aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2011-05-05 21:57:48 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:07 +0800
commit796937adcf48994f6bf9ded79bf220f02a097393 (patch)
tree547e1b8168a2e9e53301e6c253cbd8100fae0c21 /shell
parentb1f79dd8d6b78a009a5edd5dfc1597fa2bad7875 (diff)
downloadgsoc2013-evolution-796937adcf48994f6bf9ded79bf220f02a097393.tar
gsoc2013-evolution-796937adcf48994f6bf9ded79bf220f02a097393.tar.gz
gsoc2013-evolution-796937adcf48994f6bf9ded79bf220f02a097393.tar.bz2
gsoc2013-evolution-796937adcf48994f6bf9ded79bf220f02a097393.tar.lz
gsoc2013-evolution-796937adcf48994f6bf9ded79bf220f02a097393.tar.xz
gsoc2013-evolution-796937adcf48994f6bf9ded79bf220f02a097393.tar.zst
gsoc2013-evolution-796937adcf48994f6bf9ded79bf220f02a097393.zip
Bug 332497 - Add Edit -> Available Categories
Opens a window to manage categories without having to edit a contact or appointment. Not available in the Mail shell view since it doesn't use categories.
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-window-actions.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index 928cab79c3..60792ba5b6 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -27,6 +27,7 @@
#include <gal-define-views-dialog.h>
#include <libedataserverui/e-passwords.h>
+#include <libedataserverui/e-categories-editor.h>
#define EVOLUTION_COPYRIGHT \
"Copyright \xC2\xA9 1999 - 2008 Novell, Inc. and Others"
@@ -893,6 +894,42 @@ action_page_setup_cb (GtkAction *action,
}
/**
+ * E_SHELL_WINDOW_ACTION_CATEGORIES
+ * @window: and #EShellWindow
+ *
+ * Activation of this action opens the Categories Editor dialog.
+ *
+ * Main menu item: Edit -> Available categories
+ **/
+static void
+action_categories_cb (GtkAction *action,
+ EShellWindow *shell_window)
+{
+ GtkWidget *content_area;
+ GtkWidget *dialog;
+ GtkWidget *editor;
+
+ editor = e_categories_editor_new ();
+ e_categories_editor_set_entry_visible (
+ E_CATEGORIES_EDITOR (editor), FALSE);
+
+ dialog = gtk_dialog_new_with_buttons (
+ _("Categories Editor"),
+ GTK_WINDOW (shell_window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog), 12);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_pack_start (
+ GTK_BOX (content_area), GTK_WIDGET (editor), TRUE, TRUE, 6);
+ gtk_box_set_spacing (GTK_BOX (content_area), 12);
+
+ gtk_dialog_run (GTK_DIALOG (dialog));
+
+ gtk_widget_destroy (dialog);
+}
+
+/**
* E_SHELL_WINDOW_ACTION_PREFERENCES:
* @window: an #EShellWindow
*
@@ -1482,6 +1519,13 @@ static GtkActionEntry shell_entries[] = {
N_("Paste the clipboard"),
NULL }, /* Handled by EFocusTracker */
+ { "categories",
+ NULL,
+ N_("Available Cate_gories"),
+ NULL,
+ N_("Manage available categories"),
+ G_CALLBACK (action_categories_cb) },
+
{ "preferences",
GTK_STOCK_PREFERENCES,
NULL,