-
Notifications
You must be signed in to change notification settings - Fork 0
/
inkstock.py
31 lines (24 loc) · 992 Bytes
/
inkstock.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
from core.gui.app import GtkApp
from sources.source import RemoteSource
from windows.import_window import ImportWindow, ImportResults
from windows.inkstocks_window import InkStockWindow
from windows.results_window import ResultsWindow
from gi.repository import Gtk, GLib
class InkStockApp(GtkApp):
"""Base App
Add all windows to windows for it to be recognised"""
app_name = "InkStock"
ui_dir = "ui"
windows = []
def __init__(self, start_loop=False, start_gui=True, **kwargs):
self.ext = kwargs.setdefault("ext", None)
RemoteSource.load(os.path.join(os.path.dirname(__file__), 'sources'))
self.windows = RemoteSource.windows
self.windows.insert(0, InkStockWindow)
self.windows.insert(0, ResultsWindow)
self.windows.insert(0, ImportWindow)
self.windows.insert(0, ImportResults)
super().__init__(start_loop, start_gui, **kwargs)
if __name__ == '__main__':
InkStockApp(start_loop=True)