diff options
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 9 | ||||
-rw-r--r-- | calendar/gui/calendar-component.c | 13 | ||||
-rw-r--r-- | calendar/gui/component-factory.c | 13 |
3 files changed, 29 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index ee24dbf58a..bae6a3c3cc 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2000-06-09 Ettore Perazzoli <ettore@helixcode.com> + + * gui/component-factory.c (factory_fn): Pass NULL for the new args + @create_folder_fn and @remove_folder_fn. + (create_view): Updated to match the new + `EvolutionShellComponentCreateViewFn'. Return + `EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE' if type is not + "calendar". + 2000-06-09 Federico Mena Quintero <federico@helixcode.com> * idl/evolution-calendar.idl (Cal): Added a get_n_objects() diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 1509f70457..1b178cfdfc 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -47,17 +47,24 @@ static const EvolutionShellComponentFolderType folder_types[] = { /* EvolutionShellComponent methods and signals. */ -static BonoboControl * +static EvolutionShellComponentResult create_view (EvolutionShellComponent *shell_component, const char *physical_uri, + const char *type, + BonoboControl **control_return, void *closure) { BonoboControl *control; + if (g_strcasecmp (type, "calendar") != 0) + return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE; + control = control_factory_new_control (); bonobo_control_set_property (control, "folder_uri", physical_uri, NULL); - return control; + *control_return = control; + + return EVOLUTION_SHELL_COMPONENT_OK; } static void @@ -76,7 +83,7 @@ factory_fn (BonoboGenericFactory *factory, { EvolutionShellComponent *shell_component; - shell_component = evolution_shell_component_new (folder_types, create_view, NULL); + shell_component = evolution_shell_component_new (folder_types, create_view, NULL, NULL, NULL); gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", GTK_SIGNAL_FUNC (owner_set_cb), NULL); diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c index 1509f70457..1b178cfdfc 100644 --- a/calendar/gui/component-factory.c +++ b/calendar/gui/component-factory.c @@ -47,17 +47,24 @@ static const EvolutionShellComponentFolderType folder_types[] = { /* EvolutionShellComponent methods and signals. */ -static BonoboControl * +static EvolutionShellComponentResult create_view (EvolutionShellComponent *shell_component, const char *physical_uri, + const char *type, + BonoboControl **control_return, void *closure) { BonoboControl *control; + if (g_strcasecmp (type, "calendar") != 0) + return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE; + control = control_factory_new_control (); bonobo_control_set_property (control, "folder_uri", physical_uri, NULL); - return control; + *control_return = control; + + return EVOLUTION_SHELL_COMPONENT_OK; } static void @@ -76,7 +83,7 @@ factory_fn (BonoboGenericFactory *factory, { EvolutionShellComponent *shell_component; - shell_component = evolution_shell_component_new (folder_types, create_view, NULL); + shell_component = evolution_shell_component_new (folder_types, create_view, NULL, NULL, NULL); gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", GTK_SIGNAL_FUNC (owner_set_cb), NULL); |