SF.net SVN: geany:[4503] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Dec 20 20:49:28 UTC 2009


Revision: 4503
          http://geany.svn.sourceforge.net/geany/?rev=4503&view=rev
Author:   eht16
Date:     2009-12-20 20:49:28 +0000 (Sun, 20 Dec 2009)

Log Message:
-----------
Set the correct parent window for the toolbar editor dialog (closes #2913334).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/callbacks.c
    trunk/src/prefs.c
    trunk/src/toolbar.c
    trunk/src/toolbar.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-12-20 20:46:29 UTC (rev 4502)
+++ trunk/ChangeLog	2009-12-20 20:49:28 UTC (rev 4503)
@@ -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  <frank(at)frank(dot)uvena(dot)de>

Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c	2009-12-20 20:46:29 UTC (rev 4502)
+++ trunk/src/callbacks.c	2009-12-20 20:49:28 UTC (rev 4503)
@@ -2261,7 +2261,7 @@
 on_customize_toolbar1_activate         (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
-	toolbar_configure();
+	toolbar_configure(GTK_WINDOW(main_widgets.window));
 }
 
 
@@ -2269,7 +2269,7 @@
 on_button_customize_toolbar_clicked    (GtkButton       *button,
                                         gpointer         user_data)
 {
-	toolbar_configure();
+	toolbar_configure(GTK_WINDOW(ui_widgets.prefs_dialog));
 }
 
 

Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c	2009-12-20 20:46:29 UTC (rev 4502)
+++ trunk/src/prefs.c	2009-12-20 20:49:28 UTC (rev 4503)
@@ -1535,10 +1535,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: trunk/src/toolbar.c
===================================================================
--- trunk/src/toolbar.c	2009-12-20 20:46:29 UTC (rev 4502)
+++ trunk/src/toolbar.c	2009-12-20 20:49:28 UTC (rev 4503)
@@ -882,7 +882,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;
@@ -890,8 +890,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));
@@ -1011,7 +1014,7 @@
 }
 
 
-void toolbar_configure(void)
+void toolbar_configure(GtkWindow *parent)
 {
 	gchar *markup;
 	const gchar *name;
@@ -1030,7 +1033,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: trunk/src/toolbar.h
===================================================================
--- trunk/src/toolbar.h	2009-12-20 20:46:29 UTC (rev 4502)
+++ trunk/src/toolbar.h	2009-12-20 20:49:28 UTC (rev 4503)
@@ -63,6 +63,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.



More information about the Commits mailing list