diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-02-27 00:30:19 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-02-27 00:30:19 +0800 |
commit | effbd15dbbe3a73a234febcc839e53285de6b534 (patch) | |
tree | ad79a22716fe187bd3e06277444fbb62ca22595a | |
parent | 3ca3e1aca17612c61b8af1c8759cc580f1c016d0 (diff) | |
download | gsoc2013-evolution-effbd15dbbe3a73a234febcc839e53285de6b534.tar.gz gsoc2013-evolution-effbd15dbbe3a73a234febcc839e53285de6b534.tar.zst gsoc2013-evolution-effbd15dbbe3a73a234febcc839e53285de6b534.zip |
display an error message if the call to gnome_calendar_open or
2002-02-26 Rodrigo Moya <rodrigo@ximian.com>
* gui/control-factory.c (set_prop):
* gui/tasks-control.c (tasks_control_set_property): display an error
message if the call to gnome_calendar_open or e_tasks_open does not
return TRUE. Fixes #20346.
svn path=/trunk/; revision=15845
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/control-factory.c | 12 | ||||
-rw-r--r-- | calendar/gui/tasks-control.c | 12 |
3 files changed, 29 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 61e8cc5cf1..b91ac9867b 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2002-02-26 Rodrigo Moya <rodrigo@ximian.com> + + * gui/control-factory.c (set_prop): + * gui/tasks-control.c (tasks_control_set_property): display an error + message if the call to gnome_calendar_open or e_tasks_open does not + return TRUE. Fixes #20346. + 2002-02-25 Dan Winship <danw@ximian.com> * gui/itip-utils.c (itip_send_comp): use diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c index 724d5881df..0d220a3a83 100644 --- a/calendar/gui/control-factory.c +++ b/calendar/gui/control-factory.c @@ -92,10 +92,20 @@ set_prop (BonoboPropertyBag *bag, gpointer user_data) { GnomeCalendar *gcal = user_data; + char *uri; switch (arg_id) { case PROPERTY_CALENDAR_URI_IDX: - gnome_calendar_open (gcal, BONOBO_ARG_GET_STRING (arg)); /* FIXME: result value -> exception? */ + uri = BONOBO_ARG_GET_STRING (arg); + if (!gnome_calendar_open (gcal, uri)) { + char *msg; + + msg = g_strdup_printf (_("Could not open the folder in '%s'"), uri); + gnome_error_dialog_parented ( + msg, + GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal)))); + g_free (msg); + } break; default: diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c index 08e363fe8e..4f892c486d 100644 --- a/calendar/gui/tasks-control.c +++ b/calendar/gui/tasks-control.c @@ -174,11 +174,21 @@ tasks_control_set_property (BonoboPropertyBag *bag, gpointer user_data) { ETasks *tasks = user_data; + char *uri; switch (arg_id) { case TASKS_CONTROL_PROPERTY_URI_IDX: - e_tasks_open (tasks, BONOBO_ARG_GET_STRING (arg)); + uri = BONOBO_ARG_GET_STRING (arg); + if (!e_tasks_open (tasks, uri)) { + char *msg; + + msg = g_strdup_printf (_("Could not load the tasks in `%s'"), uri); + gnome_error_dialog_parented ( + msg, + GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks)))); + g_free (msg); + } break; default: |