# coding: utf-8
import wx
+from ..search import search_authors_raw
+
+_search_types = ['start', 'substring', 'full']
class SearchPanel(wx.Panel):
def SearchAuthors(self, event):
search_authors = self.search_authors.GetValue()
- search_substr = self.search_substr.GetSelection()
+ search_substr = _search_types[self.search_substr.GetSelection()]
search_case = self.search_case.GetValue()
+ if search_case is False:
+ search_case = None
+ search_authors_raw(search_authors, search_substr, search_case)
#! /usr/bin/env python
import sys
+
+from m_librarian.db import open_db
from m_librarian.wx.Application import Application
def main():
if len(sys.argv) > 1:
sys.exit("This program doesn't accept any arguments")
+ open_db()
app = Application()
app.MainLoop()