mirror of https://github.com/GNOME/gimp.git
libgimp, plug-ins: fix a case of not showing dialog.
Fix a generic case when gimp_window_set_transient() is called on an already mapped window: the handle argument was missing. The part in bmp-export though, in fact, I am still a bit at a loss. Somehow calling gimp_window_set_transient() was making the dialog not showing up at all, yet kinda blocking the bmp plug-in (waiting for a response to the non-displayed dialog) and various features in the main GIMP GUI too. Calling gtk_widget_show() first, before setting transient was enough to make the dialog finally work as it should, but this is really not ideal. I compared to other cases in other plug-ins where the set_transient() function was called before the dialog was shown and it is working fine. I just cannot find the proper reason. So this will do for now.
This commit is contained in:
parent
3bfda4f119
commit
1b7f8533ee
|
@ -311,7 +311,7 @@ gimp_window_set_transient (GtkWindow *window)
|
|||
G_CONNECT_AFTER);
|
||||
|
||||
if (gtk_widget_get_mapped (GTK_WIDGET (window)))
|
||||
gimp_window_transient_on_mapped (GTK_WIDGET (window), NULL, NULL);
|
||||
gimp_window_transient_on_mapped (GTK_WIDGET (window), NULL, handle);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -97,6 +97,7 @@ warning_dialog (const gchar *primary,
|
|||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
"%s", secondary);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
ok = (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK);
|
||||
|
|
Loading…
Reference in New Issue