GNOME Bugzilla – Bug 80683
"Add Emblem" dialog is modal
Last modified: 2004-12-22 21:47:04 UTC
This freezes up Nautilus, and I'm not able do drag an image to the "select image" button. Drag'n'drop is used with similar controls other places in Gnome. If the dialog is mage modeless, there might still be some problems with drag'n'drop because of bug 80682.
Eck. Modal==bad...
I'll take a look at this.
Created attachment 8794 [details] [review] Made dialog not modal and fixed a few other problems
It was using one 'dialog' pointer for all 3 of the dialogs for adding patterns, colors and emblems. I changed it to use 3 pointers instead, so they don't have to be modal. It was using 'property_browser->details->category' in some of the callbacks, which meant it didn't work if the user had switch to one of the other patterns/colors/emblems pages. I hard-coded "patterns" and "emblems" instead.
+ if (property_browser->details->patterns_dialog) { + gtk_widget_show(property_browser->details->patterns_dialog); + if (property_browser->details->patterns_dialog->window) { + gdk_window_raise(property_browser->details->patterns_dialog->window); } missing a space before parenthesis, and it should be using gtk_window_present() instead of show + raise. Same goes for all three dialogs. I'm somewhat worried by the fact that the weak pointers are never removed, but it seems like it will not cause trouble (just ends up NULLing some pointers twice). With those changes, please commit.
The missing space, show and raise things were old code, of course. But I've fixed those and applied. Yes, I didn't think the weak pointers mattered, as they just NULLed out pointers we were going to NULL anyway.