From 41db6d597ac579f1fd0faf1e88fa3cfd3350bf82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Suchomel?= Date: Thu, 6 Sep 2012 16:06:51 +0200 Subject: [PATCH] pair post snapshots only with lonely pre snapshots --- src/dialogs.ycp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dialogs.ycp b/src/dialogs.ycp index 0305898..61d1e3b 100644 --- a/src/dialogs.ycp +++ b/src/dialogs.ycp @@ -242,6 +242,9 @@ boolean CreateSnapshotPopup (list pre_snapshots) { `VSpacing (0.5)), `HSpacing (1)) ); + UI::ChangeWidget (`id ("post"), `Enabled, size (pre_items) > 0); + UI::ChangeWidget (`id (`pre_list), `Enabled, size (pre_items) > 0); + any ret = nil; map args = $[]; while (true) @@ -279,6 +282,7 @@ any SummaryDialog() { list configs = Snapper::configs; list snapshot_items = []; + // lonely pre snapshots list pre_snapshots = []; // generate list of snapshot table items @@ -325,12 +329,12 @@ any SummaryDialog() { y2milestone ("pre snappshot %1 does not have post", num); snapshot_items = add (snapshot_items, `item (`id (i), num, _("Pre"), date, "", s["description"]:"", userdata)); + pre_snapshots = add (pre_snapshots, num); } else { y2milestone ("skipping pre snapshot: %1", num); } - pre_snapshots = add (pre_snapshots, num); } }); return snapshot_items;