GNOME Bugzilla – Bug 575307
Runs without a window when restoring session fails
Last modified: 2016-11-26 19:53:40 UTC
For some reason, the session state loading code in gedit ignores the first group in the state file. Not quite sure why it does that, but the result is that with my patch in bug 552387, gedit doesn't work really well when loading a session. Attached patch helps a lot :-) There's also a bug where if gedit cannot restore any window from the state file, then it's running but without a window. It should probably either just quit or open an empty window in that case.
Created attachment 130618 [details] [review] Patch
patch looks good to me, not sure what that fixme was about, it was directly from danw's oroginal patch to use eggsmclient. Using g_str_has_prefix is surely a more robust approach. Just a small codestyle nitpick: I'd prefer if (has_prefix) parse_window instead of using "continue". About the other bug you mention, we should probably make parse_window return a boolean and make gedit_session_load return false if parsing fails. I think (but we need to check) that if session load fails, a new window is opened. I'd be ok to have this patch be committed before 2.26.0 if the release team decides so.
I got approval on #release-team by andre and fredp so I committed the patch (with the coding style nitpicks fixed) since it is obviously correct. I am retitling the bug to track the other issue reported... that one requires biggrer code changes and testing so it'll have to wait after code freeze is over and when gnome-session patch is committed.
Similar to bug 575252?
*** Bug 575252 has been marked as a duplicate of this bug. ***
Thanks for taking the time to report this. However, you are using a version that is too old and not supported anymore by GNOME developers. GNOME developers are no longer working on that version, so unfortunately there will not be any bug fixes by GNOME developers for the version that you use. In Gedit 3.22, I successfully tested to open a file through an SSH connexion, closing it, and still be able to use the application without any freeze. By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME. Please feel free to reopen this bug report if the problem still occurs with a recent version of GNOME, or feel free to report this bug in the bug tracking system of your Linux distribution if your distribution still supports the version that you are using.