aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
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
parent39337fc30a0867eb81bb31ce696d755ff28a884b (diff)
downloadgsoc2013-evolution-9aaf62bf4bcf15fa38fbb625adc35d3dbc4d2240.tar
gsoc2013-evolution-9aaf62bf4bcf15fa38fbb625adc35d3dbc4d2240.tar.gz
gsoc2013-evolution-9aaf62bf4bcf15fa38fbb625adc35d3dbc4d2240.tar.bz2
gsoc2013-evolution-9aaf62bf4bcf15fa38fbb625adc35d3dbc4d2240.tar.lz
gsoc2013-evolution-9aaf62bf4bcf15fa38fbb625adc35d3dbc4d2240.tar.xz
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')
-rw-r--r--widgets/table/e-table-header-item.c20
-rw-r--r--widgets/table/e-table-header-item.h1
2 files changed, 18 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
diff --git a/widgets/table/e-table-header-item.h b/widgets/table/e-table-header-item.h
index eafc50dc63..d1e539888c 100644
--- a/widgets/table/e-table-header-item.h
+++ b/widgets/table/e-table-header-item.h
@@ -95,6 +95,7 @@ typedef struct {
ETableHeader *full_header;
ETable *table;
ETree *tree;
+ GtkWidget *etfcd;
void *config;
/* For keyboard navigation*/