[nautilus/gtk4-preparation-trunk: 39/45] general: Stop using GEmblemedIcon
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gtk4-preparation-trunk: 39/45] general: Stop using GEmblemedIcon
- Date: Fri, 31 Dec 2021 12:11:19 +0000 (UTC)
commit 76059bd8eaac424eed51af148f306327445dd642
Author: António Fernandes <antoniof gnome org>
Date: Wed Dec 15 20:06:05 2021 +0000
general: Stop using GEmblemedIcon
GTK 4 is not going to draw them anyway.
Assume a temporary regression, to be fixed after the switch to GTK 4.
src/nautilus-bookmark.c | 5 +++++
src/nautilus-file.c | 5 +++++
2 files changed, 10 insertions(+)
---
diff --git a/src/nautilus-bookmark.c b/src/nautilus-bookmark.c
index bc3c3bea7..ba56a97e5 100644
--- a/src/nautilus-bookmark.c
+++ b/src/nautilus-bookmark.c
@@ -172,6 +172,7 @@ static void
apply_warning_emblem (GIcon **base,
gboolean symbolic)
{
+#if 0 && EMBLEMS_NEEDS_GTK4_REIMPLEMENTATION
GIcon *emblemed_icon;
g_autoptr (GIcon) warning = NULL;
g_autoptr (GEmblem) emblem = NULL;
@@ -191,6 +192,10 @@ apply_warning_emblem (GIcon **base,
g_object_unref (*base);
*base = emblemed_icon;
+#else
+ /* GTK 4 doesn't draw emblemed icons. Use the warning icon itself. */
+ g_set_object (base, g_themed_icon_new (symbolic ? "dialog-warning-symbolic" : "dialog-warning"));
+#endif
}
gboolean
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index b223299b5..9373e08f9 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -4966,6 +4966,7 @@ nautilus_file_get_keywords (NautilusFile *file)
return sort_keyword_list_and_remove_duplicates (keywords);
}
+#if 0 && EMBLEMS_NEEDS_GTK4_REIMPLEMENTATION
/**
* nautilus_file_get_emblem_icons
*
@@ -5018,6 +5019,7 @@ nautilus_file_get_emblem_icons (NautilusFile *file)
return icons;
}
+#endif
static void
prepend_icon_name (const char *name,
@@ -5031,7 +5033,9 @@ apply_emblems_to_icon (NautilusFile *file,
GIcon **icon,
NautilusFileIconFlags flags)
{
+#if 0 && EMBLEMS_NEEDS_GTK4_REIMPLEMENTATION
GIcon *emblemed_icon = NULL;
+
g_autolist (GIcon) emblems = NULL;
emblems = nautilus_file_get_emblem_icons (file);
@@ -5068,6 +5072,7 @@ apply_emblems_to_icon (NautilusFile *file,
g_object_unref (*icon);
*icon = emblemed_icon;
}
+#endif
}
GIcon *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]