improved the category browser
parent
c1dfa009df
commit
13f6b211ac
|
@ -54,7 +54,7 @@ class browserWindow:
|
|||
def displayHeader(self):
|
||||
cursor = 0
|
||||
for header,width in self.columns:
|
||||
self.w.addnstr(0,cursor,header,width)
|
||||
self.w.addnstr(0,cursor,header+" "*width,width)
|
||||
self.w.addstr(1,cursor,"-"*width)
|
||||
cursor += width+1
|
||||
|
||||
|
@ -167,8 +167,7 @@ class bookBrowser(browserWindow):
|
|||
self.refresh()
|
||||
|
||||
class categoryBrowser(browserWindow):
|
||||
columnDefs = [('ID',0,3),
|
||||
('Category',100,None)]
|
||||
columnDefs = [('Category',100,None)]
|
||||
|
||||
|
||||
def refreshCategories(self):
|
||||
|
|
|
@ -117,12 +117,13 @@ def browseMenu():
|
|||
def catMenu():
|
||||
(my,mx)=stdscr.getmaxyx()
|
||||
w=curses.newwin(10,40,(my-10)/2,(mx-40)/2)
|
||||
b = browser.categoryBrowser(w)
|
||||
b.refreshCategories()
|
||||
c = browser.categoryBrowser(w)
|
||||
c.refreshCategories()
|
||||
c.sortByColumn('category')
|
||||
hb.commands=browser_commands
|
||||
hb.refresh()
|
||||
b.eventLoop()
|
||||
b.clear()
|
||||
c.eventLoop()
|
||||
c.clear()
|
||||
|
||||
|
||||
m = [("Browse Library", browseMenu),
|
||||
|
|
Loading…
Reference in New Issue