~ubuntu-branches/ubuntu/saucy/deja-dup/saucy

« back to all changes in this revision

Viewing changes to common/OperationRestore.vala

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2012-06-05 13:45:39 UTC
  • mfrom: (1.1.43)
  • Revision ID: package-import@ubuntu.com-20120605134539-l35tewhkjfq4qp6e
Tags: 23.2-0ubuntu1
* New upstream release
* debian/control:
  - Add libpeas-dev to Build-Depends
  - Update valac and libglib2.0-dev versions
  - Bump debhelper version to 9
* debian/compat:
  - Bump to 9
* debian/rules:
  - Don't install new .la and .a files from upstream
* debian/patches/allow-resuming-encrypted-backup.patch:
  - Dropped, included upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
  
42
42
  public OperationRestore(string dest_in,
43
43
                          string? time_in = null,
44
 
                          List<File>? files_in = null,
45
 
                          uint xid = 0) {
46
 
    Object(xid: xid, dest: dest_in, time: time_in, restore_files: files_in,
47
 
           mode: Mode.RESTORE);
 
44
                          List<File>? files_in = null) {
 
45
    Object(dest: dest_in, time: time_in, restore_files: files_in,
 
46
           mode: ToolJob.Mode.RESTORE);
48
47
  }
49
48
  
50
49
  public async override void start()
53
52
    base.start();
54
53
  }
55
54
 
56
 
  protected override void connect_to_dup()
 
55
  protected override void connect_to_job()
57
56
  {
58
 
    base.connect_to_dup();
59
 
    dup.restore_files = restore_files;
 
57
    base.connect_to_job();
 
58
    job.restore_files = restore_files;
60
59
  }
61
60
 
62
 
  protected override List<string>? make_argv() throws Error
 
61
  protected override List<string>? make_argv()
63
62
  {
64
 
    List<string> argv = new List<string>();
65
 
    if (time != null)
66
 
      argv.append("--restore-time=%s".printf(time));
67
 
    
68
 
    dup.local = File.new_for_path(dest);
69
 
    
70
 
    return argv;
 
63
    job.time = time;
 
64
    job.local = File.new_for_path(dest);
 
65
    return null;
71
66
  }
72
67
  
73
 
  internal async override void operation_finished(Duplicity dup, bool success, bool cancelled, string? detail)
 
68
  internal async override void operation_finished(ToolJob job, bool success, bool cancelled, string? detail)
74
69
  {
75
70
    if (success)
76
71
      DejaDup.update_last_run_timestamp(DejaDup.TimestampType.RESTORE);
77
72
 
78
 
    base.operation_finished(dup, success, cancelled, detail);
 
73
    base.operation_finished(job, success, cancelled, detail);
79
74
  }
80
75
}
81
76