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
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
6 if (split_pair.length != 2)
7 host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE (
8- _ ("'%s' isn't a valid response to an OAuth authentication request")));
9+ _ ("'%s' isn't a valid response to an OAuth authentication request"), response));
10
11 if (split_pair[0] == "oauth_token")
12 oauth_token = split_pair[1];
13@@ -315,7 +315,7 @@
14
15 if (oauth_token == null || oauth_token_secret == null)
16 host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE (
17- _ ("'%s' isn't a valid response to an OAuth authentication request")));
18+ _ ("'%s' isn't a valid response to an OAuth authentication request"), response));
19
20 session.set_access_phase_credentials (oauth_token, oauth_token_secret);
21 }
22
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 public void paint (Transitions.Visuals visuals, Transitions.Motion motion, Cairo.Context ctx,
28 int width, int height, int frame_number) {
29 double alpha = motion.get_alpha (frame_number);
30- int radius = (int) ((alpha) * Math.fmax (width, height));
31+ int radius = (int) (alpha * Math.fmax (width, height));
32
33 if (visuals.from_pixbuf != null) {
34 Gdk.cairo_set_source_pixbuf (ctx, visuals.from_pixbuf, visuals.from_pos.x,
35
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 we can unenhance properly those that were previously enhanced. We also need to sort out non photos */
41 Gee.ArrayList<DataView> unenhanced_list = new Gee.ArrayList<DataView> ();
42 Gee.ArrayList<DataView> enhanced_list = new Gee.ArrayList<DataView> ();
43- foreach (DataView view in get_view () .get_selected ()) {
44+ foreach (DataView view in get_view ().get_selected ()) {
45 Photo photo = view.get_source () as Photo;
46 if (photo != null && !photo.is_enhanced ())
47 unenhanced_list.add (view);
48@@ -713,7 +713,7 @@
49 if (unenhanced_list.size == 0) {
50 // Just undo if last on stack was enhance
51 EnhanceMultipleCommand cmd = get_command_manager ().get_undo_description () as EnhanceMultipleCommand;
52- if (cmd != null && cmd.source_list == get_view () .get_selected ())
53+ if (cmd != null && cmd.get_sources () == get_view ().get_selected_sources ())
54 get_command_manager ().undo ();
55 else {
56 UnEnhanceMultipleCommand command = new UnEnhanceMultipleCommand (enhanced_list);
57@@ -726,7 +726,7 @@
58 } else {
59 // Just undo if last on stack was unenhance
60 UnEnhanceMultipleCommand cmd = get_command_manager ().get_undo_description () as UnEnhanceMultipleCommand;
61- if (cmd != null && cmd.source_list == get_view () .get_selected ())
62+ if (cmd != null && cmd.get_sources () == get_view ().get_selected_sources ())
63 get_command_manager ().undo ();
64 else {
65 EnhanceMultipleCommand command = new EnhanceMultipleCommand (unenhanced_list);
66
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 public abstract class MultipleDataSourceCommand : PageCommand {
72 protected const int MIN_OPS_FOR_PROGRESS_WINDOW = 5;
73
74- public Gee.ArrayList<DataSource> source_list = new Gee.ArrayList<DataSource> ();
75+ protected Gee.ArrayList<DataSource> source_list = new Gee.ArrayList<DataSource> ();
76
77 private string progress_text;
78 private string undo_progress_text;
79
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
85 public static void count_media (Gee.Collection<MediaSource> media, out int photo_count,
86 out int video_count) {
87- Gee.ArrayList<MediaSource> photos = new Gee.ArrayList<MediaSource> ();
88- Gee.ArrayList<MediaSource> videos = new Gee.ArrayList<MediaSource> ();
89+ var photos = new Gee.ArrayList<LibraryPhoto> ();
90+ var videos = new Gee.ArrayList<Video> ();
91
92 filter_media (media, photos, videos);
93
94
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 TransactionController controller, ref int op_count) throws Error {
100 Gee.Map<Monitorable, File> set_master_file = null;
101 Gee.Map<Monitorable, FileInfo> set_master_file_info = null;
102- Gee.ArrayList<MediaSource> to_offline = null;
103- Gee.ArrayList<MediaSource> to_online = null;
104+ Gee.ArrayList<Monitorable> to_offline = null;
105+ Gee.ArrayList<Monitorable> to_online = null;
106
107 foreach (MonitorableUpdates updates in all_updates) {
108 if (op_count >= MAX_OPERATIONS_PER_CYCLE)
109
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
115 private void on_flag_unflag () {
116 if (has_photo ()) {
117- Gee.ArrayList<DataSource> photo_list = new Gee.ArrayList<DataSource> ();
118+ var photo_list = new Gee.ArrayList<MediaSource> ();
119 photo_list.add (get_photo ());
120 get_command_manager ().execute (new FlagUnflagCommand (photo_list,
121 ! ((LibraryPhoto) get_photo ()).is_flagged ()));
122
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 }
128
129 protected override void notify_container_contents_added (ContainerSource container,
130- Gee.Collection<DataSource> added, bool relinking) {
131+ Gee.Collection<DataObject> added, bool relinking) {
132 Tag tag = (Tag) container;
133 Gee.Collection<MediaSource> sources = (Gee.Collection<MediaSource>) added;
134
135@@ -233,7 +233,7 @@
136 }
137
138 protected override void notify_container_contents_removed (ContainerSource container,
139- Gee.Collection<DataSource> removed, bool unlinking) {
140+ Gee.Collection<DataObject> removed, bool unlinking) {
141 Tag tag = (Tag) container;
142 Gee.Collection<MediaSource> sources = (Gee.Collection<MediaSource>) removed;
143
144
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 private Gee.HashSet<ContainerSource> holding_tank = new Gee.HashSet<ContainerSource> ();
150
151 public virtual signal void container_contents_added (ContainerSource container,
152- Gee.Collection<DataSource> added, bool relinked) {
153+ Gee.Collection<DataObject> added, bool relinked) {
154 }
155
156 public virtual signal void container_contents_removed (ContainerSource container,
157- Gee.Collection<DataSource> removed, bool unlinked) {
158+ Gee.Collection<DataObject> removed, bool unlinked) {
159 }
160
161 public virtual signal void container_contents_altered (ContainerSource container,
162- Gee.Collection<DataSource>? added, bool relinked, Gee.Collection<DataSource>? removed,
163+ Gee.Collection<DataObject>? added, bool relinked, Gee.Collection<DataObject>? removed,
164 bool unlinked) {
165 }
166
167@@ -55,7 +55,7 @@
168 }
169
170 public virtual void notify_container_contents_added (ContainerSource container,
171- Gee.Collection<DataSource> added, bool relinked) {
172+ Gee.Collection<DataObject> added, bool relinked) {
173 // if container is in holding tank, remove it now and relink to collection
174 if (holding_tank.contains (container)) {
175 bool removed = holding_tank.remove (container);
176@@ -68,12 +68,12 @@
177 }
178
179 public virtual void notify_container_contents_removed (ContainerSource container,
180- Gee.Collection<DataSource> removed, bool unlinked) {
181+ Gee.Collection<DataObject> removed, bool unlinked) {
182 container_contents_removed (container, removed, unlinked);
183 }
184
185 public virtual void notify_container_contents_altered (ContainerSource container,
186- Gee.Collection<DataSource>? added, bool relinked, Gee.Collection<DataSource>? removed,
187+ Gee.Collection<DataObject>? added, bool relinked, Gee.Collection<DataObject>? removed,
188 bool unlinked) {
189 container_contents_altered (container, added, relinked, removed, unlinked);
190 }
191
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 }
197
198 public override void items_altered (Gee.Map<DataObject, Alteration> map) {
199- filter_altered_items (map.keys);
200+ // Cast - our DataObjects are DataViews.
201+ filter_altered_items((Gee.Collection<DataView>) map.keys);
202
203 base.items_altered (map);
204 }
205
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 }
211
212 int posix_wexitstatus (int status) {
213- return (((status) & 0xff00) >> 8);
214+ return ((status & 0xff00) >> 8);
215 }

Subscribers

People subscribed via source and target branches