aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-presence-chooser.c
diff options
context:
space:
mode:
authorJonny Lamb <jonnylamb@gnome.org>2009-10-16 20:00:05 +0800
committerJonny Lamb <jonnylamb@gnome.org>2009-10-16 20:21:39 +0800
commitfbef69ba66c085d504fd2ea4ad3159d14023f789 (patch)
tree206dc7885281aa2bfeb05111e7f4e4c6f84e03f0 /libempathy-gtk/empathy-presence-chooser.c
parentf7c8902cbc25a7f41483422062974af47175db1d (diff)
downloadgsoc2013-empathy-fbef69ba66c085d504fd2ea4ad3159d14023f789.tar
gsoc2013-empathy-fbef69ba66c085d504fd2ea4ad3159d14023f789.tar.gz
gsoc2013-empathy-fbef69ba66c085d504fd2ea4ad3159d14023f789.tar.bz2
gsoc2013-empathy-fbef69ba66c085d504fd2ea4ad3159d14023f789.tar.lz
gsoc2013-empathy-fbef69ba66c085d504fd2ea4ad3159d14023f789.tar.xz
gsoc2013-empathy-fbef69ba66c085d504fd2ea4ad3159d14023f789.tar.zst
gsoc2013-empathy-fbef69ba66c085d504fd2ea4ad3159d14023f789.zip
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>
Diffstat (limited to 'libempathy-gtk/empathy-presence-chooser.c')
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c5
1 files changed, 5 insertions, 0 deletions
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