Commit e8061b08 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Make separate directory for each UI

For each UI, create a folder in the ui subdirectory.
parent 49bfbc25
...@@ -12,6 +12,6 @@ exclude_lines = ...@@ -12,6 +12,6 @@ exclude_lines =
if __name__ == .__main__.: if __name__ == .__main__.:
omit = omit =
topydo/ui/*.py
topydo/commands/ExitCommand.py topydo/commands/ExitCommand.py
topydo/lib/Version.py topydo/lib/Version.py
topydo/ui/*
...@@ -41,7 +41,7 @@ setup( ...@@ -41,7 +41,7 @@ setup(
'test:python_version=="3.2"': ['mock'], 'test:python_version=="3.2"': ['mock'],
}, },
entry_points= { entry_points= {
'console_scripts': ['topydo = topydo.cli.UILoader:main'], 'console_scripts': ['topydo = topydo.ui.UILoader:main'],
}, },
classifiers = [ classifiers = [
"Development Status :: 5 - Production/Stable", "Development Status :: 5 - Production/Stable",
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
import getopt import getopt
import sys import sys
from topydo.cli.CLI import CLIApplication from topydo.ui.cli.CLI import CLIApplication
from topydo.cli.CLIApplicationBase import MAIN_OPTS, error from topydo.ui.CLIApplicationBase import MAIN_OPTS, error
# enable color on windows CMD # enable color on windows CMD
if "win32" in sys.platform: if "win32" in sys.platform:
...@@ -41,13 +41,13 @@ def main(): ...@@ -41,13 +41,13 @@ def main():
if args[0] == 'prompt': if args[0] == 'prompt':
try: try:
from topydo.cli.Prompt import PromptApplication from topydo.ui.prompt.Prompt import PromptApplication
PromptApplication().run() PromptApplication().run()
except ImportError: except ImportError:
error("You have to install prompt-toolkit to run prompt mode.") error("You have to install prompt-toolkit to run prompt mode.")
elif args[0] == 'columns': elif args[0] == 'columns':
try: try:
from topydo.ui.Main import UIApplication from topydo.ui.columns.Main import UIApplication
UIApplication().run() UIApplication().run()
except ImportError: except ImportError:
error("You have to install urwid to run column mode.") error("You have to install urwid to run column mode.")
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import sys import sys
from topydo.cli.CLIApplicationBase import CLIApplicationBase, error from topydo.ui.CLIApplicationBase import CLIApplicationBase, error
from topydo.lib import TodoFile from topydo.lib import TodoFile
from topydo.lib.Config import config, ConfigError from topydo.lib.Config import config, ConfigError
......
...@@ -19,7 +19,7 @@ import urwid ...@@ -19,7 +19,7 @@ import urwid
from topydo.lib.Color import AbstractColor from topydo.lib.Color import AbstractColor
from topydo.lib.Todo import Todo from topydo.lib.Todo import Todo
from topydo.lib.TopydoString import TopydoString from topydo.lib.TopydoString import TopydoString
from topydo.ui.Utils import PaletteItem from topydo.ui.columns.Utils import PaletteItem
PALETTE_LOOKUP = { PALETTE_LOOKUP = {
# omitting AbstractColor.NEUTRAL on purpose, so a text without any # omitting AbstractColor.NEUTRAL on purpose, so a text without any
......
...@@ -22,15 +22,7 @@ import urwid ...@@ -22,15 +22,7 @@ import urwid
from collections import namedtuple from collections import namedtuple
from string import ascii_uppercase from string import ascii_uppercase
from topydo.cli.CLIApplicationBase import CLIApplicationBase
from topydo.Commands import get_subcommand from topydo.Commands import get_subcommand
from topydo.ui.CommandLineWidget import CommandLineWidget
from topydo.ui.ConsoleWidget import ConsoleWidget
from topydo.ui.KeystateWidget import KeystateWidget
from topydo.ui.TodoListWidget import TodoListWidget
from topydo.ui.Utils import PaletteItem, to_urwid_color
from topydo.ui.ViewWidget import ViewWidget
from topydo.ui.ColumnLayout import columns
from topydo.lib.Config import config, ConfigError from topydo.lib.Config import config, ConfigError
from topydo.lib.Sorter import Sorter from topydo.lib.Sorter import Sorter
from topydo.lib.Filter import get_filter_list, RelevanceFilter, DependencyFilter from topydo.lib.Filter import get_filter_list, RelevanceFilter, DependencyFilter
...@@ -38,6 +30,14 @@ from topydo.lib.Utils import get_terminal_size ...@@ -38,6 +30,14 @@ from topydo.lib.Utils import get_terminal_size
from topydo.lib.View import View from topydo.lib.View import View
from topydo.lib import TodoFile from topydo.lib import TodoFile
from topydo.lib import TodoList from topydo.lib import TodoList
from topydo.ui.CLIApplicationBase import CLIApplicationBase
from topydo.ui.columns.CommandLineWidget import CommandLineWidget
from topydo.ui.columns.ConsoleWidget import ConsoleWidget
from topydo.ui.columns.KeystateWidget import KeystateWidget
from topydo.ui.columns.TodoListWidget import TodoListWidget
from topydo.ui.columns.Utils import PaletteItem, to_urwid_color
from topydo.ui.columns.ViewWidget import ViewWidget
from topydo.ui.columns.ColumnLayout import columns
COLUMN_WIDTH = 40 COLUMN_WIDTH = 40
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
import urwid import urwid
from topydo.ui.TodoWidget import TodoWidget
from topydo.lib.Utils import translate_key_to_config from topydo.lib.Utils import translate_key_to_config
from topydo.ui.columns.TodoWidget import TodoWidget
def get_execute_signal(p_prefix): def get_execute_signal(p_prefix):
......
...@@ -20,7 +20,7 @@ import urwid ...@@ -20,7 +20,7 @@ import urwid
from topydo.lib.Config import config from topydo.lib.Config import config
from topydo.lib.ListFormat import ListFormatParser from topydo.lib.ListFormat import ListFormatParser
from topydo.lib.ProgressColor import progress_color from topydo.lib.ProgressColor import progress_color
from topydo.ui.Utils import PaletteItem, to_urwid_color from topydo.ui.columns.Utils import PaletteItem, to_urwid_color
# pass a None todo list, since we won't use %i or %I here # pass a None todo list, since we won't use %i or %I here
PRIO_FORMATTER = ListFormatParser(None, "%{(}p{)}") PRIO_FORMATTER = ListFormatParser(None, "%{(}p{)}")
......
...@@ -20,8 +20,8 @@ import os.path ...@@ -20,8 +20,8 @@ import os.path
import shlex import shlex
import sys import sys
from topydo.cli.CLIApplicationBase import CLIApplicationBase, error, usage from topydo.ui.CLIApplicationBase import CLIApplicationBase, error, usage
from topydo.cli.TopydoCompleter import TopydoCompleter from topydo.ui.prompt.TopydoCompleter import TopydoCompleter
from prompt_toolkit.shortcuts import prompt from prompt_toolkit.shortcuts import prompt
from prompt_toolkit.history import InMemoryHistory from prompt_toolkit.history import InMemoryHistory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment