~thomas-deruyter-3/qreator/qreator

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# This file is in the public domain
### END LICENSE

import optparse

import gettext
from gettext import gettext as _
gettext.textdomain('qreator')

from gi.repository import GtkClutter
## Needs to be called here, otherwise the GtkChamplain widget needs to be
## explicitly connected to signals and methods defined
GtkClutter.init([])
from gi.repository import Gtk # pylint: disable=E0611

from qreator import QreatorWindow

from qreator_lib import set_up_logging, get_version

def parse_options():
    """Support for command line options"""
    parser = optparse.OptionParser(version="%%prog %s" % get_version())
    parser.add_option(
        "-v", "--verbose", action="count", dest="verbose",
        help=_("Show debug messages (-vv debugs qreator_lib also)"))
    (options, args) = parser.parse_args()

    set_up_logging(options)

def main():
    'constructor for your class instances'
    parse_options()

    # Run the application. 
    window = QreatorWindow.QreatorWindow()
    window.show()
    Gtk.main()