From 085164b567cd902e8e56f3f43aaa95dafe86c11d Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 6 Aug 2020 14:22:06 +0200 Subject: default-applications: Set icon-name in ui file --- capplets/default-applications/mate-da-capplet.c | 44 ---------------- .../mate-default-applications-properties.ui | 60 +++++++++++++++++++--- 2 files changed, 52 insertions(+), 52 deletions(-) (limited to 'capplets') diff --git a/capplets/default-applications/mate-da-capplet.c b/capplets/default-applications/mate-da-capplet.c index f70e0ee0..116c5d5a 100644 --- a/capplets/default-applications/mate-da-capplet.c +++ b/capplets/default-applications/mate-da-capplet.c @@ -340,54 +340,10 @@ refresh_combo_box_icons(GtkIconTheme* theme, GtkComboBox* combo_box, GList* app_ } } -static struct { - const char* name; - const char* icon; -} icons[] = { - {"web_browser_image", "web-browser"}, - {"mail_reader_image", "emblem-mail"}, - {"media_player_image", "audio-x-generic"}, - {"visual_image", "zoom-best-fit"}, - {"mobility_image", "preferences-desktop-accessibility"}, - {"messenger_image", "instant-messaging"}, - {"filemanager_image", "file-manager"}, - {"imageviewer_image", "image-x-generic"}, - {"video_image", "video-x-generic"}, - {"text_image", "text-editor"}, - {"terminal_image", "terminal"}, - {"document_image", "application-pdf"}, - {"word_image", "x-office-document"}, - {"spreadsheet_image", "x-office-spreadsheet"}, - {"calculator_image", "accessories-calculator"}, -}; - /* Callback for icon theme change */ static void theme_changed_cb(GtkIconTheme* theme, MateDACapplet* capplet) { - GObject* icon; - gint i; - gint scale_factor; - cairo_surface_t *surface; - - scale_factor = gtk_widget_get_scale_factor (capplet->window); - - for (i = 0; i < G_N_ELEMENTS(icons); i++) - { - icon = gtk_builder_get_object(capplet->builder, icons[i].name); - - surface = gtk_icon_theme_load_surface (theme, icons[i].icon, - 32, scale_factor, - NULL, - GTK_ICON_LOOKUP_FORCE_SIZE, - NULL); - - gtk_image_set_from_surface (GTK_IMAGE(icon), surface); - - if (surface) - cairo_surface_destroy (surface); - } - refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->web_combo_box), capplet->web_browsers); refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->mail_combo_box), capplet->mail_readers); refresh_combo_box_icons(theme, GTK_COMBO_BOX(capplet->media_combo_box), capplet->media_players); diff --git a/capplets/default-applications/mate-default-applications-properties.ui b/capplets/default-applications/mate-default-applications-properties.ui index 57c550e4..20c094fe 100644 --- a/capplets/default-applications/mate-default-applications-properties.ui +++ b/capplets/default-applications/mate-default-applications-properties.ui @@ -1,5 +1,5 @@ - + @@ -7,15 +7,22 @@ + + True + False + window-close + + + True + False + help-browser + False 5 Preferred Applications False dialog - - - True @@ -28,12 +35,14 @@ end - gtk-help + _Help True True True False - True + help_img + True + True False @@ -43,12 +52,14 @@ - gtk-close + _Close True True True False - True + close_img + True + True False @@ -93,6 +104,8 @@ True False start + web-browser + 5 False @@ -161,6 +174,8 @@ True False start + emblem-mail + 5 False @@ -229,6 +244,8 @@ True False start + instant-messaging + 5 False @@ -316,6 +333,8 @@ True False start + image-x-generic + 5 False @@ -384,6 +403,8 @@ True False start + audio-x-generic + 5 False @@ -452,6 +473,8 @@ True False start + video-x-generic + 5 False @@ -543,6 +566,8 @@ True False start + text-editor + 5 False @@ -611,6 +636,8 @@ True False start + terminal + 5 False @@ -679,6 +706,8 @@ True False start + file-manager + 5 False @@ -747,6 +776,8 @@ True False start + accessories-calculator + 5 False @@ -838,6 +869,8 @@ True False start + application-pdf + 5 False @@ -906,6 +939,8 @@ True False start + x-office-document + 5 False @@ -974,6 +1009,8 @@ True False start + x-office-spreadsheet + 5 False @@ -1065,6 +1102,8 @@ True False start + zoom-best-fit + 5 False @@ -1149,6 +1188,8 @@ True False start + preferences-desktop-accessibility + 5 False @@ -1245,5 +1286,8 @@ helpbutton1 closebutton1 + + + -- cgit v1.2.1