1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3
# This file is in the public domain
6
"""this dialog adjusts values in gsettings
9
from gi.repository import Gtk # pylint: disable=E0611
11
logger = logging.getLogger('qreator_lib')
13
from . helpers import get_builder, show_uri, get_help_uri
15
class PreferencesDialog(Gtk.Dialog):
16
__gtype_name__ = "PreferencesDialog"
19
"""Special static method that's automatically called by Python when
20
constructing a new instance of this class.
22
Returns a fully instantiated PreferencesDialog object.
24
builder = get_builder('PreferencesQreatorDialog')
25
new_object = builder.get_object("preferences_qreator_dialog")
26
new_object.finish_initializing(builder)
29
def finish_initializing(self, builder):
30
"""Called while initializing this instance in __new__
32
finish_initalizing should be called after parsing the ui definition
33
and creating a PreferencesDialog object with it in order to
34
finish initializing the start of the new PerferencesQreatorDialog
37
Put your initialization code in here and leave __init__ undefined.
40
# Get a reference to the builder and set up the signals.
41
self.builder = builder
42
self.ui = builder.get_ui(self, True)
44
# code for other initialization actions should be added here
46
def on_btn_close_clicked(self, widget, data=None):
49
def on_btn_help_clicked(self, widget, data=None):
50
show_uri(self, "ghelp:%s" % get_help_uri('preferences'))