Extension dialogs shouldn't default to modal

Bug #649441 reported by Craig Marshall on 2010-09-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
John Smith

Bug Description

Currently, extension dialogs that display a Live Preview checkbox default to non-modal. This means the main inkscape window can still be interacted with. When this checkbox is ticked, the dialog becomes modal, allowing the main window to update based on each change of the dialog parameters.

Extension dialogs that don't need to display the live preview checkbox though, are defaulting to modal. To make the extension non-modal, you just have to pretend that it can use a live preview checkbox (which would be a bad workaround).

My thoughts are:

a) It is more useful (certainly no less useful) to have non-modal extension dialogs, meaning you can go back and forth between the work and the dialog without opening and closing anything.

b) It is no risker to have these dialogs non-modal without the live preview checkbox than it is with the live preview checkbox. It makes no difference that I can detect. (Please correct me if I'm wrong).

I have written and attached a patch that implements this, please test it and give me feedback!


Craig Marshall (craig9) wrote :
Changed in inkscape:
assignee: nobody → Craig Marshall (craig9)
status: New → In Progress
description: updated
description: updated
~suv (suv-lp) on 2010-09-28
tags: added: extensions-plugins ui
removed: extensions
~suv (suv-lp) wrote :

First notes (testing the patch with Inkscape 0.48+devel r9799 on OS X 10.5.8):

1) Do these concerns still apply (e.g. if an extension takes a long time to execute)?

2) Crash when toggling 'Live Preview' - after having had 'grid' properties pane opened once - still happens, backtrace slightly changed with your patch in. Not reproduced with modal dialogs that don't have a 'Live Preview' option, but needs checking imho (extensions, grid settings, undo history).

3) NEW: repeatable crash when importing bitmap while non-modal extension dialog is open (e.g. 'Replace Fonts…' or 'Close Curves…' (extension repository)). Does not happen in 0.48 when having an extension dialog in non-modal mode open ('Live Preview' toggled off, e.g. with 'Render > Gear…').

~suv (suv-lp) wrote :

Crash report from previously listed issue 3) (crash when importing bitmap while non-modal extension dialog is open)

Craig Marshall (craig9) wrote :


Thanks for testing that patch out. You're good at finding bugs!

1) This shouldn't be an issue, as far as I can tell (I'm open to correction from someone that may know better!). The dialogs with live preview are non-modal anyway, and these extensions don't have to be written any differently, they just have to enable the checkbox. There is a small modal dialog that pops up when the extension is actually running, which prevents things getting out of sync. Changes made since the extension starting, finishing and replacing the document are impossible. I guess this has been added since that message no the mailing list, but I haven't checked that out.

2) This is a transaction bug unaffected by this patch, which existed before my patch and will not be fixed by this patch of course. You may find that the answer to point 3 (following), will reinstate the original function call order, making the backtrace go back to as it was. I may look at it eventually, but it will involve me learning a bit more about the ins and outs of the undo system.

3) I've updated the patch and the new crash (item 3 on your list) doesn't happen any more for me (Win7, trunk rev9800)

~suv (suv-lp) wrote :

The first patch caused crashes in input and output extensions which use a dialog for their options - no longer happens with the second version (Inkscape 0.48+devel r9799 + live_preview.v2.patch, OS X 10.5.8).

John Smith (john-smithi) wrote :

Second patch works correctly on Ubuntu 12.04 and Windows 7.
Committed to trunk as r11660.

Thanks for the patch Craig !

Changed in inkscape:
status: In Progress → Fix Committed
assignee: Craig Marshall (craig9) → John Smith (john-smithi)
~suv (suv-lp) on 2012-09-10
Changed in inkscape:
milestone: none → 0.49
Ryan Lerch (ryanlerch) wrote :

Currently, (as of r13276) the behaviour is this:

Unless "Live Preview" is checked, the dialog is non-modal. But ifLive preview is turned on, the dialog becomes modal.

The issue with this is because on newer GTK versions, the modal dialog greys out the rest of the screen, and centers the dialog in the middle of the screen. Most times this covers the output of the live preview, and essentially makes it useless. (screencast attached)

ScislaC (scislac) wrote :

Ryan: Is that a GTK thing or a Window Manager thing?

Ryan Lerch (ryanlerch) wrote :

ScislaC: yeah, i think it may be a GNOME3 thing.

This behaviour only started during GNOME3. Not sure if it is because it's pulling in some GTK3 behaviour stuff or it is specifically GNOME3.

There is a way for me to turn off this behaviour system-wide: http://gnomeshell.wordpress.com/2011/09/10/the-modal-windows-behavior/

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.

Other bug subscribers