From fbef69ba66c085d504fd2ea4ad3159d14023f789 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 16 Oct 2009 13:00:05 +0100 Subject: 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 --- libempathy-gtk/empathy-presence-chooser.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c index cca7a21ef..fa8864984 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 -- cgit v1.2.3