[gnome-panel] libgnome-panel: add gp_applet_set_enable_tooltips



commit 181e0f98f2a577713f298c1d052eca94a9edb98f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Apr 28 23:18:16 2021 +0300

    libgnome-panel: add gp_applet_set_enable_tooltips

 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 e1a29d2fc..82b5a1910 100644
--- a/libgnome-panel/gp-applet-private.h
+++ b/libgnome-panel/gp-applet-private.h
@@ -57,6 +57,9 @@ void           gp_applet_set_panel_icon_size       (GpApplet        *self,
 void           gp_applet_set_menu_icon_size        (GpApplet        *self,
                                                     guint            menu_icon_size);
 
+void           gp_applet_set_enable_tooltips       (GpApplet        *self,
+                                                    gboolean         enable_tooltips);
+
 G_END_DECLS
 
 #endif
diff --git a/libgnome-panel/gp-applet.c b/libgnome-panel/gp-applet.c
index c1f4ee037..eb036e9d2 100644
--- a/libgnome-panel/gp-applet.c
+++ b/libgnome-panel/gp-applet.c
@@ -140,13 +140,7 @@ update_enable_tooltips (GpApplet *applet)
   enable_tooltips = g_settings_get_boolean (priv->general_settings,
                                             "enable-tooltips");
 
-  if (priv->enable_tooltips == enable_tooltips)
-    return;
-
-  priv->enable_tooltips = enable_tooltips;
-
-  g_object_notify_by_pspec (G_OBJECT (applet),
-                            properties[PROP_ENABLE_TOOLTIPS]);
+  gp_applet_set_enable_tooltips (applet, enable_tooltips);
 }
 
 static void
@@ -1594,3 +1588,20 @@ gp_applet_popup_menu_at_widget (GpApplet  *applet,
                             widget_anchor, menu_anchor,
                             event);
 }
+
+void
+gp_applet_set_enable_tooltips (GpApplet *self,
+                               gboolean  enable_tooltips)
+{
+  GpAppletPrivate *priv;
+
+  priv = gp_applet_get_instance_private (self);
+
+  if (priv->enable_tooltips == enable_tooltips)
+    return;
+
+  priv->enable_tooltips = enable_tooltips;
+
+  g_object_notify_by_pspec (G_OBJECT (self),
+                            properties[PROP_ENABLE_TOOLTIPS]);
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]