1
by D Sandeep Reddy
First complete version of Spellathon |
1 |
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
|
2 |
### BEGIN LICENSE
|
|
2
by D Sandeep Reddy
commit before release |
3 |
# Copyright (C) 2012 D Sandeep Reddy d.sreddy1992@gmail.com
|
4 |
# This program is free software: you can redistribute it and/or modify it
|
|
5 |
# under the terms of the GNU General Public License version 3, as published
|
|
6 |
# by the Free Software Foundation.
|
|
7 |
#
|
|
8 |
# This program is distributed in the hope that it will be useful, but
|
|
9 |
# WITHOUT ANY WARRANTY; without even the implied warranties of
|
|
10 |
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
|
|
11 |
# PURPOSE. See the GNU General Public License for more details.
|
|
12 |
#
|
|
13 |
# You should have received a copy of the GNU General Public License along
|
|
14 |
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
1
by D Sandeep Reddy
First complete version of Spellathon |
15 |
### END LICENSE
|
16 |
||
17 |
# This is your preferences dialog.
|
|
18 |
#
|
|
19 |
# Define your preferences in
|
|
20 |
# data/glib-2.0/schemas/net.launchpad.spellathon.gschema.xml
|
|
21 |
# See http://developer.gnome.org/gio/stable/GSettings.html for more info.
|
|
22 |
||
23 |
from gi.repository import Gio # pylint: disable=E0611 |
|
24 |
||
25 |
import gettext |
|
26 |
from gettext import gettext as _ |
|
27 |
gettext.textdomain('spellathon') |
|
28 |
||
29 |
import logging |
|
30 |
logger = logging.getLogger('spellathon') |
|
31 |
||
32 |
from spellathon_lib.PreferencesDialog import PreferencesDialog |
|
33 |
||
34 |
class PreferencesSpellathonDialog(PreferencesDialog): |
|
35 |
__gtype_name__ = "PreferencesSpellathonDialog" |
|
36 |
||
37 |
def finish_initializing(self, builder): # pylint: disable=E1002 |
|
38 |
"""Set up the preferences dialog"""
|
|
39 |
super(PreferencesSpellathonDialog, self).finish_initializing(builder) |
|
40 |
||
41 |
# Bind each preference widget to gsettings
|
|
42 |
settings = Gio.Settings("net.launchpad.spellathon") |
|
43 |
widget = self.builder.get_object('example_entry') |
|
44 |
settings.bind("example", widget, "text", Gio.SettingsBindFlags.DEFAULT) |
|
45 |
||
46 |
# Code for other initialization actions should be added here.
|