def main(): """ Where everything start. """ locale.setlocale(locale.LC_ALL, '') got_locales = False locales_path = None for (fr_locale_path, locales_path) in LOCALE_PATHS: print "Looking for locales in '%s' ..." % (fr_locale_path) if os.access(fr_locale_path, os.R_OK): print "Will use locales from '%s'" % (locales_path) got_locales = True break if not got_locales: print "WARNING: Locales not found" else: for module in (gettext, gtk.glade): module.bindtextdomain('paperwork', locales_path) module.textdomain('paperwork') gobject.threads_init() config = PaperworkConfig() config.read() main_win = MainWindow(config) main_win.actions['reindex'][1].do() gtk.main() print "Good bye"
def main(): """ Where everything start. """ init_logging() set_locale() GObject.threads_init() try: config = PaperworkConfig() config.read() main_win = mainwindow.MainWindow(config) mainwindow.ActionRefreshIndex(main_win, config).do() Gtk.main() finally: logger.info("Good bye")
def main(): """ Where everything start. """ check_module_versions() set_locale() GObject.threads_init() try: config = PaperworkConfig() config.read() main_win = mainwindow.MainWindow(config) mainwindow.ActionRebuildIndex(main_win, config).do() Gtk.main() finally: workers.halt() print "Good bye"