Commit caf25ee2 authored by Jim Nelson's avatar Jim Nelson

#1324: Fixes to compile under Vala 0.7.10.

parent bd59c94d
......@@ -6,7 +6,7 @@ GETTEXT_PACKAGE = $(PROGRAM)
BUILD_ROOT = 1
VALAC = valac
MIN_VALAC_VERSION = 0.7.9
MIN_VALAC_VERSION = 0.7.10
INSTALL_PROGRAM = install
INSTALL_DATA = install -m 644
......
......@@ -379,11 +379,7 @@ public abstract class PixelTransformation {
public class RGBTransformation : PixelTransformation {
/* matrix entries are stored in row-major order; by default, the matrix formed
by matrix_entries is the 4x4 identity matrix */
protected float[] matrix_entries = {
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f };
protected float[] matrix_entries;
protected const int MATRIX_SIZE = 16;
......@@ -391,6 +387,16 @@ public class RGBTransformation : PixelTransformation {
public RGBTransformation(PixelTransformationType type) {
base(type);
// Can't initialize these in their member declarations because of a valac bug that
// I've been unable to produce a minimal test case for to report (JN). May be
// related to this bug:
// https://bugzilla.gnome.org/show_bug.cgi?id=570821
matrix_entries = {
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f };
}
public override PixelFormat get_preferred_format() {
......
......@@ -303,7 +303,8 @@ public abstract class EditingTool {
private EditingToolWindow tool_window = null;
public static delegate EditingTool Factory();
[CCode (has_target=false)]
public delegate EditingTool Factory();
public signal void activated();
......
......@@ -129,7 +129,7 @@ public class LibraryWindow : AppWindow {
return page != null;
}
protected Page get_page() {
public Page get_page() {
if (page == null) {
// create the page and set its marker, if one has been supplied
page = construct_page();
......
......@@ -5,11 +5,11 @@
*/
private abstract class Properties : Gtk.HBox {
protected Gtk.Label label = new Gtk.Label("");
protected Gtk.Label info = new Gtk.Label("");
protected string basic_properties_labels;
protected string basic_properties_info;
protected bool first_line;
private Gtk.Label label = new Gtk.Label("");
private Gtk.Label info = new Gtk.Label("");
private string basic_properties_labels;
private string basic_properties_info;
private bool first_line;
public Properties() {
label.set_justify(Gtk.Justification.RIGHT);
......@@ -19,6 +19,7 @@ private abstract class Properties : Gtk.HBox {
pack_start(info, true, true, 3);
info.set_ellipsize(Pango.EllipsizeMode.END);
info.set_selectable(true);
}
protected void add_line(string label, string info) {
......@@ -85,7 +86,7 @@ private abstract class Properties : Gtk.HBox {
if (count == 1) {
foreach (DataView item in iter) {
get_single_properties(item);
get_single_properties(item);
break;
}
} else {
......@@ -110,14 +111,13 @@ private class BasicProperties : Properties {
private time_t start_time = time_t();
private time_t end_time = time_t();
private Dimensions dimensions;
private int photo_count;
private int photo_count;
private int event_count;
private string exposure;
private string aperture;
private string iso;
public BasicProperties() {
info.set_selectable(true);
}
private override void clear_properties() {
......@@ -361,7 +361,7 @@ private class ExtendedPropertiesWindow : Gtk.Window {
DataSource source = view.get_source();
if (source is PhotoSource) {
if (source is TransformablePhoto)
if (source is TransformablePhoto)
file_path = ((TransformablePhoto) source).get_file().get_path();
filesize = ((PhotoSource) source).get_filesize();
......@@ -463,9 +463,4 @@ private class ExtendedPropertiesWindow : Gtk.Window {
public void update_properties(Page page) {
properties.update_properties(page);
}
public override void show_all() {
base.show_all();
properties.info.set_selectable(true);
}
}
......@@ -132,8 +132,12 @@ public abstract class RESTTransaction {
return arguments;
}
protected void set_response(string new_response) {
response = new_response;
protected void set_response(uint8[] new_response) {
StringBuilder builder = new StringBuilder();
foreach (uint8 b in new_response)
builder.append(b.to_string());
response = builder.str;
}
protected RESTArgument[] get_sorted_arguments() {
......@@ -182,7 +186,7 @@ public abstract class RESTTransaction {
post_req.set_request("application/x-www-form-urlencoded", Soup.MemoryUse.COPY,
formdata_string, formdata_string.length);
parent_session.send_message(post_req);
response = post_req.response_body.data;
set_response(post_req.response_body.data);
is_executed = true;
}
......@@ -451,12 +455,9 @@ public abstract class UploadActionPane : ProgressPane {
TemporaryFileDescriptor[] temp_files = prepare_files();
PublishingError err = null;
try {
if (!user_cancelled && temp_files.length > 0)
send_files(temp_files);
} catch (PublishingError e) {
err = e;
} finally {
foreach (TemporaryFileDescriptor temp in temp_files) {
try {
......@@ -470,11 +471,6 @@ public abstract class UploadActionPane : ProgressPane {
}
}
}
// Have to do it this way because Vala currently doesn't handle try...finally well right
// now, the finally block is executed but the exception is not propagated upwards
if (err != null)
throw err;
}
private TemporaryFileDescriptor[] prepare_files() {
......
......@@ -63,8 +63,8 @@ namespace Exif {
public static void set_slong(uchar *buffer, ByteOrder byteOrder, int32 val);
}
[CCode (cheader_filename="libexif/exif-content.h")]
public static delegate void ForeachEntryFunc(Entry e, void *user);
[CCode (cheader_filename="libexif/exif-content.h", has_target=false)]
public delegate void ForeachEntryFunc(Entry e, void *user);
[Compact]
[CCode (
......@@ -94,8 +94,8 @@ namespace Exif {
public uint size;
}
[CCode (cheader_filename="libexif/exif-data.h")]
public static delegate void ForeachContentFunc(Content c, void *user);
[CCode (cheader_filename="libexif/exif-data.h", has_target=false)]
public delegate void ForeachContentFunc(Content c, void *user);
[CCode (
cname="ExifDataOption",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment