Merge lp:~meese/pantheon-photos/fix-vala26 into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by meese
Status: Merged
Approved by: Rico Tzschichholz
Approved revision: 2595
Merged at revision: 2644
Proposed branch: lp:~meese/pantheon-photos/fix-vala26
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 127 lines (+18/-22)
6 files modified
Makefile (+0/-2)
plugins/shotwell-publishing/FacebookPublishing.vala (+1/-2)
plugins/shotwell-publishing/FlickrPublishing.vala (+2/-3)
src/AppWindow.vala (+1/-1)
src/Dimensions.vala (+11/-11)
vapi/libraw.vapi (+3/-3)
To merge this branch: bzr merge lp:~meese/pantheon-photos/fix-vala26
Reviewer Review Type Date Requested Status
Rico Tzschichholz Approve
Review via email: mp+231996@code.launchpad.net

Commit message

Fixes syntax errors while building with valac 0.26

Description of the change

fixes vala .26 build failure caused by warnings, passing -X flags lines in makefile do nothing and causes a warning under .26 and wrong number of arguments for string format calls gives a warning now

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

Code-wise the changes look fair, but I don't have valac 0.26 to test.

Revision history for this message
Rico Tzschichholz (ricotz) wrote :

Omit the params completely and just output: "OAuth Access Token has Expired. Logout user."

Use "...".printf (response) in FlickrPublishing.vala

There are a bunch more warnings leading to build failures using valac 0.25.2

lp:~meese/pantheon-photos/fix-vala26 updated
2592. By meese

fixes vala 0.25.2 errors

2593. By meese

merge from trunk

Revision history for this message
meese (meese) wrote :

fixed (0.25.2 wasn't out yet when I did this :P)

Revision history for this message
Rico Tzschichholz (ricotz) wrote :

"set_default_icon_list ((owned) pixbuf_list);" should be
"set_default_icon_list (pixbuf_list.copy ());"

Explicitly use "public" for the struct-fields instead of just dropping the "private".

*No* need to touch "private const int NO_SCALE = 0;"

Revision history for this message
meese (meese) wrote :

>"set_default_icon_list ((owned) pixbuf_list);" should be
>"set_default_icon_list (pixbuf_list.copy ());"
hm isn't ownership transfer a better idea here as were not using pixbuf_list again?

lp:~meese/pantheon-photos/fix-vala26 updated
2594. By meese

style and list owned fixed

Revision history for this message
meese (meese) wrote :

fixed

lp:~meese/pantheon-photos/fix-vala26 updated
2595. By meese

extra space

Revision history for this message
Rico Tzschichholz (ricotz) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2014-08-27 06:20:32 +0000
3+++ Makefile 2014-08-29 21:21:35 +0000
4@@ -646,8 +646,6 @@
5 $(VALAC) --ccode --directory=$(BUILD_DIR) --basedir=src \
6 $(foreach pkg,$(VALA_PKGS),--pkg=$(pkg)) \
7 $(foreach vapidir,$(VAPI_DIRS),--vapidir=$(vapidir)) \
8- $(foreach def,$(DEFINES),-X -D$(def)) \
9- $(foreach hdir,$(HEADER_DIRS),-X -I$(hdir)) \
10 $(VALAFLAGS) \
11 $(EXPANDED_SRC_FILES)
12 @touch $@
13
14=== modified file 'plugins/shotwell-publishing/FacebookPublishing.vala'
15--- plugins/shotwell-publishing/FacebookPublishing.vala 2014-08-08 21:13:09 +0000
16+++ plugins/shotwell-publishing/FacebookPublishing.vala 2014-08-29 21:21:35 +0000
17@@ -1493,7 +1493,7 @@
18
19 case EXPIRED_SESSION_STATUS_CODE:
20 error = new Spit.Publishing.PublishingError.EXPIRED_SESSION (
21- "OAuth Access Token has Expired. Logout user.", real_message.get_uri (), msg.status_code);
22+ "OAuth Access Token has Expired. Logout user.");
23 break;
24
25 case Soup.KnownStatusCode.CANT_RESOLVE:
26@@ -1672,4 +1672,3 @@
27 }
28
29 }
30-
31
32=== modified file 'plugins/shotwell-publishing/FlickrPublishing.vala'
33--- plugins/shotwell-publishing/FlickrPublishing.vala 2014-08-08 21:13:09 +0000
34+++ plugins/shotwell-publishing/FlickrPublishing.vala 2014-08-29 21:21:35 +0000
35@@ -397,7 +397,7 @@
36
37 if (split_pair.length != 2)
38 host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE (
39- "'%s' isn't a valid response to an OAuth authentication request"));
40+ "'%s' isn't a valid response to an OAuth authentication request".printf (response)));
41
42 if (split_pair[0] == "oauth_token")
43 oauth_token = split_pair[1];
44@@ -407,7 +407,7 @@
45
46 if (oauth_token == null || oauth_token_secret == null)
47 host.post_error (new Spit.Publishing.PublishingError.MALFORMED_RESPONSE (
48- "'%s' isn't a valid response to an OAuth authentication request"));
49+ "'%s' isn't a valid response to an OAuth authentication request".printf (response)));
50
51
52 on_authentication_token_available (oauth_token, oauth_token_secret);
53@@ -1368,4 +1368,3 @@
54 }
55
56 }
57-
58
59=== modified file 'src/AppWindow.vala'
60--- src/AppWindow.vala 2014-08-08 21:13:09 +0000
61+++ src/AppWindow.vala 2014-08-29 21:21:35 +0000
62@@ -453,7 +453,7 @@
63 GLib.List<Gdk.Pixbuf> pixbuf_list = new GLib.List<Gdk.Pixbuf> ();
64 foreach (string resource in Resources.APP_ICONS)
65 pixbuf_list.append (Resources.get_icon (resource, 0));
66- set_default_icon_list (pixbuf_list);
67+ set_default_icon_list (pixbuf_list.copy ());
68
69 // restore previous size and maximization state
70 if (this is LibraryWindow) {
71
72=== modified file 'src/Dimensions.vala'
73--- src/Dimensions.vala 2014-08-08 21:13:09 +0000
74+++ src/Dimensions.vala 2014-08-29 21:21:35 +0000
75@@ -249,10 +249,10 @@
76 public struct Scaling {
77 private const int NO_SCALE = 0;
78
79- private ScaleConstraint constraint;
80- private int scale;
81- private Dimensions viewport;
82- private bool scale_up;
83+ public ScaleConstraint constraint;
84+ public int scale;
85+ public Dimensions viewport;
86+ public bool scale_up;
87
88 private Scaling (ScaleConstraint constraint, int scale, Dimensions viewport, bool scale_up) {
89 this.constraint = constraint;
90@@ -461,13 +461,13 @@
91 }
92
93 public struct ZoomState {
94- private Dimensions content_dimensions;
95- private Dimensions viewport_dimensions;
96- private double zoom_factor;
97- private double interpolation_factor;
98- private double min_factor;
99- private double max_factor;
100- private Gdk.Point viewport_center;
101+ public Dimensions content_dimensions;
102+ public Dimensions viewport_dimensions;
103+ public double zoom_factor;
104+ public double interpolation_factor;
105+ public double min_factor;
106+ public double max_factor;
107+ public Gdk.Point viewport_center;
108
109 public ZoomState (Dimensions content_dimensions, Dimensions viewport_dimensions,
110 double slider_val = 0.0, Gdk.Point? viewport_center = null) {
111
112=== modified file 'vapi/libraw.vapi'
113--- vapi/libraw.vapi 2013-05-29 18:52:09 +0000
114+++ vapi/libraw.vapi 2014-08-29 21:21:35 +0000
115@@ -37,9 +37,9 @@
116 public int colors;
117 public uint filters;
118
119- private char *make;
120- private char *model;
121- private char *cdesc;
122+ public char *make;
123+ public char *model;
124+ public char *cdesc;
125
126 public string get_make() {
127 return build_string(make, 64);

Subscribers

People subscribed via source and target branches

to all changes: