[gnome-panel] libgnome-panel: remove locked-down-changed signal



commit b525741ce459ff128d0cb6552685c7283c4ef4ce
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Jan 9 17:06:39 2018 +0200

    libgnome-panel: remove locked-down-changed signal

 libgnome-panel/gp-applet.c |   18 ++----------------
 libgnome-panel/gp-applet.h |    5 -----
 2 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/libgnome-panel/gp-applet.c b/libgnome-panel/gp-applet.c
index a9e0bc5..5f693fa 100644
--- a/libgnome-panel/gp-applet.c
+++ b/libgnome-panel/gp-applet.c
@@ -91,7 +91,6 @@ static GParamSpec *properties[LAST_PROP] = { NULL };
 
 enum
 {
-  LOCKED_DOWN_CHANGED,
   PLACEMENT_CHANGED,
 
   FLAGS_CHANGED,
@@ -438,7 +437,7 @@ install_properties (GObjectClass *object_class)
     g_param_spec_boolean ("locked-down", "Locked Down", "Locked Down",
                           FALSE,
                           G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
-                          G_PARAM_STATIC_STRINGS);
+                          G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
 
   /**
    * GpApplet:orientation:
@@ -469,19 +468,6 @@ static void
 install_signals (void)
 {
   /**
-   * GpApplet::locked-down-changed:
-   * @applet: the object on which the signal is emitted
-   * @locked_down: the new locked down value
-   *
-   * Signal is emmited when the locked down property of applet has
-   * changed.
-   */
-  signals[LOCKED_DOWN_CHANGED] =
-    g_signal_new ("locked-down-changed", GP_TYPE_APPLET, G_SIGNAL_RUN_LAST,
-                  G_STRUCT_OFFSET (GpAppletClass, locked_down_changed),
-                  NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-
-  /**
    * GpApplet::placement-changed:
    * @applet: the object on which the signal is emitted
    * @orientation: the new orientation
@@ -589,7 +575,7 @@ gp_applet_set_locked_down (GpApplet *applet,
 
   priv->locked_down = locked_down;
 
-  g_signal_emit (applet, signals[LOCKED_DOWN_CHANGED], 0, locked_down);
+  g_object_notify_by_pspec (G_OBJECT (applet), properties[PROP_LOCKED_DOWN]);
 }
 
 /**
diff --git a/libgnome-panel/gp-applet.h b/libgnome-panel/gp-applet.h
index 18bc69e..ff3ab70 100644
--- a/libgnome-panel/gp-applet.h
+++ b/libgnome-panel/gp-applet.h
@@ -59,8 +59,6 @@ typedef enum
 /**
  * GpAppletClass:
  * @parent_class: The parent class.
- * @locked_down_changed: Signal is emmited when the locked down property
- *     of applet has changed.
  * @placement_changed: Signal is emitted when the orientation or position
  *     properties of applet has changed.
  *
@@ -70,9 +68,6 @@ struct _GpAppletClass
 {
   GtkEventBoxClass parent_class;
 
-  void (* locked_down_changed) (GpApplet        *applet,
-                                gboolean         locked_down);
-
   void (* placement_changed)   (GpApplet        *applet,
                                 GtkOrientation   orientation,
                                 GtkPositionType  position);


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