pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] Multipart pic display


From: Per Hedeland
Subject: Re: [Pan-users] Multipart pic display
Date: Wed, 9 Aug 2006 00:27:32 +0200 (CEST)

Charles Kerr <address@hidden> wrote:
>
>This is a good patch.  Thank you!

Thank you for the response! I was starting to worry that it went into
/dev/null...:-)

>Feel free to submit more if you like. :)

Already did, see the "Oscillating size-to-fit" message. Though I
wouldn't call that patch "good", I think on balance it's "worthy"
(i.e. the ratio of "pretty much guaranteed to make the problem go away"
vs "only harmful to readers of the code" is pretty good:-). The version
below is perhaps marginally "nicer" though, even if the main ugliness is
the same.

--Per

--- pan-0.107/pan/gui/body-pane.cc.ORIG Tue Aug  8 07:23:50 2006
+++ pan-0.107/pan/gui/body-pane.cc      Wed Aug  9 00:10:57 2006
@@ -1107,8 +1107,15 @@
                                  GtkAllocation * allocation,
                                  gpointer        unused)
 {
-  if (!text_size_allocated_idle_tag)
-       text_size_allocated_idle_tag = g_idle_add (text_size_allocated_idle, 
text);
+  /* this is a crude way of trying to prevent that changed allocation due
+   * to addition/removal of scrollbar(s) causes eternal "oscillation". */
+  static time_t last_alloc_time (0);
+  const time_t this_alloc_time (time (NULL));
+
+  if (!text_size_allocated_idle_tag && this_alloc_time != last_alloc_time) {
+    last_alloc_time = this_alloc_time;
+    text_size_allocated_idle_tag = g_idle_add (text_size_allocated_idle, text);
+  }
 }
 
 /***




reply via email to

[Prev in Thread] Current Thread [Next in Thread]