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 324346 - the sidebar sucks
the sidebar sucks
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
: 313021 313212 322614 324435 326229 334214 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-12-17 18:36 UTC by Ronald Bultje
Modified: 2006-07-14 19:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (1.38 KB, patch)
2005-12-17 18:36 UTC, Ronald Bultje
none Details | Review
Better patch that actually works (3.07 KB, patch)
2006-06-09 09:22 UTC, Eric Anderson
needs-work Details | Review

Description Ronald Bultje 2005-12-17 18:36:08 UTC
Attached patch should fix that. Use cases:

* make sure sidebar is hidden on startup. Start totem, click sidebar button to show.
Expected: window becomes larger for new sidebar, video window does not change size.
Reality: video window becomes smaller, sidebar takes rest of space. Totem window
does not change size.

Attached patch fixes that.
Comment 1 Ronald Bultje 2005-12-17 18:36:22 UTC
Created attachment 56101 [details] [review]
fix
Comment 2 Bastien Nocera 2005-12-18 13:28:22 UTC
That's quite disgusting:
+	static gboolean was_ever_visible = FALSE;

Fixed in CVS HEAD and gnome-2-12, thanks Ronald.

2005-12-18  Bastien Nocera  <hadess@hadess.net>

        * src/totem-private.h:
        * src/totem-sidebar.c: (cb_resize), (cb_got_size),
        (on_sidebar_button_toggled): patch from Ronald Bultje
        <rbultje@ronald.bitfreak.net> to fix resizing of the sidebar
        (Closes: #324346)
Comment 3 Bastien Nocera 2005-12-18 13:28:58 UTC
*** Bug 313212 has been marked as a duplicate of this bug. ***
Comment 4 Ronald Bultje 2005-12-18 16:46:25 UTC
Yeah, it is; I just couldn't find anything better to fix it. I was hoping the size allocation would be 0, but that's not the case (it's 1, which may or may not be true for other computers). So this was the easiest way to make it work...

Thanks for applying.
Comment 5 Bastien Nocera 2005-12-18 23:23:31 UTC
*** Bug 324435 has been marked as a duplicate of this bug. ***
Comment 6 Sergej Kotliar 2006-03-12 02:57:19 UTC
*** Bug 334214 has been marked as a duplicate of this bug. ***
Comment 7 Sergej Kotliar 2006-03-23 10:46:53 UTC
Ehm... using totem 1.4.0 the sidebar still eats up half of the window size when activating... And clicking it repeatedly causes seemingly randow window sizes...

Seems like the sidebar still sucks a bit...
Comment 8 Sergej Kotliar 2006-04-09 18:34:27 UTC
Reopening, as this still is the case in GNOME 2.14...
Comment 9 Michaël Arnauts 2006-04-11 17:02:42 UTC
*** Bug 326229 has been marked as a duplicate of this bug. ***
Comment 10 Michaël Arnauts 2006-04-11 17:06:22 UTC
*** Bug 313021 has been marked as a duplicate of this bug. ***
Comment 11 Eric Anderson 2006-06-09 09:22:11 UTC
Created attachment 67026 [details] [review]
Better patch that actually works

The patch fixes the resize problem to the best of my knowledge. I did change a few things.

First, when resizing the window, the sidebar will no longer scale with the window (the gtk_paned_pack2 line). This was so that the code could predict how much space the sidebar will consume.

Now, when toggling the sidebar, the exact amount of width that the sidebar + pane handle use is added and subtracted so that the video widget remains the same size.

Of course, the patch fixes the problem with toggling and the window doing funky things. One of the things that I did to achieve this was to realize the sidebar as soon as we set it up. This is so that we know how much space it is allocated.
 
The patch removes most (all?) of the old patch and removes on_show_sidebar1_activate in favor of using g_signal_connect_swapped.
Comment 12 Bastien Nocera 2006-06-18 17:03:32 UTC
Your patch asserts though:
GLib-GObject-WARNING **: gvalue.c:89: cannot initialize GValue with type `gint', the value has already been initialized as `-g-type-private--GTypeFlags'

  • #0 g_logv
    from /usr//lib/libglib-2.0.so.0
  • #1 g_log
    from /usr//lib/libglib-2.0.so.0
  • #2 g_value_init
    from /usr//lib/libgobject-2.0.so.0
  • #3 on_sidebar_button_toggled
    at totem-sidebar.c line 54

Comment 13 Bastien Nocera 2006-06-18 17:13:16 UTC
I fixed that warning, which incidentally made it work as well :)
Very good patch, thanks Eric.

Committed to gnome-2-14 and HEAD.

2006-06-18  Bastien Nocera  <hadess@hadess.net>

        * src/totem-private.h:
        * src/totem-sidebar.c: (cb_resize), (on_sidebar_button_toggled),
        (totem_sidebar_setup):
        Patch from Eric Anderson <ejona86@gmail.com> to make showing
        and hiding the sidebar not resize the video window
        (Closes: #324346)
Comment 14 Bastien Nocera 2006-07-14 19:46:46 UTC
*** Bug 322614 has been marked as a duplicate of this bug. ***