aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-minicard-view-widget.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-05-30 16:47:00 +0800
committerChris Toshok <toshok@src.gnome.org>2001-05-30 16:47:00 +0800
commit0660722baaa21b9513d1f5eef1ce76722431a823 (patch)
treef81d901c009cf3531bda25ac348cedcbd70ebaab /addressbook/gui/widgets/e-minicard-view-widget.c
parentcc5c75e9f1153fa90e6d4cf566dd80bb26af9ee9 (diff)
downloadgsoc2013-evolution-0660722baaa21b9513d1f5eef1ce76722431a823.tar
gsoc2013-evolution-0660722baaa21b9513d1f5eef1ce76722431a823.tar.gz
gsoc2013-evolution-0660722baaa21b9513d1f5eef1ce76722431a823.tar.bz2
gsoc2013-evolution-0660722baaa21b9513d1f5eef1ce76722431a823.tar.lz
gsoc2013-evolution-0660722baaa21b9513d1f5eef1ce76722431a823.tar.xz
gsoc2013-evolution-0660722baaa21b9513d1f5eef1ce76722431a823.tar.zst
gsoc2013-evolution-0660722baaa21b9513d1f5eef1ce76722431a823.zip
new function, for the Cut verb. (copy_contacts_cb): new function, for the
2001-05-30 Chris Toshok <toshok@ximian.com> * gui/component/addressbook.c (cut_contacts_cb): new function, for the Cut verb. (copy_contacts_cb): new function, for the Copy verb. (paste_contacts_cb): new function, for the Paste verb. (select_all_contacts_cb): new function, for the Select All verb. (update_command_state): add handling for sensitivity of Cut/Copy/Paste/Select All. * gui/widgets/e-addressbook-view.c (e_addressbook_view_init): init the invisible and set up selection/destroy signals. (get_selection_model): new function, so we can get the ETableSelectionModel from either view type. makes lots of the other functions easier, since we can get the list of selected cards using the same code regardless of view type. (invisible_destroyed): new function. (selection_get): new function. convert the clipboard list to string. (selection_clear_event): new function - free up the list of ECards. (selection_received): if the selection data is valid and well-formed, add the corresponding cards to the ebook. (add_to_list): new function. (get_selected_cards): new function. (e_addressbook_view_cut): new function, implement in terms of _copy and _delete_selection. (e_addressbook_view_copy): claim ownership of the CLIPBOARD selection after saving the list of selected ECards. (e_addressbook_view_paste): call gtk_selection_convert. (e_addressbook_view_select_all): new function, using e_selection_model_select_all. (e_addressbook_view_can_print): re-implement in terms of get_selection_model. (e_addressbook_view_can_delete): same. (e_addressbook_view_can_cut): new function. (e_addressbook_view_can_copy): new function. (e_addressbook_view_can_paste): new function. hmm, always return TRUE here. (e_addressbook_view_can_select_all): new function. * gui/widgets/e-addressbook-view.h (struct _EAddressbookView): add selection stuff - the list of selected cards, and the GtkInvisible selection owner, and add prototypes for e_addressbook_view_[can]_{cut,copy,paste,select_all}. * gui/widgets/e-minicard-view-widget.h: add a prototype for e_minicard_view_widget_get_selection_model. * gui/widgets/e-minicard-view-widget.c (e_minicard_view_widget_get_selection_model): new function. svn path=/trunk/; revision=10050
Diffstat (limited to 'addressbook/gui/widgets/e-minicard-view-widget.c')
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c
index 576f8b3aab..8e9f3c2761 100644
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ b/addressbook/gui/widgets/e-minicard-view-widget.c
@@ -329,3 +329,10 @@ void e_minicard_view_widget_jump_to_letter (EMinicardViewWidget *view,
if (view->emv)
e_minicard_view_jump_to_letter(E_MINICARD_VIEW(view->emv), letter);
}
+
+ESelectionModel *
+e_minicard_view_widget_get_selection_model (EMinicardViewWidget *view)
+{
+ if (view->emv)
+ return E_SELECTION_MODEL (E_REFLOW (view->emv)->selection);
+}