diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/calendar-commands.c | 6 | ||||
-rw-r--r-- | calendar/gui/calendar-component.c | 7 | ||||
-rw-r--r-- | calendar/gui/calendar-summary.h | 2 | ||||
-rw-r--r-- | calendar/gui/component-factory.c | 7 | ||||
-rw-r--r-- | calendar/gui/control-factory.c | 3 |
5 files changed, 22 insertions, 3 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index f56d941d2c..7519e0458e 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -428,10 +428,14 @@ new_calendar (void) GtkWidget *gcal; gcal = gnome_calendar_new (); + if (!gcal) { + gnome_warning_dialog (_("Could not create the calendar view. Please check your " + "ORBit and OAF setup.")); + return NULL; + } all_calendars = g_list_prepend (all_calendars, gcal); - gtk_widget_show (gcal); return GNOME_CALENDAR (gcal); } diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index dd1b6edb3a..700631b78d 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -58,6 +58,9 @@ create_view (EvolutionShellComponent *shell_component, return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE; control = control_factory_new_control (); + if (!control) + return EVOLUTION_SHELL_COMPONENT_CORBAERROR; + bonobo_control_set_property (control, "folder_uri", physical_uri, NULL); *control_return = control; @@ -97,7 +100,8 @@ factory_fn (BonoboGenericFactory *factory, { EvolutionShellComponent *shell_component; - shell_component = evolution_shell_component_new (folder_types, create_view, NULL, NULL, NULL, NULL); + shell_component = evolution_shell_component_new (folder_types, + create_view, NULL, NULL, NULL, NULL); gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", GTK_SIGNAL_FUNC (owner_set_cb), NULL); @@ -108,6 +112,7 @@ factory_fn (BonoboGenericFactory *factory, } + void component_factory_init (void) { diff --git a/calendar/gui/calendar-summary.h b/calendar/gui/calendar-summary.h index 259fe355de..0fd3c3e7d6 100644 --- a/calendar/gui/calendar-summary.h +++ b/calendar/gui/calendar-summary.h @@ -26,6 +26,8 @@ #include <evolution-services/executive-summary-component.h> +BonoboGenericFactory *calendar_summary_factory_init (void); + BonoboObject *create_summary_view (ExecutiveSummaryComponentFactory *_factory, void *closure); diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c index dd1b6edb3a..700631b78d 100644 --- a/calendar/gui/component-factory.c +++ b/calendar/gui/component-factory.c @@ -58,6 +58,9 @@ create_view (EvolutionShellComponent *shell_component, return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE; control = control_factory_new_control (); + if (!control) + return EVOLUTION_SHELL_COMPONENT_CORBAERROR; + bonobo_control_set_property (control, "folder_uri", physical_uri, NULL); *control_return = control; @@ -97,7 +100,8 @@ factory_fn (BonoboGenericFactory *factory, { EvolutionShellComponent *shell_component; - shell_component = evolution_shell_component_new (folder_types, create_view, NULL, NULL, NULL, NULL); + shell_component = evolution_shell_component_new (folder_types, + create_view, NULL, NULL, NULL, NULL); gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", GTK_SIGNAL_FUNC (owner_set_cb), NULL); @@ -108,6 +112,7 @@ factory_fn (BonoboGenericFactory *factory, } + void component_factory_init (void) { diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c index ddec91be71..17e4c9d622 100644 --- a/calendar/gui/control-factory.c +++ b/calendar/gui/control-factory.c @@ -165,6 +165,9 @@ control_factory_new_control (void) GnomeCalendar *gcal; gcal = new_calendar (); + if (!gcal) + return NULL; + gtk_widget_show (GTK_WIDGET (gcal)); control = bonobo_control_new (GTK_WIDGET (gcal)); |