GNOME Bugzilla – Bug 131811
Implement proper session management
Last modified: 2005-01-01 21:28:13 UTC
When starting Totem without arguments, the most recently opened file is loaded. This doesn't make any sense. An application shouldn't go opening things the user didn't request. Version: 0.99.8
I agree. I came here to report this myself. The implications of this feature are worsened if the last opened file was streamed over a network because there is a big delay whilst it is initially read (especially if it was streamed over a low bandwidth internet connection). At least provide an option to toggle this behaviour, but I'd recommend defaulting it to off and hiding it in a gconf key.
Created attachment 23887 [details] [review] Even I agree, Patch attached
I agree too.
I will not apply this patch. What I would apply is a patch that implements proper session management. I'm changing the summary to that effect.
*** Bug 127074 has been marked as a duplicate of this bug. ***
*** Bug 134716 has been marked as a duplicate of this bug. ***
*** Bug 137483 has been marked as a duplicate of this bug. ***
*** Bug 139763 has been marked as a duplicate of this bug. ***
The bad thing about this is a confusing error when the last file was removed and cannot be opened. The message indicates a missing plugin which is wrong. It should at least say that the file was removed.
I agree with #9 except I don't think you have to tell the user the file was removed at all. Just don't open anything. Especially instead of complaining there is no DVD in the disc drive.
*** Bug 142877 has been marked as a duplicate of this bug. ***
*** Bug 144177 has been marked as a duplicate of this bug. ***
Is there any work being done to fix this?
*** Bug 144930 has been marked as a duplicate of this bug. ***
Mass reassign.
*** Bug 154555 has been marked as a duplicate of this bug. ***
My case: I often use totem to read videos downloaded from the web. Those are saved in /tmp. After I reboot, /tmp was cleared indeed, but totem will hang several seconds and complain about a missing file. Why opening the previous file anyway? Why is the playlist persistent? Totem is not competiting with XMMS or Rhythmbox. When I have a single file to play, I won't use the latter. Totem is inefficient for working with a library; for working with playlists, we have the load/save features. Remember what you said in http://bugzilla.gnome.org/show_bug.cgi?id=129591#c1 I don't understand what you expect from the current behaviour.
I strongly agree with #0 and #17. How dare the media player open things I didn't request from it! It's amazing that this bug is STILL not fixed after 11 months.
The bug isn't about opening the playlist of what was previously playing. This feature is only going to be removed when proper session management is implemented. Nobody came forward to implement it, and it's very low on my TODO list. Feel free to send a patch if you want it done before I get to it.
Can't you just deactived the automatic opening for now?
Everybody, just use kaffeine -- you'll be happier :)
Bastien, what constitutes proper session management? Lay out for me..
A good example of session management is in gedit: http://cvs.gnome.org/viewcvs/gedit/gedit/gedit-session.c?view=markup The API is decently well explained at: http://developer.gnome.org/doc/API/2.0/libgnomeui/GnomeClient.html We need to save as much of the state of the session as possible, that's: - the playlist - the position in the playlist - the position in the file (if it's possible to do so, ie. not a live stream) - the current paths for the file selectors And you shouldn't need to save the windows positions or sizes, as they should be automatically set by the window manager. You can test your work by: - run "gnome-session-save" - Close Totem - Check the restart command in ~/.gnome2/session - Relaunch Totem with that command and see how much of it is restored
And another session link: http://developer.gnome.org/dotplan/porting/ar01s23.html
*** Bug 161437 has been marked as a duplicate of this bug. ***
I suggest changing topic of this bug report to reduce number of dupes. I didn't find this report while searching it, and ended up submitting a duplicate. :)
I would like to suggest to atleast not try to open the last opened file if: 1) it was a stream 2) dosn't exist If so it should just *silently* open up 'empty'. I think that even with session management this will make sense.
Just a note, we don't show an error any more when opening the first file of a playlist when a playlist just finished, or when restoring a playlist.
2005-01-01 Bastien Nocera <hadess@hadess.net> * data/totem.glade: * src/Makefile.am: * src/bacon-video-widget-xine.c: (setup_config_stream), (bacon_video_widget_new), (bacon_video_widget_seek_time), (bacon_video_widget_get_volume), (bacon_video_widget_get_current_time): * src/totem-options.c: (totem_options_process_late): * src/totem-options.h: * src/totem-pl-parser.c: (totem_pl_parser_add_pls): * src/totem-playlist.c: (totem_playlist_key_press), (totem_playlist_set_at_end), (totem_playlist_get_current), (totem_playlist_get_last), (totem_playlist_set_current): * src/totem-playlist.h: * src/totem-private.h: * src/totem-session.c: (totem_session_create_key), (totem_save_yourself_cb), (totem_session_restore), (totem_session_setup), (totem_action_restore_pl): * src/totem-session.h: * src/totem.c: (totem_action_save_size), (totem_action_exit), (totem_action_menu_popup), (play_pause_set_label), (totem_action_play), (totem_action_seek), (totem_action_fullscreen_toggle), (totem_action_seek_relative), (on_recent_file_activate), (on_channels_change_event), (totem_action_open_files), (show_controls), (totem_action_toggle_controls), (on_about1_activate), (commit_hide_skip_to), (totem_action_remote), (popup_timeout_remove), (popup_hide), (on_mouse_click_fullscreen), (on_video_motion_notify_event), (on_video_button_press_event), (totem_action_handle_key), (totem_setup_window), (totem_callback_connect), (main): * src/totem.h: * src/totem-sublang.[ch]: Remove possible "burps" on startup when the sound is supposed to be mute (xine-lib) Fix parsing of .pls files with relative paths (they're relative to the .pls file, not to the working directory) (Closes: #162440) Fix problems with activating a multi-item playlist from the recent files, we should play the first item added, not the last one Move languages and subtitles menu code to totem-sublang.[ch] Add session saving support (Closes: #131811) Fix seeking into streams that haven't been played yet, only opened Some code cleanups