aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/gui/component/e-book-shell-module.c6
-rw-r--r--addressbook/gui/component/e-book-shell-view-actions.c20
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.c4
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.h3
-rw-r--r--doc/reference/shell/Makefile.am1
-rw-r--r--shell/Makefile.am1
-rw-r--r--shell/e-shell-common.h1
-rw-r--r--shell/e-shell-constants.h50
-rw-r--r--shell/e-shell-importer.c1
-rw-r--r--shell/e-shell-window-private.c4
-rw-r--r--widgets/misc/e-menu-tool-button.c14
11 files changed, 38 insertions, 67 deletions
diff --git a/addressbook/gui/component/e-book-shell-module.c b/addressbook/gui/component/e-book-shell-module.c
index 840c4cb816..1b3e778ce8 100644
--- a/addressbook/gui/component/e-book-shell-module.c
+++ b/addressbook/gui/component/e-book-shell-module.c
@@ -200,7 +200,7 @@ book_module_book_loaded_cb (EBook *book,
if (strcmp (action_name, "contact-new") == 0)
eab_show_contact_editor (book, contact, TRUE, TRUE);
- if (strcmp (action_name, "contact-list-new") == 0)
+ if (strcmp (action_name, "contact-new-list") == 0)
eab_show_contact_list_editor (book, contact, TRUE, TRUE);
g_object_unref (contact);
@@ -256,14 +256,14 @@ static GtkActionEntry item_entries[] = {
{ "contact-new",
"contact-new",
N_("_Contact"), /* XXX Need C_() here */
- "<Control>c",
+ "<Shift><Control>c",
N_("Create a new contact"),
G_CALLBACK (action_contact_new_cb) },
{ "contact-new-list",
"stock_contact-list",
N_("Contact _List"),
- "<Control>l",
+ "<Shift><Control>l",
N_("Create a new contact list"),
G_CALLBACK (action_contact_new_cb) }
};
diff --git a/addressbook/gui/component/e-book-shell-view-actions.c b/addressbook/gui/component/e-book-shell-view-actions.c
index 9a26608d84..89ca2c22a8 100644
--- a/addressbook/gui/component/e-book-shell-view-actions.c
+++ b/addressbook/gui/component/e-book-shell-view-actions.c
@@ -280,11 +280,19 @@ static void
action_contact_new_cb (GtkAction *action,
EBookShellView *book_shell_view)
{
+ EAddressbookView *view;
+ EAddressbookModel *model;
EContact *contact;
EBook *book;
+ view = e_book_shell_view_get_current_view (book_shell_view);
+ g_return_if_fail (view != NULL);
+
+ model = e_addressbook_view_get_model (view);
+ book = e_addressbook_model_get_book (model);
+ g_return_if_fail (book != NULL);
+
contact = e_contact_new ();
- book = book_shell_view->priv->book;
eab_show_contact_editor (book, contact, TRUE, TRUE);
g_object_unref (contact);
}
@@ -293,11 +301,19 @@ static void
action_contact_new_list_cb (GtkAction *action,
EBookShellView *book_shell_view)
{
+ EAddressbookView *view;
+ EAddressbookModel *model;
EContact *contact;
EBook *book;
+ view = e_book_shell_view_get_current_view (book_shell_view);
+ g_return_if_fail (view != NULL);
+
+ model = e_addressbook_view_get_model (view);
+ book = e_addressbook_model_get_book (model);
+ g_return_if_fail (book != NULL);
+
contact = e_contact_new ();
- book = book_shell_view->priv->book;
eab_show_contact_list_editor (book, contact, TRUE, TRUE);
g_object_unref (contact);
}
diff --git a/addressbook/gui/component/e-book-shell-view-private.c b/addressbook/gui/component/e-book-shell-view-private.c
index 70ba2b2815..68d8425ef8 100644
--- a/addressbook/gui/component/e-book-shell-view-private.c
+++ b/addressbook/gui/component/e-book-shell-view-private.c
@@ -507,8 +507,6 @@ e_book_shell_view_private_dispose (EBookShellView *book_shell_view)
g_hash_table_remove_all (priv->uid_to_view);
g_hash_table_remove_all (priv->uid_to_editor);
-
- DISPOSE (priv->book);
}
void
@@ -518,8 +516,6 @@ e_book_shell_view_private_finalize (EBookShellView *book_shell_view)
g_hash_table_destroy (priv->uid_to_view);
g_hash_table_destroy (priv->uid_to_editor);
-
- g_free (priv->password);
}
EAddressbookView *
diff --git a/addressbook/gui/component/e-book-shell-view-private.h b/addressbook/gui/component/e-book-shell-view-private.h
index b8d2a0ccb7..24af21539b 100644
--- a/addressbook/gui/component/e-book-shell-view-private.h
+++ b/addressbook/gui/component/e-book-shell-view-private.h
@@ -95,9 +95,6 @@ struct _EBookShellViewPrivate {
GHashTable *uid_to_view;
GHashTable *uid_to_editor;
-
- EBook *book;
- gchar *password;
};
void e_book_shell_view_private_init
diff --git a/doc/reference/shell/Makefile.am b/doc/reference/shell/Makefile.am
index 26d6bf2bb5..7a249b01f9 100644
--- a/doc/reference/shell/Makefile.am
+++ b/doc/reference/shell/Makefile.am
@@ -125,7 +125,6 @@ GTKDOC_LIBS= \
$(top_builddir)/widgets/misc/.libs/e-popup-menu.o \
$(top_builddir)/widgets/misc/.libs/e-preferences-window.o \
$(top_builddir)/widgets/misc/.libs/e-spinner.o \
- $(top_builddir)/widgets/misc/.libs/e-task-widget.o \
$(top_builddir)/widgets/misc/.libs/e-unicode.o \
-ledataserver-1.2 \
-ledataserverui-1.2 \
diff --git a/shell/Makefile.am b/shell/Makefile.am
index aff540d0fa..3afa351426 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -98,7 +98,6 @@ evolution_SOURCES = \
e-config-upgrade.h \
e-shell.c \
e-shell.h \
- e-shell-constants.h \
e-shell-importer.c \
e-shell-importer.h \
e-shell-window-private.c \
diff --git a/shell/e-shell-common.h b/shell/e-shell-common.h
index 9887a3baff..bfce3ac49b 100644
--- a/shell/e-shell-common.h
+++ b/shell/e-shell-common.h
@@ -27,5 +27,6 @@
#include <gio/gio.h>
#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
#endif /* E_SHELL_COMMON_H */
diff --git a/shell/e-shell-constants.h b/shell/e-shell-constants.h
deleted file mode 100644
index 25aec79d6f..0000000000
--- a/shell/e-shell-constants.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Ettore Perazzoli <ettore@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifndef E_SHELL_CONSTANTS_H
-#define E_SHELL_CONSTANTS_H
-
-#define E_SHELL_URI_PREFIX "evolution:"
-#define E_SHELL_URI_PREFIX_LEN 10
-
-#define E_SHELL_DEFAULTURI_PREFIX "default:"
-#define E_SHELL_DEFAULTURI_PREFIX_LEN 8
-
-#define E_SHELL_MINI_ICON_SUFFIX "-mini"
-#define E_SHELL_MINI_ICON_SUFFIX_LEN 5
-
-#define E_SHELL_ICON_SIZE 48
-#define E_SHELL_MINI_ICON_SIZE 16
-
-#define E_PATH_SEPARATOR '/'
-#define E_PATH_SEPARATOR_S "/"
-
-#define E_LOCAL_STORAGE_NAME "local"
-#define E_SUMMARY_STORAGE_NAME "summary"
-
-#define E_SUMMARY_URI "evolution:/summary"
-#define E_LOCAL_INBOX_URI "evolution:/local/Inbox"
-#define E_LOCAL_CONTACTS_URI "evolution:/local/Contacts"
-#define E_LOCAL_CALENDAR_URI "evolution:/local/Calendar"
-#define E_LOCAL_TASKS_URI "evolution:/local/Tasks"
-
-#endif
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index c01d19dea5..bea25420fb 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -48,7 +48,6 @@
#include "e-shell.h"
#include "e-shell-window.h"
-#include "e-shell-constants.h"
#include "e-shell-importer.h"
diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c
index 8ec551039f..8bfdefc536 100644
--- a/shell/e-shell-window-private.c
+++ b/shell/e-shell-window-private.c
@@ -244,6 +244,10 @@ e_shell_window_private_init (EShellWindow *shell_window)
item = e_menu_tool_button_new (_("New"));
gtk_tool_item_set_is_important (GTK_TOOL_ITEM (item), TRUE);
+ gtk_widget_add_accelerator (
+ GTK_WIDGET (item), "clicked",
+ gtk_ui_manager_get_accel_group (priv->ui_manager),
+ GDK_N, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
gtk_toolbar_insert (GTK_TOOLBAR (widget), item, 0);
priv->menu_tool_button = g_object_ref (item);
gtk_widget_show (GTK_WIDGET (item));
diff --git a/widgets/misc/e-menu-tool-button.c b/widgets/misc/e-menu-tool-button.c
index f2ff6ded44..70e64d8124 100644
--- a/widgets/misc/e-menu-tool-button.c
+++ b/widgets/misc/e-menu-tool-button.c
@@ -58,12 +58,14 @@ menu_tool_button_get_first_menu_item (GtkMenuToolButton *menu_tool_button)
}
static void
-menu_tool_button_update_icon (GtkToolButton *tool_button)
+menu_tool_button_update_button (GtkToolButton *tool_button)
{
GtkMenuItem *menu_item;
GtkMenuToolButton *menu_tool_button;
GtkImageMenuItem *image_menu_item;
+ GtkAction *action;
GtkWidget *image;
+ gchar *tooltip = NULL;
menu_tool_button = GTK_MENU_TOOL_BUTTON (tool_button);
menu_item = menu_tool_button_get_first_menu_item (menu_tool_button);
@@ -78,6 +80,14 @@ menu_tool_button_update_icon (GtkToolButton *tool_button)
image = menu_tool_button_clone_image (image);
gtk_tool_button_set_icon_widget (tool_button, image);
gtk_widget_show (image);
+
+ /* If the menu item is a proxy for a GtkAction, extract
+ * the action's tooltip and use it as our own tooltip. */
+ action = gtk_widget_get_action (GTK_WIDGET (menu_item));
+ if (action != NULL)
+ g_object_get (action, "tooltip", &tooltip, NULL);
+ gtk_widget_set_tooltip_text (GTK_WIDGET (tool_button), tooltip);
+ g_free (tooltip);
}
static void
@@ -109,7 +119,7 @@ menu_tool_button_init (EMenuToolButton *button)
{
g_signal_connect (
button, "notify::menu",
- G_CALLBACK (menu_tool_button_update_icon), NULL);
+ G_CALLBACK (menu_tool_button_update_button), NULL);
}
GType