summaryrefslogtreecommitdiff
path: root/cut-n-paste-code
diff options
context:
space:
mode:
authorJohn Harper <jsh@eazel.com>2001-02-27 20:37:20 +0000
committerJohn Harper <jsh@src.gnome.org>2001-02-27 20:37:20 +0000
commitca2a66e2ad7fd2dfd42924c0feb5098355b8eb39 (patch)
tree8edf979b07e7343e82995389e4f71bbdba6c34cb /cut-n-paste-code
parent47310e619939e8f0f10ad6f2ed3c8e78ab32188a (diff)
downloadnautilus-ca2a66e2ad7fd2dfd42924c0feb5098355b8eb39.tar.gz
Fixed bug 6294 (Sidebar gets smaller each time you open a new Window) and
2001-02-27 John Harper <jsh@eazel.com> Fixed bug 6294 (Sidebar gets smaller each time you open a new Window) and probably 6499 (Sidebar grows each time a window is opened): * cut-n-paste-code/widgets/e-paned/e-paned.c (e_paned_compute_position): fixed a bug in when it stores the last allocation of the widget. This in turn causes the widget not to do the annoying scaled resizing if the position of the splitter was set before the first size_allocate invocation * cut-n-paste-code/widgets/e-paned/README.changes: added this file describing the changes I had to make to the widget I'm also going to submit this patch to the gal maintainers
Diffstat (limited to 'cut-n-paste-code')
-rw-r--r--cut-n-paste-code/widgets/e-paned/README.changes25
-rw-r--r--cut-n-paste-code/widgets/e-paned/e-paned.c7
2 files changed, 31 insertions, 1 deletions
diff --git a/cut-n-paste-code/widgets/e-paned/README.changes b/cut-n-paste-code/widgets/e-paned/README.changes
new file mode 100644
index 000000000..c30f1b554
--- /dev/null
+++ b/cut-n-paste-code/widgets/e-paned/README.changes
@@ -0,0 +1,25 @@
+
+I had to update this widget to fix an annoying sidebar bug (6294 and
+probably 6499).
+
+This is the patch I applied, so please check this if and when updating
+e-paned from it's original source:
+
+
+--- e-paned.c 1997/01/02 07:38:15 1.1
++++ e-paned.c 2001/02/27 20:17:26
+@@ -606,7 +606,12 @@ e_paned_compute_position(EPaned *paned,
+ paned->min_position,
+ paned->max_position);
+
+- paned->last_allocation = allocation;
++ /* Only remember the last allocation if no position has been set
++ * yet, or the last allocation was already previously stored. Otherwise
++ * the second half of the above if can wrongly move the split
++ */
++ if (!paned->position_set || paned->last_allocation >= 0)
++ paned->last_allocation = allocation;
+ }
+
+ gboolean
+
diff --git a/cut-n-paste-code/widgets/e-paned/e-paned.c b/cut-n-paste-code/widgets/e-paned/e-paned.c
index ae68e1008..bd84b7933 100644
--- a/cut-n-paste-code/widgets/e-paned/e-paned.c
+++ b/cut-n-paste-code/widgets/e-paned/e-paned.c
@@ -606,7 +606,12 @@ e_paned_compute_position(EPaned *paned,
paned->min_position,
paned->max_position);
- paned->last_allocation = allocation;
+ /* Only remember the last allocation if no position has been set
+ * yet, or the last allocation was already previously stored. Otherwise
+ * the second half of the above if can wrongly move the split
+ */
+ if (!paned->position_set || paned->last_allocation >= 0)
+ paned->last_allocation = allocation;
}
gboolean