summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-01-31 14:34:52 +0100
committermonsta <[email protected]>2020-02-17 12:55:34 +0300
commit1c44c9a038f8e3b063c09660ea3e698fff652a12 (patch)
tree7c590c65aa9d059900c1109398e83c33061da862
parente52f5eab57eeb8f4d4aad96ad02109b104dc0bee (diff)
downloadengrampa-1c44c9a038f8e3b063c09660ea3e698fff652a12.tar.bz2
engrampa-1c44c9a038f8e3b063c09660ea3e698fff652a12.tar.xz
dlg-batch-add: set dialog image from icon-name instead of pixbuf
-rw-r--r--src/dlg-batch-add.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/dlg-batch-add.c b/src/dlg-batch-add.c
index d3dac4a..a373396 100644
--- a/src/dlg-batch-add.c
+++ b/src/dlg-batch-add.c
@@ -37,7 +37,6 @@
#include "typedefs.h"
-#define ARCHIVE_ICON_SIZE (48)
#define BAD_CHARS "/\\*"
#define GET_WIDGET(x) (_gtk_builder_get_widget (data->builder, (x)))
@@ -401,16 +400,14 @@ archive_type_combo_box_changed_cb (GtkComboBox *combo_box,
{
const char *mime_type;
int idx = gtk_combo_box_get_active (combo_box);
- GdkPixbuf *icon;
+ char *icon_name;
mime_type = mime_type_desc[data->supported_types[idx]].mime_type;
-
- icon = get_mime_type_pixbuf (mime_type, ARCHIVE_ICON_SIZE, NULL);
- if (icon != NULL) {
- gtk_image_set_from_pixbuf (GTK_IMAGE (GET_WIDGET ("archive_icon_image")), icon);
- g_object_unref (icon);
+ if ((icon_name = g_content_type_get_generic_icon_name (mime_type)) != NULL) {
+ gtk_image_set_from_icon_name (GTK_IMAGE (GET_WIDGET ("archive_icon_image")),
+ icon_name, GTK_ICON_SIZE_DIALOG);
+ g_free (icon_name);
}
-
update_sensitivity_for_mime_type (data, mime_type);
}