aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view-menu.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-06-10 03:19:36 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-06-10 03:19:36 +0800
commit7f36752a67c274640378ec096f37e690fd5ca8ed (patch)
treedcc3124da275074dcf11803bb553d2af384858db /shell/e-shell-view-menu.c
parent59d329b5b090175e2ea5ffd06cb20dfcd41a7688 (diff)
downloadgsoc2013-evolution-7f36752a67c274640378ec096f37e690fd5ca8ed.tar
gsoc2013-evolution-7f36752a67c274640378ec096f37e690fd5ca8ed.tar.gz
gsoc2013-evolution-7f36752a67c274640378ec096f37e690fd5ca8ed.tar.bz2
gsoc2013-evolution-7f36752a67c274640378ec096f37e690fd5ca8ed.tar.lz
gsoc2013-evolution-7f36752a67c274640378ec096f37e690fd5ca8ed.tar.xz
gsoc2013-evolution-7f36752a67c274640378ec096f37e690fd5ca8ed.tar.zst
gsoc2013-evolution-7f36752a67c274640378ec096f37e690fd5ca8ed.zip
Initial support for creating/removing folders. This implies some new
IDL methods and new functions to implement on the component side. I have also added a simple folder creation dialog in the shell. It's quite unfinished and untested. svn path=/trunk/; revision=3491
Diffstat (limited to 'shell/e-shell-view-menu.c')
-rw-r--r--shell/e-shell-view-menu.c46
1 files changed, 27 insertions, 19 deletions
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c
index 9aef0d8a97..8dec015f8d 100644
--- a/shell/e-shell-view-menu.c
+++ b/shell/e-shell-view-menu.c
@@ -26,7 +26,9 @@
#include <config.h>
#include <gnome.h>
-#include "e-shell-view.h"
+#include "e-shell-folder-creation-dialog.h"
+#include "e-shell-constants.h"
+
#include "e-shell-view-menu.h"
@@ -218,6 +220,30 @@ command_toggle_shortcut_bar (BonoboUIHandler *uih,
}
+static void
+command_new_folder (BonoboUIHandler *uih,
+ void *data,
+ const char *path)
+{
+ EShellView *shell_view;
+ EShell *shell;
+ const char *current_uri;
+ const char *default_parent_folder;
+
+ shell_view = E_SHELL_VIEW (data);
+ shell = e_shell_view_get_shell (shell_view);
+ current_uri = e_shell_view_get_current_uri (shell_view);
+
+ if (strncmp (current_uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0)
+ default_parent_folder = current_uri + E_SHELL_URI_PREFIX_LEN;
+ else
+ default_parent_folder = NULL;
+
+ e_shell_show_folder_creation_dialog (shell, GTK_WINDOW (shell_view),
+ default_parent_folder);
+}
+
+
/* Unimplemented commands. */
#define DEFINE_UNIMPLEMENTED(func) \
@@ -227,7 +253,6 @@ func (GtkWidget *widget, gpointer data) \
g_warning ("EShellView: %s: not implemented.", __FUNCTION__); \
} \
-DEFINE_UNIMPLEMENTED (command_new_folder)
DEFINE_UNIMPLEMENTED (command_new_shortcut)
DEFINE_UNIMPLEMENTED (command_new_mail_message)
DEFINE_UNIMPLEMENTED (command_new_meeting_request)
@@ -237,7 +262,6 @@ DEFINE_UNIMPLEMENTED (command_new_task_request)
DEFINE_UNIMPLEMENTED (command_new_journal_entry)
DEFINE_UNIMPLEMENTED (command_new_note)
DEFINE_UNIMPLEMENTED (command_open_selected_items)
-DEFINE_UNIMPLEMENTED (command_save_as)
DEFINE_UNIMPLEMENTED (command_close_open_items)
@@ -299,28 +323,12 @@ static GnomeUIInfo menu_file_open [] = {
GNOMEUIINFO_END
};
-static GnomeUIInfo menu_folder [] = {
- { GNOME_APP_UI_ITEM, N_("_New Folder"), NULL,
- command_new_folder, NULL,
- NULL, 0, 0, 'e', GDK_CONTROL_MASK | GDK_SHIFT_MASK },
-
- GNOMEUIINFO_END
-};
-
static GnomeUIInfo menu_file [] = {
GNOMEUIINFO_SUBTREE_STOCK (N_("_New"), menu_file_new, GNOME_STOCK_MENU_NEW),
GNOMEUIINFO_SUBTREE_STOCK (N_("_Open"), menu_file_open, GNOME_STOCK_MENU_NEW),
GNOMEUIINFO_ITEM_NONE (N_("Clos_e All Items"), N_("Closes all the open items"), command_close_open_items),
GNOMEUIINFO_SEPARATOR,
- GNOMEUIINFO_MENU_SAVE_AS_ITEM (command_save_as, NULL),
-
- GNOMEUIINFO_SEPARATOR,
-
- GNOMEUIINFO_SUBTREE (N_("_Folder"), menu_folder),
-
- GNOMEUIINFO_SEPARATOR,
-
GNOMEUIINFO_MENU_EXIT_ITEM(command_quit, NULL),
GNOMEUIINFO_END