The branch, master has been updated
via 48b0b1e23c86beec6199bbe06e46a5a43c2d1cb5 (commit)
from ffe852d215b564b2fe674c141b71d7300dd56216 (commit)
- Shortlog ------------------------------------------------------------
48b0b1e dselect: New key to set all selections back to what's currently
installed
Summary of changes:
ChangeLog | 9 +++++++++
debian/changelog | 3 +++
dselect/bindings.cc | 1 +
dselect/pkgcmds.cc | 15 +++++++++++++++
dselect/pkgkeys.cc | 2 ++
dselect/pkglist.h | 1 +
man/dselect.1 | 7 +++++++
7 files changed, 38 insertions(+), 0 deletions(-)
-----------------------------------------------------------------------
Details of changes:
commit 48b0b1e23c86beec6199bbe06e46a5a43c2d1cb5
Author: Colin Watson <[EMAIL PROTECTED]>
Date: Mon Jan 21 11:19:01 2008 +0200
dselect: New key to set all selections back to what's currently installed
Closes: #151540
diff --git a/ChangeLog b/ChangeLog
index 5b48aac..bc921b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-01-21 Colin Watson <[EMAIL PROTECTED]>
+
+ * dselect/pkgkeys.cc (packagelist_korgbindings): Add 'C'.
+ (packagelist_kinterps): Add 'revertinstalled'.
+ * dselect/bindings.cc (keybindings::descriptions): Likewise.
+ * dselect/pkglist.h (class packagelist): Add kd_revertinstalled.
+ * dselect/pkgcmds.cc (packagelist::kd_revertinstalled): New method.
+ * man/dselect.1: Document new 'C' keybinding.
+
2008-01-21 Guillem Jover <[EMAIL PROTECTED]>
* dpkg-deb/build.c (getfi): Use m_malloc instead of malloc.
diff --git a/debian/changelog b/debian/changelog
index fa4a629..c5d895f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ dpkg (1.14.17) UNRELEASED; urgency=low
[ Guillem Jover ]
* Replace strdup plus error checking usage with a new m_strdup function.
Closes: #379028
+ * Add new keybinding in dselect to restore all selections back to
+ whatever's currently installed. Closes: #151540
+ Thanks to Colin Watson.
-- Guillem Jover <[EMAIL PROTECTED]> Mon, 21 Jan 2008 10:11:55 +0200
diff --git a/dselect/bindings.cc b/dselect/bindings.cc
index 444c660..d6f32a7 100644
--- a/dselect/bindings.cc
+++ b/dselect/bindings.cc
@@ -158,6 +158,7 @@ const keybindings::description keybindings::descriptions[]=
{
{ "revert", N_("Revert to old state for all packages")
},
{ "revertsuggest", N_("Revert to suggested state for all packages")
},
{ "revertdirect", N_("Revert to directly requested state for all
packages") },
+ { "revertinstalled", N_("Revert to currently installed state for all
packages") },
// Actions which apply only to lists of methods.
{ "select-and-quit", N_("Select currently-highlighted access method")
},
diff --git a/dselect/pkgcmds.cc b/dselect/pkgcmds.cc
index 14a95c7..32744c8 100644
--- a/dselect/pkgcmds.cc
+++ b/dselect/pkgcmds.cc
@@ -264,6 +264,21 @@ void packagelist::kd_revertsuggest() {
refreshlist(); redrawthisstate();
}
+void
+packagelist::kd_revertinstalled()
+{
+ int i;
+
+ for (i = 0; i < nitems; i++) {
+ if (table[i]->pkg->name)
+ table[i]->selected = reallywant(pkginfo::want_sentinel, table[i]);
+ ldrawnstart = ldrawnend = -1;
+ }
+
+ refreshlist();
+ redrawthisstate();
+}
+
/* fixme: configurable purge/deselect */
void packagelist::kd_toggleinfo() {
diff --git a/dselect/pkgkeys.cc b/dselect/pkgkeys.cc
index 98029e7..0b249eb 100644
--- a/dselect/pkgkeys.cc
+++ b/dselect/pkgkeys.cc
@@ -72,6 +72,7 @@ const keybindings::interpretation packagelist_kinterps[] = {
{ "revert", 0, &packagelist::kd_revert_abort, qa_noquit
},
{ "revertsuggest", 0, &packagelist::kd_revertsuggest, qa_noquit
},
{ "revertdirect", 0, &packagelist::kd_revertdirect, qa_noquit
},
+ { "revertinstalled", 0, &packagelist::kd_revertinstalled, qa_noquit
},
{ 0, 0, 0, qa_noquit
}
};
@@ -144,6 +145,7 @@ const keybindings::orgbinding packagelist_korgbindings[]= {
{ 'R', "revert" },
{ 'U', "revertsuggest" },
{ 'D', "revertdirect" },
+ { 'C', "revertinstalled" },
{ -1, 0 }
};
diff --git a/dselect/pkglist.h b/dselect/pkglist.h
index 25a5cf3..89ff827 100644
--- a/dselect/pkglist.h
+++ b/dselect/pkglist.h
@@ -183,6 +183,7 @@ protected:
void kd_revert_abort();
void kd_revertsuggest();
void kd_revertdirect();
+ void kd_revertinstalled();
void kd_morespecific();
void kd_lessspecific();
void kd_swaporder();
diff --git a/man/dselect.1 b/man/dselect.1
index 3f6dd0c..03e11d2 100644
--- a/man/dselect.1
+++ b/man/dselect.1
@@ -423,6 +423,13 @@ keys, any possibly detrimental changes to the requested
package
selections can be backed out completely to the last established
settings.
.sp
+If you mistakenly establish some settings and wish to revert all the
+selections to what is currently installed on the system, press the
+\fB'C'\fP key.
+This is somewhat similar to using the unhold command on all packages,
+but provides a more obvious panic button in cases where the user
+pressed \fBenter\fP by accident.
+.sp
.
.SH BUGS
The
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]