GNOME Bugzilla – Bug 129580
Zoom functionality doen't work under certain condition
Last modified: 2007-05-07 16:41:49 UTC
Setup deatils ------------- Redhat 9.0 Gnome 2.2.2 This is xine (X11 gui) - a free video player v0.9.22. (c) 2000-2003 The xine Team. Built with xine library 1.0.0 (1-rc2) Found xine library version: 1.0.0 (1-rc2). XServer Vendor: The XFree86 Project, Inc. Release: 40300000, Protocol Version: 11, Revision: 0, Available Screen(s): 1, using 0 Depth: 24. XShmQueryVersion: 1.1. Steps to Replicate -------------------- 1.Open totem. 2.Try to play a .wav file. 3. Maximize the totem window so that in occupy the entire desktop. 4.Now cleck the option Zoom 1:1 Zoom 1:2 Zoom 2:1 Non of the above functionality works under this condition.
Totem version is 0.99.8
Created attachment 22836 [details] [review] Patch to highlight only available Zoom Ratios
1. The attached patch changes the totem.glade interface to create a main "Zoom" Menu Item and the earlier ( Zoom 1:1, Zoom 1:2 ) menu items have been created as children of this "Zoom" Item. We will change the sensitivity of these accordingly so ONLY the possible zoom ratios will be displayed to the user. ( keyboard shortcuts lead to error messages to the shell. ) 2. The APIs bacon_video_widget_set_scale_ratio and totem_action_set_scale_ratio have been changed to return a gboolean value depending on whether or not the chosen zoom ratio will lead to a change in window size. An extra argument (gboolean resize ) is being passed to these APIs to indicate whether we want to resize the toplevel window or just query whether a resize will be done or not.
Printing to the console is very very bad error feedback. I'd prefer if nothing happened in those cases (the availability of the menu items is a good enough discovery item). I'd prefer it if the test was actually done when the window is resized. Even better would be to move the set_scale_ratio to the video-utils.[ch] as apart from the dimension of the video on the screen, nothing is needed from the video widget.
EXACTLY my feelings about the patch..:) 1. I was torn between ignoring the errors from keyboard shortcuts and displaying an error message on the screen ( eeks...) and finally settled on the error messages to the console. 2. I wanted to do the tests when the window was resized since that would not require any change to the glade XML interface, but I did not know what handler handles the window change...:( Will do more work on this one and resubmit.
Mass reassign.
Re-reading the original bug report, it was indeed pretty normal that the maximised windows couldn't be set to those zoom levels. We would need to unmaximise the window first. However, we'd still need to be able to track which zoom levels can, and cannot be reached given the video size, and desktop size.
https://launchpad.net/distros/ubuntu/+source/totem/+bug/55584 mentions the same with totem 1.5.90
The original bug report should be fixed by that commit. 2007-05-07 Bastien Nocera <hadess@hadess.net> * src/totem.c: (window_state_event_cb): When the window becomes maximised, disable the fit window to movie menu entries, as we can't fit to movie when we're maximised (Closes: #129580) Having the menu entries be available depending on the size of the desktop, and the size of the movie would be nice, but it would require a different bug report.