Fix setting the icon for some dialogs if the parent itself is also a dialog.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4731 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2010-03-07 17:28:13 +00:00
parent 80a1d3965d
commit 2ec40e1a01
2 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,9 @@
* src/prefs.c:
Correctly set the parent widget for the keybinding overwrite
confirmation dialog.
* src/dialog.c:
Fix setting the icon for some dialogs if the parent itself is also
a dialog.
2010-03-05 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>

View File

@ -578,7 +578,7 @@ static void show_msgbox_dialog(GtkWidget *dialog, GtkMessageType type, GtkWindow
break;
}
gtk_window_set_title(GTK_WINDOW(dialog), title);
if (parent == NULL)
if (parent == NULL || GTK_IS_DIALOG(parent))
{
GdkPixbuf *pb = ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO);
gtk_window_set_icon(GTK_WINDOW(dialog), pb);
@ -1390,7 +1390,7 @@ static gint show_prompt(GtkWidget *parent,
GTK_BUTTONS_NONE, "%s", question_text);
gtk_widget_set_name(dialog, "GeanyDialog");
gtk_window_set_title(GTK_WINDOW(dialog), _("Question"));
if (parent == NULL)
if (parent == NULL || GTK_IS_DIALOG(parent))
{
GdkPixbuf *pb = ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO);
gtk_window_set_icon(GTK_WINDOW(dialog), pb);