aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2001-01-10 07:55:13 +0800
committerChris Toshok <toshok@src.gnome.org>2001-01-10 07:55:13 +0800
commitf75e9f44f928347bb280e927de94e861dcf3260a (patch)
tree0875821393161e6f61210a6ad6597770f33a2ef7 /addressbook/gui/widgets
parent289cbd41bc8c3bdfe417f3c78e5061bbed07dcfb (diff)
downloadgsoc2013-evolution-f75e9f44f928347bb280e927de94e861dcf3260a.tar
gsoc2013-evolution-f75e9f44f928347bb280e927de94e861dcf3260a.tar.gz
gsoc2013-evolution-f75e9f44f928347bb280e927de94e861dcf3260a.tar.bz2
gsoc2013-evolution-f75e9f44f928347bb280e927de94e861dcf3260a.tar.lz
gsoc2013-evolution-f75e9f44f928347bb280e927de94e861dcf3260a.tar.xz
gsoc2013-evolution-f75e9f44f928347bb280e927de94e861dcf3260a.tar.zst
gsoc2013-evolution-f75e9f44f928347bb280e927de94e861dcf3260a.zip
connect with the EAddressbookView's status_message signal.
2001-01-09 Chris Toshok <toshok@helixcode.com> * gui/component/addressbook.c (addressbook_factory_new_control): connect with the EAddressbookView's status_message signal. (set_status_message): set the status message on the ShellView Interface associated with our control. (retrieve_shell_view_interface_from_control): new function. get the shell view inteface associated with a control. * gui/widgets/e-addressbook-view.c (e_addressbook_view_class_init): register status_message signal. (status_message): new function, emit our status_message signal. (change_view_type): connect with the view->object's "status_message" signal. * gui/widgets/e-addressbook-view.h (struct _EAddressbookViewClass): add status_message signal. svn path=/trunk/; revision=7346
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c23
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.h5
2 files changed, 26 insertions, 2 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 416b1e71e6..0c977a2a35 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -68,6 +68,13 @@ enum {
ARG_TYPE,
};
+enum {
+ STATUS_MESSAGE,
+ LAST_SIGNAL
+};
+
+static guint e_addressbook_view_signals [LAST_SIGNAL] = {0, };
+
GtkType
e_addressbook_view_get_type (void)
{
@@ -111,6 +118,16 @@ e_addressbook_view_class_init (EAddressbookViewClass *klass)
GTK_ARG_READWRITE, ARG_QUERY);
gtk_object_add_arg_type ("EAddressbookView::type", GTK_TYPE_ENUM,
GTK_ARG_READWRITE, ARG_TYPE);
+
+ e_addressbook_view_signals [STATUS_MESSAGE] =
+ gtk_signal_new ("status_message",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EAddressbookViewClass, status_message),
+ gtk_marshal_NONE__POINTER,
+ GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
+
+ gtk_object_class_add_signals (object_class, e_addressbook_view_signals, LAST_SIGNAL);
}
static void
@@ -536,9 +553,11 @@ table_right_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, EA
}
static void
-status_message (GtkObject *object, const gchar *message, EAddressbookView *eav)
+status_message (GtkObject *object, const gchar *status, EAddressbookView *eav)
{
- printf ("status = %s\n", message);
+ gtk_signal_emit (GTK_OBJECT (eav),
+ e_addressbook_view_signals [STATUS_MESSAGE],
+ status);
}
#define SPEC "<?xml version=\"1.0\"?> \
diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h
index 28c70798fc..ca6cedf0b8 100644
--- a/addressbook/gui/widgets/e-addressbook-view.h
+++ b/addressbook/gui/widgets/e-addressbook-view.h
@@ -73,6 +73,11 @@ struct _EAddressbookView
struct _EAddressbookViewClass
{
GtkTableClass parent_class;
+
+ /*
+ * Signals
+ */
+ void (*status_message) (EAddressbookView *view, const gchar *message);
};
GtkWidget *e_addressbook_view_new (void);