aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChandni Verma <chandniverma2112@gmail.com>2011-12-02 19:09:36 +0800
committerChandni Verma <chandniverma2112@gmail.com>2012-01-28 14:49:16 +0800
commit4a6fb67d83e54e334d3db5d975f1ff9dbddf6e14 (patch)
tree76b5b4e3f846b461b4f6cd3d5c5b69803d488681 /src
parentc45bf16335ebc05661f200024d3cc4f0ecb7003f (diff)
downloadgsoc2013-empathy-4a6fb67d83e54e334d3db5d975f1ff9dbddf6e14.tar
gsoc2013-empathy-4a6fb67d83e54e334d3db5d975f1ff9dbddf6e14.tar.gz
gsoc2013-empathy-4a6fb67d83e54e334d3db5d975f1ff9dbddf6e14.tar.bz2
gsoc2013-empathy-4a6fb67d83e54e334d3db5d975f1ff9dbddf6e14.tar.lz
gsoc2013-empathy-4a6fb67d83e54e334d3db5d975f1ff9dbddf6e14.tar.xz
gsoc2013-empathy-4a6fb67d83e54e334d3db5d975f1ff9dbddf6e14.tar.zst
gsoc2013-empathy-4a6fb67d83e54e334d3db5d975f1ff9dbddf6e14.zip
Set window sensitivity
https://bugzilla.gnome.org/show_bug.cgi?id=592994
Diffstat (limited to 'src')
-rw-r--r--src/empathy-debug-window.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c
index 9cb32a34b..cf537b65d 100644
--- a/src/empathy-debug-window.c
+++ b/src/empathy-debug-window.c
@@ -424,29 +424,39 @@ debug_window_get_messages_cb (TpProxy *proxy,
{
EmpathyDebugWindow *debug_window = (EmpathyDebugWindow *) user_data;
EmpathyDebugWindowPriv *priv = GET_PRIV (debug_window);
- gchar *name;
+ gchar *active_service_name;
guint i;
GtkListStore *active_buffer;
gboolean valid_iter;
GtkTreeIter iter;
+ gchar *proxy_service_name;
active_buffer = g_object_get_data (G_OBJECT (proxy), "active-buffer");
valid_iter = debug_window_get_iter_for_active_buffer (active_buffer, &iter,
debug_window);
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->service_store), &iter,
+ COL_NAME, &proxy_service_name,
+ -1);
+ active_service_name = get_active_service_name (debug_window);
if (error != NULL)
{
DEBUG ("GetMessages failed: %s", error->message);
- debug_window_set_toolbar_sensitivity (debug_window, FALSE);
+
+ /* We want to set the window sensitivity to false only when proxy for the
+ * selected service is unable to fetch debug messages */
+ if (!tp_strdiff (active_service_name, proxy_service_name))
+ debug_window_set_toolbar_sensitivity (debug_window, FALSE);
/* We created the proxy for GetMessages call. Now destroy it. */
tp_clear_object (&proxy);
return;
}
- name = get_active_service_name (debug_window);
- DEBUG ("Retrieved debug messages for %s", name);
- g_free (name);
+ DEBUG ("Retrieved debug messages for %s", active_service_name);
+ g_free (active_service_name);
+ debug_window_set_toolbar_sensitivity (debug_window, TRUE);
+
for (i = 0; i < messages->len; i++)
{
@@ -462,21 +472,16 @@ debug_window_get_messages_cb (TpProxy *proxy,
/* Now we save this precious proxy in the service_store along its service */
if (valid_iter)
{
- gchar *proxy_service_name;
-
- gtk_tree_model_get (GTK_TREE_MODEL (priv->service_store), &iter,
- COL_NAME, &proxy_service_name,
- -1);
-
DEBUG ("Proxy for service: %s was successful in fetching debug"
" messages. Saving it.", proxy_service_name);
- g_free (proxy_service_name);
gtk_list_store_set (priv->service_store, &iter,
COL_PROXY, proxy,
-1);
}
+ g_free (proxy_service_name);
+
/* Connect to "invalidated" signal */
g_signal_connect (proxy, "invalidated",
G_CALLBACK (proxy_invalidated_cb), debug_window);