aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2011-07-02 04:13:05 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2011-07-02 04:13:05 +0200
commit8881229ab3af6dfd5a23f33357c0ef466aa7fd85 (patch)
tree1213750e363f8a5f52fc82a88f6f78401b8322d8
parent5fdfbbecdd677477555164e347406bf3bc9b624a (diff)
downloadlibayatana-indicator-8881229ab3af6dfd5a23f33357c0ef466aa7fd85.tar.gz
libayatana-indicator-8881229ab3af6dfd5a23f33357c0ef466aa7fd85.tar.bz2
libayatana-indicator-8881229ab3af6dfd5a23f33357c0ef466aa7fd85.zip
Merging "scroll" and "scroll-entry" into the "entry-scrolled" signal
API change to merge the duplication of signals, as defined in the blueprint desktop-dx-o-indicators-review
-rw-r--r--libindicator/indicator-object-marshal.list1
-rw-r--r--libindicator/indicator-object.c27
-rw-r--r--libindicator/indicator-object.h10
3 files changed, 8 insertions, 30 deletions
diff --git a/libindicator/indicator-object-marshal.list b/libindicator/indicator-object-marshal.list
index 73f1fac..4896ac4 100644
--- a/libindicator/indicator-object-marshal.list
+++ b/libindicator/indicator-object-marshal.list
@@ -1,5 +1,4 @@
VOID: POINTER, UINT, UINT
-VOID: UINT, ENUM
VOID: POINTER, UINT, ENUM
VOID: POINTER, UINT
VOID: POINTER, BOOLEAN
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index a061215..a91251c 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -59,8 +59,7 @@ enum {
ENTRY_ADDED,
ENTRY_REMOVED,
ENTRY_MOVED,
- SCROLL,
- SCROLL_ENTRY,
+ ENTRY_SCROLLED,
MENU_SHOW,
SHOW_NOW_CHANGED,
ACCESSIBLE_DESC_UPDATE,
@@ -151,26 +150,8 @@ indicator_object_class_init (IndicatorObjectClass *klass)
_indicator_object_marshal_VOID__POINTER_UINT_UINT,
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-entry:
+ IndicatorObject::entry-scrolled:
@arg0: The #IndicatorObject object
@arg1: A pointer to the #IndicatorObjectEntry that
receives the scroll event.
@@ -180,10 +161,10 @@ indicator_object_class_init (IndicatorObjectClass *klass)
When the indicator receives a mouse scroll wheel event
from the user, this signal is emitted.
*/
- signals[SCROLL_ENTRY] = g_signal_new (INDICATOR_OBJECT_SIGNAL_SCROLL_ENTRY,
+ signals[ENTRY_SCROLLED] = g_signal_new (INDICATOR_OBJECT_SIGNAL_ENTRY_SCROLLED,
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (IndicatorObjectClass, scroll_entry),
+ G_STRUCT_OFFSET (IndicatorObjectClass, entry_scrolled),
NULL, NULL,
_indicator_object_marshal_VOID__POINTER_UINT_ENUM,
G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT,
diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h
index aa15c79..5faeff5 100644
--- a/libindicator/indicator-object.h
+++ b/libindicator/indicator-object.h
@@ -49,10 +49,8 @@ typedef enum
#define INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED, INDICATOR_OBJECT_TYPE))
#define INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED "entry-moved"
#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_SCROLL_ENTRY "scroll-entry"
-#define INDICATOR_OBJECT_SIGNAL_SCROLL_ENTRY_ID (g_signal_lookup(#define INDICATOR_OBJECT_SIGNAL_SCROLL_ENTRY, INDICATOR_OBJECT_TYPE))
+#define INDICATOR_OBJECT_SIGNAL_ENTRY_SCROLLED "entry-scrolled"
+#define INDICATOR_OBJECT_SIGNAL_ENTRY_SCROLLED_ID (g_signal_lookup(INDICATOR_OBJECT_SIGNAL_ENTRY_SCROLLED, 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))
#define INDICATOR_OBJECT_SIGNAL_SHOW_NOW_CHANGED "show-now-changed"
@@ -96,6 +94,7 @@ typedef struct _IndicatorObjectEntry IndicatorObjectEntry;
@entry_removed: Slot for #IndicatorObject::entry-removed
@entry_moved: Slot for #IndicatorObject::entry-moved
@menu_show: Slot for #IndicatorObject::menu-show
+ @entry_scrolled: Slot for #IndicatorObject::entry-scrolled
@show_now_changed: Slot for #IndicatorObject::show-now-changed
@accessible_desc_update: Slot for #IndicatorObject::accessible-desc-update
*/
@@ -119,10 +118,9 @@ struct _IndicatorObjectClass {
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_scrolled) (IndicatorObject * io, IndicatorObjectEntry * entry, gint delta, IndicatorScrollDirection direction);
void (*menu_show) (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp, gpointer user_data);
void (*show_now_changed) (IndicatorObject * io, IndicatorObjectEntry * entry, gboolean show_now_state, gpointer user_data);
- void (*scroll_entry) (IndicatorObject * io, IndicatorObjectEntry * entry, gint delta, IndicatorScrollDirection direction);
void (*accessible_desc_update) (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data);
/* Reserved */