Merge lp:~ricotz/pantheon-photos/syntax-errors into lp:~pantheon-photos/pantheon-photos/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
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+

To post a comment you must log in.
Revision history for this message
Danielle Foré (danrabbit) wrote :

As far as I can tell this is good. Been poking and proding and don't see anything broken

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/pantheon-photos-publishing-extras/TumblrPublishing.vala'
--- plugins/pantheon-photos-publishing-extras/TumblrPublishing.vala 2016-02-19 19:55:55 +0000
+++ plugins/pantheon-photos-publishing-extras/TumblrPublishing.vala 2016-11-04 23:20:17 +0000
@@ -305,7 +305,7 @@
305305
306 if (split_pair.length != 2)306 if (split_pair.length != 2)
307 host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE (307 host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE (
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));
309309
310 if (split_pair[0] == "oauth_token")310 if (split_pair[0] == "oauth_token")
311 oauth_token = split_pair[1];311 oauth_token = split_pair[1];
@@ -315,7 +315,7 @@
315315
316 if (oauth_token == null || oauth_token_secret == null)316 if (oauth_token == null || oauth_token_secret == null)
317 host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE (317 host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE (
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));
319319
320 session.set_access_phase_credentials (oauth_token, oauth_token_secret);320 session.set_access_phase_credentials (oauth_token, oauth_token_secret);
321 }321 }
322322
=== modified file 'plugins/pantheon-photos-transitions/CircleEffect.vala'
--- plugins/pantheon-photos-transitions/CircleEffect.vala 2015-11-24 15:36:14 +0000
+++ plugins/pantheon-photos-transitions/CircleEffect.vala 2016-11-04 23:20:17 +0000
@@ -47,7 +47,7 @@
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,
48 int width, int height, int frame_number) {48 int width, int height, int frame_number) {
49 double alpha = motion.get_alpha (frame_number);49 double alpha = motion.get_alpha (frame_number);
50 int radius = (int) ((alpha) * Math.fmax (width, height));50 int radius = (int) (alpha * Math.fmax (width, height));
5151
52 if (visuals.from_pixbuf != null) {52 if (visuals.from_pixbuf != null) {
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,
5454
=== modified file 'src/CollectionPage.vala'
--- src/CollectionPage.vala 2016-09-19 21:18:06 +0000
+++ src/CollectionPage.vala 2016-11-04 23:20:17 +0000
@@ -699,7 +699,7 @@
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 */
700 Gee.ArrayList<DataView> unenhanced_list = new Gee.ArrayList<DataView> ();700 Gee.ArrayList<DataView> unenhanced_list = new Gee.ArrayList<DataView> ();
701 Gee.ArrayList<DataView> enhanced_list = new Gee.ArrayList<DataView> ();701 Gee.ArrayList<DataView> enhanced_list = new Gee.ArrayList<DataView> ();
702 foreach (DataView view in get_view () .get_selected ()) {702 foreach (DataView view in get_view ().get_selected ()) {
703 Photo photo = view.get_source () as Photo;703 Photo photo = view.get_source () as Photo;
704 if (photo != null && !photo.is_enhanced ())704 if (photo != null && !photo.is_enhanced ())
705 unenhanced_list.add (view);705 unenhanced_list.add (view);
@@ -713,7 +713,7 @@
713 if (unenhanced_list.size == 0) {713 if (unenhanced_list.size == 0) {
714 // Just undo if last on stack was enhance714 // Just undo if last on stack was enhance
715 EnhanceMultipleCommand cmd = get_command_manager ().get_undo_description () as EnhanceMultipleCommand;715 EnhanceMultipleCommand cmd = get_command_manager ().get_undo_description () as EnhanceMultipleCommand;
716 if (cmd != null && cmd.source_list == get_view () .get_selected ())716 if (cmd != null && cmd.get_sources () == get_view ().get_selected_sources ())
717 get_command_manager ().undo ();717 get_command_manager ().undo ();
718 else {718 else {
719 UnEnhanceMultipleCommand command = new UnEnhanceMultipleCommand (enhanced_list);719 UnEnhanceMultipleCommand command = new UnEnhanceMultipleCommand (enhanced_list);
@@ -726,7 +726,7 @@
726 } else {726 } else {
727 // Just undo if last on stack was unenhance727 // Just undo if last on stack was unenhance
728 UnEnhanceMultipleCommand cmd = get_command_manager ().get_undo_description () as UnEnhanceMultipleCommand;728 UnEnhanceMultipleCommand cmd = get_command_manager ().get_undo_description () as UnEnhanceMultipleCommand;
729 if (cmd != null && cmd.source_list == get_view () .get_selected ())729 if (cmd != null && cmd.get_sources () == get_view ().get_selected_sources ())
730 get_command_manager ().undo ();730 get_command_manager ().undo ();
731 else {731 else {
732 EnhanceMultipleCommand command = new EnhanceMultipleCommand (unenhanced_list);732 EnhanceMultipleCommand command = new EnhanceMultipleCommand (unenhanced_list);
733733
=== modified file 'src/Commands.vala'
--- src/Commands.vala 2016-09-19 21:18:06 +0000
+++ src/Commands.vala 2016-11-04 23:20:17 +0000
@@ -275,7 +275,7 @@
275public abstract class MultipleDataSourceCommand : PageCommand {275public abstract class MultipleDataSourceCommand : PageCommand {
276 protected const int MIN_OPS_FOR_PROGRESS_WINDOW = 5;276 protected const int MIN_OPS_FOR_PROGRESS_WINDOW = 5;
277277
278 public Gee.ArrayList<DataSource> source_list = new Gee.ArrayList<DataSource> ();278 protected Gee.ArrayList<DataSource> source_list = new Gee.ArrayList<DataSource> ();
279279
280 private string progress_text;280 private string progress_text;
281 private string undo_progress_text;281 private string undo_progress_text;
282282
=== modified file 'src/MediaDataRepresentation.vala'
--- src/MediaDataRepresentation.vala 2016-09-19 21:18:06 +0000
+++ src/MediaDataRepresentation.vala 2016-11-04 23:20:17 +0000
@@ -397,8 +397,8 @@
397397
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,
399 out int video_count) {399 out int video_count) {
400 Gee.ArrayList<MediaSource> photos = new Gee.ArrayList<MediaSource> ();400 var photos = new Gee.ArrayList<LibraryPhoto> ();
401 Gee.ArrayList<MediaSource> videos = new Gee.ArrayList<MediaSource> ();401 var videos = new Gee.ArrayList<Video> ();
402402
403 filter_media (media, photos, videos);403 filter_media (media, photos, videos);
404404
405405
=== modified file 'src/MediaMonitor.vala'
--- src/MediaMonitor.vala 2014-08-08 21:13:09 +0000
+++ src/MediaMonitor.vala 2016-11-04 23:20:17 +0000
@@ -286,8 +286,8 @@
286 TransactionController controller, ref int op_count) throws Error {286 TransactionController controller, ref int op_count) throws Error {
287 Gee.Map<Monitorable, File> set_master_file = null;287 Gee.Map<Monitorable, File> set_master_file = null;
288 Gee.Map<Monitorable, FileInfo> set_master_file_info = null;288 Gee.Map<Monitorable, FileInfo> set_master_file_info = null;
289 Gee.ArrayList<MediaSource> to_offline = null;289 Gee.ArrayList<Monitorable> to_offline = null;
290 Gee.ArrayList<MediaSource> to_online = null;290 Gee.ArrayList<Monitorable> to_online = null;
291291
292 foreach (MonitorableUpdates updates in all_updates) {292 foreach (MonitorableUpdates updates in all_updates) {
293 if (op_count >= MAX_OPERATIONS_PER_CYCLE)293 if (op_count >= MAX_OPERATIONS_PER_CYCLE)
294294
=== modified file 'src/PhotoPage.vala'
--- src/PhotoPage.vala 2016-09-19 21:18:06 +0000
+++ src/PhotoPage.vala 2016-11-04 23:20:17 +0000
@@ -3162,7 +3162,7 @@
31623162
3163 private void on_flag_unflag () {3163 private void on_flag_unflag () {
3164 if (has_photo ()) {3164 if (has_photo ()) {
3165 Gee.ArrayList<DataSource> photo_list = new Gee.ArrayList<DataSource> ();3165 var photo_list = new Gee.ArrayList<MediaSource> ();
3166 photo_list.add (get_photo ());3166 photo_list.add (get_photo ());
3167 get_command_manager ().execute (new FlagUnflagCommand (photo_list,3167 get_command_manager ().execute (new FlagUnflagCommand (photo_list,
3168 ! ((LibraryPhoto) get_photo ()).is_flagged ()));3168 ! ((LibraryPhoto) get_photo ()).is_flagged ()));
31693169
=== modified file 'src/Tag.vala'
--- src/Tag.vala 2014-09-27 09:58:03 +0000
+++ src/Tag.vala 2016-11-04 23:20:17 +0000
@@ -205,7 +205,7 @@
205 }205 }
206206
207 protected override void notify_container_contents_added (ContainerSource container,207 protected override void notify_container_contents_added (ContainerSource container,
208 Gee.Collection<DataSource> added, bool relinking) {208 Gee.Collection<DataObject> added, bool relinking) {
209 Tag tag = (Tag) container;209 Tag tag = (Tag) container;
210 Gee.Collection<MediaSource> sources = (Gee.Collection<MediaSource>) added;210 Gee.Collection<MediaSource> sources = (Gee.Collection<MediaSource>) added;
211211
@@ -233,7 +233,7 @@
233 }233 }
234234
235 protected override void notify_container_contents_removed (ContainerSource container,235 protected override void notify_container_contents_removed (ContainerSource container,
236 Gee.Collection<DataSource> removed, bool unlinking) {236 Gee.Collection<DataObject> removed, bool unlinking) {
237 Tag tag = (Tag) container;237 Tag tag = (Tag) container;
238 Gee.Collection<MediaSource> sources = (Gee.Collection<MediaSource>) removed;238 Gee.Collection<MediaSource> sources = (Gee.Collection<MediaSource>) removed;
239239
240240
=== modified file 'src/core/ContainerSourceCollection.vala'
--- src/core/ContainerSourceCollection.vala 2014-08-08 21:13:09 +0000
+++ src/core/ContainerSourceCollection.vala 2016-11-04 23:20:17 +0000
@@ -18,15 +18,15 @@
18 private Gee.HashSet<ContainerSource> holding_tank = new Gee.HashSet<ContainerSource> ();18 private Gee.HashSet<ContainerSource> holding_tank = new Gee.HashSet<ContainerSource> ();
1919
20 public virtual signal void container_contents_added (ContainerSource container,20 public virtual signal void container_contents_added (ContainerSource container,
21 Gee.Collection<DataSource> added, bool relinked) {21 Gee.Collection<DataObject> added, bool relinked) {
22 }22 }
2323
24 public virtual signal void container_contents_removed (ContainerSource container,24 public virtual signal void container_contents_removed (ContainerSource container,
25 Gee.Collection<DataSource> removed, bool unlinked) {25 Gee.Collection<DataObject> removed, bool unlinked) {
26 }26 }
2727
28 public virtual signal void container_contents_altered (ContainerSource container,28 public virtual signal void container_contents_altered (ContainerSource container,
29 Gee.Collection<DataSource>? added, bool relinked, Gee.Collection<DataSource>? removed,29 Gee.Collection<DataObject>? added, bool relinked, Gee.Collection<DataObject>? removed,
30 bool unlinked) {30 bool unlinked) {
31 }31 }
3232
@@ -55,7 +55,7 @@
55 }55 }
5656
57 public virtual void notify_container_contents_added (ContainerSource container,57 public virtual void notify_container_contents_added (ContainerSource container,
58 Gee.Collection<DataSource> added, bool relinked) {58 Gee.Collection<DataObject> added, bool relinked) {
59 // if container is in holding tank, remove it now and relink to collection59 // if container is in holding tank, remove it now and relink to collection
60 if (holding_tank.contains (container)) {60 if (holding_tank.contains (container)) {
61 bool removed = holding_tank.remove (container);61 bool removed = holding_tank.remove (container);
@@ -68,12 +68,12 @@
68 }68 }
6969
70 public virtual void notify_container_contents_removed (ContainerSource container,70 public virtual void notify_container_contents_removed (ContainerSource container,
71 Gee.Collection<DataSource> removed, bool unlinked) {71 Gee.Collection<DataObject> removed, bool unlinked) {
72 container_contents_removed (container, removed, unlinked);72 container_contents_removed (container, removed, unlinked);
73 }73 }
7474
75 public virtual void notify_container_contents_altered (ContainerSource container,75 public virtual void notify_container_contents_altered (ContainerSource container,
76 Gee.Collection<DataSource>? added, bool relinked, Gee.Collection<DataSource>? removed,76 Gee.Collection<DataObject>? added, bool relinked, Gee.Collection<DataObject>? removed,
77 bool unlinked) {77 bool unlinked) {
78 container_contents_altered (container, added, relinked, removed, unlinked);78 container_contents_altered (container, added, relinked, removed, unlinked);
79 }79 }
8080
=== modified file 'src/core/ViewCollection.vala'
--- src/core/ViewCollection.vala 2016-09-19 21:18:06 +0000
+++ src/core/ViewCollection.vala 2016-11-04 23:20:17 +0000
@@ -646,7 +646,8 @@
646 }646 }
647647
648 public override void items_altered (Gee.Map<DataObject, Alteration> map) {648 public override void items_altered (Gee.Map<DataObject, Alteration> map) {
649 filter_altered_items (map.keys);649 // Cast - our DataObjects are DataViews.
650 filter_altered_items((Gee.Collection<DataView>) map.keys);
650651
651 base.items_altered (map);652 base.items_altered (map);
652 }653 }
653654
=== modified file 'src/util/system.vala'
--- src/util/system.vala 2016-02-10 07:45:46 +0000
+++ src/util/system.vala 2016-11-04 23:20:17 +0000
@@ -28,5 +28,5 @@
28}28}
2929
30int posix_wexitstatus (int status) {30int posix_wexitstatus (int status) {
31 return (((status) & 0xff00) >> 8);31 return ((status & 0xff00) >> 8);
32}32}

Subscribers

People subscribed via source and target branches