Skip to content

Commit

Permalink
menus: Convert most icons to symbolic versions (#1798)
Browse files Browse the repository at this point in the history
Some are left at full color where it seems to make more sense. Places, trash,
cinnamon desktop specific actions. They can always be revisted as needed. It's
also possible some are missed as these are spread all over nemo's code base.
  • Loading branch information
JosephMcc authored and clefebvre committed Mar 9, 2018
1 parent af08b05 commit 86927cb
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 51 deletions.
2 changes: 0 additions & 2 deletions files/usr/share/nemo/actions/mount-archive.nemo_action
Expand Up @@ -10,8 +10,6 @@ Selection=s

Mimetypes=application/x-7z-compressed;application/x-cd-image;application/x-cpio;application/x-rar;application/x-rar-compressed;application/x-7z-compressed-tar;application/x-bzip-compressed-tar;application/x-compressed-tar;application/x-tar;application/zip;

Stock-Id=gtk-directory

Dependencies=/usr/lib/gvfs/gvfsd-archive;

Selection=s
Expand Down
2 changes: 1 addition & 1 deletion files/usr/share/nemo/actions/new-launcher.nemo_action
Expand Up @@ -8,7 +8,7 @@ Exec=cinnamon-desktop-editor -mnemo-launcher -d"%P"

Selection=None

Stock-Id=gtk-add
Icon-Name=list-add-symbolic

Extensions=any;

Expand Down
2 changes: 1 addition & 1 deletion files/usr/share/nemo/actions/send-by-mail.nemo_action
Expand Up @@ -176,7 +176,7 @@ Comment[zh_HK]=以電子郵件附件傳送
Comment[zh_TW]=以 email 附加檔案傳送
Quote=double
Exec=<send-by-mail.py %F>
Icon-Name=mail-attachment
Icon-Name=mail-attachment-symbolic
Selection=NotNone
Extensions=nodirs;
Dependencies=xdg-email
Expand Down
2 changes: 1 addition & 1 deletion libnemo-private/nemo-icon-names.h
Expand Up @@ -13,7 +13,7 @@
#define NEMO_ICON_SEARCH "system-search"
#define NEMO_ICON_TRASH "user-trash"
#define NEMO_ICON_TRASH_FULL "user-trash-full"
#define NEMO_ICON_DELETE "edit-delete"
#define NEMO_ICON_DELETE "edit-delete-symbolic"

#define NEMO_ICON_FOLDER_DESKTOP "user-desktop"
#define NEMO_ICON_FOLDER_DOCUMENTS "folder-documents"
Expand Down
4 changes: 2 additions & 2 deletions src/nemo-places-sidebar.c
Expand Up @@ -3372,7 +3372,7 @@ bookmarks_build_popup_menu (NemoPlacesSidebar *sidebar)

item = gtk_image_menu_item_new_with_mnemonic (_("_Open"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item),
gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU));
gtk_image_new_from_icon_name ("folder-open-symbolic", GTK_ICON_SIZE_MENU));
g_signal_connect (item, "activate",
G_CALLBACK (open_shortcut_cb), sidebar);
gtk_widget_show (item);
Expand Down Expand Up @@ -3408,7 +3408,7 @@ bookmarks_build_popup_menu (NemoPlacesSidebar *sidebar)
item = gtk_image_menu_item_new_with_label (_("Remove"));
sidebar->popup_menu_remove_item = item;
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item),
gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU));
gtk_image_new_from_icon_name ("list-remove-symbolic", GTK_ICON_SIZE_MENU));
g_signal_connect (item, "activate",
G_CALLBACK (remove_shortcut_cb), sidebar);
gtk_widget_show (item);
Expand Down
21 changes: 14 additions & 7 deletions src/nemo-tree-sidebar.c
Expand Up @@ -1244,8 +1244,7 @@ create_popup_menu (FMTreeView *view)


/* add the "open" menu item */
menu_image = gtk_image_new_from_stock (GTK_STOCK_OPEN,
GTK_ICON_SIZE_MENU);
menu_image = gtk_image_new_from_icon_name ("folder-open-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (menu_image);
menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Open"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),
Expand Down Expand Up @@ -1299,7 +1298,10 @@ create_popup_menu (FMTreeView *view)
eel_gtk_menu_append_separator (GTK_MENU (popup));

/* add the "cut folder" menu item */
menu_item = gtk_image_menu_item_new_from_stock (GTK_STOCK_CUT, NULL);
menu_image = gtk_image_new_from_icon_name ("edit-cut-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (menu_image);
menu_item = gtk_image_menu_item_new_with_mnemonic (_("Cu_t"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), menu_image);
g_signal_connect (menu_item, "activate",
G_CALLBACK (fm_tree_view_cut_cb),
view);
Expand All @@ -1308,7 +1310,10 @@ create_popup_menu (FMTreeView *view)
view->details->popup_cut = menu_item;

/* add the "copy folder" menu item */
menu_item = gtk_image_menu_item_new_from_stock (GTK_STOCK_COPY, NULL);
menu_image = gtk_image_new_from_icon_name ("edit-copy-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (menu_image);
menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Copy"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), menu_image);
g_signal_connect (menu_item, "activate",
G_CALLBACK (fm_tree_view_copy_cb),
view);
Expand All @@ -1317,8 +1322,7 @@ create_popup_menu (FMTreeView *view)
view->details->popup_copy = menu_item;

/* add the "paste files into folder" menu item */
menu_image = gtk_image_new_from_stock (GTK_STOCK_PASTE,
GTK_ICON_SIZE_MENU);
menu_image = gtk_image_new_from_icon_name ("edit-paste-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (menu_image);
menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Paste Into Folder"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),
Expand Down Expand Up @@ -1390,7 +1394,10 @@ create_popup_menu (FMTreeView *view)
GTK_WIDGET (eel_gtk_menu_append_separator (GTK_MENU (popup)));

/* add the "properties" menu item */
menu_item = gtk_image_menu_item_new_from_stock (GTK_STOCK_PROPERTIES, NULL);
menu_image = gtk_image_new_from_icon_name ("document-properties-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (menu_image);
menu_item = gtk_image_menu_item_new_with_mnemonic (_("P_roperties"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), menu_image);
g_signal_connect (menu_item, "activate",
G_CALLBACK (fm_tree_view_properties_cb),
view);
Expand Down
42 changes: 21 additions & 21 deletions src/nemo-view.c
Expand Up @@ -8169,18 +8169,18 @@ nemo_view_init_show_hidden_files (NemoView *view)
}

static const GtkActionEntry directory_view_entries[] = {
/* name, stock id, label */ { "New Documents", "document-new", N_("Create New _Document") },
/* name, stock id, label */ { "New Documents", "document-new-symbolic", N_("Create New _Document") },
/* name, stock id, label */ { "Open With", NULL, N_("Open Wit_h"),
NULL, N_("Choose a program with which to open the selected item") },
/* name, stock id */ { "Properties", GTK_STOCK_PROPERTIES,
/* name, stock id */ { "Properties", "document-properties-symbolic",
/* label, accelerator */ N_("_Properties"), "<alt>Return",
/* tooltip */ N_("View or modify the properties of each selected item"),
G_CALLBACK (action_properties_callback) },
/* name, stock id */ { "PropertiesAccel", NULL,
/* label, accelerator */ "PropertiesAccel", "<control>I",
/* tooltip */ NULL,
G_CALLBACK (action_properties_callback) },
/* name, stock id */ { "New Folder", "folder-new",
/* name, stock id */ { "New Folder", "folder-new-symbolic",
/* label, accelerator */ N_("Create New _Folder"), "<control><shift>N",
/* tooltip */ N_("Create a new empty folder inside this folder"),
G_CALLBACK (action_new_folder_callback) },
Expand All @@ -8206,20 +8206,20 @@ static const GtkActionEntry directory_view_entries[] = {
/* label, accelerator */ N_("Open in New _Tab"), "<control><shift>o",
/* tooltip */ N_("Open each selected item in a new tab"),
G_CALLBACK (action_open_new_tab_callback) },
/* name, stock id */ { NEMO_ACTION_OPEN_IN_TERMINAL, "utilities-terminal",
/* name, stock id */ { NEMO_ACTION_OPEN_IN_TERMINAL, "utilities-terminal-symbolic",
/* label, accelerator */ N_("Open in Terminal"), "",
/* tooltip */ N_("Open terminal in the selected folder"),
G_CALLBACK (action_open_in_terminal_callback) },
/* name, stock id */ { NEMO_ACTION_OPEN_AS_ROOT, GTK_STOCK_DIALOG_AUTHENTICATION,
/* name, stock id */ { NEMO_ACTION_OPEN_AS_ROOT, "dialog-password-symbolic",
/* label, accelerator */ N_("Open as Root"), "",
/* tooltip */ N_("Open the folder with administration privileges"),
G_CALLBACK (action_open_as_root_callback) },

/* name, stock id */ { NEMO_ACTION_FOLLOW_SYMLINK, GTK_STOCK_JUMP_TO,
/* name, stock id */ { NEMO_ACTION_FOLLOW_SYMLINK, "go-jump-symbolic",
/* label, accelerator */ N_("Follow link to original file"), "",
/* tooltip */ N_("Navigate to the original file that this symbolic link points to"),
G_CALLBACK (action_follow_symlink_callback) },
/* name, stock id */ { NEMO_ACTION_OPEN_CONTAINING_FOLDER, GTK_STOCK_JUMP_TO,
/* name, stock id */ { NEMO_ACTION_OPEN_CONTAINING_FOLDER, "go-jump-symbolic",
/* label, accelerator */ N_("Open containing folder"), "",
/* tooltip */ N_("Navigate to the folder that the selected item is stored in"),
G_CALLBACK (action_open_containing_folder_callback) },
Expand All @@ -8235,21 +8235,21 @@ static const GtkActionEntry directory_view_entries[] = {
/* label, accelerator */ N_("E_mpty Trash"), NULL,
/* tooltip */ N_("Delete all items in the Trash"),
G_CALLBACK (action_empty_trash_callback) },
/* name, stock id */ { "Cut", GTK_STOCK_CUT,
/* label, accelerator */ NULL, NULL,
/* name, stock id */ { "Cut", "edit-cut-symbolic",
/* label, accelerator */ N_("Cut"), "<control>X",
/* tooltip */ N_("Prepare the selected files to be moved with a Paste command"),
G_CALLBACK (action_cut_files_callback) },
/* name, stock id */ { "Copy", GTK_STOCK_COPY,
/* label, accelerator */ NULL, NULL,
/* name, stock id */ { "Copy", "edit-copy-symbolic",
/* label, accelerator */ N_("Copy"), "<control>C",
/* tooltip */ N_("Prepare the selected files to be copied with a Paste command"),
G_CALLBACK (action_copy_files_callback) },
/* name, stock id */ { "Paste", GTK_STOCK_PASTE,
/* label, accelerator */ NULL, NULL,
/* name, stock id */ { "Paste", "edit-paste-symbolic",
/* label, accelerator */ N_("Paste"), "<control>V",
/* tooltip */ N_("Move or copy files previously selected by a Cut or Copy command"),
G_CALLBACK (action_paste_files_callback) },
/* We make accelerator "" instead of null here to not inherit the stock
accelerator for paste */
/* name, stock id */ { "Paste Files Into", GTK_STOCK_PASTE,
/* name, stock id */ { "Paste Files Into", "edit-paste-symbolic",
/* label, accelerator */ N_("_Paste Into Folder"), "",
/* tooltip */ N_("Move or copy files previously selected by a Cut or Copy command into the selected folder"),
G_CALLBACK (action_paste_files_into_callback) },
Expand Down Expand Up @@ -8295,11 +8295,11 @@ static const GtkActionEntry directory_view_entries[] = {
/* label, accelerator */ N_("_Restore"), NULL,
NULL,
G_CALLBACK (action_restore_from_trash_callback) },
/* name, stock id */ { "Undo", GTK_STOCK_UNDO,
/* name, stock id */ { "Undo", "edit-undo-symbolic",
/* label, accelerator */ N_("_Undo"), "<control>Z",
/* tooltip */ N_("Undo the last action"),
G_CALLBACK (action_undo_callback) },
/* name, stock id */ { "Redo", GTK_STOCK_REDO,
/* name, stock id */ { "Redo", "edit-redo-symbolic",
/* label, accelerator */ N_("_Redo"), "<control>Y",
/* tooltip */ N_("Redo the last undone action"),
G_CALLBACK (action_redo_callback) },
Expand Down Expand Up @@ -8388,15 +8388,15 @@ static const GtkActionEntry directory_view_entries[] = {
/* tooltip */ N_("Open this folder in a new tab"),
G_CALLBACK (action_location_open_in_new_tab_callback) },

/* name, stock id */ { NEMO_ACTION_LOCATION_CUT, GTK_STOCK_CUT,
/* name, stock id */ { NEMO_ACTION_LOCATION_CUT, "edit-cut-symbolic",
/* label, accelerator */ NULL, "",
/* tooltip */ N_("Prepare this folder to be moved with a Paste command"),
G_CALLBACK (action_location_cut_callback) },
/* name, stock id */ { NEMO_ACTION_LOCATION_COPY, GTK_STOCK_COPY,
/* name, stock id */ { NEMO_ACTION_LOCATION_COPY, "edit-copy-symbolic",
/* label, accelerator */ NULL, "",
/* tooltip */ N_("Prepare this folder to be copied with a Paste command"),
G_CALLBACK (action_location_copy_callback) },
/* name, stock id */ { NEMO_ACTION_LOCATION_PASTE_FILES_INTO, GTK_STOCK_PASTE,
/* name, stock id */ { NEMO_ACTION_LOCATION_PASTE_FILES_INTO, "edit-paste-symbolic",
/* label, accelerator */ N_("_Paste Into Folder"), "",
/* tooltip */ N_("Move or copy files previously selected by a Cut or Copy command into this folder"),
G_CALLBACK (action_location_paste_files_into_callback) },
Expand Down Expand Up @@ -8438,7 +8438,7 @@ static const GtkActionEntry directory_view_entries[] = {
/* tooltip */ N_("Detect media in the selected drive"),
G_CALLBACK (action_location_detect_media_callback) },

/* name, stock id */ { "LocationProperties", GTK_STOCK_PROPERTIES,
/* name, stock id */ { "LocationProperties", "document-properties-symbolic",
/* label, accelerator */ N_("_Properties"), NULL,
/* tooltip */ N_("View or modify the properties of this folder"),
G_CALLBACK (action_location_properties_callback) },
Expand Down Expand Up @@ -9694,7 +9694,7 @@ real_update_menus (NemoView *view)
}

if (app_icon == NULL) {
app_icon = g_themed_icon_new (GTK_STOCK_OPEN);
app_icon = g_themed_icon_new ("folder-open-symbolic");
}

action = gtk_action_group_get_action (view->details->dir_action_group,
Expand Down

0 comments on commit 86927cb

Please sign in to comment.