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 ------------------------- 1 file changed, 44 deletions(-) (limited to 'capplets/default-applications/mate-da-capplet.c') 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); -- cgit v1.2.1