[metacity] Replace deprecated symbols in theme-viewer.c



commit eb06413188496fac33bd3a96caae527877d2cbb5
Author: Luis Torres <lgtorres42 gmail com>
Date:   Fri Jun 19 01:00:02 2009 +0200

    Replace deprecated symbols in theme-viewer.c
    
    -Replaced calls to gtk_toolbar_insert_stock with gtk_toolbar_insert
    -Created appropriated GtkToolButtons

 src/ui/theme-viewer.c |   41 +++++++++++++++++++++--------------------
 1 files changed, 21 insertions(+), 20 deletions(-)
---
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c
index f3dd310..b1fd496 100644
--- a/src/ui/theme-viewer.c
+++ b/src/ui/theme-viewer.c
@@ -131,26 +131,27 @@ normal_contents (void)
    */
   toolbar = gtk_toolbar_new ();
 
-  gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
-                            GTK_STOCK_NEW,
-                            _("Open another one of these windows"),
-                            NULL,
-                            NULL, NULL,
-                            -1);  /* -1 means "append" */
-  
-  gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
-                            GTK_STOCK_OPEN,
-                            _("This is a demo button with an 'open' icon"),
-                            NULL,
-                            NULL, NULL,
-                            -1);  /* -1 means "append" */
-
-  gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
-                            GTK_STOCK_QUIT,
-                            _("This is a demo button with a 'quit' icon"),
-                            NULL,
-                            NULL, NULL,
-                            -1);  /* -1 means "append" */
+  GtkToolItem *newButton = gtk_tool_button_new_from_stock(GTK_STOCK_NEW);
+  gtk_tool_item_set_tooltip_text(newButton,
+				 "Open another one of these windows");
+  gtk_toolbar_insert(GTK_TOOLBAR(toolbar),
+		     newButton,
+		     -1); /*-1 means append to end of toolbar*/
+
+  GtkToolItem *openButton = gtk_tool_button_new_from_stock(GTK_STOCK_OPEN);
+  gtk_tool_item_set_tooltip_text(openButton,
+				 "This is a demo button with an \'open\' icon");
+  gtk_toolbar_insert(GTK_TOOLBAR(toolbar),
+		     openButton,
+		     -1); /*-1 means append to end of toolbar*/
+
+  GtkToolItem *quitButton = gtk_tool_button_new_from_stock(GTK_STOCK_QUIT);
+  gtk_tool_item_set_tooltip_text(quitButton,
+				 "This is a demo button with a \'quit\' icon");
+  gtk_toolbar_insert(GTK_TOOLBAR(toolbar),
+		     quitButton,
+		     -1); /*-1 means append to end of toolbar*/
+
 
   handlebox = gtk_handle_box_new ();
 



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