~teejee2008/timeshift/trunk

« back to all changes in this revision

Viewing changes to src/Core/FsTabEntry.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:
10
10
        public bool is_comment = false;
11
11
        public bool is_empty_line = false;
12
12
        
13
 
        public string device = "";
 
13
        public string device_string = "";
14
14
        public string mount_point = "";
15
15
        public string type = "";
16
16
        public string options = "defaults";
20
20
 
21
21
        public string device_uuid {
22
22
                owned get{
23
 
                        if (device.down().has_prefix("uuid=")){
24
 
                                return device.replace("\"","").replace("'","").split("=")[1];
 
23
                        if (device_string.down().has_prefix("uuid=")){
 
24
                                return device_string.replace("\"","").replace("'","").split("=")[1];
25
25
                        }
26
26
                        else{
27
27
                                return "";
28
28
                        }
29
29
                }
30
30
                set {
31
 
                        device = "UUID=%s".printf(value);
 
31
                        device_string = "UUID=%s".printf(value);
32
32
                }
33
33
        }
34
34
 
61
61
                                        if (part.strip().length == 0) { continue; }
62
62
                                        switch (++part_num){
63
63
                                                case 0:
64
 
                                                        entry.device = part.strip();
 
64
                                                        entry.device_string = part.strip();
65
65
                                                        break;
66
66
                                                case 1:
67
67
                                                        entry.mount_point = part.strip();
104
104
                        }
105
105
                        else {
106
106
                                text += "%s\t%s\t%s\t%s\t%s\t%s\n".printf(
107
 
                                        entry.device, entry.mount_point, entry.type,
 
107
                                        entry.device_string, entry.mount_point, entry.type,
108
108
                                        entry.options, entry.dump, entry.pass);
109
109
                        }
110
110
                }
143
143
                        || mount_point.has_prefix("/media")
144
144
                        || (mount_point == "none")
145
145
                        || !mount_point.has_prefix("/")
146
 
                        || (!device.has_prefix("/dev/") && !device.down().has_prefix("uuid="))){
 
146
                        || (!device_string.has_prefix("/dev/") && !device_string.down().has_prefix("uuid="))){
147
147
                        
148
148
                        return false;
149
149
                }