diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2001-02-06 05:18:25 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-02-06 05:18:25 +0800 |
commit | fdb765da597c1929ffc8d5275e74b78f5624fe60 (patch) | |
tree | 14a86b60a86f23e719034d30be433ccfa6b8911a /widgets/menus/gal-view-etable.c | |
parent | 707cce7733ad5bd9fda46ed3b48259df4e2d73f0 (diff) | |
download | gsoc2013-evolution-fdb765da597c1929ffc8d5275e74b78f5624fe60.tar.gz gsoc2013-evolution-fdb765da597c1929ffc8d5275e74b78f5624fe60.tar.zst gsoc2013-evolution-fdb765da597c1929ffc8d5275e74b78f5624fe60.zip |
Fixed a number of small bugs in how we were saving and loading view
2001-02-05 Christopher James Lahey <clahey@helixcode.com>
* gal-view-collection.c: Fixed a number of small bugs in how we
were saving and loading view collections.
* gal-view-etable.c (config_changed): Send the changed signal
properly.
(gal_view_etable_construct): Duplicate the spec's state here.
svn path=/trunk/; revision=7986
Diffstat (limited to 'widgets/menus/gal-view-etable.c')
-rw-r--r-- | widgets/menus/gal-view-etable.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c index 220bf9ad24..1eb3166611 100644 --- a/widgets/menus/gal-view-etable.c +++ b/widgets/menus/gal-view-etable.c @@ -15,13 +15,28 @@ static GalViewClass *gal_view_etable_parent_class; + +static void +config_changed (ETableConfig *config, ETableState *state, GalViewEtable *view) +{ + if (view->state) + gtk_object_unref(GTK_OBJECT(view->state)); + view->state = e_table_state_duplicate(state); + gal_view_changed(GAL_VIEW(view)); +} + static void gal_view_etable_edit (GalView *view) { GalViewEtable *etable_view = GAL_VIEW_ETABLE(view); - e_table_config_new(etable_view->title, - etable_view->spec, - etable_view->state); + ETableConfig *config; + + config = e_table_config_new(etable_view->title, + etable_view->spec, + etable_view->state); + + gtk_signal_connect(GTK_OBJECT(config), "changed", + GTK_SIGNAL_FUNC(config_changed), view); } static void @@ -147,7 +162,13 @@ gal_view_etable_construct (GalViewEtable *view, if (spec) gtk_object_ref(GTK_OBJECT(spec)); view->spec = spec; + + if (view->state) + gtk_object_unref(GTK_OBJECT(view->state)); + view->state = e_table_state_duplicate(spec->state); + view->title = g_strdup(title); + return GAL_VIEW(view); } |