event-controller: rename notification signal "swipe" to "swipe-ended"

Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
This commit is contained in:
Carlos Garnacho 2012-09-13 14:24:30 +02:00 committed by Simon Schampijer
parent a2b77a2166
commit ec42f63630
2 changed files with 7 additions and 7 deletions

View File

@ -30,7 +30,7 @@ typedef struct _SugarSwipeControllerPriv SugarSwipeControllerPriv;
typedef struct _SugarEventData SugarEventData; typedef struct _SugarEventData SugarEventData;
enum { enum {
SWIPE_FINISHED, SWIPE_ENDED,
LAST_SIGNAL LAST_SIGNAL
}; };
@ -193,7 +193,7 @@ _sugar_swipe_controller_check_emit (SugarSwipeController *controller)
priv->swiped = TRUE; priv->swiped = TRUE;
g_signal_emit_by_name (G_OBJECT (controller), "started"); g_signal_emit_by_name (G_OBJECT (controller), "started");
g_object_notify (G_OBJECT (controller), "state"); g_object_notify (G_OBJECT (controller), "state");
g_signal_emit (controller, signals[SWIPE_FINISHED], 0, direction); g_signal_emit (controller, signals[SWIPE_ENDED], 0, direction);
g_signal_emit_by_name (G_OBJECT (controller), "finished"); g_signal_emit_by_name (G_OBJECT (controller), "finished");
} }
} }
@ -302,11 +302,11 @@ sugar_swipe_controller_class_init (SugarSwipeControllerClass *klass)
controller_class->get_state = sugar_swipe_controller_get_state; controller_class->get_state = sugar_swipe_controller_get_state;
controller_class->reset = sugar_swipe_controller_reset; controller_class->reset = sugar_swipe_controller_reset;
signals[SWIPE_FINISHED] = signals[SWIPE_ENDED] =
g_signal_new ("swipe-finished", g_signal_new ("swipe-ended",
SUGAR_TYPE_SWIPE_CONTROLLER, SUGAR_TYPE_SWIPE_CONTROLLER,
G_SIGNAL_RUN_FIRST, G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (SugarSwipeControllerClass, swipe_finished), G_STRUCT_OFFSET (SugarSwipeControllerClass, swipe_ended),
NULL, NULL, NULL, NULL,
g_cclosure_marshal_VOID__ENUM, g_cclosure_marshal_VOID__ENUM,
G_TYPE_NONE, 1, G_TYPE_NONE, 1,

View File

@ -58,8 +58,8 @@ struct _SugarSwipeControllerClass
{ {
SugarEventControllerClass parent_class; SugarEventControllerClass parent_class;
void (* swipe_finished) (SugarSwipeController *controller, void (* swipe_ended) (SugarSwipeController *controller,
SugarSwipeDirection direction); SugarSwipeDirection direction);
}; };
GType sugar_swipe_controller_get_type (void) G_GNUC_CONST; GType sugar_swipe_controller_get_type (void) G_GNUC_CONST;