SF.net SVN: geany: [1070] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Fri Dec 8 16:21:52 UTC 2006


Revision: 1070
          http://svn.sourceforge.net/geany/?rev=1070&view=rev
Author:   ntrel
Date:     2006-12-08 08:21:52 -0800 (Fri, 08 Dec 2006)

Log Message:
-----------
Use ui_button_new_with_image() in dialogs_show_unsaved_file().

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/dialogs.c
    trunk/src/ui_utils.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-12-08 16:06:07 UTC (rev 1069)
+++ trunk/ChangeLog	2006-12-08 16:21:52 UTC (rev 1070)
@@ -12,6 +12,8 @@
    on_compiler_treeview_copy_activate() to msgwindow.c.
    Create the Recent files submenu item manually because Glade 2.10
    removes empty menus.
+ * src/dialogs.c, src/ui_utils.c:
+   Use ui_button_new_with_image() in dialogs_show_unsaved_file().
 
 
 2006-12-08  Enrico Troeger  <enrico.troeger at uvena.de>

Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c	2006-12-08 16:06:07 UTC (rev 1069)
+++ trunk/src/dialogs.c	2006-12-08 16:21:52 UTC (rev 1070)
@@ -333,7 +333,7 @@
 gboolean dialogs_show_unsaved_file(gint idx)
 {
 #ifndef G_OS_WIN32
-	GtkWidget *dialog, *button, *label, *image, *hbox, *align;
+	GtkWidget *dialog, *button;
 #endif
 	gchar *msg, *short_fn = NULL;
 	gint ret;
@@ -356,18 +356,7 @@
 		"%s", _("Do you want to save it before closing?"));
 	gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
 
-	button = gtk_button_new();
-	label = gtk_label_new_with_mnemonic(_("_Don't save"));
-	image = gtk_image_new_from_stock(GTK_STOCK_CLEAR, GTK_ICON_SIZE_BUTTON);
-	hbox = gtk_hbox_new(FALSE, 2);
-
-	align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0);
-	gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
-	gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 0);
-
-	gtk_container_add(GTK_CONTAINER(button), align);
-	gtk_container_add(GTK_CONTAINER(align), hbox);
-	gtk_widget_show_all(align);
+	button = ui_button_new_with_image(GTK_STOCK_CLEAR, _("_Don't save"));
 	gtk_dialog_add_action_widget(GTK_DIALOG(dialog), button, GTK_RESPONSE_NO);
 	gtk_widget_show(button);
 

Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c	2006-12-08 16:06:07 UTC (rev 1069)
+++ trunk/src/ui_utils.c	2006-12-08 16:21:52 UTC (rev 1070)
@@ -1096,6 +1096,7 @@
 	align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0);
 	gtk_container_add(GTK_CONTAINER(align), hbox);
 	gtk_container_add(GTK_CONTAINER(button), align);
+	gtk_widget_show_all(align);
 	return button;
 }
 


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