+2008-01-21 Colin Watson <cjwatson@debian.org>
+
+ * 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 <guillem@debian.org>
* dpkg-deb/build.c (getfi): Use m_malloc instead of malloc.
[ 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 <guillem@debian.org> Mon, 21 Jan 2008 10:11:55 +0200
{ "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") },
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() {
{ "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 }
};
{ 'R', "revert" },
{ 'U', "revertsuggest" },
{ 'D', "revertdirect" },
+ { 'C', "revertinstalled" },
{ -1, 0 }
};
void kd_revert_abort();
void kd_revertsuggest();
void kd_revertdirect();
+ void kd_revertinstalled();
void kd_morespecific();
void kd_lessspecific();
void kd_swaporder();
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