summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-09-27 17:59:50 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-09-27 17:59:50 +0200
commitc930fdf055b346ffd6387f41952196219b3fe401 (patch)
tree1bf89f7e3433d25a4372e59faa0229a2417c45eb
parent0e040ab16fec64c504c1a83e18d65011dab1cb59 (diff)
cleanups
-rw-r--r--gtk/channel-display.c4
-rw-r--r--gtk/spice-channel-priv.h16
-rw-r--r--gtk/spice-channel.c16
3 files changed, 17 insertions, 19 deletions
diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index 6cc7bb6..6ddd1a0 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -92,6 +92,10 @@ static void spice_display_channel_class_init(SpiceDisplayChannelClass *klass)
G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
g_type_class_add_private(klass, sizeof(spice_display_channel));
+
+ sw_canvas_init();
+ quic_init();
+ rop3_init();
}
/* ------------------------------------------------------------------ */
diff --git a/gtk/spice-channel-priv.h b/gtk/spice-channel-priv.h
index fdd3ffc..b0b0faa 100644
--- a/gtk/spice-channel-priv.h
+++ b/gtk/spice-channel-priv.h
@@ -131,22 +131,14 @@ struct spice_channel {
int message_ack_count;
};
-enum {
- SPICE_CHANNEL_EVENT,
-
- SPICE_CHANNEL_LAST_SIGNAL,
-};
-
-extern guint channel_signals[SPICE_CHANNEL_LAST_SIGNAL];
+/* channel-*.c */
+void base_handle_set_ack(SpiceChannel *channel, spice_msg_in *in);
+void base_handle_ping(SpiceChannel *channel, spice_msg_in *in);
+void base_handle_notify(SpiceChannel *channel, spice_msg_in *in);
/* channel-display-mjpeg.c */
void stream_mjpeg_init(display_stream *st);
void stream_mjpeg_data(display_stream *st);
void stream_mjpeg_cleanup(display_stream *st);
-/* channel-*.c */
-void base_handle_set_ack(SpiceChannel *channel, spice_msg_in *in);
-void base_handle_ping(SpiceChannel *channel, spice_msg_in *in);
-void base_handle_notify(SpiceChannel *channel, spice_msg_in *in);
-
#endif /* __SPICE_CLIENT_CHANNEL_PRIV_H__ */
diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index dba87a6..25f8d90 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -29,7 +29,13 @@ enum {
PROP_CHANNEL_ID,
};
-guint channel_signals[SPICE_CHANNEL_LAST_SIGNAL];
+enum {
+ SPICE_CHANNEL_EVENT,
+
+ SPICE_CHANNEL_LAST_SIGNAL,
+};
+
+static guint signals[SPICE_CHANNEL_LAST_SIGNAL];
static void spice_channel_init(SpiceChannel *channel)
{
@@ -184,7 +190,7 @@ static void spice_channel_class_init(SpiceChannelClass *klass)
G_PARAM_STATIC_NICK |
G_PARAM_STATIC_BLURB));
- channel_signals[SPICE_CHANNEL_EVENT] =
+ signals[SPICE_CHANNEL_EVENT] =
g_signal_new("spice-channel-event",
G_OBJECT_CLASS_TYPE(gobject_class),
G_SIGNAL_RUN_FIRST,
@@ -197,10 +203,6 @@ static void spice_channel_class_init(SpiceChannelClass *klass)
g_type_class_add_private(klass, sizeof(spice_channel));
- sw_canvas_init();
- quic_init();
- rop3_init();
-
SSL_library_init();
SSL_load_error_strings();
}
@@ -208,7 +210,7 @@ static void spice_channel_class_init(SpiceChannelClass *klass)
static void spice_channel_emit_event(SpiceChannel *channel,
enum SpiceChannelEvent event)
{
- g_signal_emit(channel, channel_signals[SPICE_CHANNEL_EVENT], 0, event);
+ g_signal_emit(channel, signals[SPICE_CHANNEL_EVENT], 0, event);
}
/* ---------------------------------------------------------------- */