aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-addressbook-model.h
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-05-18 07:30:57 +0800
committerChris Toshok <toshok@src.gnome.org>2001-05-18 07:30:57 +0800
commitbb0671f820227cd6759c5b77e678c87ff24af99a (patch)
tree3a00d31e02aaf352a35807d19f4276959bbe4111 /addressbook/gui/widgets/e-addressbook-model.h
parente435c042d08e5b3a46889bd7fafd1ef0f28bc734 (diff)
downloadgsoc2013-evolution-bb0671f820227cd6759c5b77e678c87ff24af99a.tar.gz
gsoc2013-evolution-bb0671f820227cd6759c5b77e678c87ff24af99a.tar.zst
gsoc2013-evolution-bb0671f820227cd6759c5b77e678c87ff24af99a.zip
add our selection_change signal. (e_minicard_view_widget_realize): connect
2001-05-17 Chris Toshok <toshok@ximian.com> * gui/widgets/e-minicard-view-widget.c (e_minicard_view_widget_class_init): add our selection_change signal. (e_minicard_view_widget_realize): connect to the ESelectionModel's selection_changed signal. (e_minicard_view_widget_selected_count): new function. (selection_change): new function - emit our "selection_change" signal. * gui/widgets/e-minicard-view-widget.h (struct _EMinicardViewWidgetClass): add selection_change signal. also, add prototype for e_minicard_view_widget_selected_count. * gui/widgets/e-addressbook-view.c (e_addressbook_view_class_init): add our command_state_change signal. (e_addressbook_view_init): connect to the writable_status signal on the EAddressbookModel. (minicard_selection_change): new function - calls command_state_change. (create_minicard_view): connect to selection_change on the minicard_view so we know when to update command state. (table_selection_change): new function - calls command_state_change. (writable_status): new function - calls command_state_change. (command_state_change): new function - emits our "command_state_change" signal. (create_table_view): connect to the selection_change signal so we know to update the command state. (change_view_type): update the command state every time we change view types. (e_addressbook_view_can_create): new function. (e_addressbook_view_can_print): new function. (e_addressbook_view_can_delete): new function. (e_addressbook_view_can_stop): new function. * gui/widgets/e-addressbook-view.h (struct _EAddressbookViewClass): add command_state_change signal, and prototypes of functions the component can use to test the state of commands. * gui/widgets/e-addressbook-model.c (addressbook_destroy): unlink the writable_status signal on the EBook. (writable_status): new function. (e_addressbook_model_class_init): add our writable_status signal. (e_addressbook_model_init): init writable_status_id. (e_addressbook_model_set_arg): unlink the writable_status signal on the old EBook, and connect it on the new one. * gui/widgets/e-addressbook-model.h: add writable_status signal. * gui/component/addressbook.c (update_command_state): new function, set the sensitivity of the bonobo commands. (control_activate): update our command state immediately upon activating the control. (addressbook_factory_new_control): register command_state_change to update the commands. svn path=/trunk/; revision=9874
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-model.h')
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.h b/addressbook/gui/widgets/e-addressbook-model.h
index f8fd01b535..5443e2dbfb 100644
--- a/addressbook/gui/widgets/e-addressbook-model.h
+++ b/addressbook/gui/widgets/e-addressbook-model.h
@@ -29,7 +29,7 @@ struct _EAddressbookModel {
int data_count;
int allocated_count;
- int create_card_id, remove_card_id, modify_card_id, status_message_id;
+ int create_card_id, remove_card_id, modify_card_id, status_message_id, writable_status_id;
guint editable : 1;
guint first_get_view : 1;
@@ -42,11 +42,12 @@ struct _EAddressbookModelClass {
/*
* Signals
*/
- void (*status_message) (EAddressbookModel *model, const gchar *message);
- void (*card_added) (EAddressbookModel *model, gint index, gint count);
- void (*card_removed) (EAddressbookModel *model, gint index);
- void (*card_changed) (EAddressbookModel *model, gint index);
- void (*model_changed) (EAddressbookModel *model);
+ void (*writable_status) (EAddressbookModel *model, gboolean writable);
+ void (*status_message) (EAddressbookModel *model, const gchar *message);
+ void (*card_added) (EAddressbookModel *model, gint index, gint count);
+ void (*card_removed) (EAddressbookModel *model, gint index);
+ void (*card_changed) (EAddressbookModel *model, gint index);
+ void (*model_changed) (EAddressbookModel *model);
};