aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-03-13 01:27:11 +0800
committerDan Winship <danw@src.gnome.org>2003-03-13 01:27:11 +0800
commitffec3e92a36ce871a71c5e739fbaf08fa957ab9c (patch)
tree26f579377605c5d00d59cc442fca898d54d07f0f /my-evolution
parentc32307b1c859b5b763ec33ca1e2ad54727ce1608 (diff)
downloadgsoc2013-evolution-ffec3e92a36ce871a71c5e739fbaf08fa957ab9c.tar.gz
gsoc2013-evolution-ffec3e92a36ce871a71c5e739fbaf08fa957ab9c.tar.zst
gsoc2013-evolution-ffec3e92a36ce871a71c5e739fbaf08fa957ab9c.zip
New, to free/thaw the ETree models. (e_summary_shown_add_node): Don't
* e-summary-shown.c (e_summary_shown_freeze, e_summary_shown_thaw): New, to free/thaw the ETree models. (e_summary_shown_add_node): Don't freeze/thaw around the single add here. That doesn't really help much. * e-summary-preferences.c (fill_rdf_etable): Freeze/thaw the ESummaryShown while filling it in. * e-summary-weather.c (e_summary_weather_fill_etable): Likewise. svn path=/trunk/; revision=20263
Diffstat (limited to 'my-evolution')
-rw-r--r--my-evolution/ChangeLog12
-rw-r--r--my-evolution/e-summary-preferences.c3
-rw-r--r--my-evolution/e-summary-shown.c36
-rw-r--r--my-evolution/e-summary-shown.h3
-rw-r--r--my-evolution/e-summary-weather.c3
5 files changed, 40 insertions, 17 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index 67605633f9..f40f7d2674 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,15 @@
+2003-03-12 Dan Winship <danw@ximian.com>
+
+ * e-summary-shown.c (e_summary_shown_freeze,
+ e_summary_shown_thaw): New, to free/thaw the ETree models.
+ (e_summary_shown_add_node): Don't freeze/thaw around the single
+ add here. That doesn't really help much.
+
+ * e-summary-preferences.c (fill_rdf_etable): Freeze/thaw the
+ ESummaryShown while filling it in.
+
+ * e-summary-weather.c (e_summary_weather_fill_etable): Likewise.
+
2003-03-07 Ettore Perazzoli <ettore@ximian.com>
* Locations (name): Add some escapes to the newly added locations
diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c
index 056532d0b3..3e117df284 100644
--- a/my-evolution/e-summary-preferences.c
+++ b/my-evolution/e-summary-preferences.c
@@ -443,6 +443,7 @@ fill_rdf_etable (GtkWidget *widget,
}
ess = E_SUMMARY_SHOWN (widget);
+ e_summary_shown_freeze (ess);
/* Fill the defaults first */
for (i = 0; rdfs[i].url; i++) {
@@ -482,6 +483,7 @@ fill_rdf_etable (GtkWidget *widget,
}
if (handle == NULL) {
+ e_summary_shown_thaw (ess);
return;
}
@@ -534,6 +536,7 @@ fill_rdf_etable (GtkWidget *widget,
}
fclose (handle);
+ e_summary_shown_thaw (ess);
}
static void
diff --git a/my-evolution/e-summary-shown.c b/my-evolution/e-summary-shown.c
index b8f2b4bd80..98301059c1 100644
--- a/my-evolution/e-summary-shown.c
+++ b/my-evolution/e-summary-shown.c
@@ -558,22 +558,6 @@ e_summary_shown_new (void)
return GTK_WIDGET (shown);
}
-static ETreePath
-e_tree_model_node_append (ETreeModel *etm,
- ETreePath parent,
- gpointer data)
-{
- ETreeMemory *etmm;
- ETreePath path;
-
- etmm = E_TREE_MEMORY (etm);
- e_tree_memory_freeze (etmm);
- path = e_tree_memory_node_insert (etmm, parent, -1, data);
- e_tree_memory_thaw (etmm);
-
- return path;
-}
-
ETreePath
e_summary_shown_add_node (ESummaryShown *shown,
gboolean all,
@@ -603,7 +587,7 @@ e_summary_shown_add_node (ESummaryShown *shown,
}
etmm = E_TREE_MEMORY (td->etm);
- path = e_tree_model_node_append (td->etm, parent, data);
+ path = e_tree_memory_node_insert (etmm, parent, -1, data);
tree = e_tree_scrolled_get_tree (E_TREE_SCROLLED (td->etable));
e_tree_node_set_expanded (tree, path, expanded);
@@ -650,6 +634,24 @@ e_summary_shown_remove_node (ESummaryShown *shown,
}
+void
+e_summary_shown_freeze (ESummaryShown *shown)
+{
+ g_return_if_fail (IS_E_SUMMARY_SHOWN (shown));
+
+ e_tree_memory_freeze (E_TREE_MEMORY (shown->priv->all->etm));
+ e_tree_memory_freeze (E_TREE_MEMORY (shown->priv->shown->etm));
+}
+
+void
+e_summary_shown_thaw (ESummaryShown *shown)
+{
+ g_return_if_fail (IS_E_SUMMARY_SHOWN (shown));
+
+ e_tree_memory_thaw (E_TREE_MEMORY (shown->priv->all->etm));
+ e_tree_memory_thaw (E_TREE_MEMORY (shown->priv->shown->etm));
+}
+
static void
make_list (ETreePath path,
gpointer data)
diff --git a/my-evolution/e-summary-shown.h b/my-evolution/e-summary-shown.h
index 739e773a0f..4f6ffd4459 100644
--- a/my-evolution/e-summary-shown.h
+++ b/my-evolution/e-summary-shown.h
@@ -75,6 +75,9 @@ ETreePath e_summary_shown_add_node (ESummaryShown *shown,
void e_summary_shown_remove_node (ESummaryShown *shown,
gboolean all,
ESummaryShownModelEntry *entry);
+void e_summary_shown_freeze (ESummaryShown *shown);
+void e_summary_shown_thaw (ESummaryShown *shown);
GList *e_summary_shown_get_selection (ESummaryShown *shown,
gboolean all);
+
#endif
diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c
index 00dbb25198..77614198f7 100644
--- a/my-evolution/e-summary-weather.c
+++ b/my-evolution/e-summary-weather.c
@@ -667,6 +667,8 @@ e_summary_weather_fill_etable (ESummaryShown *ess)
gnome_config_get_vector ("Main/regions", &nregions, &regions);
region = NULL;
+
+ e_summary_shown_freeze (ess);
for (iregions = nregions - 1; iregions >= 0; iregions--) {
int nstates, istates;
char **states;
@@ -754,6 +756,7 @@ e_summary_weather_fill_etable (ESummaryShown *ess)
g_strfreev (regions);
gnome_config_pop_prefix ();
+ e_summary_shown_thaw (ess);
return;
}