diff options
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-model.c | 13 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-model.h | 1 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 29 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.h | 1 |
4 files changed, 44 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index aadd5f049f..80ff8debf1 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -37,6 +37,7 @@ enum { enum { WRITABLE_STATUS, STATUS_MESSAGE, + SEARCH_RESULT, FOLDER_BAR_MESSAGE, CARD_ADDED, CARD_REMOVED, @@ -231,11 +232,15 @@ status_message (EBookView *book_view, static void sequence_complete (EBookView *book_view, + EBookViewStatus status, EAddressbookModel *model) { model->search_in_progress = FALSE; status_message (book_view, NULL, model); gtk_signal_emit (GTK_OBJECT (model), + e_addressbook_model_signals [SEARCH_RESULT], + status); + gtk_signal_emit (GTK_OBJECT (model), e_addressbook_model_signals [STOP_STATE_CHANGED]); } @@ -285,6 +290,14 @@ e_addressbook_model_class_init (GtkObjectClass *object_class) gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); + e_addressbook_model_signals [SEARCH_RESULT] = + gtk_signal_new ("search_result", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (EAddressbookModelClass, search_result), + gtk_marshal_NONE__ENUM, + GTK_TYPE_NONE, 1, GTK_TYPE_ENUM); + e_addressbook_model_signals [FOLDER_BAR_MESSAGE] = gtk_signal_new ("folder_bar_message", GTK_RUN_LAST, diff --git a/addressbook/gui/widgets/e-addressbook-model.h b/addressbook/gui/widgets/e-addressbook-model.h index 5e018388b8..57644dbca6 100644 --- a/addressbook/gui/widgets/e-addressbook-model.h +++ b/addressbook/gui/widgets/e-addressbook-model.h @@ -45,6 +45,7 @@ struct _EAddressbookModelClass { * Signals */ void (*writable_status) (EAddressbookModel *model, gboolean writable); + void (*search_result) (EAddressbookModel *model, EBookViewStatus status); void (*status_message) (EAddressbookModel *model, const gchar *message); void (*folder_bar_message) (EAddressbookModel *model, const gchar *message); void (*card_added) (EAddressbookModel *model, gint index, gint count); diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 229e8675c2..c8052b4216 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -79,6 +79,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 search_result (GtkObject *object, EBookViewStatus status, EAddressbookView *eav); static void folder_bar_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); @@ -105,6 +106,7 @@ enum { enum { STATUS_MESSAGE, + SEARCH_RESULT, FOLDER_BAR_MESSAGE, COMMAND_STATE_CHANGE, ALPHABET_STATE_CHANGE, @@ -180,6 +182,14 @@ e_addressbook_view_class_init (EAddressbookViewClass *klass) gtk_marshal_NONE__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); + e_addressbook_view_signals [SEARCH_RESULT] = + gtk_signal_new ("search_result", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (EAddressbookViewClass, search_result), + gtk_marshal_NONE__ENUM, + GTK_TYPE_NONE, 1, GTK_TYPE_ENUM); + e_addressbook_view_signals [FOLDER_BAR_MESSAGE] = gtk_signal_new ("folder_bar_message", GTK_RUN_LAST, @@ -223,6 +233,11 @@ e_addressbook_view_init (EAddressbookView *eav) eav); gtk_signal_connect (GTK_OBJECT(eav->model), + "search_result", + GTK_SIGNAL_FUNC (search_result), + eav); + + gtk_signal_connect (GTK_OBJECT(eav->model), "folder_bar_message", GTK_SIGNAL_FUNC (folder_bar_message), eav); @@ -1293,6 +1308,14 @@ emit_status_message (EAddressbookView *eav, const gchar *status) } static void +emit_search_result (EAddressbookView *eav, EBookViewStatus status) +{ + gtk_signal_emit (GTK_OBJECT (eav), + e_addressbook_view_signals [SEARCH_RESULT], + status); +} + +static void emit_folder_bar_message (EAddressbookView *eav, const gchar *message) { gtk_signal_emit (GTK_OBJECT (eav), @@ -1307,6 +1330,12 @@ status_message (GtkObject *object, const gchar *status, EAddressbookView *eav) } static void +search_result (GtkObject *object, EBookViewStatus status, EAddressbookView *eav) +{ + emit_search_result (eav, status); +} + +static void folder_bar_message (GtkObject *object, const gchar *status, EAddressbookView *eav) { emit_folder_bar_message (eav, status); diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h index 58511845bd..897c37d420 100644 --- a/addressbook/gui/widgets/e-addressbook-view.h +++ b/addressbook/gui/widgets/e-addressbook-view.h @@ -94,6 +94,7 @@ struct _EAddressbookViewClass * Signals */ void (*status_message) (EAddressbookView *view, const gchar *message); + void (*search_result) (EAddressbookView *view, EBookViewStatus status); void (*folder_bar_message) (EAddressbookView *view, const gchar *message); void (*command_state_change) (EAddressbookView *view); void (*alphabet_state_change) (EAddressbookView *view, gunichar letter); |