Commit ab9f99ee authored by Jens Georg's avatar Jens Georg

Fix deprecation warnings

parent 2077c722
Pipeline #68504 passed with stage
in 29 minutes and 13 seconds
......@@ -22,13 +22,16 @@ shotwell_plugin_dir = join_paths(get_option('libdir'), 'shotwell', 'plugins', 'b
add_global_arguments(['-DHAVE_CONFIG_H=1'],
['-include'], ['config.h'],
language : 'c')
add_global_arguments(['--target-glib=2.40',
'--vapidir=@0@'.format(join_paths(meson.current_source_dir(),
'vapi')),
'--enable-checking',
'--fatal-warnings',
'--enable-experimental',
'--enable-deprecated'], language : 'vala')
add_global_arguments(
[
'--target-glib=2.40',
'--vapidir=@0@'.format(join_paths(meson.current_source_dir(), 'vapi')),
'--enable-checking',
'--fatal-warnings',
'--enable-experimental',
],
language : 'vala'
)
version_h = vcs_tag(command: ['git', 'rev-parse', 'HEAD'], input: 'version.h.in', output: 'version.h', fallback: '')
version = declare_dependency(sources : version_h, include_directories : include_directories('.'))
......
......@@ -264,21 +264,21 @@ public class Transaction {
protected void check_response(Soup.Message message) throws Spit.Publishing.PublishingError {
switch (message.status_code) {
case Soup.KnownStatusCode.OK:
case Soup.KnownStatusCode.CREATED: // HTTP code 201 (CREATED) signals that a new
case Soup.Status.OK:
case Soup.Status.CREATED: // HTTP code 201 (CREATED) signals that a new
// resource was created in response to a PUT or POST
break;
case Soup.KnownStatusCode.CANT_RESOLVE:
case Soup.KnownStatusCode.CANT_RESOLVE_PROXY:
case Soup.Status.CANT_RESOLVE:
case Soup.Status.CANT_RESOLVE_PROXY:
throw new Spit.Publishing.PublishingError.NO_ANSWER("Unable to resolve %s (error code %u)",
get_endpoint_url(), message.status_code);
case Soup.KnownStatusCode.CANT_CONNECT:
case Soup.KnownStatusCode.CANT_CONNECT_PROXY:
case Soup.Status.CANT_CONNECT:
case Soup.Status.CANT_CONNECT_PROXY:
throw new Spit.Publishing.PublishingError.NO_ANSWER("Unable to connect to %s (error code %u)",
get_endpoint_url(), message.status_code);
case Soup.KnownStatusCode.SSL_FAILED:
case Soup.Status.SSL_FAILED:
throw new Spit.Publishing.PublishingError.SSL_FAILED ("Unable to connect to %s: Secure connection failed",
get_endpoint_url ());
......@@ -541,7 +541,7 @@ public class UploadTransaction : Transaction {
int payload_part_num = message_parts.get_length();
Soup.Buffer bindable_data = new Soup.Buffer(Soup.MemoryUse.COPY, payload.data[0:payload_length]);
var bindable_data = new Soup.Buffer.take(payload.data[0:payload_length]);
message_parts.append_form_file("", publishable.get_serialized_file().get_path(), mime_type,
bindable_data);
......
......@@ -275,7 +275,7 @@ private class UploadTransaction: Transaction {
int image_part_num = message_parts.get_length();
Soup.Buffer bindable_data = new Soup.Buffer(Soup.MemoryUse.COPY, photo_data.data[0:data_length]);
Soup.Buffer bindable_data = new Soup.Buffer.take(photo_data.data[0:data_length]);
message_parts.append_form_file("", photo.get_serialized_file().get_path(), "image/jpeg", bindable_data);
unowned Soup.MessageHeaders image_part_header;
......
......@@ -48,7 +48,8 @@ internal class UploadTransaction : Publishing.RESTSupport.GooglePublisher.Authen
// bind the binary image data read from disk into a Soup.Buffer object so that we
// can attach it to the multipart request, then actaully append the buffer
// to the multipart request. Then, set the MIME type for this part.
Soup.Buffer bindable_data = new Soup.Buffer(Soup.MemoryUse.TEMPORARY, photo_data);
// FIXME: Passing no free function here only works because we are sync
Soup.Buffer bindable_data = new Soup.Buffer.with_owner(photo_data, mapped_file, null);
// create a message that can be sent over the wire whose payload is the multipart container
// that we've been building up
......
......@@ -615,10 +615,19 @@ private class MapWidget : Gtk.Bin {
var map_attribution_text = create_attribution_actor();
map_attribution_text.content_gravity = Clutter.ContentGravity.BOTTOM_RIGHT;
map_attribution_text.set_x_align(Clutter.ActorAlign.END);
map_attribution_text.set_x_expand(true);
map_attribution_text.set_y_align(Clutter.ActorAlign.END);
map_attribution_text.set_y_expand(true);
// add lock/unlock button to top left corner of map
map_edit_lock_button.content_gravity = Clutter.ContentGravity.TOP_RIGHT;
map_edit_lock_button.reactive = true;
map_edit_lock_button.set_x_align(Clutter.ActorAlign.END);
map_edit_lock_button.set_x_expand(true);
map_edit_lock_button.set_y_align(Clutter.ActorAlign.START);
map_edit_lock_button.set_y_expand(true);
map_edit_lock_button.button_release_event.connect((a, e) => {
if (e.button != 1 /* CLUTTER_BUTTON_PRIMARY */)
return false;
......@@ -627,8 +636,9 @@ private class MapWidget : Gtk.Bin {
map_edit_locked_image : map_edit_unlocked_image);
return true;
});
map_view.bin_layout_add(map_edit_lock_button, Clutter.BinAlignment.END, Clutter.BinAlignment.START);
map_view.bin_layout_add(map_attribution_text, Clutter.BinAlignment.END, Clutter.BinAlignment.END);
map_view.add_child(map_edit_lock_button);
map_view.add_child(map_attribution_text);
gtk_champlain_widget.has_tooltip = true;
gtk_champlain_widget.query_tooltip.connect((x, y, keyboard_tooltip, tooltip) => {
Gdk.Rectangle lock_rect = {
......@@ -647,7 +657,11 @@ private class MapWidget : Gtk.Bin {
// add scale to bottom left corner of the map
map_scale.content_gravity = Clutter.ContentGravity.BOTTOM_LEFT;
map_scale.connect_view(map_view);
map_view.bin_layout_add(map_scale, Clutter.BinAlignment.START, Clutter.BinAlignment.END);
map_scale.set_x_align(Clutter.ActorAlign.START);
map_scale.set_x_expand(true);
map_scale.set_y_align(Clutter.ActorAlign.END);
map_scale.set_y_expand(true);
map_view.add_child(map_scale);
map_view.set_zoom_on_double_click(false);
map_view.notify.connect((o, p) => {
......
......@@ -232,7 +232,7 @@ public class VideoReader {
debug("Thumbnailer timer called");
if (thumbnailer_pid != 0) {
debug("Killing thumbnailer process: %d", thumbnailer_pid);
Posix.kill(thumbnailer_pid, Posix.SIGKILL);
Posix.kill(thumbnailer_pid, Posix.Signal.KILL);
}
return false; // Don't call again.
}
......
......@@ -60,7 +60,7 @@ class EventDirectoryItem : CheckerboardItem {
pixbuf = media.get_preview_pixbuf(squared_scaling);
} catch (Error error) {
ThumbnailCache.fetch_async_scaled(media, ThumbnailCache.Size.BIG,
new Dimensions(ThumbnailCache.Size.BIG, ThumbnailCache.Size.BIG),
Dimensions(ThumbnailCache.Size.BIG, ThumbnailCache.Size.BIG),
ThumbnailCache.DEFAULT_INTERP, () => {});
if (media is LibraryPhoto) {
LibraryPhoto photo = (LibraryPhoto) media;
......
......@@ -6,8 +6,7 @@ public class ImportRoll.Branch : Sidebar.Branch {
Sidebar.Branch.Options.HIDE_IF_EMPTY,
ImportRoll.Branch.comparator);
this.entries = new Gee.HashMap<int64?, ImportRoll.SidebarEntry>((Gee.HashDataFunc<int64?>)GLib.int64_hash,
(Gee.EqualDataFunc<int64?>)GLib.int64_equal);
this.entries = new Gee.HashMap<int64?, ImportRoll.SidebarEntry>(int64_hash, int64_equal);
foreach (var source in MediaCollectionRegistry.get_instance().get_all()) {
on_import_rolls_altered(source);
......
......@@ -97,7 +97,6 @@ public class Sidebar.Tree : Gtk.TreeView {
Gtk.TreeViewColumn text_column = new Gtk.TreeViewColumn();
text_column.set_expand(true);
Gtk.CellRendererPixbuf icon_renderer = new Gtk.CellRendererPixbuf();
icon_renderer.follow_state = true;
text_column.pack_start (icon_renderer, false);
text_column.add_attribute(icon_renderer, "gicon", Columns.ICON);
text_column.set_cell_data_func(icon_renderer, icon_renderer_function);
......
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