Merge lp:~ricotz/pantheon-photos/syntax-errors into lp:~pantheon-photos/pantheon-photos/trunk
- syntax-errors
- Merge into trunk
Proposed by
Rico Tzschichholz
Status: | Merged |
---|---|
Approved by: | Danielle Foré |
Approved revision: | 3034 |
Merged at revision: | 3034 |
Proposed branch: | lp:~ricotz/pantheon-photos/syntax-errors |
Merge into: | lp:~pantheon-photos/pantheon-photos/trunk |
Diff against target: |
215 lines (+23/-22) 11 files modified
plugins/pantheon-photos-publishing-extras/TumblrPublishing.vala (+2/-2) plugins/pantheon-photos-transitions/CircleEffect.vala (+1/-1) src/CollectionPage.vala (+3/-3) src/Commands.vala (+1/-1) src/MediaDataRepresentation.vala (+2/-2) src/MediaMonitor.vala (+2/-2) src/PhotoPage.vala (+1/-1) src/Tag.vala (+2/-2) src/core/ContainerSourceCollection.vala (+6/-6) src/core/ViewCollection.vala (+2/-1) src/util/system.vala (+1/-1) |
To merge this branch: | bzr merge lp:~ricotz/pantheon-photos/syntax-errors |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Danielle Foré | Approve | ||
Review via email: mp+310106@code.launchpad.net |
Commit message
Fix syntax errors to make it compilable with valac 0.35+
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'plugins/pantheon-photos-publishing-extras/TumblrPublishing.vala' | |||
2 | --- plugins/pantheon-photos-publishing-extras/TumblrPublishing.vala 2016-02-19 19:55:55 +0000 | |||
3 | +++ plugins/pantheon-photos-publishing-extras/TumblrPublishing.vala 2016-11-04 23:20:17 +0000 | |||
4 | @@ -305,7 +305,7 @@ | |||
5 | 305 | 305 | ||
6 | 306 | if (split_pair.length != 2) | 306 | if (split_pair.length != 2) |
7 | 307 | host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE ( | 307 | host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE ( |
9 | 308 | _ ("'%s' isn't a valid response to an OAuth authentication request"))); | 308 | _ ("'%s' isn't a valid response to an OAuth authentication request"), response)); |
10 | 309 | 309 | ||
11 | 310 | if (split_pair[0] == "oauth_token") | 310 | if (split_pair[0] == "oauth_token") |
12 | 311 | oauth_token = split_pair[1]; | 311 | oauth_token = split_pair[1]; |
13 | @@ -315,7 +315,7 @@ | |||
14 | 315 | 315 | ||
15 | 316 | if (oauth_token == null || oauth_token_secret == null) | 316 | if (oauth_token == null || oauth_token_secret == null) |
16 | 317 | host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE ( | 317 | host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE ( |
18 | 318 | _ ("'%s' isn't a valid response to an OAuth authentication request"))); | 318 | _ ("'%s' isn't a valid response to an OAuth authentication request"), response)); |
19 | 319 | 319 | ||
20 | 320 | session.set_access_phase_credentials (oauth_token, oauth_token_secret); | 320 | session.set_access_phase_credentials (oauth_token, oauth_token_secret); |
21 | 321 | } | 321 | } |
22 | 322 | 322 | ||
23 | === modified file 'plugins/pantheon-photos-transitions/CircleEffect.vala' | |||
24 | --- plugins/pantheon-photos-transitions/CircleEffect.vala 2015-11-24 15:36:14 +0000 | |||
25 | +++ plugins/pantheon-photos-transitions/CircleEffect.vala 2016-11-04 23:20:17 +0000 | |||
26 | @@ -47,7 +47,7 @@ | |||
27 | 47 | public void paint (Transitions.Visuals visuals, Transitions.Motion motion, Cairo.Context ctx, | 47 | public void paint (Transitions.Visuals visuals, Transitions.Motion motion, Cairo.Context ctx, |
28 | 48 | int width, int height, int frame_number) { | 48 | int width, int height, int frame_number) { |
29 | 49 | double alpha = motion.get_alpha (frame_number); | 49 | double alpha = motion.get_alpha (frame_number); |
31 | 50 | int radius = (int) ((alpha) * Math.fmax (width, height)); | 50 | int radius = (int) (alpha * Math.fmax (width, height)); |
32 | 51 | 51 | ||
33 | 52 | if (visuals.from_pixbuf != null) { | 52 | if (visuals.from_pixbuf != null) { |
34 | 53 | Gdk.cairo_set_source_pixbuf (ctx, visuals.from_pixbuf, visuals.from_pos.x, | 53 | Gdk.cairo_set_source_pixbuf (ctx, visuals.from_pixbuf, visuals.from_pos.x, |
35 | 54 | 54 | ||
36 | === modified file 'src/CollectionPage.vala' | |||
37 | --- src/CollectionPage.vala 2016-09-19 21:18:06 +0000 | |||
38 | +++ src/CollectionPage.vala 2016-11-04 23:20:17 +0000 | |||
39 | @@ -699,7 +699,7 @@ | |||
40 | 699 | we can unenhance properly those that were previously enhanced. We also need to sort out non photos */ | 699 | we can unenhance properly those that were previously enhanced. We also need to sort out non photos */ |
41 | 700 | Gee.ArrayList<DataView> unenhanced_list = new Gee.ArrayList<DataView> (); | 700 | Gee.ArrayList<DataView> unenhanced_list = new Gee.ArrayList<DataView> (); |
42 | 701 | Gee.ArrayList<DataView> enhanced_list = new Gee.ArrayList<DataView> (); | 701 | Gee.ArrayList<DataView> enhanced_list = new Gee.ArrayList<DataView> (); |
44 | 702 | foreach (DataView view in get_view () .get_selected ()) { | 702 | foreach (DataView view in get_view ().get_selected ()) { |
45 | 703 | Photo photo = view.get_source () as Photo; | 703 | Photo photo = view.get_source () as Photo; |
46 | 704 | if (photo != null && !photo.is_enhanced ()) | 704 | if (photo != null && !photo.is_enhanced ()) |
47 | 705 | unenhanced_list.add (view); | 705 | unenhanced_list.add (view); |
48 | @@ -713,7 +713,7 @@ | |||
49 | 713 | if (unenhanced_list.size == 0) { | 713 | if (unenhanced_list.size == 0) { |
50 | 714 | // Just undo if last on stack was enhance | 714 | // Just undo if last on stack was enhance |
51 | 715 | EnhanceMultipleCommand cmd = get_command_manager ().get_undo_description () as EnhanceMultipleCommand; | 715 | EnhanceMultipleCommand cmd = get_command_manager ().get_undo_description () as EnhanceMultipleCommand; |
53 | 716 | if (cmd != null && cmd.source_list == get_view () .get_selected ()) | 716 | if (cmd != null && cmd.get_sources () == get_view ().get_selected_sources ()) |
54 | 717 | get_command_manager ().undo (); | 717 | get_command_manager ().undo (); |
55 | 718 | else { | 718 | else { |
56 | 719 | UnEnhanceMultipleCommand command = new UnEnhanceMultipleCommand (enhanced_list); | 719 | UnEnhanceMultipleCommand command = new UnEnhanceMultipleCommand (enhanced_list); |
57 | @@ -726,7 +726,7 @@ | |||
58 | 726 | } else { | 726 | } else { |
59 | 727 | // Just undo if last on stack was unenhance | 727 | // Just undo if last on stack was unenhance |
60 | 728 | UnEnhanceMultipleCommand cmd = get_command_manager ().get_undo_description () as UnEnhanceMultipleCommand; | 728 | UnEnhanceMultipleCommand cmd = get_command_manager ().get_undo_description () as UnEnhanceMultipleCommand; |
62 | 729 | if (cmd != null && cmd.source_list == get_view () .get_selected ()) | 729 | if (cmd != null && cmd.get_sources () == get_view ().get_selected_sources ()) |
63 | 730 | get_command_manager ().undo (); | 730 | get_command_manager ().undo (); |
64 | 731 | else { | 731 | else { |
65 | 732 | EnhanceMultipleCommand command = new EnhanceMultipleCommand (unenhanced_list); | 732 | EnhanceMultipleCommand command = new EnhanceMultipleCommand (unenhanced_list); |
66 | 733 | 733 | ||
67 | === modified file 'src/Commands.vala' | |||
68 | --- src/Commands.vala 2016-09-19 21:18:06 +0000 | |||
69 | +++ src/Commands.vala 2016-11-04 23:20:17 +0000 | |||
70 | @@ -275,7 +275,7 @@ | |||
71 | 275 | public abstract class MultipleDataSourceCommand : PageCommand { | 275 | public abstract class MultipleDataSourceCommand : PageCommand { |
72 | 276 | protected const int MIN_OPS_FOR_PROGRESS_WINDOW = 5; | 276 | protected const int MIN_OPS_FOR_PROGRESS_WINDOW = 5; |
73 | 277 | 277 | ||
75 | 278 | public Gee.ArrayList<DataSource> source_list = new Gee.ArrayList<DataSource> (); | 278 | protected Gee.ArrayList<DataSource> source_list = new Gee.ArrayList<DataSource> (); |
76 | 279 | 279 | ||
77 | 280 | private string progress_text; | 280 | private string progress_text; |
78 | 281 | private string undo_progress_text; | 281 | private string undo_progress_text; |
79 | 282 | 282 | ||
80 | === modified file 'src/MediaDataRepresentation.vala' | |||
81 | --- src/MediaDataRepresentation.vala 2016-09-19 21:18:06 +0000 | |||
82 | +++ src/MediaDataRepresentation.vala 2016-11-04 23:20:17 +0000 | |||
83 | @@ -397,8 +397,8 @@ | |||
84 | 397 | 397 | ||
85 | 398 | public static void count_media (Gee.Collection<MediaSource> media, out int photo_count, | 398 | public static void count_media (Gee.Collection<MediaSource> media, out int photo_count, |
86 | 399 | out int video_count) { | 399 | out int video_count) { |
89 | 400 | Gee.ArrayList<MediaSource> photos = new Gee.ArrayList<MediaSource> (); | 400 | var photos = new Gee.ArrayList<LibraryPhoto> (); |
90 | 401 | Gee.ArrayList<MediaSource> videos = new Gee.ArrayList<MediaSource> (); | 401 | var videos = new Gee.ArrayList<Video> (); |
91 | 402 | 402 | ||
92 | 403 | filter_media (media, photos, videos); | 403 | filter_media (media, photos, videos); |
93 | 404 | 404 | ||
94 | 405 | 405 | ||
95 | === modified file 'src/MediaMonitor.vala' | |||
96 | --- src/MediaMonitor.vala 2014-08-08 21:13:09 +0000 | |||
97 | +++ src/MediaMonitor.vala 2016-11-04 23:20:17 +0000 | |||
98 | @@ -286,8 +286,8 @@ | |||
99 | 286 | TransactionController controller, ref int op_count) throws Error { | 286 | TransactionController controller, ref int op_count) throws Error { |
100 | 287 | Gee.Map<Monitorable, File> set_master_file = null; | 287 | Gee.Map<Monitorable, File> set_master_file = null; |
101 | 288 | Gee.Map<Monitorable, FileInfo> set_master_file_info = null; | 288 | Gee.Map<Monitorable, FileInfo> set_master_file_info = null; |
104 | 289 | Gee.ArrayList<MediaSource> to_offline = null; | 289 | Gee.ArrayList<Monitorable> to_offline = null; |
105 | 290 | Gee.ArrayList<MediaSource> to_online = null; | 290 | Gee.ArrayList<Monitorable> to_online = null; |
106 | 291 | 291 | ||
107 | 292 | foreach (MonitorableUpdates updates in all_updates) { | 292 | foreach (MonitorableUpdates updates in all_updates) { |
108 | 293 | if (op_count >= MAX_OPERATIONS_PER_CYCLE) | 293 | if (op_count >= MAX_OPERATIONS_PER_CYCLE) |
109 | 294 | 294 | ||
110 | === modified file 'src/PhotoPage.vala' | |||
111 | --- src/PhotoPage.vala 2016-09-19 21:18:06 +0000 | |||
112 | +++ src/PhotoPage.vala 2016-11-04 23:20:17 +0000 | |||
113 | @@ -3162,7 +3162,7 @@ | |||
114 | 3162 | 3162 | ||
115 | 3163 | private void on_flag_unflag () { | 3163 | private void on_flag_unflag () { |
116 | 3164 | if (has_photo ()) { | 3164 | if (has_photo ()) { |
118 | 3165 | Gee.ArrayList<DataSource> photo_list = new Gee.ArrayList<DataSource> (); | 3165 | var photo_list = new Gee.ArrayList<MediaSource> (); |
119 | 3166 | photo_list.add (get_photo ()); | 3166 | photo_list.add (get_photo ()); |
120 | 3167 | get_command_manager ().execute (new FlagUnflagCommand (photo_list, | 3167 | get_command_manager ().execute (new FlagUnflagCommand (photo_list, |
121 | 3168 | ! ((LibraryPhoto) get_photo ()).is_flagged ())); | 3168 | ! ((LibraryPhoto) get_photo ()).is_flagged ())); |
122 | 3169 | 3169 | ||
123 | === modified file 'src/Tag.vala' | |||
124 | --- src/Tag.vala 2014-09-27 09:58:03 +0000 | |||
125 | +++ src/Tag.vala 2016-11-04 23:20:17 +0000 | |||
126 | @@ -205,7 +205,7 @@ | |||
127 | 205 | } | 205 | } |
128 | 206 | 206 | ||
129 | 207 | protected override void notify_container_contents_added (ContainerSource container, | 207 | protected override void notify_container_contents_added (ContainerSource container, |
131 | 208 | Gee.Collection<DataSource> added, bool relinking) { | 208 | Gee.Collection<DataObject> added, bool relinking) { |
132 | 209 | Tag tag = (Tag) container; | 209 | Tag tag = (Tag) container; |
133 | 210 | Gee.Collection<MediaSource> sources = (Gee.Collection<MediaSource>) added; | 210 | Gee.Collection<MediaSource> sources = (Gee.Collection<MediaSource>) added; |
134 | 211 | 211 | ||
135 | @@ -233,7 +233,7 @@ | |||
136 | 233 | } | 233 | } |
137 | 234 | 234 | ||
138 | 235 | protected override void notify_container_contents_removed (ContainerSource container, | 235 | protected override void notify_container_contents_removed (ContainerSource container, |
140 | 236 | Gee.Collection<DataSource> removed, bool unlinking) { | 236 | Gee.Collection<DataObject> removed, bool unlinking) { |
141 | 237 | Tag tag = (Tag) container; | 237 | Tag tag = (Tag) container; |
142 | 238 | Gee.Collection<MediaSource> sources = (Gee.Collection<MediaSource>) removed; | 238 | Gee.Collection<MediaSource> sources = (Gee.Collection<MediaSource>) removed; |
143 | 239 | 239 | ||
144 | 240 | 240 | ||
145 | === modified file 'src/core/ContainerSourceCollection.vala' | |||
146 | --- src/core/ContainerSourceCollection.vala 2014-08-08 21:13:09 +0000 | |||
147 | +++ src/core/ContainerSourceCollection.vala 2016-11-04 23:20:17 +0000 | |||
148 | @@ -18,15 +18,15 @@ | |||
149 | 18 | private Gee.HashSet<ContainerSource> holding_tank = new Gee.HashSet<ContainerSource> (); | 18 | private Gee.HashSet<ContainerSource> holding_tank = new Gee.HashSet<ContainerSource> (); |
150 | 19 | 19 | ||
151 | 20 | public virtual signal void container_contents_added (ContainerSource container, | 20 | public virtual signal void container_contents_added (ContainerSource container, |
153 | 21 | Gee.Collection<DataSource> added, bool relinked) { | 21 | Gee.Collection<DataObject> added, bool relinked) { |
154 | 22 | } | 22 | } |
155 | 23 | 23 | ||
156 | 24 | public virtual signal void container_contents_removed (ContainerSource container, | 24 | public virtual signal void container_contents_removed (ContainerSource container, |
158 | 25 | Gee.Collection<DataSource> removed, bool unlinked) { | 25 | Gee.Collection<DataObject> removed, bool unlinked) { |
159 | 26 | } | 26 | } |
160 | 27 | 27 | ||
161 | 28 | public virtual signal void container_contents_altered (ContainerSource container, | 28 | public virtual signal void container_contents_altered (ContainerSource container, |
163 | 29 | Gee.Collection<DataSource>? added, bool relinked, Gee.Collection<DataSource>? removed, | 29 | Gee.Collection<DataObject>? added, bool relinked, Gee.Collection<DataObject>? removed, |
164 | 30 | bool unlinked) { | 30 | bool unlinked) { |
165 | 31 | } | 31 | } |
166 | 32 | 32 | ||
167 | @@ -55,7 +55,7 @@ | |||
168 | 55 | } | 55 | } |
169 | 56 | 56 | ||
170 | 57 | public virtual void notify_container_contents_added (ContainerSource container, | 57 | public virtual void notify_container_contents_added (ContainerSource container, |
172 | 58 | Gee.Collection<DataSource> added, bool relinked) { | 58 | Gee.Collection<DataObject> added, bool relinked) { |
173 | 59 | // if container is in holding tank, remove it now and relink to collection | 59 | // if container is in holding tank, remove it now and relink to collection |
174 | 60 | if (holding_tank.contains (container)) { | 60 | if (holding_tank.contains (container)) { |
175 | 61 | bool removed = holding_tank.remove (container); | 61 | bool removed = holding_tank.remove (container); |
176 | @@ -68,12 +68,12 @@ | |||
177 | 68 | } | 68 | } |
178 | 69 | 69 | ||
179 | 70 | public virtual void notify_container_contents_removed (ContainerSource container, | 70 | public virtual void notify_container_contents_removed (ContainerSource container, |
181 | 71 | Gee.Collection<DataSource> removed, bool unlinked) { | 71 | Gee.Collection<DataObject> removed, bool unlinked) { |
182 | 72 | container_contents_removed (container, removed, unlinked); | 72 | container_contents_removed (container, removed, unlinked); |
183 | 73 | } | 73 | } |
184 | 74 | 74 | ||
185 | 75 | public virtual void notify_container_contents_altered (ContainerSource container, | 75 | public virtual void notify_container_contents_altered (ContainerSource container, |
187 | 76 | Gee.Collection<DataSource>? added, bool relinked, Gee.Collection<DataSource>? removed, | 76 | Gee.Collection<DataObject>? added, bool relinked, Gee.Collection<DataObject>? removed, |
188 | 77 | bool unlinked) { | 77 | bool unlinked) { |
189 | 78 | container_contents_altered (container, added, relinked, removed, unlinked); | 78 | container_contents_altered (container, added, relinked, removed, unlinked); |
190 | 79 | } | 79 | } |
191 | 80 | 80 | ||
192 | === modified file 'src/core/ViewCollection.vala' | |||
193 | --- src/core/ViewCollection.vala 2016-09-19 21:18:06 +0000 | |||
194 | +++ src/core/ViewCollection.vala 2016-11-04 23:20:17 +0000 | |||
195 | @@ -646,7 +646,8 @@ | |||
196 | 646 | } | 646 | } |
197 | 647 | 647 | ||
198 | 648 | public override void items_altered (Gee.Map<DataObject, Alteration> map) { | 648 | public override void items_altered (Gee.Map<DataObject, Alteration> map) { |
200 | 649 | filter_altered_items (map.keys); | 649 | // Cast - our DataObjects are DataViews. |
201 | 650 | filter_altered_items((Gee.Collection<DataView>) map.keys); | ||
202 | 650 | 651 | ||
203 | 651 | base.items_altered (map); | 652 | base.items_altered (map); |
204 | 652 | } | 653 | } |
205 | 653 | 654 | ||
206 | === modified file 'src/util/system.vala' | |||
207 | --- src/util/system.vala 2016-02-10 07:45:46 +0000 | |||
208 | +++ src/util/system.vala 2016-11-04 23:20:17 +0000 | |||
209 | @@ -28,5 +28,5 @@ | |||
210 | 28 | } | 28 | } |
211 | 29 | 29 | ||
212 | 30 | int posix_wexitstatus (int status) { | 30 | int posix_wexitstatus (int status) { |
214 | 31 | return (((status) & 0xff00) >> 8); | 31 | return ((status & 0xff00) >> 8); |
215 | 32 | } | 32 | } |
As far as I can tell this is good. Been poking and proding and don't see anything broken