diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-02-14 21:02:59 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-02-14 21:02:59 +0800 |
commit | 378a7c56b720dd4240d192c859737ea19e709fbf (patch) | |
tree | 45f82ede882ca6ad9fa16e0a059e4a0140e7ec03 /calendar/gui/e-tasks.c | |
parent | de5b206ef73db4f87f19ae4e5b943c28334425a8 (diff) | |
download | gsoc2013-evolution-378a7c56b720dd4240d192c859737ea19e709fbf.tar.gz gsoc2013-evolution-378a7c56b720dd4240d192c859737ea19e709fbf.tar.zst gsoc2013-evolution-378a7c56b720dd4240d192c859737ea19e709fbf.zip |
don't append 'calendar.ics' to the URI. (get_prop): finished.
2002-02-13 Rodrigo Moya <rodrigo@ximian.com>
* gui/control-factory.c (set_prop): don't append 'calendar.ics'
to the URI.
(get_prop): finished.
* gui/tasks-control.c (tasks_control_set_property): don't append
'tasks.ics' to the URI.
(tasks_control_get_property): finished.
* gui/gnome-cal.c (gnome_calendar_open):
* gui/e-tasks.c (e_tasks_open): append $filename.ics to the uri to be
opened if the uri is local. Leave intact in other cases.
svn path=/trunk/; revision=15724
Diffstat (limited to 'calendar/gui/e-tasks.c')
-rw-r--r-- | calendar/gui/e-tasks.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index 2fa52dd652..b9443a2875 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -29,6 +29,7 @@ #include <gal/menus/gal-view-instance.h> #include <gal/menus/gal-view-factory-etable.h> #include <gal/menus/gal-view-etable.h> +#include "e-util/e-url.h" #include "widgets/menus/gal-view-menus.h" #include "dialogs/task-editor.h" #include "cal-search-bar.h" @@ -332,6 +333,8 @@ e_tasks_open (ETasks *tasks, ETasksPrivate *priv; char *config_filename; char *message; + EUri *uri; + char *real_uri; g_return_val_if_fail (tasks != NULL, FALSE); g_return_val_if_fail (E_IS_TASKS (tasks), FALSE); @@ -339,12 +342,21 @@ e_tasks_open (ETasks *tasks, priv = tasks->priv; - message = g_strdup_printf (_("Opening tasks at %s"), file); + uri = e_uri_new (file); + if (!uri || !g_strncasecmp (uri->protocol, "file", 4)) + real_uri = g_concat_dir_and_file (file, "tasks.ics"); + else + real_uri = g_strdup (file); + + message = g_strdup_printf (_("Opening tasks at %s"), real_uri); set_status_message (tasks, message); g_free (message); - if (!cal_client_open_calendar (priv->client, file, FALSE)) { + if (!cal_client_open_calendar (priv->client, real_uri, FALSE)) { g_message ("e_tasks_open(): Could not issue the request"); + g_free (real_uri); + e_uri_free (uri); + return FALSE; } @@ -352,6 +364,8 @@ e_tasks_open (ETasks *tasks, e_calendar_table_load_state (E_CALENDAR_TABLE (priv->tasks_view), config_filename); g_free (config_filename); + g_free (real_uri); + e_uri_free (uri); return TRUE; } |