[gtk] filechooserbutton: Add icon to default (None) combo box item
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] filechooserbutton: Add icon to default (None) combo box item
- Date: Wed, 25 Sep 2019 15:54:31 +0000 (UTC)
commit d03239603196c13b9acbb6ca7cc44bfe9e87f540
Author: Timm Bäder <mail baedert org>
Date: Sun Sep 22 09:20:36 2019 +0200
filechooserbutton: Add icon to default (None) combo box item
See #2118
gtk/gtkfilechooserbutton.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 711f82b14f..f60222aa69 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -2090,18 +2090,22 @@ model_add_empty_selection (GtkFileChooserButton *button)
GtkListStore *store;
GtkTreeIter iter;
gint pos;
+ GIcon *icon;
store = GTK_LIST_STORE (priv->model);
pos = model_get_type_position (button, ROW_TYPE_EMPTY_SELECTION);
+ icon = g_themed_icon_new ("document-open-symbolic");
gtk_list_store_insert (store, &iter, pos);
gtk_list_store_set (store, &iter,
- ICON_COLUMN, NULL,
- DISPLAY_NAME_COLUMN, _(FALLBACK_DISPLAY_NAME),
- TYPE_COLUMN, ROW_TYPE_EMPTY_SELECTION,
- DATA_COLUMN, NULL,
- IS_FOLDER_COLUMN, FALSE,
- -1);
+ ICON_COLUMN, icon,
+ DISPLAY_NAME_COLUMN, _(FALLBACK_DISPLAY_NAME),
+ TYPE_COLUMN, ROW_TYPE_EMPTY_SELECTION,
+ DATA_COLUMN, NULL,
+ IS_FOLDER_COLUMN, FALSE,
+ -1);
+
+ g_object_unref (icon);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]