1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3
# This file is in the public domain
6
# This is your preferences dialog.
8
# Define your preferences in
9
# data/glib-2.0/schemas/net.launchpad.trophyinfo.gschema.xml
10
# See http://developer.gnome.org/gio/stable/GSettings.html for more info.
14
from gettext import gettext as _
17
from gi.repository import Gio # pylint: disable=E0611
19
from accomplishments.gui.base.PreferencesDialog import PreferencesDialog
22
gettext.textdomain('trophyinfo')
23
logger = logging.getLogger('trophyinfo')
26
class PreferencesTrophyinfoDialog(PreferencesDialog):
28
__gtype_name__ = "PreferencesTrophyinfoDialog"
30
def finish_initializing(self, builder): # pylint: disable=E1002
31
"""Set up the preferences dialog"""
32
super(PreferencesTrophyinfoDialog, self).finish_initializing(builder)
34
# Bind each preference widget to gsettings
35
settings = Gio.Settings("net.launchpad.trophyinfo")
36
widget = self.builder.get_object('example_entry')
37
settings.bind("example", widget, "text", Gio.SettingsBindFlags.DEFAULT)
39
# Code for other initialization actions should be added here.