Skip to content

Commit fc1194a

Browse files
committed
extensions: Show symbolic icons properly, hide the icon if it's not
a symbolic name.
1 parent 43e464a commit fc1194a

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

src/nemo-view.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5608,7 +5608,6 @@ add_extension_action_for_files (NemoView *view,
56085608
gboolean sensitive, priority;
56095609
gboolean separator;
56105610
GtkAction *action;
5611-
GdkPixbuf *pixbuf;
56125611
GtkWidget *widget_a, *widget_b;
56135612
ExtensionActionCallbackData *data;
56145613

@@ -5628,11 +5627,15 @@ add_extension_action_for_files (NemoView *view,
56285627
tip,
56295628
NULL);
56305629
if (icon != NULL) {
5631-
pixbuf = nemo_ui_get_menu_icon (icon, GTK_WIDGET (view));
5632-
if (pixbuf != NULL) {
5633-
gtk_action_set_gicon (action, G_ICON (pixbuf));
5634-
g_object_unref (pixbuf);
5630+
GIcon *gicon;
5631+
5632+
if (g_str_has_suffix (icon, "-symbolic")) {
5633+
gicon = g_themed_icon_new (icon);
5634+
} else {
5635+
gicon = NULL;
56355636
}
5637+
5638+
gtk_action_set_gicon (action, gicon);
56365639
}
56375640
} else if (separator) {
56385641
action = nemo_separator_action_new (name);

0 commit comments

Comments
 (0)