[anjuta] glade: Fix the images in the palette toggles used for choosing the edit mode.



commit f88a236dd7f1f81cc2b888ac6751c9cac1f40cf2
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Mon Nov 19 20:28:11 2012 +0100

    glade: Fix the images in the palette toggles used for choosing the edit mode.
    
    Glade registers the images as stock icons so we can use gtk_image_new_from_stock() to
    create them.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688671

 plugins/glade/plugin.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/plugins/glade/plugin.c b/plugins/glade/plugin.c
index e25d4f1..eaa7dcf 100644
--- a/plugins/glade/plugin.c
+++ b/plugins/glade/plugin.c
@@ -570,12 +570,8 @@ create_selector_tool_button ()
 {
   GtkWidget *button;
   GtkWidget *image;
-  gchar *image_path;
 
-  image_path =
-      g_build_filename (glade_app_get_pixmaps_dir (), "selector.png", NULL);
-  image = gtk_image_new_from_file (image_path);
-  g_free (image_path);
+  image = gtk_image_new_from_stock ("glade-selector", GTK_ICON_SIZE_LARGE_TOOLBAR);
 
   button = gtk_toggle_button_new ();
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
@@ -596,12 +592,8 @@ create_drag_resize_tool_button ()
 {
   GtkWidget *button;
   GtkWidget *image;
-  gchar *image_path;
 
-  image_path =
-      g_build_filename (glade_app_get_pixmaps_dir (), "drag-resize.png", NULL);
-  image = gtk_image_new_from_file (image_path);
-  g_free (image_path);
+  image = gtk_image_new_from_stock ("glade-drag-resize", GTK_ICON_SIZE_LARGE_TOOLBAR);
 
   button = gtk_toggle_button_new ();
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);



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