aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog18
-rw-r--r--shell/Evolution-ConfigControl.idl13
-rw-r--r--shell/e-corba-config-page.c105
-rw-r--r--shell/evolution-config-control.c64
-rw-r--r--shell/evolution-config-control.h6
5 files changed, 22 insertions, 184 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 4fe778ac9a..3ab4e72c68 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,21 @@
+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.
+
2004-03-31 Rodney Dawes <dobey@ximian.com>
* e-shell-importer.c (choose_importer_from_list):
diff --git a/shell/Evolution-ConfigControl.idl b/shell/Evolution-ConfigControl.idl
index 059ed6b286..dfe99dd644 100644
--- a/shell/Evolution-ConfigControl.idl
+++ b/shell/Evolution-ConfigControl.idl
@@ -11,24 +11,11 @@
module GNOME {
module Evolution {
interface ConfigControl : Bonobo::Unknown {
- /* Apply the current settings. */
- void apply ();
-
/* The actual Control. */
readonly attribute Bonobo::Control control;
/* Get the event source for this control. */
readonly attribute Bonobo::EventSource eventSource;
-
- /* These are the events that get emitted when the properties of
- the dialog change:
-
- - "changed"
-
- Emitted when the data entered changes, and thus
- doesn't match the applied settings anymore. The user must
- assume this to be true until ::apply gets invoked.
- */
};
}; /* module Evolution */
}; /* module GNOME */
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. */
diff --git a/shell/evolution-config-control.c b/shell/evolution-config-control.c
index 4b8c884867..b5224bdc3c 100644
--- a/shell/evolution-config-control.c
+++ b/shell/evolution-config-control.c
@@ -40,18 +40,10 @@
static BonoboObjectClass *parent_class = NULL;
struct _EvolutionConfigControlPrivate {
- gboolean changed;
BonoboControl *control;
BonoboEventSource *event_source;
};
-enum {
- APPLY,
- LAST_SIGNAL
-};
-static int signals[LAST_SIGNAL] = { 0 };
-
-
/* GObject methods. */
static void
@@ -93,21 +85,6 @@ impl_finalize (GObject *object)
/* Evolution::ConfigControl CORBA methods. */
-static void
-impl_apply (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- EvolutionConfigControl *config_control;
- EvolutionConfigControlPrivate *priv;
-
- config_control = EVOLUTION_CONFIG_CONTROL (bonobo_object_from_servant (servant));
- priv = config_control->priv;
-
- g_signal_emit (config_control, signals[APPLY], 0);
-
- priv->changed = FALSE;
-}
-
static Bonobo_Control
impl__get_control (PortableServer_Servant servant,
CORBA_Environment *ev)
@@ -150,18 +127,9 @@ evolution_config_control_class_init (EvolutionConfigControlClass *class)
object_class->finalize = impl_finalize;
epv = &class->epv;
- epv->apply = impl_apply;
epv->_get_control = impl__get_control;
epv->_get_eventSource = impl__get_eventSource;
-
- signals[APPLY] = g_signal_new ("apply",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EvolutionConfigControlClass, apply),
- NULL, NULL,
- e_shell_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
-
+
parent_class = g_type_class_ref (PARENT_TYPE);
}
@@ -171,7 +139,6 @@ evolution_config_control_init (EvolutionConfigControl *config_control)
EvolutionConfigControlPrivate *priv;
priv = g_new (EvolutionConfigControlPrivate, 1);
- priv->changed = FALSE;
priv->control = NULL;
priv->event_source = bonobo_event_source_new ();
@@ -206,35 +173,6 @@ evolution_config_control_new (GtkWidget *widget)
return new;
}
-void
-evolution_config_control_changed (EvolutionConfigControl *config_control)
-{
- EvolutionConfigControlPrivate *priv;
- CORBA_Environment ev;
- CORBA_any *null_value;
-
- g_return_if_fail (EVOLUTION_IS_CONFIG_CONTROL (config_control));
-
- priv = config_control->priv;
-
- if (priv->changed)
- return;
-
- priv->changed = TRUE;
-
- CORBA_exception_init (&ev);
-
- null_value = CORBA_any__alloc ();
- null_value->_type = TC_null;
-
- bonobo_event_source_notify_listeners (priv->event_source, "changed", null_value, &ev);
-
- CORBA_free (null_value);
-
- CORBA_exception_free (&ev);
-}
-
-
BONOBO_TYPE_FUNC_FULL (EvolutionConfigControl,
GNOME_Evolution_ConfigControl,
PARENT_TYPE,
diff --git a/shell/evolution-config-control.h b/shell/evolution-config-control.h
index 41e5da856c..d5b9d38904 100644
--- a/shell/evolution-config-control.h
+++ b/shell/evolution-config-control.h
@@ -53,10 +53,6 @@ struct _EvolutionConfigControlClass {
BonoboObjectClass parent_class;
POA_GNOME_Evolution_ConfigControl__epv epv;
-
- /* Signals. */
-
- void (* apply) (EvolutionConfigControl *control);
};
@@ -65,6 +61,4 @@ EvolutionConfigControl *evolution_config_control_new (GtkWidget
void evolution_config_control_construct (EvolutionConfigControl *control,
GtkWidget *widget);
-void evolution_config_control_changed (EvolutionConfigControl *config_control);
-
#endif /* EVOLUTION_CONFIG_CONTROL_H */