~teejee2008/timeshift/trunk

« back to all changes in this revision

Viewing changes to src/Core/CryptTabEntry.vala

  • Committer: Tony George
  • Date: 2016-11-01 12:07:45 UTC
  • Revision ID: tony.george.kol@gmail.com-20161101120745-rqdl2p6125cgp428
RestoreWindow: Fixed some issues in device selection logic; Comboboxes would remain unselected in some scenarios; User will be prompted to unlock default devices before the restore window is displayed;

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
        // fields
14
14
        public string mapped_name = "";
15
 
        public string device = "";
 
15
        public string device_string = "";
16
16
        public string keyfile = "none";
17
17
        public string options = "luks,nofail";
18
18
        public string line = "";
19
19
 
20
20
        public string device_uuid {
21
21
                owned get{
22
 
                        if (device.down().has_prefix("uuid=")){
23
 
                                return device.replace("\"","").replace("'","").split("=")[1];
 
22
                        if (device_string.down().has_prefix("uuid=")){
 
23
                                return device_string.replace("\"","").replace("'","").split("=")[1];
24
24
                        }
25
25
                        else{
26
26
                                return "";
27
27
                        }
28
28
                }
29
29
                set {
30
 
                        device = "UUID=%s".printf(value);
 
30
                        device_string = "UUID=%s".printf(value);
31
31
                }
32
32
        }
33
33
 
63
63
                                                        entry.mapped_name = part.strip();
64
64
                                                        break;
65
65
                                                case 1:
66
 
                                                        entry.device = part.strip();
 
66
                                                        entry.device_string = part.strip();
67
67
                                                        break;
68
68
                                                case 2:
69
69
                                                        entry.keyfile = part.strip();
92
92
                        }
93
93
                        else {
94
94
                                text += "%s\t%s\t%s\t%s\n".printf(
95
 
                                        entry.mapped_name, entry.device,
 
95
                                        entry.mapped_name, entry.device_string,
96
96
                                        entry.keyfile, entry.options);
97
97
                        }
98
98
                }