Merge lp://staging/~artem-anufrij/scratch/dont-force-to-save-unsaved into lp://staging/~elementary-apps/scratch/scratch
Status: | Merged |
---|---|
Approved by: | Robert Roth |
Approved revision: | 1414 |
Merged at revision: | 1393 |
Proposed branch: | lp://staging/~artem-anufrij/scratch/dont-force-to-save-unsaved |
Merge into: | lp://staging/~elementary-apps/scratch/scratch |
Diff against target: |
746 lines (+236/-186) 7 files modified
HACKING (+1/-1) src/Dialogs/PreferencesDialog.vala (+1/-5) src/MainWindow.vala (+53/-6) src/Scratch.vala (+16/-2) src/Services/Document.vala (+145/-161) src/Widgets/DocumentView.vala (+13/-3) src/Widgets/ToolBar.vala (+7/-8) |
To merge this branch: | bzr merge lp://staging/~artem-anufrij/scratch/dont-force-to-save-unsaved |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Roth (community) | code review | Approve | |
Danielle Foré | ux | Approve | |
Review via email: mp+237154@code.staging.launchpad.net |
Commit message
Use temporary files for unsaved files to be able to restore them at next startup
Description of the change
BLUEPRINT DESCRIPTION:
+1 for keeping in .local/
Code looks mostly OK, here are some notes: folder_ unsaved seems to be the only reason you're making the Scratch instance a singleton, but that variable should be part of settings (e.g I want to configure that in dconf - or scratch Preferences if Dan allows - to use /tmp instead of my home dir) friendly, and there are more like this. Translatable strings should not be concatenated. ").printf ("<b>%s</b>".printf (get_basename ())).
* Singleton is not needed here, accessing data_home_
* string message = _("File ") + " \"<b>%s</b>\" ".printf (get_basename ()) + _("was modified by an external application. Do you want to load it again or continue your editing?");
This is not translation-
It can also be written like: _("File %s was modified by an external application.
I see that there are some of these coming from before your commits, so it's not 100% your code, but they should be fixed too (not necessarily on this branch), but at least the code we touch should get better after each touch.
* Add a description and a commit message to the merge proposal
I haven't tested this yet, this is just a code review, will test later, with the fixes.