~ubuntu-branches/ubuntu/quantal/cairo-dock-plug-ins/quantal-201208191523

« back to all changes in this revision

Viewing changes to GMenu/src/applet-recent.c

  • Committer: Kees Cook
  • Date: 2011-08-11 23:17:39 UTC
  • mfrom: (20.1.1 cairo-dock-plug-ins)
  • Revision ID: kees@outflux.net-20110811231739-cteedan51tmdg77v
Tags: 2.4.0~0beta2-0ubuntu1
releasing version 2.4.0~0beta2-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
                gtk_menu_shell_append (GTK_MENU_SHELL (top_menu), pSeparator);
55
55
                
56
56
                GtkWidget *pMenuItem = gtk_image_menu_item_new_with_label (D_("Recent Documents"));
57
 
                const gchar *cIconPath = MY_APPLET_SHARE_DATA_DIR"/icon-recent.png";
 
57
 
 
58
                const gchar *cIconPath = cairo_dock_search_icon_s_path ("document-open-recent");
 
59
                if (cIconPath == NULL)
 
60
                        cIconPath = MY_APPLET_SHARE_DATA_DIR"/icon-recent.png";
 
61
 
58
62
                GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file_at_size (cIconPath, 24, 24, NULL);
59
63
                GtkWidget *image = gtk_image_new_from_pixbuf (pixbuf);
60
64
                g_object_unref (pixbuf);
 
65
#if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16)
 
66
                gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (pMenuItem), TRUE);
 
67
#endif
61
68
                gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (pMenuItem), image);
62
69
                gtk_menu_shell_append (GTK_MENU_SHELL (top_menu), pMenuItem);
63
70
                gtk_widget_show_all (pMenuItem);