emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/gtkutil.c,v


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/src/gtkutil.c,v
Date: Tue, 06 Nov 2007 09:26:53 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Jan Djärv <jhd>        07/11/06 09:26:52

Index: gtkutil.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/gtkutil.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -b -r1.120 -r1.121
--- gtkutil.c   17 Sep 2007 08:07:19 -0000      1.120
+++ gtkutil.c   6 Nov 2007 09:26:52 -0000       1.121
@@ -3460,6 +3460,7 @@
       GtkImage *wimage = GTK_IMAGE (gtk_bin_get_child (GTK_BIN (wbutton)));
       GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (wbutton));
       GtkImageType store_type = gtk_image_get_storage_type (wimage);
+
       if (store_type == GTK_IMAGE_STOCK)
         {
           gchar *stock_id;
@@ -3489,6 +3490,25 @@
 
               wmenuimage = gtk_image_new_from_pixbuf (dest_pixbuf);
             }
+          else
+            {
+              fprintf (stderr, "internal error: GTK_IMAGE_PIXBUF failed\n");
+              abort ();
+            }
+        }
+      else if (store_type == GTK_IMAGE_ICON_NAME) 
+        {
+          const gchar *icon_name;
+          GtkIconSize icon_size;
+
+          gtk_image_get_icon_name (wimage, &icon_name, &icon_size);
+          wmenuimage = gtk_image_new_from_icon_name (icon_name,
+                                                     GTK_ICON_SIZE_MENU);
+        }
+      else
+        {
+          fprintf (stderr, "internal error: store_type is %d\n", store_type);
+          abort ();
         }
     }
   if (wmenuimage)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]