[Aptitude-svn-commit] r4013 - in branches/aptitude-0.3/aptitude: .
src src/cmdline
Daniel Burrows
dburrows at costa.debian.org
Wed Aug 31 17:40:25 UTC 2005
Author: dburrows
Date: Wed Aug 31 17:40:21 2005
New Revision: 4013
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc
branches/aptitude-0.3/aptitude/src/cmdline/cmdline_util.cc
branches/aptitude-0.3/aptitude/src/cmdline/cmdline_util.h
branches/aptitude-0.3/aptitude/src/ui.cc
branches/aptitude-0.3/aptitude/src/ui.h
Log:
Let the user enter the visual UI from the resolver prompt.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Wed Aug 31 17:40:21 2005
@@ -1,5 +1,10 @@
2005-08-31 Daniel Burrows <dburrows at debian.org>
+ * src/cmdline/cmdline_resolver.cc, src/cmdline/cmdline_util.cc, src/cmdline/cmdline_util.h, src/ui.cc, src/ui.h:
+
+ Let the user enter the visual interface from the resolver
+ prompt.
+
* src/generic/aptcache.cc:
In mark_all_upgradable, only mark packages that are already
Modified: branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc (original)
+++ branches/aptitude-0.3/aptitude/src/cmdline/cmdline_resolver.cc Wed Aug 31 17:40:21 2005
@@ -24,6 +24,7 @@
#include "cmdline_prompt.h"
#include "cmdline_show.h"
#include "cmdline_show_broken.h"
+#include "cmdline_util.h"
#include <aptitude.h>
#include <solution_fragment.h>
@@ -126,6 +127,7 @@
",: %F"
".: %F"
"o: %F"
+ "e: %F"
"r pkg ver ...: %F%n"
"a pkg ver ...: %F%n"
"<ACTION> pkg... : %F%n"
@@ -150,6 +152,8 @@
flowindentbox(0, 3,
fragf(_("view an explanation of the changes in the solution"))),
flowindentbox(0, 3,
+ fragf(_("examine the solution in the visual user interface"))),
+ flowindentbox(0, 3,
fragf(_("reject the given package versions; don't display any solutions in which they occur."))),
flowindentbox(0, 3,
fragf(_("accept the given package versions; display only solutions in which they occur."))),
@@ -411,6 +415,9 @@
delete f;
break;
}
+ case 'E':
+ ui_solution_screen();
+ break;
case 'R':
reject_or_mandate_version(string(response, 1), true);
break;
Modified: branches/aptitude-0.3/aptitude/src/cmdline/cmdline_util.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/cmdline/cmdline_util.cc (original)
+++ branches/aptitude-0.3/aptitude/src/cmdline/cmdline_util.cc Wed Aug 31 17:40:21 2005
@@ -8,6 +8,7 @@
#include <aptitude.h>
#include <ui.h>
+#include <vs_progress.h>
#include <generic/apt.h>
@@ -24,6 +25,19 @@
exit(0);
}
+void ui_solution_screen()
+{
+ ui_init();
+ file_quit.connect(sigc::ptr_fun(vscreen_exitmain));
+
+ vs_progress_ref p = gen_progress_bar();
+ do_new_package_view(*p.unsafe_get_ref());
+
+ do_examine_solution();
+ ui_main();
+ exit(0);
+}
+
void cmdline_show_stringlist(strvector &items)
{
int loc=2;
Modified: branches/aptitude-0.3/aptitude/src/cmdline/cmdline_util.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/cmdline/cmdline_util.h (original)
+++ branches/aptitude-0.3/aptitude/src/cmdline/cmdline_util.h Wed Aug 31 17:40:21 2005
@@ -21,6 +21,11 @@
*/
void ui_preview();
+/** Starts up the visual UI with the solution screen visible, exiting
+ * when the UI shuts down.
+ */
+void ui_solution_screen();
+
/** Splits the given input string into a package name/pattern and a
* version source. If the input string is an output string, the
* function will still behave sanely.
Modified: branches/aptitude-0.3/aptitude/src/ui.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.cc (original)
+++ branches/aptitude-0.3/aptitude/src/ui.cc Wed Aug 31 17:40:21 2005
@@ -1370,7 +1370,7 @@
*solver = NULL;
}
-static void do_examine_solution()
+void do_examine_solution()
{
static vs_widget_ref solver;
@@ -1884,7 +1884,13 @@
// Make sure the broken indicator doesn't annoyingly pop up for a
// moment. (hack?)
- b->hide();
+ //
+ // Note that it *should* be visible if we enter this code from the
+ // command-line (i.e., with the cache already loaded). More hack?
+ if(apt_cache_file && (*apt_cache_file)->resolver_exists())
+ b->show();
+ else
+ b->hide();
}
void ui_main()
Modified: branches/aptitude-0.3/aptitude/src/ui.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/ui.h (original)
+++ branches/aptitude-0.3/aptitude/src/ui.h Wed Aug 31 17:40:21 2005
@@ -249,6 +249,9 @@
// Can be used to manually pop up an error dialog, if necessary.
void check_apt_errors();
+/** Display the solution editor screen if it isn't visible. */
+void do_examine_solution();
+
void do_new_package_view(OpProgress &progress);
// Displays a new package-view.
More information about the Aptitude-svn-commit
mailing list