Skip to content

Commit

Permalink
Merge branch 'SLE-12-SP1' into merge_SLE-12-SP1
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Jul 24, 2018
2 parents 14fbb16 + 869760d commit 5a85701
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
7 changes: 7 additions & 0 deletions package/yast2-snapper.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jul 24 08:42:11 UTC 2018 - knut.anderssen@suse.com

- Use the correct snapshot number when restoring selected massively
(bsc#956955)
- 3.1.12

-------------------------------------------------------------------
Tue Jun 7 08:25:45 UTC 2016 - igonzalezsosa@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-snapper.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-snapper
Version: 3.1.11
Version: 3.1.12
Release: 0
Group: System/YaST

Expand Down
16 changes: 7 additions & 9 deletions src/include/snapper/dialogs.rb
Expand Up @@ -941,7 +941,7 @@ def ShowDialog
HSpacing(0.5)
)
)
show_file_modification.call(current_file, pre_num, snapshot_num)
show_file_modification.call(current_file, from, to)
end
else
UI.ReplaceWidget(Id(:diff_chooser), VBox(VStretch()))
Expand All @@ -959,7 +959,7 @@ def ShowDialog
Right(Label(date))
)
else
tree_label = "%{pre} && %{post}" % { :pre => pre_num, :post => snapshot_num }
tree_label = "%{pre} && %{post}" % { :pre => from, :post => to }
date_widget = VBox(
HBox(
# label, date string will follow at the end of line
Expand Down Expand Up @@ -1096,10 +1096,8 @@ def ShowDialog
elsif ret == :diff_snapshot
if type == :SINGLE
UI.ChangeWidget(Id(:selection_snapshots), :Enabled, false)
show_file_modification.call(current_file, snapshot_num, 0)
else
show_file_modification.call(current_file, pre_num, snapshot_num)
end
show_file_modification.call(current_file, from, to)

elsif ret == :diff_arbitrary || ret == :selection_snapshots
UI.ChangeWidget(Id(:selection_snapshots), :Enabled, true)
Expand Down Expand Up @@ -1170,10 +1168,10 @@ def ShowDialog
"from snapshot '%2' to current system?"
),
Snapper.GetFileFullPath(current_filename),
snapshot_num
from
)
)
Snapper.RestoreFiles(snapshot_num, [current_filename])
Snapper.RestoreFiles(from, [current_filename])
end
next

Expand Down Expand Up @@ -1209,7 +1207,7 @@ def ShowDialog
"<p>Files existing in original snapshot will be copied to current system.</p>\n" +
"<p>Files that did not exist in the snapshot will be deleted.</p>Are you sure?"
),
pre_num,
from,
to_restore.join("<br>")
),
60,
Expand All @@ -1218,7 +1216,7 @@ def ShowDialog
Label.NoButton,
:focus_no
)
Snapper.RestoreFiles(pre_num, filenames)
Snapper.RestoreFiles(from, filenames)
break
end
next
Expand Down

0 comments on commit 5a85701

Please sign in to comment.