From 98ec2f386f7b9409a2c745808ea6d5e329175bcd Mon Sep 17 00:00:00 2001
From: Ted Gould <ted@gould.cx>
Date: Tue, 14 Sep 2010 09:50:09 -0500
Subject: Adding slot for the menu show signal

---
 libindicator/indicator-object.h | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'libindicator')

diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h
index 3c6bec5..cddf7c8 100644
--- a/libindicator/indicator-object.h
+++ b/libindicator/indicator-object.h
@@ -79,8 +79,7 @@ typedef struct _IndicatorObjectEntry   IndicatorObjectEntry;
 	@entry_added: Slot for #IndicatorObject::entry-added
 	@entry_removed: Slot for #IndicatorObject::entry-removed
 	@entry_moved: Slot for #IndicatorObject::entry-moved
-	@indicator_object_reserved_1: Reserved for future use
-	@indicator_object_reserved_2: Reserved for future use
+	@menu_show: Slot for #IndicatorObject::menu-show
 */
 struct _IndicatorObjectClass {
 	GObjectClass parent_class;
@@ -94,13 +93,13 @@ struct _IndicatorObjectClass {
 	guint      (*get_location) (IndicatorObject * io, IndicatorObjectEntry * entry);
 
 	/* Signals */
-        void       (*entry_added)   (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data);
-        void       (*entry_removed) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data);
-        void       (*entry_moved)   (IndicatorObject * io, IndicatorObjectEntry * entry, guint old_pos, guint new_pos, gpointer user_data);
-        void       (*scroll)        (IndicatorObject * io, gint delta, IndicatorScrollDirection direction);
+	void       (*entry_added)   (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data);
+	void       (*entry_removed) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data);
+	void       (*entry_moved)   (IndicatorObject * io, IndicatorObjectEntry * entry, guint old_pos, guint new_pos, gpointer user_data);
+	void       (*scroll)        (IndicatorObject * io, gint delta, IndicatorScrollDirection direction);
+	void       (*menu_show)     (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp, gpointer user_data);
 
 	/* Reserved */
-	void (* indicator_object_reserved_1) (void);
 };
 
 /**
-- 
cgit v1.2.3


From 06b508479f76b2d90425ad0e16c65c94c3c8eb49 Mon Sep 17 00:00:00 2001
From: Ted Gould <ted@gould.cx>
Date: Tue, 14 Sep 2010 09:51:06 -0500
Subject: Forgot the signal name

---
 libindicator/indicator-object.h | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'libindicator')

diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h
index cddf7c8..32a35f9 100644
--- a/libindicator/indicator-object.h
+++ b/libindicator/indicator-object.h
@@ -51,6 +51,8 @@ typedef enum
 #define INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED_ID    (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED, INDICATOR_OBJECT_TYPE))
 #define INDICATOR_OBJECT_SIGNAL_SCROLL            "scroll"
 #define INDICATOR_OBJECT_SIGNAL_SCROLL_ID         (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_SCROLL, INDICATOR_OBJECT_TYPE))
+#define INDICATOR_OBJECT_SIGNAL_MENU_SHOW         "menu-show"
+#define INDICATOR_OBJECT_SIGNAL_MENU_SHOW_ID      (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_MENU_SHOW, INDICATOR_OBJECT_TYPE))
 
 typedef struct _IndicatorObject        IndicatorObject;
 typedef struct _IndicatorObjectClass   IndicatorObjectClass;
-- 
cgit v1.2.3


From 69221d8f85a2e1b5f3638e7dfc988b772f74737e Mon Sep 17 00:00:00 2001
From: Ted Gould <ted@gould.cx>
Date: Tue, 14 Sep 2010 09:55:16 -0500
Subject: Adding in the signal for the menu showing

---
 libindicator/indicator-object-marshal.list |  1 +
 libindicator/indicator-object.c            | 53 ++++++++++++++++++++----------
 2 files changed, 37 insertions(+), 17 deletions(-)

(limited to 'libindicator')

diff --git a/libindicator/indicator-object-marshal.list b/libindicator/indicator-object-marshal.list
index d9dd126..bb447bb 100644
--- a/libindicator/indicator-object-marshal.list
+++ b/libindicator/indicator-object-marshal.list
@@ -1,2 +1,3 @@
 VOID: POINTER, UINT, UINT
 VOID: UINT,ENUM
+VOID: POINTER, UINT
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index 511a407..a5fd740 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -57,7 +57,8 @@ enum {
 	ENTRY_ADDED,
 	ENTRY_REMOVED,
 	ENTRY_MOVED,
-        SCROLL,
+	SCROLL,
+	MENU_SHOW,
 	LAST_SIGNAL
 };
 
@@ -145,22 +146,40 @@ indicator_object_class_init (IndicatorObjectClass *klass)
 	                                     G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_NONE);
 
 
-        /**
-                IndicatorObject::scroll:
-                @arg0: The #IndicatorObject object
-                @arg1: The delta of the scroll event
-                @arg2: The orientation of the scroll event.
-
-                When the indicator receives a mouse scroll wheel event
-                from the user, this signal is emitted.
-         */
-        signals[SCROLL] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SCROLL,
-                                        G_TYPE_FROM_CLASS(klass),
-                                        G_SIGNAL_RUN_LAST,
-                                        G_STRUCT_OFFSET (IndicatorObjectClass, scroll),
-                                        NULL, NULL,
-                                        _indicator_object_marshal_VOID__UINT_ENUM,
-                                        G_TYPE_NONE, 2, G_TYPE_UINT, INDICATOR_OBJECT_TYPE_SCROLL_DIRECTION);
+	/**
+		IndicatorObject::scroll:
+		@arg0: The #IndicatorObject object
+		@arg1: The delta of the scroll event
+		@arg2: The orientation of the scroll event.
+
+		When the indicator receives a mouse scroll wheel event
+		from the user, this signal is emitted.
+	*/
+	signals[SCROLL] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SCROLL,
+	                                G_TYPE_FROM_CLASS(klass),
+	                                G_SIGNAL_RUN_LAST,
+	                                G_STRUCT_OFFSET (IndicatorObjectClass, scroll),
+	                                NULL, NULL,
+	                                _indicator_object_marshal_VOID__UINT_ENUM,
+	                                G_TYPE_NONE, 2, G_TYPE_UINT, INDICATOR_OBJECT_TYPE_SCROLL_DIRECTION);
+
+	/**
+		IndicatorObject::menu-show:
+		@arg0: The #IndicatorObject object
+		@arg1: A pointer to the #IndicatorObjectEntry that
+			is being shown.
+		@arg2: The timestamp of the event
+
+		Used when the indicator wants to signal up the stack
+		that the menu should be shown.
+	*/
+	signals[MENU_SHOW] = g_signal_new (INDICATOR_OBJECT_SIGNAL_MENU_SHOW,
+	                                   G_TYPE_FROM_CLASS(klass),
+	                                   G_SIGNAL_RUN_LAST,
+	                                   G_STRUCT_OFFSET (IndicatorObjectClass, menu_show),
+	                                   NULL, NULL,
+	                                   _indicator_object_marshal_VOID__POINTER_UINT,
+	                                   G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT);
 
 
 	return;
-- 
cgit v1.2.3