diff options
author | Chris Toshok <toshok@ximian.com> | 2001-05-23 17:19:07 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2001-05-23 17:19:07 +0800 |
commit | be19c59c2e0f254538f72ba136d7524d8619045a (patch) | |
tree | 56a41f4e6ecd2e115e74e93e9e83873ff589261e /addressbook/gui/widgets/e-addressbook-view.c | |
parent | c5ed45567edc05e791930e16bf56e5b02e247f1a (diff) | |
download | gsoc2013-evolution-be19c59c2e0f254538f72ba136d7524d8619045a.tar gsoc2013-evolution-be19c59c2e0f254538f72ba136d7524d8619045a.tar.gz gsoc2013-evolution-be19c59c2e0f254538f72ba136d7524d8619045a.tar.bz2 gsoc2013-evolution-be19c59c2e0f254538f72ba136d7524d8619045a.tar.lz gsoc2013-evolution-be19c59c2e0f254538f72ba136d7524d8619045a.tar.xz gsoc2013-evolution-be19c59c2e0f254538f72ba136d7524d8619045a.tar.zst gsoc2013-evolution-be19c59c2e0f254538f72ba136d7524d8619045a.zip |
add sequence_complete_id to EAddressbookModel and stop_state_changed to
2001-05-23 Chris Toshok <toshok@ximian.com>
* gui/widgets/e-addressbook-model.h: add sequence_complete_id to
EAddressbookModel and stop_state_changed to
EAddressbookModelClass. also, add prototype for
e_addressbook_model_can_stop.
* gui/widgets/e-addressbook-model.c (remove_book_view): disconnect
from "sequence_complete", and set search_in_progress to FALSE.
(sequence_complete): set search_in_progress to FALSE and emit
"stop_state_changed."
(e_addressbook_model_class_init): create the "stop_state_changed"
signal.
(e_addressbook_model_init): init stuff.
(book_view_loaded): connect to "sequence_complete" signal.
(book_view_loaded): set search_in_progress to TRUE and emit
"stop_state_changed"
(e_addressbook_model_stop): set search_in_progress to false, emit
"stop_state_changed", and set our status to "Search Interrupted."
(e_addressbook_model_can_stop): return search_in_progress.
* gui/widgets/e-addressbook-view.c (e_addressbook_view_init):
connect to the stop_state_changed signal on EAddressbookModel.
(stop_state_changed): new function.
(e_addressbook_view_can_stop): call e_addressbook_model_can_stop.
* gui/component/addressbook.c (update_command_state): use
e_addressbook_view_can_stop to set the sensitivity of the stop
button.
svn path=/trunk/; revision=9940
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-view.c')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 2cc1acd7e4..55443000a0 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -62,6 +62,7 @@ static void e_addressbook_view_destroy (GtkObject *object); static void change_view_type (EAddressbookView *view, EAddressbookViewType view_type); static void status_message (GtkObject *object, const gchar *status, EAddressbookView *eav); +static void stop_state_changed (GtkObject *object, EAddressbookView *eav); static void writable_status (GtkObject *object, gboolean writable, EAddressbookView *eav); static void command_state_change (EAddressbookView *eav); @@ -168,6 +169,11 @@ e_addressbook_view_init (EAddressbookView *eav) eav); gtk_signal_connect (GTK_OBJECT(eav->model), + "stop_state_changed", + GTK_SIGNAL_FUNC (stop_state_changed), + eav); + + gtk_signal_connect (GTK_OBJECT(eav->model), "writable_status", GTK_SIGNAL_FUNC (writable_status), eav); @@ -681,6 +687,12 @@ status_message (GtkObject *object, const gchar *status, EAddressbookView *eav) } static void +stop_state_changed (GtkObject *object, EAddressbookView *eav) +{ + command_state_change (eav); +} + +static void writable_status (GtkObject *object, gboolean writable, EAddressbookView *eav) { command_state_change (eav); @@ -1097,6 +1109,6 @@ e_addressbook_view_can_delete (EAddressbookView *view) gboolean e_addressbook_view_can_stop (EAddressbookView *view) { - return FALSE; + return e_addressbook_model_can_stop (view->model); } |