aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-main-window.c
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2010-06-24 10:34:33 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2010-06-24 17:37:22 +0800
commitee36de0c87a759e0ffe7ef6e845110e53a724299 (patch)
tree6341e89a1dc7ea988676d2bcc6103b1b4a2b50c0 /src/empathy-main-window.c
parent53ff0c11c8b340eb7038bade1a12a7c4bd5f4cac (diff)
downloadgsoc2013-empathy-ee36de0c87a759e0ffe7ef6e845110e53a724299.tar
gsoc2013-empathy-ee36de0c87a759e0ffe7ef6e845110e53a724299.tar.gz
gsoc2013-empathy-ee36de0c87a759e0ffe7ef6e845110e53a724299.tar.bz2
gsoc2013-empathy-ee36de0c87a759e0ffe7ef6e845110e53a724299.tar.lz
gsoc2013-empathy-ee36de0c87a759e0ffe7ef6e845110e53a724299.tar.xz
gsoc2013-empathy-ee36de0c87a759e0ffe7ef6e845110e53a724299.tar.zst
gsoc2013-empathy-ee36de0c87a759e0ffe7ef6e845110e53a724299.zip
Port EmpathyPreferences to GtkDialog subclass
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r--src/empathy-main-window.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 8e2973a6c..b8033a207 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -99,6 +99,7 @@ struct _EmpathyMainWindowPriv {
GSettings *gsettings_ui;
GSettings *gsettings_contacts;
+ GtkWidget *preferences;
GtkWidget *main_vbox;
GtkWidget *throbber;
GtkWidget *throbber_tool_item;
@@ -1202,7 +1203,17 @@ static void
main_window_edit_preferences_cb (GtkAction *action,
EmpathyMainWindow *window)
{
- empathy_preferences_show (GTK_WINDOW (window));
+ EmpathyMainWindowPriv *priv = GET_PRIV (window);
+
+ if (priv->preferences == NULL) {
+ priv->preferences = empathy_preferences_new (GTK_WINDOW (window));
+ g_object_add_weak_pointer (G_OBJECT (priv->preferences),
+ (gpointer) &priv->preferences);
+
+ gtk_widget_show (priv->preferences);
+ } else {
+ gtk_window_present (GTK_WINDOW (priv->preferences));
+ }
}
static void