aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-presence-chooser.c
diff options
context:
space:
mode:
authorDavyd Madeley <davyd@madeley.id.au>2009-04-11 00:53:57 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-04-11 00:53:57 +0800
commit112c98327f8a59f8995a8698ad60145f4bc0e2db (patch)
tree938c1ded6f05e6a59af2886469b25ccb1c083eee /libempathy-gtk/empathy-presence-chooser.c
parent12b5423be5e03a60c0abe6a34de85ea70db8a796 (diff)
downloadgsoc2013-empathy-112c98327f8a59f8995a8698ad60145f4bc0e2db.tar
gsoc2013-empathy-112c98327f8a59f8995a8698ad60145f4bc0e2db.tar.gz
gsoc2013-empathy-112c98327f8a59f8995a8698ad60145f4bc0e2db.tar.bz2
gsoc2013-empathy-112c98327f8a59f8995a8698ad60145f4bc0e2db.tar.lz
gsoc2013-empathy-112c98327f8a59f8995a8698ad60145f4bc0e2db.tar.xz
gsoc2013-empathy-112c98327f8a59f8995a8698ad60145f4bc0e2db.tar.zst
gsoc2013-empathy-112c98327f8a59f8995a8698ad60145f4bc0e2db.zip
Unset focus from GtkEntry when editing is stopped
From: Davyd Madeley <davyd@madeley.id.au> svn path=/trunk/; revision=2781
Diffstat (limited to 'libempathy-gtk/empathy-presence-chooser.c')
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 32f32acb0..3cc69dfc8 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -260,7 +260,13 @@ set_status_editing (EmpathyPresenceChooser *self, gboolean editing)
GTK_ENTRY_ICON_PRIMARY,
TRUE);
- // FIXME - move the focus somewhere
+ /* attempt to get the toplevel for this widget */
+ GtkWidget *window = gtk_widget_get_toplevel (GTK_WIDGET (self));
+ if (GTK_WIDGET_TOPLEVEL (window) && GTK_IS_WINDOW (window))
+ {
+ /* unset the focus */
+ gtk_window_set_focus (GTK_WINDOW (window), NULL);
+ }
priv->editing_status = FALSE;
}