[empathy/gnome-2-28] presence-chooser: make the entry not editable when we are offline



commit a8844c7816553ea10c08d8119cef98a766c15a6d
Author: Jonny Lamb <jonnylamb gnome org>
Date:   Fri Oct 16 13:00:05 2009 +0100

    presence-chooser: make the entry not editable when we are offline
    
    The idea behind this is that you can't set a custom status when you
    are offline. It just doesn't make sense.
    
    Signed-off-by: Jonny Lamb <jonnylamb gnome org>

 libempathy-gtk/empathy-presence-chooser.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 7acd8a5..0b52525 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -908,6 +908,7 @@ presence_chooser_presence_changed_cb (EmpathyPresenceChooser *chooser)
 	GtkTreeModel               *model;
 	GtkTreeIter                 iter;
 	gboolean valid, match_state = FALSE, match = FALSE;
+	GtkWidget                  *entry;
 
 	priv = GET_PRIV (chooser);
 
@@ -977,6 +978,10 @@ presence_chooser_presence_changed_cb (EmpathyPresenceChooser *chooser)
 	else {
 		presence_chooser_flash_stop (chooser, state);
 	}
+
+	entry = gtk_bin_get_child (GTK_BIN (chooser));
+	gtk_editable_set_editable (GTK_EDITABLE (entry),
+	    state != TP_CONNECTION_PRESENCE_TYPE_OFFLINE);
 }
 
 static gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]