r5826 - software/ui/src
Enrico Zini
enrico at alioth.debian.org
Mon Feb 18 18:16:46 UTC 2008
Author: enrico
Date: 2008-02-18 18:16:46 +0000 (Mon, 18 Feb 2008)
New Revision: 5826
Modified:
software/ui/src/GamesOptions.h
software/ui/src/goplay.cpp
Log:
Allow to choose the direction with --go, and added --primary to choose the primary facet
Modified: software/ui/src/GamesOptions.h
===================================================================
--- software/ui/src/GamesOptions.h 2008-02-18 17:55:24 UTC (rev 5825)
+++ software/ui/src/GamesOptions.h 2008-02-18 18:16:46 UTC (rev 5826)
@@ -31,6 +31,7 @@
public:
BoolOption* out_debug;
BoolOption* out_verbose;
+ StringOption* gowhere;
StringOption* mainFacet;
StringOption* secondaryFacet;
StringOption* ftags;
@@ -48,7 +49,10 @@
"enable verbose output");
out_debug = add<BoolOption>("debug", 0, "debug", "",
"enable debugging output (including verbose output)");
- mainFacet = add<StringOption>("go", 0, "go", "facet",
+ gowhere = add<StringOption>("go", 0, "go", "where",
+ "change the interface flavour. "
+ "Available flavours are: play, learn, admin, net, office, safe, web");
+ mainFacet = add<StringOption>("primary", 0, "primary", "facet",
"use the given facet instead of 'games'");
secondaryFacet = add<StringOption>("secondary", 0, "secondary", "facet",
"use the given facet instead of 'interface'");
Modified: software/ui/src/goplay.cpp
===================================================================
--- software/ui/src/goplay.cpp 2008-02-18 17:55:24 UTC (rev 5825)
+++ software/ui/src/goplay.cpp 2008-02-18 18:16:46 UTC (rev 5826)
@@ -358,7 +358,7 @@
Engine engine;
- if (wibble::str::endsWith(argv[0], "learn"))
+ if (wibble::str::endsWith(argv[0], "learn") || opts.gowhere->stringValue() == "learn")
{
engine.mainFacet = "field";
engine.secondaryFacet = "interface";
@@ -367,31 +367,31 @@
Xapian::Query("XTrole::documentation"),
Xapian::Query("XTrole::program")),
Xapian::Query("XTuse::learning"));
- } else if (wibble::str::endsWith(argv[0], "admin")) {
+ } else if (wibble::str::endsWith(argv[0], "admin") || opts.gowhere->stringValue() == "admin") {
engine.mainFacet = "admin";
engine.secondaryFacet = "interface";
engine.globalFilter = Xapian::Query(Xapian::Query::OP_OR,
Xapian::Query("XTrole::documentation"),
Xapian::Query("XTrole::program"));
- } else if (wibble::str::endsWith(argv[0], "net")) {
+ } else if (wibble::str::endsWith(argv[0], "net") || opts.gowhere->stringValue() == "net") {
engine.mainFacet = "network";
engine.secondaryFacet = "interface";
engine.globalFilter = Xapian::Query(Xapian::Query::OP_OR,
Xapian::Query("XTrole::documentation"),
Xapian::Query("XTrole::program"));
- } else if (wibble::str::endsWith(argv[0], "office")) {
+ } else if (wibble::str::endsWith(argv[0], "office") || opts.gowhere->stringValue() == "office") {
engine.mainFacet = "office";
engine.secondaryFacet = "interface";
engine.globalFilter = Xapian::Query(Xapian::Query::OP_OR,
Xapian::Query("XTrole::documentation"),
Xapian::Query("XTrole::program"));
- } else if (wibble::str::endsWith(argv[0], "safe")) {
+ } else if (wibble::str::endsWith(argv[0], "safe") || opts.gowhere->stringValue() == "safe") {
engine.mainFacet = "security";
engine.secondaryFacet = "interface";
engine.globalFilter = Xapian::Query(Xapian::Query::OP_OR,
Xapian::Query("XTrole::documentation"),
Xapian::Query("XTrole::program"));
- } else if (wibble::str::endsWith(argv[0], "web")) {
+ } else if (wibble::str::endsWith(argv[0], "web") || opts.gowhere->stringValue() == "web") {
engine.mainFacet = "web";
engine.secondaryFacet = "interface";
engine.globalFilter = Xapian::Query(Xapian::Query::OP_OR,
More information about the Pkg-games-commits
mailing list