Skip to content

Commit

Permalink
Use XDG standard icon names (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
rocka authored Jul 27, 2024
1 parent 5f6aef0 commit a42ef19
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
8 changes: 4 additions & 4 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ source=(
"gtk-query-immodules-3.0.hook::https://gitlab.archlinux.org/archlinux/packaging/packages/gtk3/-/raw/$__arch_pkg_commit/gtk-query-immodules-3.0.hook"
)
sha256sums=('ecbf69e66a073cbcf23454ae1ab366beedae6e96582975ae55964b0cc7bab685'
'6de32e1bee6bf4307aaec072fc8431b044e73299720a490298b8c1b7c502e039'
'5723d1d2c0e69ce2e7f36973560a2297f6288e1fdfa4f6946104347080c7fc8c'
'9785368d56b851e52de00eec852fc56f636dbc66d53c74d9b102e7c060f69533'
'760bd3d65b3c5c0be19311d3b9d2be1f33c3bec198bc470de5afe23f5d488b8f'
'736821182ac014617006e9d00fafa807a19611f3a9032133dee91b4656b7980a'
'00927690718c65f6b3c025e2e919028f41cd522c573964dd7fdc31b3022b983f'
'7573f278af2cf64e365f253f74e7a7e6d3459c7f93e5cb3850877313f2d0f751'
'db82bc4647eda7cc102590d5cfffd8524cf126a704358096e0e66f5c068fe46f'
'24217b43a7ca5bd46ff205b8f2a7c5a5192cafc36f5093255ed9053e5496afed'
'940638221f69f89e758044c37d40e2c39a14eb479afe6046c0e7e78c061e8ca2'
Expand All @@ -149,8 +149,8 @@ sha256sums=('ecbf69e66a073cbcf23454ae1ab366beedae6e96582975ae55964b0cc7bab685'
'9761a289cf93558ec67bb498b765ccb757027b10071da938ff14fca695a0103d'
'b92a82568a0f5c1c897561efafb55deb2331450d53377ab230def71012d8ccfc'
'bf0e188ba6cfb24b506e4eab7e62a020348cce307d4eecde571227a058c441ad'
'69754da0ccb0776003f2464a7d4cd433a5d02ad99801848c7b16f1de24c6988b'
'af2d2d4a0d876f9abc350a1cdb09ffc016a8894ee3c46030c3d90c6e99b27c5a'
'ba31709dad005ac06a86222ee6ead41175d88f8f61fd4d541770f957383431a7'
'7c52a25019d52e02254cc7b578d32aeea87c2fd5f708ef71dbeb6b7edd0aa08e'
'904a819f3c484736384964b77591cae6dca17e849949f7a80d13f134a159ab32'
'288978a65fbd0524e9194940b9b15774b010cb7193ef5bf5a4a5df3358ef9df6'
'96ddecb48e5734159f91261c3a4b7f71a757d6aab69d22f11df600fb91511b11'
Expand Down
28 changes: 14 additions & 14 deletions appearance__buttons-menus-icons.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ Index: b/gtk/gtkbutton.c
+ else if (g_strcmp0 (label, _("_Close")) == 0) use_this_icon = "gtk-close";
+ else if (g_strcmp0 (label, _("_Yes")) == 0) use_this_icon = "gtk-yes";
+ else if (g_strcmp0 (label, _("_No")) == 0) use_this_icon = "gtk-no";
+ else if (g_strcmp0 (label, _("_Print")) == 0) use_this_icon = "gtk-print";
+ else if (g_strcmp0 (label, _("Pre_view")) == 0) use_this_icon = "gtk-print-preview";
+ else if (g_strcmp0 (label, _("_Open")) == 0) use_this_icon = "gtk-open";
+ else if (g_strcmp0 (label, _("_Save")) == 0) use_this_icon = "gtk-save";
+ else if (g_strcmp0 (label, _("_Print")) == 0) use_this_icon = "document-print";
+ else if (g_strcmp0 (label, _("Pre_view")) == 0) use_this_icon = "document-print-preview";
+ else if (g_strcmp0 (label, _("_Open")) == 0) use_this_icon = "document-open";
+ else if (g_strcmp0 (label, _("_Save")) == 0) use_this_icon = "document-save";
+ else if (g_strcmp0 (label, _("_Apply")) == 0) use_this_icon = "gtk-apply";
+ else if (g_strcmp0 (label, _("_Stop")) == 0) use_this_icon = "gtk-stop";
+ else if (g_strcmp0 (label, _("_Delete")) == 0) use_this_icon = "gtk-delete";
+ else if (g_strcmp0 (label, _("_Remove")) == 0) use_this_icon = "gtk-remove";
+ else if (g_strcmp0 (label, _("_Add")) == 0) use_this_icon = "gtk-add";
+ else if (g_strcmp0 (label, _("_Help")) == 0) use_this_icon = "gtk-help";
+ else if (g_strcmp0 (label, _("_Delete")) == 0) use_this_icon = "edit-delete";
+ else if (g_strcmp0 (label, _("_Remove")) == 0) use_this_icon = "list-remove";
+ else if (g_strcmp0 (label, _("_Add")) == 0) use_this_icon = "list-add";
+ else if (g_strcmp0 (label, _("_Help")) == 0) use_this_icon = "help-contents";
+ if (use_this_icon)
+ g_object_set (button, "image", gtk_image_new_from_icon_name (use_this_icon, GTK_ICON_SIZE_BUTTON), NULL);
+ }
Expand All @@ -40,12 +40,12 @@ Index: b/gtk/gtkmenuitem.c
{
+ gchar *use_this_icon = NULL;
+ if (g_strcmp0 (label, _("Copy _Link Address")) == 0 || g_strcmp0 (label, _("_Copy")) == 0
+ || g_strcmp0 (label, _("Copy URL")) == 0) use_this_icon = "gtk-copy";
+ else if (g_strcmp0 (label, _("Cu_t")) == 0) use_this_icon = "gtk-cut";
+ else if (g_strcmp0 (label, _("_Paste")) == 0) use_this_icon = "gtk-paste";
+ else if (g_strcmp0 (label, _("_Delete")) == 0) use_this_icon = "gtk-delete";
+ else if (g_strcmp0 (label, _("Select _All")) == 0) use_this_icon = "gtk-select-all";
+ else if (g_strcmp0 (label, _("_Open Link")) == 0) use_this_icon = "gtk-jump-to";
+ || g_strcmp0 (label, _("Copy URL")) == 0) use_this_icon = "edit-copy";
+ else if (g_strcmp0 (label, _("Cu_t")) == 0) use_this_icon = "edit-cut";
+ else if (g_strcmp0 (label, _("_Paste")) == 0) use_this_icon = "edit-paste";
+ else if (g_strcmp0 (label, _("_Delete")) == 0) use_this_icon = "edit-delete";
+ else if (g_strcmp0 (label, _("Select _All")) == 0) use_this_icon = "edit-select-all";
+ else if (g_strcmp0 (label, _("_Open Link")) == 0) use_this_icon = "go-jump";
+ if (use_this_icon)
+ return g_object_new (GTK_TYPE_IMAGE_MENU_ITEM,
+ "use-underline", TRUE,
Expand Down
8 changes: 4 additions & 4 deletions appearance__message-dialogs.patch
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@ Index: b/gtk/gtkmessagedialog.c
{
case GTK_MESSAGE_INFO:
name = _("Information");
+ icon = "gtk-dialog-info";
+ icon = "dialog-information";
break;

case GTK_MESSAGE_QUESTION:
name = _("Question");
+ icon = "gtk-dialog-question";
+ icon = "dialog-question";
break;

case GTK_MESSAGE_WARNING:
name = _("Warning");
+ icon = "gtk-dialog-warning";
+ icon = "dialog-warning";
break;

case GTK_MESSAGE_ERROR:
name = _("Error");
+ icon = "gtk-dialog-error";
+ icon = "dialog-error";
break;

case GTK_MESSAGE_OTHER:
Expand Down
10 changes: 5 additions & 5 deletions popovers__file-chooser-list.patch
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ Index: b/gtk/gtkfilechooserwidget.c
priv->type_column_item = add_button (box, _("Show T_ype Column"), "item.toggle-show-type");
priv->show_time_item = add_button (box, _("Show _Time"), "item.toggle-show-time");
priv->sort_directories_item = add_button (box, _("Sort _Folders before Files"), "item.toggle-sort-dirs-first");
+ g_object_set (priv->visit_file_item, "image", gtk_image_new_from_icon_name ("gtk-jump-to", GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (priv->open_folder_item, "image", gtk_image_new_from_icon_name ("gtk-open", GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (priv->copy_file_location_item, "image", gtk_image_new_from_icon_name ("gtk-copy", GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (priv->visit_file_item, "image", gtk_image_new_from_icon_name ("go-jump", GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (priv->open_folder_item, "image", gtk_image_new_from_icon_name ("folder-open", GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (priv->copy_file_location_item, "image", gtk_image_new_from_icon_name ("edit-copy", GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (priv->add_shortcut_item, "image", gtk_image_new_from_icon_name ("gtk-add", GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (priv->delete_file_item, "image", gtk_image_new_from_icon_name ("gtk-delete", GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (priv->trash_file_item, "image", gtk_image_new_from_icon_name ("user-trash-full",GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (priv->delete_file_item, "image", gtk_image_new_from_icon_name ("edit-delete", GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (priv->trash_file_item, "image", gtk_image_new_from_icon_name ("user-trash",GTK_ICON_SIZE_MENU), NULL);
}

/* Updates the popover for the file list, creating it if necessary */
Expand Down
6 changes: 3 additions & 3 deletions popovers__places-sidebar.patch
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ Index: b/gtk/gtkplacessidebar.c
+ {
+ g_object_set (
+ g_list_first (gtk_container_get_children (GTK_CONTAINER (box)))->data,
+ "image", gtk_image_new_from_icon_name ("gtk-open", GTK_ICON_SIZE_MENU), NULL
+ "image", gtk_image_new_from_icon_name ("folder-open", GTK_ICON_SIZE_MENU), NULL
+ );
+ g_object_set (data.remove_item, "image", gtk_image_new_from_icon_name("gtk-remove",GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (data.add_shortcut_item, "image", gtk_image_new_from_icon_name("gtk-add", GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (data.remove_item, "image", gtk_image_new_from_icon_name("list-remove",GTK_ICON_SIZE_MENU), NULL);
+ g_object_set (data.add_shortcut_item, "image", gtk_image_new_from_icon_name("list-add", GTK_ICON_SIZE_MENU), NULL);
+ }

/* Update everything! */
Expand Down

0 comments on commit a42ef19

Please sign in to comment.