Guideline properties dialog deficiences

Bug #484187 reported by LucaDC on 2009-11-17
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Low
Johan Engelen

Bug Description

A couple of issues related to the giodeline properties dialog:

 - if you enter a new X value and press enter, the new value is applied and the dialog closes; this is very useful and immediate but does not happen with the Y and Angle fields: you always have to grab the mouse (that you had to release to type the new value) and click Ok;

 - the Relative change option is always reset between inivocations of the dialog so I always have to recheck it every time (I never need to type in absolute coordinates); maybe having it being remembered in the document is even too much, but between different invocations of the dialog during a Inskape session would be enough;

 - when typing decimal values you have to use the correct separator, either '.' or ','; also, the wrong one is not allowed, so: why not dinamically translating the wrong one into the right one so the './canc' key in the numeric pad can always be used? Having to move the hand from the keypad to the ',' key is very annoying and some documents (usually imported PDFs) ask for the '.' also if my locale is ','.

Thanks.

su_v (suv-lp) on 2009-11-17
tags: added: guides
tags: added: ui
jazzynico (jazzynico) wrote :

Confirmed on Windows XP, inkscape trunk revision 10145.

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
Pablo Trabajos (pajarico) wrote :

Related bug: #263111 Decimal numbers - accept comma on Numeric Keyboard
https://bugs.launchpad.net/inkscape/+bug/263111

'.' is accepted in Fill&Dtroke dialog and size/position spinboxes. If you input a period from the numpad it gets converted to comma after pushing intro (as IMHO it should).

But this doesn't work with the guides dialog, I don't know why.

Johan Engelen (johanengelen) wrote :

the relative checkbox status is now remembered. good idea! (r10147)

Johan Engelen (johanengelen) wrote :

request 1 (the stuff with pressing enter) is committed in r10148

Johan Engelen (johanengelen) wrote :

3rd request also done :) r10149

Changed in inkscape:
assignee: nobody → Johan Engelen (johanengelen)
status: Confirmed → Fix Committed
jazzynico (jazzynico) on 2011-04-09
Changed in inkscape:
milestone: none → 0.49
LucaDC (dicappello) wrote :

First of all, many many thanks for working into this!
Unfortunately, I can't compile it under Windows XP, as when linking:

build\libinkscape.a(guides.o):guides.cpp:(.text+0x203a): undefined reference to `VTT for Inkscape::UI::Widget::SpinButton'
build\libinkscape.a(guides.o):guides.cpp:(.text+0x205e): undefined reference to `vtable for Inkscape::UI::Widget::SpinButton'
...
(and many other duplicates)

Looking forward to see these improvements at work.
Regards.

jazzynico (jazzynico) wrote :

@ LucaDC - I've had the same issue, but it worked after cleaning the dependencies with # btool.exe clean.

@ Johan - Do you think it's possible to make it work with the Scalar widgets so that the other dialogs (preferences, LPE, transform, etc.) can use a comma too?

LucaDC (dicappello) wrote :

@JazzyNico - you're absolutely right: I was so impatient to see this that I didn't think enough before writing.
Anyway, complete rebuild just finished and everything is wonderfully fine!
Thanks again.

jazzynico (jazzynico) wrote :

@ Johan (again!) - The dialog has a new label (Guidelinea) and I'm quite sure it is not intended.

Johan Engelen (johanengelen) wrote :

@ Johan - Do you think it's possible to make it work with the Scalar widgets so that the other dialogs (preferences, LPE, transform, etc.) can use a comma too?

Should be super easy.
Most dialogs don't explicitly set the widgets to "numeric mode". So they accept all kinds of stuff at the moment, and the comma/point issue is not a problem.

@ Johan (again!) - The dialog has a new label (Guidelinea) and I'm quite sure it is not intended.

Oops !

Johan Engelen (johanengelen) wrote :

I have converted Inkscape::UI::Widget::Scalar to use this subclassed SpinButton, and PrefSpinButton thingie too . (committed in r10159)

jazzynico (jazzynico) wrote :

Thanks Johan!

Just a minor thing: the random widget needs a gtk::button that was in the <gtkmm/spinbutton.h> include you removed from the scalar widget, and it prevents inkscape from compiling correctly. Apparently, adding #include <gtkmm/button.h> in random.h solves the issue.
Could you please commit the fix? (I probably won't have commit access before tomorrow and thus can't help today.)

su_v (suv-lp) wrote :

Build failure confirmed on OSX 10.5.8 (i386) - upgrading from r10150 to 10159.

LucaDC (dicappello) wrote :

This approach makes me wonder if we could add _very-simple_ operators evaluation in these numeric-only input fields: something like "12-34.5" or "45.3/3", being the result evaluated on the fly and numerically entered in place of the input string (no need to keep the original expression in the SVG).
I would be really happy having only one operator with two operands... at least for now ;)

Johan Engelen (johanengelen) wrote :

strange how my build worked... fixed it

Johan Engelen (johanengelen) wrote :

Luca: perhaps not super easy, but it seems doable.

ScislaC (scislac) wrote :

Johan,

Gimp already does this, so maybe it could be easier than you're thinking (in that you don't need to reinvent the wheel)... I'm sure the logic for the widgets is in one of the files here:
http://git.gnome.org/browse/gimp/tree/libgimpwidgets

Johan Engelen (johanengelen) wrote :

Thanks for that pointer ScislaC!
Indeed, http://git.gnome.org/browse/gimp/tree/libgimpwidgets/gimpsizeentry.c is the widget that does this.
Here, a link to the patch that made it work: https://bugzilla.gnome.org/review?bug=76616&attachment=130279.
It includes a huge effort in converting units, which we probably should not do.

ScislaC (scislac) wrote :

Johan: I think people just want straight mathematical operations with the numbers shown, so I wouldn't think we would need the unit conversion.

On 13-4-2011 20:53, ScislaC wrote:
> Johan: I think people just want straight mathematical operations with
> the numbers shown, so I wouldn't think we would need the unit
> conversion.

But it would be supernifty, and since it is already in the code... :P

Johan Engelen (johanengelen) wrote :

^_^

See r10162, try it out in the Transform dialog.

su_v (suv-lp) wrote :

@Johan - does r10162 address or implement the feature request bug #171282 “Calculator in input fields” <https://bugs.launchpad.net/inkscape/+bug/171282>?

su_v (suv-lp) wrote :

Don't know if important, but I get these warnings when compiling r10162 (GCC 4.2):

  CXX ui/widget/spinbutton.o
ui/widget/spinbutton.cpp: In member function ‘virtual int Inkscape::UI::Widget::SpinButton::on_input(double*)’:
ui/widget/spinbutton.cpp:37: warning: taking address of temporary
  CXX util/expression-evaluator.o
util/expression-evaluator.cpp:85: warning: non-local variable ‘Inkscape::Util::<anonymous enum> Inkscape::Util::GimpEevlTokenTypeEnum’ uses anonymous type

Johan Engelen (johanengelen) wrote :

On 14-4-2011 0:36, ~suv wrote:
> @Johan - does r10162 address or implement the feature request bug
> #171282 “Calculator in input fields”
> <https://bugs.launchpad.net/inkscape/+bug/171282>?

I think so :)

LucaDC (dicappello) wrote :

Just a huge "THANK YOU" @Johan for all the improvements this features have brought to my workflow.
It took a while to see this addressed but it was worth it, even much better than I expected!
Thanks again.

Bryce Harrington (bryce) on 2015-02-21
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers