[Xfce4-commits] [xfce/xfce4-panel] 01/01: systray: Improve app icon lookup
noreply at xfce.org
noreply at xfce.org
Tue Jan 14 00:33:14 CET 2020
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-panel.
commit 12b28bb49b6ea2fcbd0009af4af7eca147a0756b
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Jan 14 00:32:38 2020 +0100
systray: Improve app icon lookup
Also bump the dependency on libxfce4ui to 4.15.1 as a result.
---
configure.ac.in | 2 +-
plugins/systray/systray-dialog.glade | 6 +++---
plugins/systray/systray.c | 12 ++++++++----
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/configure.ac.in b/configure.ac.in
index 5999222..c29d669 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -143,7 +143,7 @@ dnl ***********************************
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.13.0])
XDT_CHECK_PACKAGE([GARCON], [garcon-1], [0.5.0])
XDT_CHECK_PACKAGE([GARCON_GTK3], [garcon-gtk3-1], [0.5.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.13.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.15.1])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.13.2])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.22.0])
XDT_CHECK_PACKAGE([EXO], [exo-2], [0.11.2])
diff --git a/plugins/systray/systray-dialog.glade b/plugins/systray/systray-dialog.glade
index 8a79256..6d5578b 100644
--- a/plugins/systray/systray-dialog.glade
+++ b/plugins/systray/systray-dialog.glade
@@ -6,7 +6,7 @@
<object class="GtkListStore" id="applications-store">
<columns>
<!-- column-name icon -->
- <column type="GdkPixbuf"/>
+ <column type="GIcon"/>
<!-- column-name title -->
<column type="gchararray"/>
<!-- column-name hidden -->
@@ -18,7 +18,7 @@
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">edit-clear</property>
+ <property name="icon_name">edit-clear-symbolic</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
@@ -242,7 +242,7 @@
<child>
<object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
<attributes>
- <attribute name="pixbuf">0</attribute>
+ <attribute name="gicon">0</attribute>
</attributes>
</child>
</object>
diff --git a/plugins/systray/systray.c b/plugins/systray/systray.c
index dfe945a..fbeba04 100644
--- a/plugins/systray/systray.c
+++ b/plugins/systray/systray.c
@@ -128,7 +128,7 @@ enum
enum
{
- COLUMN_PIXBUF,
+ COLUMN_GICON,
COLUMN_TITLE,
COLUMN_HIDDEN,
COLUMN_INTERNAL_NAME
@@ -154,6 +154,9 @@ static const gchar *known_applications[][3] =
{ "workrave tray icon", NULL, "Workrave Applet" },
{ "audacious2", "audacious", "Audacious" },
{ "wicd-client.py", "wicd-gtk", "Wicd" },
+ { "drop-down terminal", "utilities-terminal", "Xfce Dropdown Terminal" },
+ { "xfce terminal", "utilities-terminal", "Xfce Terminal" },
+ { "task manager", "utilities-system-monitor", "Xfce Taskmanager" },
{ "xfce4-power-manager", "xfpm-ac-adapter", "Xfce Power Manager" },
};
@@ -932,6 +935,7 @@ systray_plugin_dialog_add_application_names (gpointer data,
gchar *camelcase = NULL;
const gchar *icon_name = name;
GdkPixbuf *pixbuf;
+ GIcon *gicon;
guint i;
GtkTreeIter iter;
@@ -962,14 +966,14 @@ systray_plugin_dialog_add_application_names (gpointer data,
/* try to load the icon name */
if (G_LIKELY (icon_name != NULL))
- pixbuf = xfce_panel_pixbuf_from_source (icon_name, NULL, ICON_SIZE);
+ gicon = xfce_gicon_from_name (icon_name);
else
- pixbuf = NULL;
+ gicon = xfce_gicon_from_name (name);
/* insert in the store */
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
- COLUMN_PIXBUF, pixbuf,
+ COLUMN_GICON, gicon,
COLUMN_TITLE, title,
COLUMN_HIDDEN, hidden,
COLUMN_INTERNAL_NAME, name,
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list