[empathy] EmpathyContactSearchDialog: Add a "Not Supported" message page
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] EmpathyContactSearchDialog: Add a "Not Supported" message page
- Date: Mon, 8 Jul 2013 10:44:20 +0000 (UTC)
commit b5c17731e76ff1dd2fa034e9cbcaa59a1965f25a
Author: Xavier Claessens <xavier claessens collabora co uk>
Date: Mon Jul 8 12:19:02 2013 +0200
EmpathyContactSearchDialog: Add a "Not Supported" message page
https://bugzilla.gnome.org/show_bug.cgi?id=703775
libempathy-gtk/empathy-contact-search-dialog.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-search-dialog.c b/libempathy-gtk/empathy-contact-search-dialog.c
index 90c61df..cb74a12 100644
--- a/libempathy-gtk/empathy-contact-search-dialog.c
+++ b/libempathy-gtk/empathy-contact-search-dialog.c
@@ -54,7 +54,8 @@ enum
enum {
PAGE_SEARCH_RESULTS,
- PAGE_NO_MATCH
+ PAGE_NO_MATCH,
+ PAGE_NOT_SUPPORTED,
};
typedef struct _EmpathyContactSearchDialogPrivate EmpathyContactSearchDialogPrivate;
@@ -102,10 +103,16 @@ on_searcher_reset (GObject *source_object,
if (error != NULL)
{
DEBUG ("Failed to reset the TpContactSearch: %s", error->message);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook),
+ PAGE_NOT_SUPPORTED);
+
g_error_free (error);
return;
}
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook),
+ PAGE_SEARCH_RESULTS);
+
search = g_hash_table_new (g_str_hash, g_str_equal);
search_criteria = gtk_entry_get_text (GTK_ENTRY (priv->search_entry));
@@ -314,10 +321,16 @@ on_searcher_created (GObject *source_object,
if (error != NULL)
{
DEBUG ("Failed to create a TpContactSearch: %s", error->message);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook),
+ PAGE_NOT_SUPPORTED);
+
g_error_free (error);
return;
}
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook),
+ PAGE_SEARCH_RESULTS);
+
g_signal_connect (priv->searcher, "search-results-received",
G_CALLBACK (_search_results_received), self);
g_signal_connect (priv->searcher, "notify::state",
@@ -642,6 +655,7 @@ empathy_contact_search_dialog_init (EmpathyContactSearchDialog *self)
NULL);
append_message_page (self, _("No contacts found"));
+ append_message_page (self, _("Contact search is not supported on this account"));
gtk_box_pack_start (GTK_BOX (vbox), priv->notebook, TRUE, TRUE, 3);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]