diff --git a/ChangeLog b/ChangeLog index 9e542a38..7944211f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,9 @@ * src/keyfile.c, src/msgwindow.c, src/msgwindow.h, src/ui_utils.h: Add preferences for hiding single tabs from the messages window (no GUI preferences yet, still to be implemented). + * src/callbacks.c, src/prefs.c, src/toolbar.c, src/toolbar.h: + Set the correct parent window for the toolbar editor + dialog (closes #2913334). 2009-12-20 Frank Lanitz diff --git a/src/callbacks.c b/src/callbacks.c index 0f431738..6929ed45 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -2261,7 +2261,7 @@ void on_customize_toolbar1_activate (GtkMenuItem *menuitem, gpointer user_data) { - toolbar_configure(); + toolbar_configure(GTK_WINDOW(main_widgets.window)); } @@ -2269,7 +2269,7 @@ void on_button_customize_toolbar_clicked (GtkButton *button, gpointer user_data) { - toolbar_configure(); + toolbar_configure(GTK_WINDOW(ui_widgets.prefs_dialog)); } diff --git a/src/prefs.c b/src/prefs.c index cd880bd4..433b9e06 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -1535,10 +1535,14 @@ void prefs_show_dialog(void) GtkWidget *label; guint i; gchar *encoding_string; + GdkPixbuf *pb; ui_widgets.prefs_dialog = create_prefs_dialog(); gtk_widget_set_name(ui_widgets.prefs_dialog, "GeanyPrefsDialog"); gtk_window_set_transient_for(GTK_WINDOW(ui_widgets.prefs_dialog), GTK_WINDOW(main_widgets.window)); + pb = ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO); + gtk_window_set_icon(GTK_WINDOW(ui_widgets.prefs_dialog), pb); + g_object_unref(pb); /* free our reference */ /* init the default file encoding combo box */ combo_new = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_new_encoding"); diff --git a/src/toolbar.c b/src/toolbar.c index 86dc23ab..a6d2cb70 100644 --- a/src/toolbar.c +++ b/src/toolbar.c @@ -882,7 +882,7 @@ static void tb_editor_available_items_deleted_cb(GtkTreeModel *model, GtkTreePat } -static TBEditorWidget *tb_editor_create_dialog(void) +static TBEditorWidget *tb_editor_create_dialog(GtkWindow *parent) { GtkWidget *dialog, *vbox, *hbox, *vbox_buttons, *button_add, *button_remove; GtkWidget *swin_available, *swin_used, *tree_available, *tree_used, *label; @@ -890,8 +890,11 @@ static TBEditorWidget *tb_editor_create_dialog(void) GtkTreeViewColumn *column; TBEditorWidget *tbw = g_new(TBEditorWidget, 1); + if (parent == NULL) + parent = GTK_WINDOW(main_widgets.window); + dialog = gtk_dialog_new_with_buttons(_("Customize Toolbar"), - GTK_WINDOW(main_widgets.window), + parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); @@ -1011,7 +1014,7 @@ static TBEditorWidget *tb_editor_create_dialog(void) } -void toolbar_configure(void) +void toolbar_configure(GtkWindow *parent) { gchar *markup; const gchar *name; @@ -1030,7 +1033,7 @@ void toolbar_configure(void) all_items = gtk_action_group_list_actions(group); /* create the GUI */ - tbw = tb_editor_create_dialog(); + tbw = tb_editor_create_dialog(parent); /* fill the stores */ gtk_list_store_insert_with_values(tbw->store_available, NULL, -1, diff --git a/src/toolbar.h b/src/toolbar.h index e06d5ea2..98c5b073 100644 --- a/src/toolbar.h +++ b/src/toolbar.h @@ -63,6 +63,6 @@ GtkWidget *toolbar_init(void); void toolbar_finalize(void); -void toolbar_configure(void); +void toolbar_configure(GtkWindow *parent); #endif