[gnome-panel] libgnome-panel: add gp_applet_set_panel_icon_size
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] libgnome-panel: add gp_applet_set_panel_icon_size
- Date: Fri, 30 Apr 2021 22:54:19 +0000 (UTC)
commit 1eab7bf79541c2b685ac31d76421a30a1470caad
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Apr 28 23:15:52 2021 +0300
libgnome-panel: add gp_applet_set_panel_icon_size
libgnome-panel/gp-applet-private.h | 3 +++
libgnome-panel/gp-applet.c | 25 ++++++++++++++++++-------
2 files changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/libgnome-panel/gp-applet-private.h b/libgnome-panel/gp-applet-private.h
index 77023f25c..68650c8b3 100644
--- a/libgnome-panel/gp-applet-private.h
+++ b/libgnome-panel/gp-applet-private.h
@@ -51,6 +51,9 @@ void gp_applet_remove_from_panel (GpApplet *self);
void gp_applet_set_prefer_symbolic_icons (GpApplet *self,
gboolean prefer_symbolic_icons);
+void gp_applet_set_panel_icon_size (GpApplet *self,
+ guint panel_icon_size);
+
G_END_DECLS
#endif
diff --git a/libgnome-panel/gp-applet.c b/libgnome-panel/gp-applet.c
index 3873974d3..27528936b 100644
--- a/libgnome-panel/gp-applet.c
+++ b/libgnome-panel/gp-applet.c
@@ -226,13 +226,7 @@ update_panel_icon_size (GpApplet *applet)
panel_icon_size = panel_max_icon_size;
}
- if (priv->panel_icon_size == panel_icon_size)
- return;
-
- priv->panel_icon_size = panel_icon_size;
-
- g_object_notify_by_pspec (G_OBJECT (applet),
- properties[PROP_PANEL_ICON_SIZE]);
+ gp_applet_set_panel_icon_size (applet, panel_icon_size);
}
static void
@@ -1447,6 +1441,23 @@ gp_applet_get_panel_icon_size (GpApplet *applet)
return priv->panel_icon_size;
}
+void
+gp_applet_set_panel_icon_size (GpApplet *self,
+ guint panel_icon_size)
+{
+ GpAppletPrivate *priv;
+
+ priv = gp_applet_get_instance_private (self);
+
+ if (priv->panel_icon_size == panel_icon_size)
+ return;
+
+ priv->panel_icon_size = panel_icon_size;
+
+ g_object_notify_by_pspec (G_OBJECT (self),
+ properties[PROP_PANEL_ICON_SIZE]);
+}
+
/**
* gp_applet_get_menu_icon_size:
* @applet: a #GpApplet
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]