Commit b5c17731 authored by Xavier Claessens's avatar Xavier Claessens

EmpathyContactSearchDialog: Add a "Not Supported" message page

https://bugzilla.gnome.org/show_bug.cgi?id=703775
parent bda80ecc
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment