From d98575e489383d801398e62a0ad2f7f6bae43ba2 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Wed, 28 Aug 2002 09:21:45 +0000 Subject: [ oops, merged the .h and .glade file back to the HEAD from the 1-0 2002-08-28 Chris Toshok [ oops, merged the .h and .glade file back to the HEAD from the 1-0 branch, but missed the .c file. ] * gui/component/select-names/e-select-names.c (status_message): set the status label's text. (e_select_names_init): get the status message widget from the glade ui. svn path=/trunk/; revision=17889 --- addressbook/gui/component/select-names/e-select-names.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index 791293ae35..193ec51ff5 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -414,6 +414,15 @@ update_query (GtkWidget *widget, ESelectNames *e_select_names) g_free (query); } +static void +status_message (EAddressbookModel *model, const gchar *message, ESelectNames *e_select_names) +{ + if (message == NULL) + gtk_label_set_text (GTK_LABEL (e_select_names->status_message), ""); + else + gtk_label_set_text (GTK_LABEL (e_select_names->status_message), message); +} + static void categories_changed (GtkWidget *widget, gint value, ESelectNames *e_select_names) { @@ -516,6 +525,13 @@ e_select_names_init (ESelectNames *e_select_names) e_select_names->adapter = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "adapter"); e_select_names->without = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "without"); + e_select_names->status_message = glade_xml_get_widget (gui, "status-message"); + if (e_select_names->status_message && !GTK_IS_LABEL (e_select_names->status_message)) + e_select_names->status_message = NULL; + if (e_select_names->status_message) + gtk_signal_connect (GTK_OBJECT (e_select_names->model), "status_message", + GTK_SIGNAL_FUNC (status_message), e_select_names); + e_select_names->categories = glade_xml_get_widget (gui, "custom-categories"); if (e_select_names->categories && !E_IS_CATEGORIES_MASTER_LIST_OPTION_MENU (e_select_names->categories)) e_select_names->categories = NULL; -- cgit v1.2.3