Hello community, here is the log from the commit of package yast2-snapper for openSUSE:Factory checked in at 2015-11-24 22:31:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-snapper (Old) and /work/SRC/openSUSE:Factory/.yast2-snapper.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-snapper" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-snapper/yast2-snapper.changes 2015-06-16 15:29:12.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-snapper.new/yast2-snapper.changes 2015-11-24 22:31:59.000000000 +0100 @@ -1,0 +2,6 @@ +Wed Nov 18 11:15:53 UTC 2015 - [email protected] + +- disable delete and modify snapshots if not exist (bsc#951179) +- 3.1.10 + +------------------------------------------------------------------- Old: ---- yast2-snapper-3.1.9.tar.bz2 New: ---- yast2-snapper-3.1.10.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-snapper.spec ++++++ --- /var/tmp/diff_new_pack.sLNwcF/_old 2015-11-24 22:31:59.000000000 +0100 +++ /var/tmp/diff_new_pack.sLNwcF/_new 2015-11-24 22:31:59.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-snapper -Version: 3.1.9 +Version: 3.1.10 Release: 0 # change to noarch causes problems according to behlert ++++++ yast2-snapper-3.1.9.tar.bz2 -> yast2-snapper-3.1.10.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.1.9/package/yast2-snapper.changes new/yast2-snapper-3.1.10/package/yast2-snapper.changes --- old/yast2-snapper-3.1.9/package/yast2-snapper.changes 2015-06-16 10:35:10.000000000 +0200 +++ new/yast2-snapper-3.1.10/package/yast2-snapper.changes 2015-11-18 14:55:16.000000000 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Nov 18 11:15:53 UTC 2015 - [email protected] + +- disable delete and modify snapshots if not exist (bsc#951179) +- 3.1.10 + +------------------------------------------------------------------- Mon Jun 15 16:18:54 CEST 2015 - [email protected] - removed noarch tag again (bsc#934856) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.1.9/package/yast2-snapper.spec new/yast2-snapper-3.1.10/package/yast2-snapper.spec --- old/yast2-snapper-3.1.9/package/yast2-snapper.spec 2015-06-16 10:35:10.000000000 +0200 +++ new/yast2-snapper-3.1.10/package/yast2-snapper.spec 2015-11-18 14:55:16.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-snapper -Version: 3.1.9 +Version: 3.1.10 Release: 0 Group: System/YaST diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.1.9/src/include/snapper/dialogs.rb new/yast2-snapper-3.1.10/src/include/snapper/dialogs.rb --- old/yast2-snapper-3.1.9/src/include/snapper/dialogs.rb 2015-06-15 16:30:10.000000000 +0200 +++ new/yast2-snapper-3.1.10/src/include/snapper/dialogs.rb 2015-11-18 14:55:16.000000000 +0100 @@ -94,6 +94,14 @@ ret end + + # grouped enable condition based on snapshot presence for modification widgets + def enable_snapshot_buttons(condition) + UI.ChangeWidget(Id(:show), :Enabled, condition) + UI.ChangeWidget(Id(:modify), :Enabled, condition) + UI.ChangeWidget(Id(:delete), :Enabled, condition) + end + # Popup for modification of existing snapshot # @return true if new snapshot was created @@ -309,12 +317,12 @@ UI.ChangeWidget( Id("post"), :Enabled, - Ops.greater_than(Builtins.size(pre_items), 0) + !pre_items.empty? ) UI.ChangeWidget( Id(:pre_list), :Enabled, - Ops.greater_than(Builtins.size(pre_items), 0) + !pre_items.empty? ) ret = nil @@ -465,11 +473,7 @@ Popup.ClearFeedback UI.ChangeWidget(Id(:snapshots_table), :Items, get_snapshot_items.call) - UI.ChangeWidget( - Id(:show), - :Enabled, - Ops.greater_than(Builtins.size(snapshot_items), 0) - ) + enable_snapshot_buttons(!snapshot_items.empty?) nil end @@ -520,11 +524,11 @@ Wizard.HideAbortButton UI.SetFocus(Id(:snapshots_table)) - UI.ChangeWidget(Id(:show), :Enabled, false) if snapshot_items == [] + enable_snapshot_buttons(!snapshot_items.empty?) UI.ChangeWidget( Id(:configs), :Enabled, - Ops.greater_than(Builtins.size(configs), 1) + configs.size > 1 ) ret = nil
