[gnome-maps] Remove addSignalsMethods for Gobject classes



commit f30888fdb1d05de9e1295565aa6be77626df152c
Author: Shipra <bangashipra gmail com>
Date:   Sat Sep 27 03:43:37 2014 +0530

    Remove addSignalsMethods for Gobject classes
    
    Instead of using Utils.addSignalsMethods, wee need to use
    the Signals property. The call to addSignalsMethods override
    the native connect, emit and disconnect functions coming from
    Gobject and hence impede us to connect or emit native signals.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733414

 src/application.js   |    1 -
 src/geoclue.js       |    4 +++-
 src/layersPopover.js |    1 -
 src/notification.js  |    5 ++++-
 src/searchPopup.js   |    6 ++++--
 5 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 53675ec..4e26fe2 100644
--- a/src/application.js
+++ b/src/application.js
@@ -146,4 +146,3 @@ const Application = new Lang.Class({
         this._mainWindow = null;
     }
 });
-Utils.addSignalMethods(Application.prototype);
diff --git a/src/geoclue.js b/src/geoclue.js
index 358ed41..4b4b6e5 100644
--- a/src/geoclue.js
+++ b/src/geoclue.js
@@ -80,6 +80,9 @@ const LocationProxy = Gio.DBusProxy.makeProxyWrapper(LocationInterface);
 const Geoclue = new Lang.Class({
     Name: 'Geoclue',
     Extends: GObject.Object,
+    Signals: {
+        'location-changed': { }
+    },
     Properties: {
         'connected': GObject.ParamSpec.boolean('connected',
                                                'Connected',
@@ -194,4 +197,3 @@ const Geoclue = new Lang.Class({
         Utils.debug("Updated location: " + location.description);
     }
 });
-Utils.addSignalMethods(Geoclue.prototype);
diff --git a/src/layersPopover.js b/src/layersPopover.js
index e96cdf8..511b3e6 100644
--- a/src/layersPopover.js
+++ b/src/layersPopover.js
@@ -42,4 +42,3 @@ const LayersPopover = new Lang.Class({
         this.add(ui.grid);
     }
 });
-Utils.addSignalMethods(LayersPopover.prototype);
diff --git a/src/notification.js b/src/notification.js
index cab1339..b65189b 100644
--- a/src/notification.js
+++ b/src/notification.js
@@ -29,6 +29,10 @@ const Utils = imports.utils;
 const Notification = new Lang.Class({
     Name: 'Notification',
     Extends: Gtk.Revealer,
+    Signals: {
+        'revealed': { },
+        'dismissed': { }
+    },
     Abstract: true,
 
     _init: function() {
@@ -64,7 +68,6 @@ const Notification = new Lang.Class({
         }
     }
 });
-Utils.addSignalMethods(Notification.prototype);
 
 const Plain = new Lang.Class({
     Name: 'Plain',
diff --git a/src/searchPopup.js b/src/searchPopup.js
index f54d58c..e7d0aaa 100644
--- a/src/searchPopup.js
+++ b/src/searchPopup.js
@@ -21,8 +21,8 @@
 const Gtk = imports.gi.Gtk;
 const GLib = imports.gi.GLib;
 const GdkPixbuf = imports.gi.GdkPixbuf;
-const GObject = imports.gi.GObject;
 
+const GObject = imports.gi.GObject;
 const Lang = imports.lang;
 const Utils = imports.utils;
 
@@ -37,6 +37,9 @@ const _PLACE_ICON_SIZE = 20;
 const SearchPopup = new Lang.Class({
     Name: 'SearchPopup',
     Extends: Gtk.Popover,
+    Signals : {
+        'selected' : { param_types: [ GObject.TYPE_OBJECT ] }
+    },
 
     _init: function(props) {
         this._numVisible = props.num_visible;
@@ -178,4 +181,3 @@ const SearchPopup = new Lang.Class({
         return description;
     }
 });
-Utils.addSignalMethods(SearchPopup.prototype);


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