aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-26 19:54:01 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-26 19:54:01 +0800
commit3ba9a682ce49528af7db7a6d7e5b5baddd475618 (patch)
tree966b96d987fea38e3596a88b83f32f0c17065b4a /libempathy-gtk
parentc48ad853488aed4cd28eeb20d6c4614f01b4b2f0 (diff)
downloadgsoc2013-empathy-3ba9a682ce49528af7db7a6d7e5b5baddd475618.tar
gsoc2013-empathy-3ba9a682ce49528af7db7a6d7e5b5baddd475618.tar.gz
gsoc2013-empathy-3ba9a682ce49528af7db7a6d7e5b5baddd475618.tar.bz2
gsoc2013-empathy-3ba9a682ce49528af7db7a6d7e5b5baddd475618.tar.lz
gsoc2013-empathy-3ba9a682ce49528af7db7a6d7e5b5baddd475618.tar.xz
gsoc2013-empathy-3ba9a682ce49528af7db7a6d7e5b5baddd475618.tar.zst
gsoc2013-empathy-3ba9a682ce49528af7db7a6d7e5b5baddd475618.zip
irc-network-chooser-dialog: make it transient and modal
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-irc-network-chooser-dialog.c6
-rw-r--r--libempathy-gtk/empathy-irc-network-chooser-dialog.h3
-rw-r--r--libempathy-gtk/empathy-irc-network-chooser.c5
3 files changed, 11 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-irc-network-chooser-dialog.c b/libempathy-gtk/empathy-irc-network-chooser-dialog.c
index b4483df1e..06d9e59a4 100644
--- a/libempathy-gtk/empathy-irc-network-chooser-dialog.c
+++ b/libempathy-gtk/empathy-irc-network-chooser-dialog.c
@@ -534,6 +534,8 @@ empathy_irc_network_chooser_dialog_constructed (GObject *object)
/* Request a side ensuring to display at least some networks */
gtk_widget_set_size_request (GTK_WIDGET (self), -1, 300);
+
+ gtk_window_set_modal (GTK_WINDOW (self), TRUE);
}
static void
@@ -594,11 +596,13 @@ empathy_irc_network_chooser_dialog_init (EmpathyIrcNetworkChooserDialog *self)
GtkWidget *
empathy_irc_network_chooser_dialog_new (EmpathyAccountSettings *settings,
- EmpathyIrcNetwork *network)
+ EmpathyIrcNetwork *network,
+ GtkWindow *parent)
{
return g_object_new (EMPATHY_TYPE_IRC_NETWORK_CHOOSER_DIALOG,
"settings", settings,
"network", network,
+ "transient-for", parent,
NULL);
}
diff --git a/libempathy-gtk/empathy-irc-network-chooser-dialog.h b/libempathy-gtk/empathy-irc-network-chooser-dialog.h
index 1c9d3fabd..0d4f24e7f 100644
--- a/libempathy-gtk/empathy-irc-network-chooser-dialog.h
+++ b/libempathy-gtk/empathy-irc-network-chooser-dialog.h
@@ -57,7 +57,8 @@ GType empathy_irc_network_chooser_dialog_get_type (void) G_GNUC_CONST;
GtkWidget * empathy_irc_network_chooser_dialog_new (
EmpathyAccountSettings *settings,
- EmpathyIrcNetwork *network);
+ EmpathyIrcNetwork *network,
+ GtkWindow *parent);
EmpathyIrcNetwork * empathy_irc_network_chooser_dialog_get_network (
EmpathyIrcNetworkChooserDialog *self);
diff --git a/libempathy-gtk/empathy-irc-network-chooser.c b/libempathy-gtk/empathy-irc-network-chooser.c
index 6d41ae224..55a90fd0c 100644
--- a/libempathy-gtk/empathy-irc-network-chooser.c
+++ b/libempathy-gtk/empathy-irc-network-chooser.c
@@ -264,12 +264,15 @@ clicked_cb (GtkButton *button,
gpointer user_data)
{
EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (button);
+ GtkWindow *window;
if (priv->dialog != NULL)
goto out;
+ window = empathy_get_toplevel_window (GTK_WIDGET (button));
+
priv->dialog = empathy_irc_network_chooser_dialog_new (priv->settings,
- priv->network);
+ priv->network, window);
gtk_widget_show_all (priv->dialog);
tp_g_signal_connect_object (priv->dialog, "response",