Commit 41262d82 authored by Michael Terry's avatar Michael Terry

convert to valac 0.14

parent a1e93f27
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# DEJA_PROG_VALAC([MINIMUM-VERSION]) # DEJA_PROG_VALAC([MINIMUM-VERSION])
# -------------------------------- # --------------------------------
AC_DEFUN([DEJA_PROG_VALAC], AC_DEFUN([DEJA_PROG_VALAC],
[AC_PATH_PROG([VALAC], [valac-0.12], []) [AC_PATH_PROG([VALAC], [valac-0.14], [])
AS_IF([test -z "$VALAC"], AS_IF([test -z "$VALAC"],
[AC_MSG_WARN([No Vala compiler found. You will not be able to compile .vala source files.])], [AC_MSG_WARN([No Vala compiler found. You will not be able to compile .vala source files.])],
[AS_IF([test -n "$1"], [AS_IF([test -n "$1"],
......
...@@ -30,7 +30,7 @@ class Listener : Object ...@@ -30,7 +30,7 @@ class Listener : Object
public DBusProxy proxy {get; construct;} public DBusProxy proxy {get; construct;}
public string method {get; construct;} public string method {get; construct;}
public Variant args {get; construct;} public Variant args {get; construct;}
public Handler handler {get; set;} public unowned Handler handler {get; set;}
public Listener(DBusProxy proxy, string method, Variant? args, Handler handler) public Listener(DBusProxy proxy, string method, Variant? args, Handler handler)
{ {
......
...@@ -167,7 +167,7 @@ public int get_prompt_delay() ...@@ -167,7 +167,7 @@ public int get_prompt_delay()
span = TimeSpan.MINUTE * 2; span = TimeSpan.MINUTE * 2;
else else
span = TimeSpan.DAY * 30; span = TimeSpan.DAY * 30;
return span / TimeSpan.SECOND; return (int)(span / TimeSpan.SECOND);
} }
public bool has_seen_settings() public bool has_seen_settings()
......
...@@ -40,6 +40,9 @@ public class DuplicityInfo : Object ...@@ -40,6 +40,9 @@ public class DuplicityInfo : Object
// will already have been thrown up. // will already have been thrown up.
public bool check_duplicity_version(out string header, out string msg) { public bool check_duplicity_version(out string header, out string msg) {
string output; string output;
header = null;
msg = null;
try { try {
Process.spawn_command_line_sync("duplicity --version", out output, null, null); Process.spawn_command_line_sync("duplicity --version", out output, null, null);
......
...@@ -38,7 +38,7 @@ AC_PROG_MAKE_SET ...@@ -38,7 +38,7 @@ AC_PROG_MAKE_SET
LT_PREREQ([2.2.6]) LT_PREREQ([2.2.6])
LT_INIT LT_INIT
DEJA_PROG_VALAC([0.11.6]) DEJA_PROG_VALAC([0.13.4])
# Sets up gettext. # Sets up gettext.
GETTEXT_PACKAGE="$PACKAGE" GETTEXT_PACKAGE="$PACKAGE"
......
...@@ -594,7 +594,7 @@ public abstract class AssistantOperation : Assistant ...@@ -594,7 +594,7 @@ public abstract class AssistantOperation : Assistant
do_close(); do_close();
} }
bool do_minimize_to_tray(Gdk.Event event) bool do_minimize_to_tray(Gdk.EventAny event)
{ {
if (is_interrupted() || op == null) if (is_interrupted() || op == null)
do_cancel(); // instead, do the normal cancel operation do_cancel(); // instead, do the normal cancel operation
......
...@@ -96,7 +96,7 @@ public class AssistantRestoreMissing : AssistantRestore { ...@@ -96,7 +96,7 @@ public class AssistantRestoreMissing : AssistantRestore {
*/ */
private bool scan_queue = true; private bool scan_queue = true;
private bool cancel_assistant = false; private bool cancel_assistant = false;
private Sequence<Time?> backups_queue = new Sequence<Time?>(g_free); private Sequence<Time?> backups_queue = new Sequence<Time?>();
private HashTable<string, DeletedFile> allfiles_prev; private HashTable<string, DeletedFile> allfiles_prev;
private List<File> restore_files_remaining; private List<File> restore_files_remaining;
......
...@@ -216,6 +216,8 @@ static bool kickoff() ...@@ -216,6 +216,8 @@ static bool kickoff()
static bool time_until_next_run(out TimeSpan time) static bool time_until_next_run(out TimeSpan time)
{ {
time = 0;
var next_date = DejaDup.next_run_date(); var next_date = DejaDup.next_run_date();
if (next_date == null) { if (next_date == null) {
debug("Automatic backups disabled. Not scheduling a backup."); debug("Automatic backups disabled. Not scheduling a backup.");
...@@ -234,11 +236,11 @@ static void prepare_run(TimeSpan wait_time) ...@@ -234,11 +236,11 @@ static void prepare_run(TimeSpan wait_time)
TimeSpan secs = wait_time / TimeSpan.SECOND + 1; TimeSpan secs = wait_time / TimeSpan.SECOND + 1;
if (wait_time > 0 && secs > 0) { if (wait_time > 0 && secs > 0) {
debug("Waiting %ld seconds until next backup.", secs); debug("Waiting %ld seconds until next backup.", (long)secs);
timeout_id = Timeout.add_seconds((uint)secs, kickoff); timeout_id = Timeout.add_seconds((uint)secs, kickoff);
} }
else { else {
debug("Late by %ld seconds. Backing up now.", secs * -1); debug("Late by %ld seconds. Backing up now.", (long)(secs * -1));
kickoff(); kickoff();
} }
} }
......
...@@ -69,7 +69,7 @@ public class ConfigLabelBackupDate : ConfigLabel ...@@ -69,7 +69,7 @@ public class ConfigLabelBackupDate : ConfigLabel
now.get_month(), now.get_month(),
now.get_day_of_month(), now.get_day_of_month(),
0, 0, 0.0); 0, 0, 0.0);
var diff = date.difference(now) / TimeSpan.DAY; var diff = (int)(date.difference(now) / TimeSpan.DAY);
return ngettext("%d day from now", "%d days from now", diff).printf(diff); return ngettext("%d day from now", "%d days from now", diff).printf(diff);
} }
else { else {
...@@ -78,7 +78,7 @@ public class ConfigLabelBackupDate : ConfigLabel ...@@ -78,7 +78,7 @@ public class ConfigLabelBackupDate : ConfigLabel
now.get_month(), now.get_month(),
now.get_day_of_month(), now.get_day_of_month(),
0, 0, 0.0); 0, 0, 0.0);
var diff = now.difference(date) / TimeSpan.DAY + 1; var diff = (int)(now.difference(date) / TimeSpan.DAY + 1);
return ngettext("%d day ago", "%d days ago", diff).printf(diff); return ngettext("%d day ago", "%d days ago", diff).printf(diff);
} }
} }
......
...@@ -287,6 +287,7 @@ public class ConfigLocation : ConfigWidget ...@@ -287,6 +287,7 @@ public class ConfigLocation : ConfigWidget
bool lookup_uuid(string uuid, out Gtk.TreeIter iter_in) bool lookup_uuid(string uuid, out Gtk.TreeIter iter_in)
{ {
Gtk.TreeIter iter; Gtk.TreeIter iter;
iter_in = Gtk.TreeIter();
if (store.get_iter_first(out iter)) { if (store.get_iter_first(out iter)) {
do { do {
string iter_uuid; string iter_uuid;
......
...@@ -26,8 +26,8 @@ public class ConfigURLPartBool : ConfigBool ...@@ -26,8 +26,8 @@ public class ConfigURLPartBool : ConfigBool
public delegate bool TestActive(string val); public delegate bool TestActive(string val);
public ConfigURLPart.Part part {get; construct;} public ConfigURLPart.Part part {get; construct;}
TestActive _test_active; unowned TestActive _test_active;
public TestActive test_active { public unowned TestActive test_active {
get {return _test_active;} get {return _test_active;}
set { set {
_test_active = value; _test_active = value;
......
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