aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2013-07-08 18:19:02 +0800
committerXavier Claessens <xavier.claessens@collabora.co.uk>2013-07-08 18:43:39 +0800
commitb5c17731e76ff1dd2fa034e9cbcaa59a1965f25a (patch)
tree93ecef9f79318b225f72bc2f2de5c87fe313fc70
parentbda80eccdf3e79c195bfa7982a9955c401e31c48 (diff)
downloadgsoc2013-empathy-b5c17731e76ff1dd2fa034e9cbcaa59a1965f25a.tar
gsoc2013-empathy-b5c17731e76ff1dd2fa034e9cbcaa59a1965f25a.tar.gz
gsoc2013-empathy-b5c17731e76ff1dd2fa034e9cbcaa59a1965f25a.tar.bz2
gsoc2013-empathy-b5c17731e76ff1dd2fa034e9cbcaa59a1965f25a.tar.lz
gsoc2013-empathy-b5c17731e76ff1dd2fa034e9cbcaa59a1965f25a.tar.xz
gsoc2013-empathy-b5c17731e76ff1dd2fa034e9cbcaa59a1965f25a.tar.zst
gsoc2013-empathy-b5c17731e76ff1dd2fa034e9cbcaa59a1965f25a.zip
EmpathyContactSearchDialog: Add a "Not Supported" message page
https://bugzilla.gnome.org/show_bug.cgi?id=703775
-rw-r--r--libempathy-gtk/empathy-contact-search-dialog.c16
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 90c61dfb1..cb74a12a5 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);