Revision: 1494
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1494&view=rev
Author:   zas_
Date:     2009-03-08 14:27:19 +0000 (Sun, 08 Mar 2009)

Log Message:
-----------
Display icons in edit contextual menu.

Modified Paths:
--------------
    trunk/src/menu.c
    trunk/src/pixbuf_util.c

Modified: trunk/src/menu.c
===================================================================
--- trunk/src/menu.c    2009-03-08 13:23:25 UTC (rev 1493)
+++ trunk/src/menu.c    2009-03-08 14:27:19 UTC (rev 1494)
@@ -21,6 +21,7 @@
 #include "editors.h"
 #include "filedata.h"
 #include "img-view.h"
+#include "pixbuf_util.h"
 #include "preferences.h"
 #include "slideshow.h"
 #include "utilops.h"
@@ -83,7 +84,13 @@
                        }
 
                if (active)
-                       menu_item_add(menu, editor->name, func, editor->key);
+                       {
+                       const gchar *stock_id = NULL;
+                       if (editor->icon && 
register_theme_icon_as_stock(editor->key, editor->icon))
+                               stock_id = editor->key;
+
+                       menu_item_add_stock(menu, editor->name, stock_id, func, 
editor->key);
+                       }
                }
        
        g_list_free(editors_list);

Modified: trunk/src/pixbuf_util.c
===================================================================
--- trunk/src/pixbuf_util.c     2009-03-08 13:23:25 UTC (rev 1493)
+++ trunk/src/pixbuf_util.c     2009-03-08 14:27:19 UTC (rev 1494)
@@ -166,6 +166,9 @@
        GError *error = NULL;
 
        icon_theme = gtk_icon_theme_get_default();
+       
+       if (gtk_icon_theme_has_icon(icon_theme, key)) return FALSE;
+
        pixbuf = gtk_icon_theme_load_icon(icon_theme,
                            icon, /* icon name */
                            64, /* size */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to