aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-corba-config-page.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-08 04:48:40 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-08 04:48:40 +0800
commit5ffbd120533029408a898318f26ebee9d95b8433 (patch)
treef12e74bcc255d36d4bbebf12219ae86d6aba1838 /shell/e-corba-config-page.c
parent70bc05259b1f4cde235b39e55f095dc9cfdbcb12 (diff)
downloadgsoc2013-evolution-5ffbd120533029408a898318f26ebee9d95b8433.tar
gsoc2013-evolution-5ffbd120533029408a898318f26ebee9d95b8433.tar.gz
gsoc2013-evolution-5ffbd120533029408a898318f26ebee9d95b8433.tar.bz2
gsoc2013-evolution-5ffbd120533029408a898318f26ebee9d95b8433.tar.lz
gsoc2013-evolution-5ffbd120533029408a898318f26ebee9d95b8433.tar.xz
gsoc2013-evolution-5ffbd120533029408a898318f26ebee9d95b8433.tar.zst
gsoc2013-evolution-5ffbd120533029408a898318f26ebee9d95b8433.zip
Removed the "apply" method.
2004-04-07 Jeffrey Stedfast <fejj@ximian.com> * Evolution-ConfigControl.idl: Removed the "apply" method. * e-corba-config-page.c: We can probably remove this entire file, it seems pretty useless. But until I know for sure, I guess I won't bother. (impl_apply): Removed, no longer a valid interface. (listener_event_callback): Huh? calls a non-existant function if the event name was "changed". Uhm, yea...ok. Removed. (setup_listener): Removed. Did nothing but to setup the above listener. * evolution-config-control.c: No longer needs to keep 'changed' state. (evolution_config_control_changed): Removed. (impl_apply): Removed. No lonegr a valid interface. svn path=/trunk/; revision=25361
Diffstat (limited to 'shell/e-corba-config-page.c')
-rw-r--r--shell/e-corba-config-page.c105
1 files changed, 3 insertions, 102 deletions
diff --git a/shell/e-corba-config-page.c b/shell/e-corba-config-page.c
index 50fd1bdfd6..9e26785dac 100644
--- a/shell/e-corba-config-page.c
+++ b/shell/e-corba-config-page.c
@@ -42,66 +42,8 @@ static EConfigPageClass *parent_class = NULL;
struct _ECorbaConfigPagePrivate {
GNOME_Evolution_ConfigControl config_control_interface;
-
- BonoboListener *listener;
-
- Bonobo_EventSource event_source;
};
-
-/* ::ConfigControl interface handling. */
-
-static void
-listener_event_callback (BonoboListener *listener,
- const char *event_name,
- const CORBA_any *any,
- CORBA_Environment *ev,
- void *data)
-{
- ECorbaConfigPage *corba_config_page;
-
- corba_config_page = E_CORBA_CONFIG_PAGE (data);
-
- if (strcmp (event_name, "changed") == 0)
- e_config_page_changed (E_CONFIG_PAGE (corba_config_page));
-}
-
-static void
-setup_listener (ECorbaConfigPage *corba_config_page,
- GNOME_Evolution_ConfigControl config_control_interface)
-{
- ECorbaConfigPagePrivate *priv;
- Bonobo_EventSource event_source;
- CORBA_Environment ev;
-
- priv = corba_config_page->priv;
-
- CORBA_exception_init (&ev);
-
- event_source = GNOME_Evolution_ConfigControl__get_eventSource (config_control_interface, &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Cannot get eventSource interface for ConfigPage -- %s", BONOBO_EX_REPOID (&ev));
- } else {
- priv->listener = bonobo_listener_new (listener_event_callback, corba_config_page);
- Bonobo_EventSource_addListener (event_source,
- bonobo_object_corba_objref (BONOBO_OBJECT (priv->listener)),
- &ev);
-
- if (! BONOBO_EX (&ev)) {
- priv->config_control_interface = config_control_interface;
- priv->event_source = event_source;
- } else {
- g_warning ("Cannot add listener for ConfigPage -- %s", BONOBO_EX_REPOID (&ev));
-
- bonobo_object_unref (BONOBO_OBJECT (priv->listener));
- priv->listener = NULL;
- }
- }
-
- CORBA_exception_free (&ev);
-}
-
-
/* GObject methods. */
static void
@@ -120,19 +62,7 @@ impl_dispose (GObject *object)
bonobo_object_release_unref (priv->config_control_interface, &ev);
priv->config_control_interface = CORBA_OBJECT_NIL;
}
-
- if (priv->listener != NULL) {
- Bonobo_EventSource_removeListener (priv->event_source,
- bonobo_object_corba_objref (BONOBO_OBJECT (priv->listener)),
- &ev);
-
- bonobo_object_unref (BONOBO_OBJECT (priv->listener));
- bonobo_object_release_unref (priv->event_source, &ev);
-
- priv->event_source = CORBA_OBJECT_NIL;
- priv->listener = NULL;
- }
-
+
CORBA_exception_free (&ev);
(* G_OBJECT_CLASS (parent_class)->dispose) (object);
@@ -152,30 +82,6 @@ impl_finalize (GObject *object)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
-
-/* EConfigPage methods. */
-
-static void
-impl_apply (EConfigPage *config_page)
-{
- ECorbaConfigPage *corba_config_page;
- ECorbaConfigPagePrivate *priv;
- CORBA_Environment ev;
-
- corba_config_page = E_CORBA_CONFIG_PAGE (config_page);
- priv = corba_config_page->priv;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_ConfigControl_apply (priv->config_control_interface, &ev);
-
- if (BONOBO_EX (&ev))
- g_warning ("Cannot apply settings -- %s", BONOBO_EX_REPOID (&ev));
-
- CORBA_exception_free (&ev);
-}
-
-
/* GTK+ ctors. */
static void
@@ -189,7 +95,6 @@ class_init (ECorbaConfigPageClass *class)
object_class->finalize = impl_finalize;
config_page_class = E_CONFIG_PAGE_CLASS (class);
- config_page_class->apply = impl_apply;
parent_class = g_type_class_ref(PARENT_TYPE);
}
@@ -201,9 +106,7 @@ init (ECorbaConfigPage *corba_config_page)
priv = g_new (ECorbaConfigPagePrivate, 1);
priv->config_control_interface = CORBA_OBJECT_NIL;
- priv->listener = NULL;
- priv->event_source = CORBA_OBJECT_NIL;
-
+
corba_config_page->priv = priv;
}
@@ -231,9 +134,7 @@ e_corba_config_page_construct (ECorbaConfigPage *corba_config_page,
control_widget = bonobo_widget_new_control_from_objref (control, CORBA_OBJECT_NIL);
gtk_widget_show (control_widget);
gtk_container_add (GTK_CONTAINER (corba_config_page), control_widget);
-
- setup_listener (corba_config_page, corba_object);
-
+
/* Notice we *don't* unref the corba_object here as
bonobo_widget_new_control_from_objref() effectively takes ownership
for the object that we get from ::__get_control. */