mirror of
https://github.com/linuxmint/timeshift.git
synced 2024-08-17 04:20:34 +03:00
Added support for LVM volumes; Updated restore window
This commit is contained in:
parent
adc9a0ea30
commit
42ae712338
@ -43,7 +43,7 @@ public class RestoreWindow : Gtk.Dialog{
|
||||
|
||||
//bootloader
|
||||
private Label lbl_header_bootloader;
|
||||
private CheckButton chk_restore_grub2;
|
||||
//private CheckButton chk_restore_grub2;
|
||||
private ComboBox cmb_boot_device;
|
||||
|
||||
//exclude
|
||||
@ -80,7 +80,7 @@ public class RestoreWindow : Gtk.Dialog{
|
||||
this.window_position = WindowPosition.CENTER_ON_PARENT;
|
||||
this.set_destroy_with_parent (true);
|
||||
this.set_modal (true);
|
||||
this.set_default_size (500, 400);
|
||||
this.set_default_size (550, 450);
|
||||
|
||||
//set app icon
|
||||
try{
|
||||
@ -109,7 +109,7 @@ public class RestoreWindow : Gtk.Dialog{
|
||||
notebook.append_page (vbox_target, lbl_exclude);
|
||||
|
||||
//lbl_header_partitions
|
||||
lbl_header_partitions = new Gtk.Label("<b>" + _("Target Device") + ":</b>");
|
||||
lbl_header_partitions = new Gtk.Label(_("Device for Restoring Snapshot") + ":");
|
||||
lbl_header_partitions.xalign = (float) 0.0;
|
||||
lbl_header_partitions.set_use_markup(true);
|
||||
vbox_target.add(lbl_header_partitions);
|
||||
@ -189,7 +189,7 @@ public class RestoreWindow : Gtk.Dialog{
|
||||
//bootloader options -------------------------------------------
|
||||
|
||||
//lbl_header_bootloader
|
||||
lbl_header_bootloader = new Gtk.Label("<b>" +_("Bootloader") + ":</b>");
|
||||
lbl_header_bootloader = new Gtk.Label(_("Device for Bootloader Installation") + ":");
|
||||
lbl_header_bootloader.set_use_markup(true);
|
||||
lbl_header_bootloader.xalign = (float) 0.0;
|
||||
vbox_target.add(lbl_header_bootloader);
|
||||
@ -200,7 +200,7 @@ public class RestoreWindow : Gtk.Dialog{
|
||||
hbox_grub.margin_bottom = 6;
|
||||
vbox_target.add (hbox_grub);
|
||||
|
||||
string grub_msg = _("Re-install GRUB2 bootloader on the target device (recommended)");
|
||||
/*string grub_msg = _("Re-install GRUB2 bootloader on the target device (recommended)");
|
||||
|
||||
//chk_restore_grub2
|
||||
chk_restore_grub2 = new CheckButton.with_label(_("Re-install GRUB2") + ":");
|
||||
@ -210,7 +210,7 @@ public class RestoreWindow : Gtk.Dialog{
|
||||
|
||||
chk_restore_grub2.toggled.connect(()=>{
|
||||
cmb_boot_device.sensitive = chk_restore_grub2.active;
|
||||
});
|
||||
});*/
|
||||
|
||||
//cmb_boot_device
|
||||
cmb_boot_device = new ComboBox ();
|
||||
@ -431,9 +431,9 @@ public class RestoreWindow : Gtk.Dialog{
|
||||
|
||||
btn_reset_exclude_list_clicked();
|
||||
|
||||
chk_restore_grub2.active = true; //keep enabled always
|
||||
chk_restore_grub2.sensitive = false; //don't allow user to disable
|
||||
cmb_boot_device.sensitive = chk_restore_grub2.active;
|
||||
//chk_restore_grub2.active = true; //keep enabled always
|
||||
//chk_restore_grub2.sensitive = false; //don't allow user to disable
|
||||
//cmb_boot_device.sensitive = chk_restore_grub2.active;
|
||||
}
|
||||
|
||||
|
||||
@ -441,10 +441,10 @@ public class RestoreWindow : Gtk.Dialog{
|
||||
PartitionInfo pi;
|
||||
model.get (iter, 0, out pi, -1);
|
||||
if ((App.root_device != null) && (pi.device == App.root_device.device)){
|
||||
(cell as Gtk.CellRendererText).text = pi.device_name_sdaX + " (" + _("sys") + ")";
|
||||
(cell as Gtk.CellRendererText).text = pi.partition_name + " (" + _("sys") + ")";
|
||||
}
|
||||
else{
|
||||
(cell as Gtk.CellRendererText).text = pi.device_name_sdaX;
|
||||
(cell as Gtk.CellRendererText).text = pi.partition_name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -876,6 +876,13 @@ public class RestoreWindow : Gtk.Dialog{
|
||||
return;
|
||||
}
|
||||
|
||||
//check if grub device selected ---------------
|
||||
|
||||
if (cmb_boot_device.active < 0){
|
||||
messagebox_show(_("Select Boot Device"),_("Please select the boot device"), true);
|
||||
return;
|
||||
}
|
||||
|
||||
//get selected target partition ------------------
|
||||
|
||||
PartitionInfo restore_target = null;
|
||||
@ -923,7 +930,8 @@ public class RestoreWindow : Gtk.Dialog{
|
||||
|
||||
//save grub install options ----------------------
|
||||
|
||||
App.reinstall_grub2 = chk_restore_grub2.active;
|
||||
//App.reinstall_grub2 = chk_restore_grub2.active;
|
||||
App.reinstall_grub2 = true;
|
||||
|
||||
if (App.reinstall_grub2){
|
||||
DeviceInfo dev;
|
||||
|
@ -418,15 +418,17 @@ namespace Utility
|
||||
}
|
||||
}
|
||||
|
||||
public string device_name_sdaX{
|
||||
public string disk_name{
|
||||
owned get{
|
||||
return device.split("/")[2];
|
||||
|
||||
return "";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public string device_name_sda{
|
||||
public string partition_name{
|
||||
owned get{
|
||||
return device.split("/")[2][0:3];
|
||||
return device[5:device.length];
|
||||
}
|
||||
}
|
||||
|
||||
@ -609,7 +611,7 @@ namespace Utility
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pi.device.has_prefix("/dev/sd") || pi.device.has_prefix("/dev/hd")) {
|
||||
if (pi.device.has_prefix("/dev/sd") || pi.device.has_prefix("/dev/hd") || pi.device.has_prefix("/dev/mapper/")) {
|
||||
//ok
|
||||
}
|
||||
else{
|
||||
|
@ -17,17 +17,17 @@ long_line_behaviour=1
|
||||
long_line_column=80
|
||||
|
||||
[files]
|
||||
current_page=6
|
||||
FILE_NAME_0=1240;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FMain.vala;0;4
|
||||
FILE_NAME_1=15188;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FMainWindow.vala;0;4
|
||||
FILE_NAME_2=18670;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FSettingsWindow.vala;0;4
|
||||
current_page=4
|
||||
FILE_NAME_0=2176;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FMain.vala;0;4
|
||||
FILE_NAME_1=3715;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FMainWindow.vala;0;4
|
||||
FILE_NAME_2=18296;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FSettingsWindow.vala;0;4
|
||||
FILE_NAME_3=13804;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FRestoreWindow.vala;0;4
|
||||
FILE_NAME_4=1602;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FUtility.vala;0;4
|
||||
FILE_NAME_5=794;Make;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2Fmakefile;0;4
|
||||
FILE_NAME_6=218;Conf;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fdebian%2Fcontrol;0;4
|
||||
FILE_NAME_7=16;None;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fdebian%2Fchangelog;0;4
|
||||
FILE_NAME_8=111;Sh;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Finstaller%2Finstall.sh;0;4
|
||||
FILE_NAME_9=750;Sh;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fbuild-installer.sh;0;4
|
||||
FILE_NAME_4=12635;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FUtility.vala;0;4
|
||||
FILE_NAME_5=1138;Make;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2Fmakefile;0;4
|
||||
FILE_NAME_6=410;Conf;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fdebian%2Fcontrol;0;4
|
||||
FILE_NAME_7=232;None;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fdebian%2Fchangelog;0;4
|
||||
FILE_NAME_8=559;Sh;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Finstaller%2Finstall.sh;0;4
|
||||
FILE_NAME_9=402;Sh;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fbuild-installer.sh;0;4
|
||||
|
||||
[VTE]
|
||||
last_dir=/home/teejee
|
||||
|
Loading…
Reference in New Issue
Block a user