ekiga r6489 - trunk/lib/engine/gui/gtk-frontend
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6489 - trunk/lib/engine/gui/gtk-frontend
- Date: Thu, 24 Jul 2008 13:43:28 +0000 (UTC)
Author: jpuydt
Date: Thu Jul 24 13:43:28 2008
New Revision: 6489
URL: http://svn.gnome.org/viewvc/ekiga?rev=6489&view=rev
Log:
Added the "message-notice-event" signal to SimpleChatPage too... the chat window will have to count unreads itself
Modified:
trunk/lib/engine/gui/gtk-frontend/simple-chat-page.cpp
trunk/lib/engine/gui/gtk-frontend/simple-chat-page.h
Modified: trunk/lib/engine/gui/gtk-frontend/simple-chat-page.cpp
==============================================================================
--- trunk/lib/engine/gui/gtk-frontend/simple-chat-page.cpp (original)
+++ trunk/lib/engine/gui/gtk-frontend/simple-chat-page.cpp Thu Jul 24 13:43:28 2008
@@ -39,9 +39,23 @@
#include "presentity-view.h"
#include "chat-area.h"
+enum {
+ MESSAGE_NOTICE_EVENT,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
static GObjectClass *parent_class = NULL;
static void
+on_message_notice_event (G_GNUC_UNUSED GtkWidget* widget,
+ gpointer data)
+{
+ g_signal_emit (data, signals[MESSAGE_NOTICE_EVENT], 0);
+}
+
+static void
simple_chat_page_dispose (GObject *obj)
{
@@ -68,6 +82,7 @@
simple_chat_page_class_init (gpointer g_class,
G_GNUC_UNUSED gpointer class_data)
{
+ SimpleChatPageClass* simple_chat_page_class = NULL;
GObjectClass* gobject_class = NULL;
parent_class = (GObjectClass*)g_type_class_peek_parent (g_class);
@@ -75,6 +90,19 @@
gobject_class = (GObjectClass*)g_class;
gobject_class->dispose = simple_chat_page_dispose;
gobject_class->finalize = simple_chat_page_finalize;
+
+ signals[MESSAGE_NOTICE_EVENT] =
+ g_signal_new ("message-notice-event",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ChatAreaClass, message_notice_event),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ /* FIXME: is it useful? */
+ simple_chat_page_class = (SimpleChatPageClass*)g_class;
+ simple_chat_page_class->message_notice_event = NULL;
}
GType
@@ -122,6 +150,8 @@
gtk_box_pack_start (GTK_BOX (result), area,
TRUE, TRUE, 2);
gtk_widget_show (area);
+ g_signal_connect (area, "message-notice-event",
+ G_CALLBACK (on_message_notice_event), result);
return GTK_WIDGET (result);
}
Modified: trunk/lib/engine/gui/gtk-frontend/simple-chat-page.h
==============================================================================
--- trunk/lib/engine/gui/gtk-frontend/simple-chat-page.h (original)
+++ trunk/lib/engine/gui/gtk-frontend/simple-chat-page.h Thu Jul 24 13:43:28 2008
@@ -58,6 +58,9 @@
struct _SimpleChatPageClass {
GtkVBoxClass parent_class;
+
+ /* this is the "message-notice-event" signal */
+ void (*message_notice_event) (SimpleChatPage* self);
};
#define TYPE_SIMPLE_CHAT_PAGE (simple_chat_page_get_type())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]