aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-memo-table.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-06-21 21:56:34 +0800
committerMilan Crha <mcrha@redhat.com>2013-06-21 21:56:34 +0800
commit4a101290fdb546296f7bc0a9a34ba342e741895a (patch)
tree3a5cecac900e672a87f2865a8288f30dbeea4c34 /calendar/gui/e-memo-table.c
parent97c70105b71adc9b7cb9f4db15bf44f98133a82c (diff)
downloadgsoc2013-evolution-4a101290fdb546296f7bc0a9a34ba342e741895a.tar.gz
gsoc2013-evolution-4a101290fdb546296f7bc0a9a34ba342e741895a.tar.zst
gsoc2013-evolution-4a101290fdb546296f7bc0a9a34ba342e741895a.zip
Calendar views inline text edit with Ctrl+C/V/X does not work
The shortcuts Ctrl+C/V/X are used for whole calendar items copy/paste/cut, not for text when editing event details inline, either in a day/week view or in a list view. By tracking the is-editing property of respective cell editor and using it when enabling/disabling clipboard actions makes the respective text operations work as expected.
Diffstat (limited to 'calendar/gui/e-memo-table.c')
-rw-r--r--calendar/gui/e-memo-table.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index f229bcf7a2..580f378083 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -700,6 +700,7 @@ memo_table_update_actions (ESelectable *selectable,
GSList *list, *iter;
gboolean can_paste = FALSE;
gboolean sources_are_editable = TRUE;
+ gboolean is_editing;
gboolean sensitive;
const gchar *tooltip;
gint n_selected;
@@ -707,6 +708,7 @@ memo_table_update_actions (ESelectable *selectable,
memo_table = E_MEMO_TABLE (selectable);
n_selected = e_table_selected_count (E_TABLE (memo_table));
+ is_editing = e_table_is_editing (E_TABLE (memo_table));
list = e_memo_table_get_selected (memo_table);
for (iter = list; iter != NULL && sources_are_editable; iter = iter->next) {
@@ -723,25 +725,25 @@ memo_table_update_actions (ESelectable *selectable,
target_list, clipboard_targets[ii], NULL);
action = e_focus_tracker_get_cut_clipboard_action (focus_tracker);
- sensitive = (n_selected > 0) && sources_are_editable;
+ sensitive = (n_selected > 0) && sources_are_editable && !is_editing;
tooltip = _("Cut selected memos to the clipboard");
gtk_action_set_sensitive (action, sensitive);
gtk_action_set_tooltip (action, tooltip);
action = e_focus_tracker_get_copy_clipboard_action (focus_tracker);
- sensitive = (n_selected > 0);
+ sensitive = (n_selected > 0) && !is_editing;
tooltip = _("Copy selected memos to the clipboard");
gtk_action_set_sensitive (action, sensitive);
gtk_action_set_tooltip (action, tooltip);
action = e_focus_tracker_get_paste_clipboard_action (focus_tracker);
- sensitive = sources_are_editable && can_paste;
+ sensitive = sources_are_editable && can_paste && !is_editing;
tooltip = _("Paste memos from the clipboard");
gtk_action_set_sensitive (action, sensitive);
gtk_action_set_tooltip (action, tooltip);
action = e_focus_tracker_get_delete_selection_action (focus_tracker);
- sensitive = (n_selected > 0) && sources_are_editable;
+ sensitive = (n_selected > 0) && sources_are_editable && !is_editing;
tooltip = _("Delete selected memos");
gtk_action_set_sensitive (action, sensitive);
gtk_action_set_tooltip (action, tooltip);