Revision: 4623 http://geany.svn.sourceforge.net/geany/?rev=4623&view=rev Author: eht16 Date: 2010-01-31 21:51:57 +0000 (Sun, 31 Jan 2010)
Log Message: ----------- Backport from trunk: Set the correct parent window for the toolbar editor dialog (closes #2913334).
Modified Paths: -------------- branches/geany-0.18.1/ChangeLog branches/geany-0.18.1/src/callbacks.c branches/geany-0.18.1/src/prefs.c branches/geany-0.18.1/src/toolbar.c branches/geany-0.18.1/src/toolbar.h
Modified: branches/geany-0.18.1/ChangeLog =================================================================== --- branches/geany-0.18.1/ChangeLog 2010-01-31 21:51:43 UTC (rev 4622) +++ branches/geany-0.18.1/ChangeLog 2010-01-31 21:51:57 UTC (rev 4623) @@ -15,6 +15,9 @@ * src/editor.c: Fix LaTeX environment auto completion with CR/LF line endings. Add some sanity checks. + * 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 <frank(at)frank(dot)uvena(dot)de>
Modified: branches/geany-0.18.1/src/callbacks.c =================================================================== --- branches/geany-0.18.1/src/callbacks.c 2010-01-31 21:51:43 UTC (rev 4622) +++ branches/geany-0.18.1/src/callbacks.c 2010-01-31 21:51:57 UTC (rev 4623) @@ -2251,7 +2251,7 @@ on_customize_toolbar1_activate (GtkMenuItem *menuitem, gpointer user_data) { - toolbar_configure(); + toolbar_configure(GTK_WINDOW(main_widgets.window)); }
@@ -2259,6 +2259,6 @@ on_button_customize_toolbar_clicked (GtkButton *button, gpointer user_data) { - toolbar_configure(); + toolbar_configure(GTK_WINDOW(ui_widgets.prefs_dialog)); }
Modified: branches/geany-0.18.1/src/prefs.c =================================================================== --- branches/geany-0.18.1/src/prefs.c 2010-01-31 21:51:43 UTC (rev 4622) +++ branches/geany-0.18.1/src/prefs.c 2010-01-31 21:51:57 UTC (rev 4623) @@ -1482,10 +1482,14 @@ 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");
Modified: branches/geany-0.18.1/src/toolbar.c =================================================================== --- branches/geany-0.18.1/src/toolbar.c 2010-01-31 21:51:43 UTC (rev 4622) +++ branches/geany-0.18.1/src/toolbar.c 2010-01-31 21:51:57 UTC (rev 4623) @@ -870,7 +870,7 @@ }
-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; @@ -878,8 +878,11 @@ 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)); @@ -999,7 +1002,7 @@ }
-void toolbar_configure(void) +void toolbar_configure(GtkWindow *parent) { gchar *markup; const gchar *name; @@ -1018,7 +1021,7 @@ 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,
Modified: branches/geany-0.18.1/src/toolbar.h =================================================================== --- branches/geany-0.18.1/src/toolbar.h 2010-01-31 21:51:43 UTC (rev 4622) +++ branches/geany-0.18.1/src/toolbar.h 2010-01-31 21:51:57 UTC (rev 4623) @@ -57,6 +57,6 @@
void toolbar_finalize(void);
-void toolbar_configure(void); +void toolbar_configure(GtkWindow *parent);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.