|
19 | 19 | from pbpy import pbuac
|
20 | 20 |
|
21 | 21 | import pbgui.main
|
| 22 | +import pbgui.gateway |
22 | 23 |
|
23 | 24 | import pbsync_version
|
24 | 25 |
|
@@ -440,7 +441,7 @@ def main(argv):
|
440 | 441 |
|
441 | 442 | parser.add_argument("--sync", help="Main command for the PBSync, synchronizes the project with latest changes from the repo, and does some housekeeping",
|
442 | 443 | choices=["all", "partial", "binaries", "engineversion", "engine", "force", "ddc"])
|
443 |
| - parser.add_argument("--nogui", help="Command line switch to skip GUI for sync handler", default=False) |
| 444 | + parser.add_argument("--gui", help="Open a GUI page", choices=["sync", "settings"]) |
444 | 445 | parser.add_argument("--printversion", help="Prints requested version information into console.",
|
445 | 446 | choices=["current-engine", "latest-engine", "project"])
|
446 | 447 | parser.add_argument(
|
@@ -540,13 +541,13 @@ def pbsync_config_parser_func(root):
|
540 | 541 | run UpdateProject again.""", True)
|
541 | 542 |
|
542 | 543 | # Parse args
|
543 |
| - if not (args.sync is None): |
| 544 | + if not (args.gui is None): |
544 | 545 | def sync():
|
545 |
| - sync_handler(args.sync, args.repository, args.bundle) |
546 |
| - if args.nogui: |
547 |
| - sync() |
548 |
| - else: |
549 |
| - pbgui.main.run(sync) |
| 546 | + return sync_handler(args.sync, args.repository, args.bundle) |
| 547 | + pbgui.set_default_page(args.gui) |
| 548 | + pbgui.main.run(sync) |
| 549 | + if not (args.sync is None): |
| 550 | + sync_handler(args.sync, args.repository, args.bundle) |
550 | 551 | elif not (args.printversion is None):
|
551 | 552 | printversion_handler(args.printversion, args.repository)
|
552 | 553 | elif not (args.autoversion is None):
|
|
0 commit comments