Merge lp://staging/~shnatsel/scratch/handle-unix-signals into lp://staging/~elementary-apps/scratch/scratch

Proposed by Sergey "Shnatsel" Davidoff
Status: Merged
Approved by: Mario Guerriero
Approved revision: 985
Merged at revision: 984
Proposed branch: lp://staging/~shnatsel/scratch/handle-unix-signals
Merge into: lp://staging/~elementary-apps/scratch/scratch
Diff against target: 42 lines (+14/-0)
2 files modified
src/CMakeLists.txt (+1/-0)
src/MainWindow.vala (+13/-0)
To merge this branch: bzr merge lp://staging/~shnatsel/scratch/handle-unix-signals
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+146499@code.staging.launchpad.net

Description of the change

Scratch now traps INT and TERM signals and properly quits by calling action_quit() instead of collapsing and losing data.

I had to write a wrapper function for action_quit () so it can be passed as signal handler. Turning the original function to match the expected function signature would have worked too; I'm not sure which way is preferred.

To post a comment you must log in.
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

This was tested with the new elementary-testing-scripts that provide representative testing, and it works. I'll be running it as my production Scratch instance for additional regression testing.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches