aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-10-30 11:48:43 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-10-30 11:48:43 +0800
commit1fc908bfb1f00c66e636b91e5e5b4ec30bc013eb (patch)
treeabd70b6318e318ba2b100a26e6b2da9b7af86359
parentac8cf2c210f655675c49f04fb7c3c679db4f1fae (diff)
downloadgsoc2013-evolution-1fc908bfb1f00c66e636b91e5e5b4ec30bc013eb.tar
gsoc2013-evolution-1fc908bfb1f00c66e636b91e5e5b4ec30bc013eb.tar.gz
gsoc2013-evolution-1fc908bfb1f00c66e636b91e5e5b4ec30bc013eb.tar.bz2
gsoc2013-evolution-1fc908bfb1f00c66e636b91e5e5b4ec30bc013eb.tar.lz
gsoc2013-evolution-1fc908bfb1f00c66e636b91e5e5b4ec30bc013eb.tar.xz
gsoc2013-evolution-1fc908bfb1f00c66e636b91e5e5b4ec30bc013eb.tar.zst
gsoc2013-evolution-1fc908bfb1f00c66e636b91e5e5b4ec30bc013eb.zip
Connect to manager's "ok" signal. (manager_ok_cb): Emit "ok"
2001-10-29 Jon Trowbridge <trow@ximian.com> * gui/component/select-names/e-select-names-bonobo.c (init): Connect to manager's "ok" signal. (manager_ok_cb): Emit "ok" bonobo-signal. * gui/component/select-names/e-select-names-manager.c (e_select_names_manager_class_init): Added "ok" signal. (e_select_names_clicked): Emit 'ok' signal. svn path=/trunk/; revision=14415
-rw-r--r--addressbook/ChangeLog10
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c57
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.c14
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.h1
4 files changed, 61 insertions, 21 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 6fd18c407b..e6a35a9c74 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,13 @@
+2001-10-29 Jon Trowbridge <trow@ximian.com>
+
+ * gui/component/select-names/e-select-names-bonobo.c (init):
+ Connect to manager's "ok" signal.
+ (manager_ok_cb): Emit "ok" bonobo-signal.
+
+ * gui/component/select-names/e-select-names-manager.c
+ (e_select_names_manager_class_init): Added "ok" signal.
+ (e_select_names_clicked): Emit 'ok' signal.
+
2001-10-29 Chris Toshok <toshok@ximian.com>
* gui/widgets/e-addressbook-util.c
diff --git a/addressbook/gui/component/select-names/e-select-names-bonobo.c b/addressbook/gui/component/select-names/e-select-names-bonobo.c
index ca37ccce21..70cacc6c6e 100644
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.c
+++ b/addressbook/gui/component/select-names/e-select-names-bonobo.c
@@ -243,6 +243,37 @@ entry_changed (GtkWidget *widget, BonoboControl *control)
bonobo_control_set_property (control, "entry_changed", TRUE, NULL);
}
+static void
+manager_changed_cb (ESelectNamesManager *manager, const gchar *section_id, gint changed_working_copy, gpointer closure)
+{
+ ESelectNamesBonobo *select_names = E_SELECT_NAMES_BONOBO (closure);
+ BonoboArg *arg;
+
+ arg = bonobo_arg_new (BONOBO_ARG_STRING);
+ BONOBO_ARG_SET_STRING (arg, section_id);
+
+ bonobo_event_source_notify_listeners_full (select_names->priv->event_source,
+ "GNOME/Evolution",
+ "changed",
+ changed_working_copy ? "working_copy" : "model",
+ arg, NULL);
+
+ bonobo_arg_release (arg);
+}
+
+static void
+manager_ok_cb (ESelectNamesManager *manager, gpointer closure)
+{
+ ESelectNamesBonobo *select_names = E_SELECT_NAMES_BONOBO (closure);
+
+ bonobo_event_source_notify_listeners_full (select_names->priv->event_source,
+ "GNOME/Evolution",
+ "ok",
+ "dialog",
+ NULL,
+ NULL);
+}
+
static Bonobo_Control
impl_SelectNames_get_entry_for_section (PortableServer_Servant servant,
const CORBA_char *section_id,
@@ -288,8 +319,7 @@ impl_SelectNames_get_entry_for_section (PortableServer_Servant servant,
bonobo_control_set_properties (control, property_bag);
- gtk_signal_connect (GTK_OBJECT (entry_widget), "changed",
- GTK_SIGNAL_FUNC (entry_changed), control);
+ gtk_signal_connect (GTK_OBJECT (entry_widget), "changed", GTK_SIGNAL_FUNC (entry_changed), control);
return CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (control)), ev);
}
@@ -365,24 +395,6 @@ class_init (ESelectNamesBonoboClass *klass)
}
static void
-manager_changed_cb (ESelectNamesManager *manager, const gchar *section_id, gint changed_working_copy, gpointer closure)
-{
- ESelectNamesBonobo *select_names = E_SELECT_NAMES_BONOBO (closure);
- BonoboArg *arg;
-
- arg = bonobo_arg_new (BONOBO_ARG_STRING);
- BONOBO_ARG_SET_STRING (arg, section_id);
-
- bonobo_event_source_notify_listeners_full (select_names->priv->event_source,
- "GNOME/Evolution",
- "changed",
- changed_working_copy ? "working_copy" : "model",
- arg, NULL);
-
- bonobo_arg_release (arg);
-}
-
-static void
init (ESelectNamesBonobo *select_names)
{
ESelectNamesBonoboPrivate *priv;
@@ -397,6 +409,11 @@ init (ESelectNamesBonobo *select_names)
GTK_SIGNAL_FUNC (manager_changed_cb),
select_names);
+ gtk_signal_connect (GTK_OBJECT (priv->manager),
+ "ok",
+ GTK_SIGNAL_FUNC (manager_ok_cb),
+ select_names);
+
select_names->priv = priv;
}
diff --git a/addressbook/gui/component/select-names/e-select-names-manager.c b/addressbook/gui/component/select-names/e-select-names-manager.c
index 10b7662b31..2ba538b63f 100644
--- a/addressbook/gui/component/select-names/e-select-names-manager.c
+++ b/addressbook/gui/component/select-names/e-select-names-manager.c
@@ -34,6 +34,7 @@ enum {
enum {
CHANGED,
+ OK,
LAST_SIGNAL
};
@@ -161,6 +162,15 @@ e_select_names_manager_class_init (ESelectNamesManagerClass *klass)
GTK_TYPE_NONE, 2,
GTK_TYPE_POINTER,
GTK_TYPE_INT);
+
+ e_select_names_manager_signals[OK] =
+ gtk_signal_new ("ok",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (ESelectNamesManagerClass, ok),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
gtk_object_class_add_signals (object_class, e_select_names_manager_signals, LAST_SIGNAL);
}
@@ -526,7 +536,9 @@ e_select_names_clicked(ESelectNames *dialog, gint button, ESelectNamesManager *m
switch(button) {
case 0:
- /* We don't need to do anything if they click on OK */
+ /* We don't need to do much if they click on OK */
+
+ gtk_signal_emit (GTK_OBJECT (manager), e_select_names_manager_signals[OK]);
break;
case 1: {
diff --git a/addressbook/gui/component/select-names/e-select-names-manager.h b/addressbook/gui/component/select-names/e-select-names-manager.h
index 99f01cb818..1304a13a71 100644
--- a/addressbook/gui/component/select-names/e-select-names-manager.h
+++ b/addressbook/gui/component/select-names/e-select-names-manager.h
@@ -39,6 +39,7 @@ struct _ESelectNamesManagerClass {
GtkObjectClass parent_class;
void (*changed) (ESelectNamesManager *, const gchar *section_id, gint changed_working_copy);
+ void (*ok) (ESelectNamesManager *);
};
ESelectNamesManager *e_select_names_manager_new (void);