After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 169152 - Columns resizing on drag in RbTreeView
Columns resizing on drag in RbTreeView
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: User Interface
HEAD
Other All
: Normal minor
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-03-03 23:46 UTC by Rob
Modified: 2005-07-29 03:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to drop RbTreeView and use of GtkTreeView (5.46 KB, patch)
2005-03-04 17:20 UTC, Nickolay V. Shmyrev
none Details | Review
Testcase in simple gtk (14.04 KB, text/plain)
2005-03-05 16:49 UTC, Nickolay V. Shmyrev
  Details
Patch to gtk to improve columns resizing (3.43 KB, patch)
2005-03-09 16:02 UTC, Nickolay V. Shmyrev
none Details | Review
Modified version of RbTreeView->GtkTreeView (4.72 KB, patch)
2005-07-15 17:09 UTC, James "Doc" Livingston
committed Details | Review

Description Rob 2005-03-03 23:46:26 UTC
The category dividers in applications move like one would expect them to...
dragging one moves one. The issue I am having (in my case in Rhythmbox) is that
moving one divider to the left moves the two dividers farther to the left right,
so they are converging. See the ASCII art:
|Track    |Title          |Genre    |Artist        |Album                  |Time
becomes
|Track    |Title               |Genre   |Artist |Album                     |Time
If that doesn't get the idea across, I'll attach a few screenshots... I hope
this isn't intended behavior.

Other information:
Comment 1 Rob 2005-03-03 23:47:16 UTC
In the example above, I dragged the album divider left, which caused the genre
and artist dividers to move right.
Comment 2 Nickolay V. Shmyrev 2005-03-04 16:58:43 UTC
Actually, it's rhythmbox bug, since it uses RbTreeView - it's own tree
implemntation.
Comment 3 Nickolay V. Shmyrev 2005-03-04 17:20:02 UTC
Created attachment 38256 [details] [review]
Patch to drop RbTreeView and use of GtkTreeView

Files that not needed and should be removed:

       gtktreeprivate.h 			       \
       gtkrbtree.h				       
       rb-tree-view.c				       
       rb-tree-view.h				       
       rb-query-creator.h			       
       rb-tree-view-column.c			       
       rb-tree-view-column.h

Althogh it doesn't solve problem completely. GtkTreeView behaviour is also not
perfect.
Comment 4 Nickolay V. Shmyrev 2005-03-05 16:49:02 UTC
Created attachment 38302 [details]
Testcase in simple gtk
Comment 5 Christophe Fergeau 2005-03-07 08:46:18 UTC
What is this testcase about?
Comment 6 Nickolay V. Shmyrev 2005-03-09 16:02:17 UTC
Created attachment 38462 [details] [review]
Patch to gtk to improve columns resizing

Attachment 38302 [details] is the simple demo of resizing columns when two or more
columns are expandible. gtk is not optimal in this situation - when you start
to resize column it sometimes jump and so on, when you move mouse left, column
sometimes grow but then becames smaller.

This patch should correct situation.
Comment 7 Nickolay V. Shmyrev 2005-03-09 16:06:26 UTC
About RbTreeView. If I've understood correctly it was created for three resons -

1. Expandable columns
2. Sortable columns
3. Handling of horizontal resizing so that widget has constant width.

Now in gkt 2.4 both 1) and 2) supported. 3 can be archived by just setting
GTK_POLICY_NEVER to hscrollbar of ScrolledWindow. This will be more conformant
way to all gtk application behaviour.

So as a result it would be nice to remove RbTreeView with the patch from comment #3
Comment 8 James "Doc" Livingston 2005-07-15 14:51:35 UTC
I had a play around with this and it works fine, but making the entry view never
have horizontal scrollbars isn't as easy as setting hscrollbar_policy to
GTK_POLICY_NEVER for rb-entryview (which is derived from ScrolledWindow.). Does
anyone with more GTK knowledge than me know exactly how to get the horizontal
scrollbars to disappear?
Comment 9 Nickolay V. Shmyrev 2005-07-15 16:11:49 UTC
James, the problem here is the following - you either have no resizable columns
at all or have horizontal scrollbar that should appear or use POLICY_NEVER and
then widget should expand. That is _gtk_ behavior and it's preferable for me,
since it 
follows the behavior of other applications. Having the widget that looks very
similar to GtkTreeView but behaves differently is not so good.

Probably rhythmbox can use new implementation of scrollbar_widget instead that
even without horizonal scrollbar will restrict child size.

To be honest, I also don't know why columns should be resizable.
Comment 10 James "Doc" Livingston 2005-07-15 17:09:33 UTC
Created attachment 49253 [details] [review]
Modified version of RbTreeView->GtkTreeView

For some reason none of the columns were set to be expandable, so they wouldn't
shrink - which is why it wasn't working.

This is a slightly modified version of the first patch, which will make several
columns ellipsize and shrink when necessary - the title, artist, album and
genre (the ones it makes sense to ellipsize). This means that we shouldn't get
a horizontal scrollbar unless the window is fairly thin.

The column resize behaviour is still wierd, but I guess that's a GTK issue. I
guess the reason they are resizable is that if things are being ellipsized, you
might care more about the title than the album - and so want to give it more
room.
Comment 11 James "Doc" Livingston 2005-07-29 03:55:41 UTC
If you think the column-resizing patch needs to be applied, please attach it to
a bug against GTK.


2005-07-29  James Livingston  <jrl@ids.org.au>

        * sources/rb-playlist-source.c: (rb_playlist_source_constructor):
        * sources/rb-sourcelist.c:
        * widgets/Makefile.am:
        * widgets/rb-entry-view.c: (rb_entry_view_append_column),
        (rb_entry_view_constructor): Patch from Nickolay V. Shmyrev
        <nshmyrev@yandex.ru> to use GTK's TreeView rather than our own
        implementation. (Closes 169152)

        Files removed:
        * widgets/gtkrbtree.h:
        * widgets/gtktreeprivate.h:
        * widgets/rb-tree-view-column.c:
        * widgets/rb-tree-view-column.h:
        * widgets/rb-tree-view.c:
        * widgets/rb-tree-view.h: