aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-07-18 06:03:57 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-07-18 06:03:57 +0800
commit39c3739393bb6527a9829f1a0bdee27cff0da182 (patch)
treebd2d0649da89914a0a4ec78d8adb6d65e106ae0d /shell/e-shell-view.c
parent515ebfd45c748cf31e2f45fe9180f97e08051498 (diff)
downloadgsoc2013-evolution-39c3739393bb6527a9829f1a0bdee27cff0da182.tar.gz
gsoc2013-evolution-39c3739393bb6527a9829f1a0bdee27cff0da182.tar.zst
gsoc2013-evolution-39c3739393bb6527a9829f1a0bdee27cff0da182.zip
Get the EStorageSet from the shortcut's shell since there is no
* e-shortcuts-view-model.c (get_icon_for_item): Get the EStorageSet from the shortcut's shell since there is no e_shortcuts_get_storage_set() anymore. * e-shortcuts-view.c (get_shortcut_info): Likewise. (impl_shortcut_drag_motion): Likewise. (impl_shortcut_drag_data_received): Likewise. * e-shell.c (e_shell_construct): e_shortcuts_new_from_file(), not e_shortcuts_new() here. * e-shortcuts.c: Removed members storage_set and folder_type_registy in EShortcutsPrivate. New member shell. (init): Init to NULL. (e_shortcuts_construct): Removed arg @storage_set and @folder_type_registry, new arg @shell. (e_shortcuts_new): Removed. (e_shortcuts_new_from_file): New. (impl_destroy): Renamed from destroy(). (e_shortcuts_get_storage_set): Removed. (e_shortcuts_get_shell): New. (load_shortcuts): Accept any URI that can be parsed (by e_shell_parse_uri). * e-shell.c (e_shell_parse_uri): New. * e-shell-view.c (evolution_uri_for_default_uri): New. (display_uri): Use it to determine the evolution: uri given a default: uri. * e-shell.c (impl_Shell_handleURI): Pass it over to e_shell_create_view_from_uri_and_settings() even if it's an E_SHELL_DEFAULTURI_PREFIX. (handle_default_uri): Removed. svn path=/trunk/; revision=17497
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index a06e8eeabd..6e12ed4323 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -743,7 +743,7 @@ set_folder_timeout (gpointer data)
shell_view = E_SHELL_VIEW (data);
priv = shell_view->priv;
- /* set to 0 so we don't remove it in _display_uri() */
+ /* Set to 0 so we don't remove it in _display_uri(). */
priv->set_folder_timeout = 0;
e_shell_view_display_uri (shell_view, priv->set_folder_uri);
@@ -2208,6 +2208,25 @@ create_new_view_for_uri (EShellView *shell_view,
return TRUE;
}
+static char *
+evolution_uri_for_default_uri (EShell *shell,
+ const char *default_uri)
+{
+ char *uri;
+ char *path;
+ char *extra;
+
+ if (! e_shell_parse_uri (shell, default_uri, &path, &extra))
+ return NULL;
+
+ uri = g_strconcat (E_SHELL_URI_PREFIX, path, "#", extra, NULL);
+
+ g_free (path);
+ g_free (extra);
+
+ return uri;
+}
+
static gboolean
display_uri (EShellView *shell_view,
const char *uri,
@@ -2218,6 +2237,7 @@ display_uri (EShellView *shell_view,
gboolean retval;
const char *view_info;
char *real_uri;
+ char *allocated_uri = NULL;
priv = shell_view->priv;
@@ -2242,6 +2262,11 @@ display_uri (EShellView *shell_view,
goto end;
}
+ if (strncmp (uri, E_SHELL_DEFAULTURI_PREFIX, E_SHELL_DEFAULTURI_PREFIX_LEN) == 0) {
+ allocated_uri = evolution_uri_for_default_uri (e_shell_view_get_shell (shell_view), uri);
+ uri = allocated_uri;
+ }
+
view_info = strchr (uri, '#');
if (view_info) {
real_uri = g_strndup (uri, view_info - uri);
@@ -2297,6 +2322,8 @@ display_uri (EShellView *shell_view,
e_shell_view_get_current_folder_type (shell_view),
e_shell_view_get_current_component_id (shell_view));
+ g_free (allocated_uri);
+
return retval;
}