From e9a5c3d19ce9cd6c68b4dc288215464d06868e3b Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Sun, 20 May 2001 14:45:47 +0000 Subject: Implemented the "Copy Folder" and "Move Folder" menu items. Untested. svn path=/trunk/; revision=9899 --- shell/e-shell-view.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'shell/e-shell-view.c') diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 8806b56ff4..73b7e3ba20 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -1770,6 +1770,14 @@ e_shell_view_get_appbar (EShellView *shell_view) return shell_view->priv->appbar; } +/** + * e_shell_view_get_current_uri: + * @shell_view: A pointer to an EShellView object + * + * Get the URI currently displayed by this shell view. + * + * Return value: + **/ const char * e_shell_view_get_current_uri (EShellView *shell_view) { @@ -1779,6 +1787,32 @@ e_shell_view_get_current_uri (EShellView *shell_view) return shell_view->priv->uri; } +/** + * e_shell_view_get_current_path: + * @shell_view: A pointer to an EShellView object + * + * Get the path of the current displayed folder. + * + * Return value: + **/ +const char * +e_shell_view_get_current_path (EShellView *shell_view) +{ + const char *current_uri; + const char *current_path; + + current_uri = e_shell_view_get_current_uri (shell_view); + if (current_uri == NULL) + return NULL; + + if (strncmp (current_uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0) + current_path = current_uri + E_SHELL_URI_PREFIX_LEN; + else + current_path = NULL; + + return current_path; +} + static void save_shortcut_bar_icon_modes (EShellView *shell_view) { -- cgit v1.2.3