Skip to content

Commit

Permalink
moved initLogging to application.py
Browse files Browse the repository at this point in the history
follw-up to #6
  • Loading branch information
hnesk committed Oct 12, 2020
1 parent 283a704 commit 34034dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ocrd_browser/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pkg_resources
from typing import List
from ocrd_utils import initLogging
from ocrd_browser.util.gtk import ActionRegistry
from ocrd_browser.ui import MainWindow, AboutDialog, OpenDialog
from ocrd_browser.view import ViewRegistry
Expand All @@ -13,6 +14,7 @@ def __init__(self) -> None:
flags=Gio.ApplicationFlags.HANDLES_OPEN)
self.actions = ActionRegistry(for_widget=self)
self.view_registry = ViewRegistry.create_from_entry_points()
initLogging()

def do_startup(self) -> None:
Gtk.Application.do_startup(self)
Expand Down
2 changes: 0 additions & 2 deletions ocrd_browser/ui/window.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from gi.repository import Gtk, GdkPixbuf, Gio, GObject, GLib
from ocrd_models import OcrdFile
from ocrd_utils import initLogging

from ocrd_browser.model import Document
from ocrd_browser.view import ViewRegistry, View, ViewImages
Expand All @@ -24,7 +23,6 @@ class MainWindow(Gtk.ApplicationWindow):

def __init__(self, **kwargs: Any):
Gtk.ApplicationWindow.__init__(self, **kwargs)
initLogging()
# noinspection PyCallByClass,PyArgumentList
self.set_icon(GdkPixbuf.Pixbuf.new_from_resource("/org/readmachine/ocrd-browser/icons/icon.png"))
self.views: List[View] = []
Expand Down

0 comments on commit 34034dd

Please sign in to comment.