|
@@ -5,12 +5,8 @@
|
|
|
# All rights reserved
|
|
|
#
|
|
|
# THIS SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY
|
|
|
-from sqlite3 import Cursor
|
|
|
-from typing import Union
|
|
|
-
|
|
|
-import urwid
|
|
|
-from urwid import raw_display
|
|
|
-from app.widgets import (AutoCompleteEdit, AutoCompleteFloatEdit)
|
|
|
+from psycopg import Cursor
|
|
|
+from urwid import raw_display, WidgetPlaceholder, SolidFill, MainLoop
|
|
|
from app.activities import ActivityManager, show_or_exit
|
|
|
from app.activities.RecipeEditor import RecipeEditor
|
|
|
from app.db_utils import QueryManager, display_mapper
|
|
@@ -36,9 +32,9 @@ except:
|
|
|
exit(1)
|
|
|
#from mock import *
|
|
|
|
|
|
-class Recipe(urwid.WidgetPlaceholder):
|
|
|
+class Recipe(WidgetPlaceholder):
|
|
|
def __init__(self, activity_manager):
|
|
|
- super().__init__(urwid.SolidFill(u'/'))
|
|
|
+ super().__init__(SolidFill(u'/'))
|
|
|
self.activity_manager = activity_manager
|
|
|
recipe = self.activity_manager.get('recipe_editor')
|
|
|
|
|
@@ -67,7 +63,7 @@ def iter_palettes():
|
|
|
palettes = iter_palettes()
|
|
|
|
|
|
screen = raw_display.Screen()
|
|
|
-loop = urwid.MainLoop(app, next(palettes), screen=screen,
|
|
|
+loop = MainLoop(app, next(palettes), screen=screen,
|
|
|
unhandled_input=lambda k: show_or_exit(k, screen=screen, palettes=palettes),
|
|
|
pop_ups=True)
|
|
|
loop.run()
|