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 340014 - The last un-maximized window size isn't saved
The last un-maximized window size isn't saved
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Movie player
1.4.x
Other All
: Normal minor
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
: 342685 342839 343860 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-04-28 11:42 UTC by Julien Olivier
Modified: 2006-08-11 10:15 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
totem-save-state-in-file.patch (8.98 KB, patch)
2006-08-11 08:59 UTC, Bastien Nocera
committed Details | Review

Description Julien Olivier 2006-04-28 11:42:00 UTC
Please describe the problem:
If you open Totem, maximize it, and close it, the next time you open it, you
won't be able to un-maximize it. The window will just be - say - 1024x768 but be
moveable.

The correct way to handle it is to save the size of the last non-maximized
window, and restore it on un-maximize.

Evolution used to have the same problem and they fixed it very recently, so it
might be easier for you to understand what I mean by reading Evolution's bug
#243962.

Steps to reproduce:
1. Open Totem
2. Maximize its window
3. Close Totem
4. Open Totem again
5. Click on the un-maximize icon in Metacity


Actual results:
The window moves a little bit, but stays at the same size it was before.

Expected results:
The window size should be restored to the latest non-maximized size.

Does this happen every time?
Yes.

Other information:
Comment 1 Bastien Nocera 2006-04-28 13:10:31 UTC
Makes complete sense. We should also save whether the window was maximised before exiting.
Comment 2 Bastien Nocera 2006-05-24 07:44:59 UTC
*** Bug 342685 has been marked as a duplicate of this bug. ***
Comment 3 Bastien Nocera 2006-05-25 08:55:25 UTC
*** Bug 342839 has been marked as a duplicate of this bug. ***
Comment 4 Elijah Newren 2006-06-05 02:06:27 UTC
*** Bug 343860 has been marked as a duplicate of this bug. ***
Comment 5 Bastien Nocera 2006-08-11 08:59:18 UTC
Created attachment 70699 [details] [review]
totem-save-state-in-file.patch

An example of saving window state in a file, rather than in GConf.
Comment 6 Bastien Nocera 2006-08-11 09:02:53 UTC
2006-08-11  Bastien Nocera  <hadess@hadess.net>

        * configure.in: up the requirements to glib 2.8, sorry
        * data/totem.schemas.in: remove the window width, height and
        sidebar shown entries, and moved them to a local file
        * src/totem-private.h:
        * src/totem-sidebar.c: (totem_sidebar_setup):
        * src/totem-sidebar.h:
        * src/totem.c: (totem_action_save_size), (totem_action_save_state),
        (totem_action_exit), (window_state_event_cb), (totem_setup_window),
        (main):
        Save the video widget's width, height, maximised state and whether
        the sidebar is shown in a local file, rather than saving those
        (wrongly) in GConf (Closes: #340014)
Comment 7 Julien Olivier 2006-08-11 10:03:33 UTC
Thank you very much for that.

Out of curiosity, is there any reason why you chose to save those information in a text file instead of using gconf as you did before ?
Comment 8 Bastien Nocera 2006-08-11 10:15:46 UTC
See http://live.gnome.org/GnomeGoalsSaveState
GConf is not for saving state, just preferences