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/e-summary.c | |
parent | 58755d5604d35422d133c39aab785078a40fb8b4 (diff) | |
download | gsoc2013-evolution-6498968214fd4fb26675d3f068f7086eef5a2c4d.tar gsoc2013-evolution-6498968214fd4fb26675d3f068f7086eef5a2c4d.tar.gz gsoc2013-evolution-6498968214fd4fb26675d3f068f7086eef5a2c4d.tar.bz2 gsoc2013-evolution-6498968214fd4fb26675d3f068f7086eef5a2c4d.tar.lz gsoc2013-evolution-6498968214fd4fb26675d3f068f7086eef5a2c4d.tar.xz gsoc2013-evolution-6498968214fd4fb26675d3f068f7086eef5a2c4d.tar.zst gsoc2013-evolution-6498968214fd4fb26675d3f068f7086eef5a2c4d.zip |
Freeze and thaw
svn path=/trunk/; revision=13132
Diffstat (limited to 'my-evolution/e-summary.c')
-rw-r--r-- | my-evolution/e-summary.c | 37 |
1 files changed, 37 insertions, 0 deletions
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); + } +} |