diff options
author | rbuj <[email protected]> | 2020-01-31 14:34:52 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-02-06 13:06:50 +0100 |
commit | c6133891168a3d7219a94676effcba4d29e80277 (patch) | |
tree | a67183be079de3d6b099b7f96fa28267a086d122 /src/dlg-batch-add.c | |
parent | 623bd665371e3afd9dc6fa29f9e1cfe735681358 (diff) | |
download | engrampa-c6133891168a3d7219a94676effcba4d29e80277.tar.bz2 engrampa-c6133891168a3d7219a94676effcba4d29e80277.tar.xz |
dlg-batch-add: set dialog image from icon-name instead of pixbuf
Diffstat (limited to 'src/dlg-batch-add.c')
-rw-r--r-- | src/dlg-batch-add.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/dlg-batch-add.c b/src/dlg-batch-add.c index 50b85d8..8e30bd4 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); } |