! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
X11 session support for mousepad
Status:
RESOLVED: MOVED
Priority:
Very Low
Severity:
enhancement
Product:
Mousepad
Component:
General

Comments

Description Dimitar Zhekov 2009-05-27 17:15:40 CEST
Created attachment 2373 
session support for mousepad

X11 session support for mousepad. However, patch 2369 from libxfcegui4 bug 5377 is required, and xfce session bug 5379 should be fixed for 2+ mousepads.
Comment 1 Dimitar Zhekov 2009-10-25 12:47:25 CET
Created attachment 2633 
minimal session support for mousepad

X11 session: save settings and file name.
4.6.1 compatible.
Comment 2 Andre Miranda editbugs 2013-10-30 03:59:20 CET
If think xfce4-session handles this stuff by now.
However after restoring a saved session, Mousepad is opened with a empty file.
Is this a xfce4-session bug or we should keep this bug open in order to investigate this misbehavior?
Comment 3 Ikonta 2015-11-10 15:12:17 CET
(In reply to André Miranda from comment #2)
> If think xfce4-session handles this stuff by now.
> However after restoring a saved session, Mousepad is opened with a empty
> file.
> Is this a xfce4-session bug or we should keep this bug open in order to
> investigate this misbehavior?

xfce-base/xfce4-session-4.12.1 handles this incompletely: mousepad is started at session's restore, but user expects it not only to be started, but to be started with the same files opened.
I'm not familiar with session's theory, could you describe how I can verify is it xfce4-session bug or not? As for me, it at least is not only xfce4-session bug.

P.S. About completeness of session support see my last FR (bug #12300).
Comment 4 Dimitar Zhekov 2015-11-10 19:09:46 CET
xfce-session now (since 4.8 IIRC) properly handles interactivity, including 2+ programs interacting while logging out. That is not the point.

To restore the file(s) it was opened with, a program must register a "save-yourself" handler, and this handler must place the file name(s) in the session data - you can see that in the example attachment. xfce-session, by itself, only saves the program name. It has no access to the internals of mousepad, or any other program - and rightly so.

The handler may also save any program settings which are normally saved on exit, since "save-yourself" means that normal exit (like File -> Quit) will not happen.

Last, it may also ask whether to save a file which was modified but not saved. Here, Xfce 4.6 and earlier had some problems, which were fixed. (A more complex alternative will be to save the file content in a temporary file, and on restore (a) read that file, (b) place the proper file name, and (c) re-light the "modified" flag. But that's not good for large files.)

Now, to check whether MP handles sessions properly, simply get the source, and try to find something that looks like a save-yourself handler. It may be different than the attachment, using some new xfce-session library API-s or something, but the source is not big, and you should be able to spot it.
Comment 5 Git Bot editbugs 2020-05-24 01:27:04 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/mousepad/-/issues/3.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #5401

Reported by:
Dimitar Zhekov
Reported on: 2009-05-27
Last modified on: 2020-05-24

People

Assignee:
Matthew Brush
CC List:
4 users

Version

Version:
Unspecified
Target Milestone:
Mousepad 0.2.x

Attachments

session support for mousepad (3.23 KB, patch)
2009-05-27 17:15 CEST , Dimitar Zhekov
no flags
minimal session support for mousepad (2.76 KB, patch)
2009-10-25 12:47 CET , Dimitar Zhekov
no flags

Additional information