aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook/e-book-shell-content.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-12-08 00:31:17 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-12-26 04:42:17 +0800
commitabc0e4c694fb3d9624e890384880def730769fa0 (patch)
tree8d411f90f4edb0859ffe0b260c85e02e7d273088 /modules/addressbook/e-book-shell-content.c
parent83dc7625983470bff4ce8b9070fbc23c3370c472 (diff)
downloadgsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar
gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.gz
gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.bz2
gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.lz
gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.xz
gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.tar.zst
gsoc2013-evolution-abc0e4c694fb3d9624e890384880def730769fa0.zip
Introduce ESelectable and EFocusTracker.
EFocusTracker tracks the input focus within a window and helps keep the sensitivity of "selectable" actions in the main menu up-to-date. Selectable actions include Cut, Copy, Paste, Select All and Delete. EFocusTracker has built-in support for widgets that implement the GtkEditable interface such as GtkEntry and GtkTextView. It also supports custom widgets that implement the ESelectable interface, which is a subset of GtkEditable and can apply to anything that displays selectable content (esp. tree views and ETables). This commit integrates EFocusTracker with EShellWindow, CompEditor, EMsgComposer, and ESignatureManager. It also bumps the GtkHTML requirement to 2.29.5 to utilize the new GtkhtmlEditor:html constructor property.
Diffstat (limited to 'modules/addressbook/e-book-shell-content.c')
-rw-r--r--modules/addressbook/e-book-shell-content.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c
index 5eb4459b7b..a7a616fc18 100644
--- a/modules/addressbook/e-book-shell-content.c
+++ b/modules/addressbook/e-book-shell-content.c
@@ -284,11 +284,9 @@ book_shell_content_check_state (EShellContent *shell_content)
ESelectionModel *selection_model;
EAddressbookModel *model;
EAddressbookView *view;
- GtkClipboard *clipboard;
gboolean has_email = TRUE;
gboolean is_contact_list = TRUE;
guint32 state = 0;
- gint n_contacts;
gint n_selected;
struct {
@@ -301,8 +299,6 @@ book_shell_content_check_state (EShellContent *shell_content)
model = e_addressbook_view_get_model (view);
selection_model = e_addressbook_view_get_selection_model (view);
- n_contacts = (selection_model != NULL) ?
- e_selection_model_row_count (selection_model) : 0;
n_selected = (selection_model != NULL) ?
e_selection_model_selected_count (selection_model) : 0;
@@ -333,8 +329,6 @@ book_shell_content_check_state (EShellContent *shell_content)
foreach_data.list, foreach_data.list);
}
- clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
-
if (n_selected == 1)
state |= E_BOOK_SHELL_CONTENT_SELECTION_SINGLE;
if (n_selected > 1)
@@ -347,10 +341,6 @@ book_shell_content_check_state (EShellContent *shell_content)
state |= E_BOOK_SHELL_CONTENT_SOURCE_IS_BUSY;
if (e_addressbook_model_get_editable (model))
state |= E_BOOK_SHELL_CONTENT_SOURCE_IS_EDITABLE;
- if (n_contacts == 0)
- state |= E_BOOK_SHELL_CONTENT_SOURCE_IS_EMPTY;
- if (e_clipboard_wait_is_directory_available (clipboard))
- state |= E_BOOK_SHELL_CONTENT_CLIPBOARD_HAS_DIRECTORY;
return state;
}
@@ -649,24 +639,3 @@ e_book_shell_content_get_searchbar (EBookShellContent *book_shell_content)
return E_SHELL_SEARCHBAR (widget);
}
-
-void
-e_book_shell_content_clipboard_copy (EBookShellContent *book_shell_content)
-{
- EAddressbookView *addressbook_view;
- EWebView *web_view;
-
- g_return_if_fail (E_IS_BOOK_SHELL_CONTENT (book_shell_content));
-
- web_view = E_WEB_VIEW (book_shell_content->priv->preview);
- addressbook_view =
- e_book_shell_content_get_current_view (book_shell_content);
- g_return_if_fail (addressbook_view != NULL);
-
- if (!GTK_WIDGET_HAS_FOCUS (web_view)) {
- e_addressbook_view_copy (addressbook_view);
- return;
- }
-
- e_web_view_clipboard_copy (web_view);
-}