diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-12-01 22:50:11 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-12-01 22:50:11 +0800 |
commit | b1782d8dea042c29a50152db4c3bd63da80f3c02 (patch) | |
tree | 4bead4435ea0919bacbf37bc54968b952f0991e5 | |
parent | a955dcbb4b7182a030974e80e6c6bee823392fad (diff) | |
parent | 228251c3b10a22dedd3f3928561f08bbcae040a1 (diff) | |
download | gsoc2013-empathy-b1782d8dea042c29a50152db4c3bd63da80f3c02.tar gsoc2013-empathy-b1782d8dea042c29a50152db4c3bd63da80f3c02.tar.gz gsoc2013-empathy-b1782d8dea042c29a50152db4c3bd63da80f3c02.tar.bz2 gsoc2013-empathy-b1782d8dea042c29a50152db4c3bd63da80f3c02.tar.lz gsoc2013-empathy-b1782d8dea042c29a50152db4c3bd63da80f3c02.tar.xz gsoc2013-empathy-b1782d8dea042c29a50152db4c3bd63da80f3c02.tar.zst gsoc2013-empathy-b1782d8dea042c29a50152db4c3bd63da80f3c02.zip |
Merge branch 'irc-grab-636203'
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 4645040a2..b6a308aff 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -183,8 +183,17 @@ account_widget_set_control_buttons_sensitivity (EmpathyAccountWidget *self, if (sensitive) { - gtk_widget_set_can_default (priv->apply_button, TRUE); - gtk_widget_grab_default (priv->apply_button); + /* We can't grab default if the widget hasn't be packed in a + * window */ + GtkWidget *window; + + window = gtk_widget_get_toplevel (priv->apply_button); + if (window != NULL && + gtk_widget_is_toplevel (window)) + { + gtk_widget_set_can_default (priv->apply_button, TRUE); + gtk_widget_grab_default (priv->apply_button); + } } } } |