aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header-item.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-12-22 04:47:40 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-12-22 04:47:40 +0800
commit9aaf62bf4bcf15fa38fbb625adc35d3dbc4d2240 (patch)
tree70db70aeb924e2195ba2e285d03cef2644190b03 /widgets/table/e-table-header-item.c
parent39337fc30a0867eb81bb31ce696d755ff28a884b (diff)
downloadgsoc2013-evolution-9aaf62bf4bcf15fa38fbb625adc35d3dbc4d2240.tar.gz
gsoc2013-evolution-9aaf62bf4bcf15fa38fbb625adc35d3dbc4d2240.tar.zst
gsoc2013-evolution-9aaf62bf4bcf15fa38fbb625adc35d3dbc4d2240.zip
Fixes #29309
2004-12-21 JP Rosevear <jpr@novell.com> Fixes #29309 * e-table-header-item.h: add field chooser dialog data member * e-table-header-item.c: remove weak pointer ref (ethi_popup_field_chooser): if we already have a dialog, just present it, otherwise create a new one and listen for its destruction svn path=/trunk/; revision=28169
Diffstat (limited to 'widgets/table/e-table-header-item.c')
-rw-r--r--widgets/table/e-table-header-item.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 44d54dd4e3..265d29fed0 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -141,6 +141,11 @@ ethi_dispose (GObject *object){
g_object_unref (ethi->full_header);
ethi->full_header = NULL;
+
+ if (ethi->etfcd)
+ g_object_remove_weak_pointer (G_OBJECT (ethi->etfcd), (gpointer *)&ethi->etfcd);
+
+
if (ethi->config)
g_object_unref (ethi->config);
ethi->config = NULL;
@@ -1377,13 +1382,22 @@ ethi_popup_remove_column(GtkWidget *widget, EthiHeaderInfo *info)
static void
ethi_popup_field_chooser(GtkWidget *widget, EthiHeaderInfo *info)
{
- GtkWidget *etfcd = e_table_field_chooser_dialog_new();
- g_object_set(etfcd,
+ if (info->ethi->etfcd) {
+ gtk_window_present (GTK_WINDOW (info->ethi->etfcd));
+
+ return;
+ }
+
+ info->ethi->etfcd = e_table_field_chooser_dialog_new();
+ g_object_add_weak_pointer (G_OBJECT (info->ethi->etfcd), (gpointer *)&info->ethi->etfcd);
+
+ g_object_set(info->ethi->etfcd,
"full_header", info->ethi->full_header,
"header", info->ethi->eth,
"dnd_code", info->ethi->dnd_code,
NULL);
- gtk_widget_show(etfcd);
+
+ gtk_widget_show(info->ethi->etfcd);
}
static void