Issue 24727 - auto-hide of toolbox separators does not work in all cirumstances
Summary: auto-hide of toolbox separators does not work in all cirumstances
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: www (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: Frank Schönheit
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks: 24411
  Show dependency tree
 
Reported: 2004-01-22 19:28 UTC by Frank Schönheit
Modified: 2004-09-30 16:58 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
suggested patch (1.93 KB, patch)
2004-01-22 19:29 UTC, Frank Schönheit
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2004-01-22 19:28:49 UTC
Normally, the ToolBox automatically hides one of two adjacent separator items.
E.g., if you have a ToolBox with
  <A> | <B> | <C>

where the bracketed items are normal buttons, then if <B> is hidden (HideItem),
one of the two separators is hidden.

However, in a scenario where *both* <B> and <C> are hidden, this does not work
as expected: Here, only one of the separators is hidden, which results in
  <A> |

, which is surely not expected (is it?).

The attached patch is a suggestion how to fix this.
Comment 1 Frank Schönheit 2004-01-22 19:29:19 UTC
Created attachment 12665 [details]
suggested patch
Comment 2 Frank Schönheit 2004-01-22 19:33:27 UTC
The patch replaces the code which checks whether a separator item should be visible.
The basic idea is to iteratively check whether a separator is followed by a
visible button:
- If a separator is followed (skipping all hidden buttons) by a visible button,
then the separator should be visible.
- If a separator is followed (skipping all hidden button) by another separator,
then the visibility of the first separator is the same as the visibility of the
second iterator

The old code did always declare a separator as visible when there was a
separator following.

I hope this is a valid approach to fix this.
Comment 3 Frank Schönheit 2004-01-22 19:34:20 UTC
fs->ssa: If you'd find some minutes to review and (hopefully approve) this, I'd
gladly check this in on my CWS :)
Comment 4 stephan_schaefer 2004-01-27 13:49:00 UTC
ssa->fs: please, go ahead. I checked with CD that the toolbar configuration
dialog is not affected.
Comment 5 Frank Schönheit 2004-01-28 07:40:29 UTC
great!
(thanks for checking with CD yourself, I was going to involve him in this bug,
but you were faster - thanks! :)
Comment 6 Frank Schönheit 2004-01-29 15:19:18 UTC
fix checked in in CWS frmcontrols02
Comment 7 Frank Schönheit 2004-04-06 08:46:31 UTC
working in CWS frmcontrols02
Comment 8 Frank Schönheit 2004-04-06 08:46:47 UTC
closing
Comment 9 christof.pintaske 2004-09-30 16:58:46 UTC
should get target 2.0 since it is fixed in 2.0 (otherwise it won't appear in the
records)