[gedit] Code cleanup when creating a button



commit 0abf06dc82140ed8b5a2a5b04a0cc4d12d7c70ee
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Mar 14 11:35:22 2010 +0100

    Code cleanup when creating a button
    
    Patch by Garrett Regier

 gedit/gedit-io-error-message-area.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gedit/gedit-io-error-message-area.c b/gedit/gedit-io-error-message-area.c
index 5869019..3b870f2 100644
--- a/gedit/gedit-io-error-message-area.c
+++ b/gedit/gedit-io-error-message-area.c
@@ -106,13 +106,11 @@ info_bar_add_stock_button_with_text (GtkInfoBar  *infobar,
 				     gint         response_id)
 {
 	GtkWidget *button;
-	
-	button = gedit_gtk_button_new_with_stock_icon (text, stock_id);
-	gtk_widget_show (button);
+	GtkWidget *image;
 
-	gtk_info_bar_add_action_widget (infobar,
-					button,
-					response_id);
+	button = gtk_info_bar_add_button (infobar, text, response_id);
+	image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
+	gtk_button_set_image (GTK_BUTTON (button), image);
 }
 #endif
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]