aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-10-22 23:12:40 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-10-22 23:12:40 +0800
commitc44198513ebe9cea0fdb6041d8890ec0beeb55ae (patch)
tree424087f0267a87a5474e69801aa303298b550b55 /calendar/gui
parentd44b2ffe43fcf26f983e0365faac5f0aa7203bfc (diff)
downloadgsoc2013-evolution-c44198513ebe9cea0fdb6041d8890ec0beeb55ae.tar
gsoc2013-evolution-c44198513ebe9cea0fdb6041d8890ec0beeb55ae.tar.gz
gsoc2013-evolution-c44198513ebe9cea0fdb6041d8890ec0beeb55ae.tar.bz2
gsoc2013-evolution-c44198513ebe9cea0fdb6041d8890ec0beeb55ae.tar.lz
gsoc2013-evolution-c44198513ebe9cea0fdb6041d8890ec0beeb55ae.tar.xz
gsoc2013-evolution-c44198513ebe9cea0fdb6041d8890ec0beeb55ae.tar.zst
gsoc2013-evolution-c44198513ebe9cea0fdb6041d8890ec0beeb55ae.zip
we don't need to save the state
2001-10-22 JP Rosevear <jpr@ximian.com> * gui/dialogs/meeting-page.c (meeting_page_destroy): we don't need to save the state * gui/e-meeting-time-sel.c (e_meeting_time_selector_destroy): ditto * gui/e-meeting-model.c (build_etable): listen for the etable being destroyed (table_destroy_cb): save the state when the etable is destroyed svn path=/trunk/; revision=13872
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/meeting-page.c8
-rw-r--r--calendar/gui/e-meeting-model.c20
-rw-r--r--calendar/gui/e-meeting-time-sel.c7
3 files changed, 18 insertions, 17 deletions
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index fbef04d18e..447022e81c 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -242,7 +242,6 @@ meeting_page_destroy (GtkObject *object)
MeetingPage *mpage;
MeetingPagePrivate *priv;
ETable *real_table;
- char *filename;
g_return_if_fail (object != NULL);
g_return_if_fail (IS_MEETING_PAGE (object));
@@ -260,13 +259,6 @@ meeting_page_destroy (GtkObject *object)
g_list_free (priv->address_strings);
gtk_object_unref (GTK_OBJECT (priv->model));
-
- /* Save state */
- filename = g_strdup_printf ("%s/config/et-header-meeting-page",
- evolution_dir);
- real_table = e_table_scrolled_get_table (priv->etable);
- e_table_save_state (real_table, filename);
- g_free (filename);
if (priv->xml) {
gtk_object_unref (GTK_OBJECT (priv->xml));
diff --git a/calendar/gui/e-meeting-model.c b/calendar/gui/e-meeting-model.c
index 472c12ce4e..0271d7bd0c 100644
--- a/calendar/gui/e-meeting-model.c
+++ b/calendar/gui/e-meeting-model.c
@@ -116,6 +116,8 @@ static void invite_entry_changed_cb (BonoboListener *listener,
CORBA_Environment *ev,
gpointer data);
+static void table_destroy_cb (ETableScrolled *etable, gpointer data);
+
static ETableModelClass *parent_class = NULL;
GtkType
@@ -747,10 +749,11 @@ build_etable (ETableModel *model, const gchar *spec_file, const gchar *state_fil
#if 0
gtk_signal_connect (GTK_OBJECT (real_table),
"right_click", GTK_SIGNAL_FUNC (right_click_cb), mpage);
- gtk_signal_connect (GTK_OBJECT (real_table->sort_info),
- "sort_info_changed", GTK_SIGNAL_FUNC (sort_info_changed_cb), mts);
#endif
+ gtk_signal_connect (GTK_OBJECT (etable), "destroy",
+ GTK_SIGNAL_FUNC (table_destroy_cb), g_strdup (state_file));
+
gtk_object_unref (GTK_OBJECT (extras));
return E_TABLE_SCROLLED (etable);
@@ -1494,3 +1497,16 @@ attendee_changed_cb (EMeetingAttendee *ia, gpointer data)
e_table_model_row_changed (E_TABLE_MODEL (im), row);
}
+
+static void
+table_destroy_cb (ETableScrolled *etable, gpointer data)
+{
+ ETable *real_table;
+ char *filename = data;
+
+ real_table = e_table_scrolled_get_table (etable);
+ e_table_save_state (real_table, filename);
+
+ g_free (data);
+}
+
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index aba83f9cf8..74cb9bcf12 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -819,7 +819,6 @@ e_meeting_time_selector_destroy (GtkObject *object)
{
EMeetingTimeSelector *mts;
ETable *real_table;
- char *filename;
mts = E_MEETING_TIME_SELECTOR (object);
@@ -827,12 +826,6 @@ e_meeting_time_selector_destroy (GtkObject *object)
gdk_color_context_free (mts->color_context);
gdk_bitmap_unref (mts->stipple);
-
- filename = g_strdup_printf ("%s/config/et-header-meeting-time-sel",
- evolution_dir);
- real_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (mts->etable));
- e_table_save_state (real_table, filename);
- g_free (filename);
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(*GTK_OBJECT_CLASS (parent_class)->destroy)(object);