diff options
author | Iain Holmes <iain@src.gnome.org> | 2001-09-26 07:08:08 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2001-09-26 07:08:08 +0800 |
commit | 6498968214fd4fb26675d3f068f7086eef5a2c4d (patch) | |
tree | e1ebb0c3f00e40ca6d64e7a74558a7b152dddcac /my-evolution | |
parent | 58755d5604d35422d133c39aab785078a40fb8b4 (diff) | |
download | gsoc2013-evolution-6498968214fd4fb26675d3f068f7086eef5a2c4d.tar.gz gsoc2013-evolution-6498968214fd4fb26675d3f068f7086eef5a2c4d.tar.zst gsoc2013-evolution-6498968214fd4fb26675d3f068f7086eef5a2c4d.zip |
Freeze and thaw
svn path=/trunk/; revision=13132
Diffstat (limited to 'my-evolution')
-rw-r--r-- | my-evolution/ChangeLog | 10 | ||||
-rw-r--r-- | my-evolution/e-summary-factory.c | 2 | ||||
-rw-r--r-- | my-evolution/e-summary.c | 37 | ||||
-rw-r--r-- | my-evolution/e-summary.h | 2 |
4 files changed, 51 insertions, 0 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index 750002aa72..339ae821c0 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,5 +1,15 @@ 2001-09-25 Iain Holmes <iain@ximian.com> + * e-summary.c (e_summary_draw): Check if the summary is frozen, if so + just set redraw_pending. + (e_summary_freeze): Freeze the summary. + (e_summary_thaw): Thaw the summary and redraw if needed. + + * e-summary-factory.c (control_activate): Thaw summary. + (control_deactivate): Freeze summary. + +2001-09-25 Iain Holmes <iain@ximian.com> + * Misc warnings cleanups. * e-summary.c (e_summary_url_requested): Check in the cache for the diff --git a/my-evolution/e-summary-factory.c b/my-evolution/e-summary-factory.c index 1f709e1561..7c19f570ac 100644 --- a/my-evolution/e-summary-factory.c +++ b/my-evolution/e-summary-factory.c @@ -57,6 +57,7 @@ control_activate (BonoboControl *control, e_pixmaps_update (ui_component, pixmaps); bonobo_ui_component_thaw (ui_component, NULL); + e_summary_thaw (summary); } static void @@ -65,6 +66,7 @@ control_deactivate (BonoboControl *control, ESummary *summary) { bonobo_ui_component_unset_container (ui_component); + e_summary_freeze (summary); } static void diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c index 0ea9e7cde1..d93877e024 100644 --- a/my-evolution/e-summary.c +++ b/my-evolution/e-summary.c @@ -82,6 +82,9 @@ struct _ESummaryPrivate { GList *connections; gpointer alarm; + + gboolean frozen; + gboolean redraw_pending; }; typedef struct _ProtocolListener { @@ -159,6 +162,11 @@ e_summary_draw (ESummary *summary) return; } + if (summary->priv->frozen == TRUE) { + summary->priv->redraw_pending = TRUE; + return; + } + string = g_string_new (HTML_1); t = time (NULL); strftime (date, 255, _("%A, %B %e %Y"), localtime (&t)); @@ -447,6 +455,9 @@ e_summary_init (ESummary *summary) priv = summary->priv; + priv->frozen = FALSE; + priv->redraw_pending = FALSE; + priv->html_scroller = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->html_scroller), GTK_POLICY_AUTOMATIC, @@ -823,3 +834,29 @@ e_summary_remove_online_connection (ESummary *summary, summary->priv->connections = g_list_remove_link (summary->priv->connections, p); g_list_free (p); } + +void +e_summary_freeze (ESummary *summary) +{ + g_return_if_fail (IS_E_SUMMARY (summary)); + + if (summary->priv->frozen == TRUE) { + return; + } + + summary->priv->frozen = TRUE; +} + +void +e_summary_thaw (ESummary *summary) +{ + g_return_if_fail (IS_E_SUMMARY (summary)); + if (summary->priv->frozen == FALSE) { + return; + } + + summary->priv->frozen = FALSE; + if (summary->priv->redraw_pending) { + e_summary_draw (summary); + } +} diff --git a/my-evolution/e-summary.h b/my-evolution/e-summary.h index 6bb012f75e..d2e4f4e61f 100644 --- a/my-evolution/e-summary.h +++ b/my-evolution/e-summary.h @@ -149,4 +149,6 @@ void e_summary_add_online_connection (ESummary *summary, void e_summary_remove_online_connection (ESummary *summary, ESummaryConnection *connection); +void e_summary_freeze (ESummary *summary); +void e_summary_thaw (ESummary *summary); #endif |