[cheese] CheeseCamera: Rename a default signal handler, for clarity.
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] CheeseCamera: Rename a default signal handler, for clarity.
- Date: Mon, 7 Mar 2011 09:41:32 +0000 (UTC)
commit 790dbad849fbf567030c289b733254495e396794
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Feb 25 12:59:24 2011 +0100
CheeseCamera: Rename a default signal handler, for clarity.
* libcheese/cheese-camera.[h|cc]: Rename the default signal handler
for the state-flags-changed signal from state_changed to
state_flags_changed, to make the code clearer. Rename the enum ID
for this signal likewise.
This should also help any language bindings that offer the ability
to override the default signal handler, because they will assume
that the name matches.
libcheese/cheese-camera.c | 8 ++++----
libcheese/cheese-camera.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index bfb7772..69b47cd 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -101,7 +101,7 @@ enum
PHOTO_SAVED,
PHOTO_TAKEN,
VIDEO_SAVED,
- STATE_CHANGED,
+ STATE_FLAGS_CHANGED,
LAST_SIGNAL
};
@@ -242,7 +242,7 @@ cheese_camera_bus_message_cb (GstBus *bus, GstMessage *message, CheeseCamera *ca
GstState old, new;
gst_message_parse_state_changed (message, &old, &new, NULL);
if (new == GST_STATE_PLAYING)
- g_signal_emit (camera, camera_signals[STATE_CHANGED], 0, new);
+ g_signal_emit (camera, camera_signals[STATE_FLAGS_CHANGED], 0, new);
}
break;
}
@@ -1088,9 +1088,9 @@ cheese_camera_class_init (CheeseCameraClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- camera_signals[STATE_CHANGED] = g_signal_new ("state-flags-changed", G_OBJECT_CLASS_TYPE (klass),
+ camera_signals[STATE_FLAGS_CHANGED] = g_signal_new ("state-flags-changed", G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (CheeseCameraClass, state_changed),
+ G_STRUCT_OFFSET (CheeseCameraClass, state_flags_changed),
NULL, NULL,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
diff --git a/libcheese/cheese-camera.h b/libcheese/cheese-camera.h
index e129828..ae0e1e9 100644
--- a/libcheese/cheese-camera.h
+++ b/libcheese/cheese-camera.h
@@ -51,7 +51,7 @@ typedef struct
void (*photo_saved)(CheeseCamera *camera);
void (*photo_taken)(CheeseCamera *camera, GdkPixbuf *pixbuf);
void (*video_saved)(CheeseCamera *camera);
- void (*state_changed)(CheeseCamera *camera, GstState new_state);
+ void (*state_flags_changed)(CheeseCamera *camera, GstState new_state);
} CheeseCameraClass;
enum CheeseCameraError
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]