Merge lp:~vikoadi/pantheon-photos/fix-modified into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by Viko Adi Rahmawan
Status: Work in progress
Proposed branch: lp:~vikoadi/pantheon-photos/fix-modified
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 19 lines (+2/-2)
1 file modified
src/Page.vala (+2/-2)
To merge this branch: bzr merge lp:~vikoadi/pantheon-photos/fix-modified
Reviewer Review Type Date Requested Status
Artem Anufrij (community) Needs Fixing
Review via email: mp+238792@code.launchpad.net

Description of the change

dont create _modified file if photo is not modified

To post a comment you must log in.
Revision history for this message
meese (meese) wrote :

I think

LibraryWindow app = AppWindow.get_instance () as LibraryWindow;
if (app == null || modified_file.get_file_format () == PhotoFileFormat.RAW)

might work better as photo viewer shouldn't be saving a modified copy unless explicitly told to with save?

Revision history for this message
meese (meese) wrote :

** if (app != null || modified_file.get_file_format () == PhotoFileFormat.RAW)

Revision history for this message
Viko Adi Rahmawan (vikoadi) wrote :

But it will return unmodified image if its modified in image viewer.
Or maybe we should just ask user to save their modification?
But currently .modified files is already being used in open with menu.
is it really a big deal?

Revision history for this message
Victor Martinez (victored) wrote :

Why not just pass the original file to Open With?

Revision history for this message
Viko Adi Rahmawan (vikoadi) wrote :

If we just pass the original, all the changes we do will be discarded. That would be weird is it?

Revision history for this message
Danielle Foré (danrabbit) wrote :

Yeah, Viko is right. That doesn't really make sense to pass the original file IMO.

Revision history for this message
Artem Anufrij (artem-anufrij) wrote :

open an image in the edit mode (double click)

#1 set as desktop background
-> modified file will not be created! OK

#2 click on "automaticly improve", and than set it as desktop background again
-> photo will be improved by "photos"; modified file will be created; modified file will be set as background. OK

#3 edit the foto with the "adjust tool", and than set it as desktop backgound again
-> the photo will be reseted in the preview. FAIL

review: Needs Fixing

Unmerged revisions

2667. By Viko Adi Rahmawan

dont make modified file for unmodified file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Page.vala'
2--- src/Page.vala 2014-09-29 15:08:44 +0000
3+++ src/Page.vala 2014-10-18 13:05:25 +0000
4@@ -2710,7 +2710,7 @@
5 File[] modified_files = null;
6 foreach (var source in sources) {
7 Photo modified_file = (Photo)source;
8- if (modified_file.get_file_format () == PhotoFileFormat.RAW)
9+ if (!modified_file.has_transformations () || modified_file.get_file_format () == PhotoFileFormat.RAW)
10 modified_files += modified_file.get_file ();
11 else
12 modified_files += modified_file.get_modified_file ();
13@@ -2720,4 +2720,4 @@
14 warning (err.message);
15 }
16 }
17-}
18\ No newline at end of file
19+}

Subscribers

People subscribed via source and target branches