~jonobacon/ubuntu-accomplishments-daemon/ubuntu-accomplishments-daemon

« back to all changes in this revision

Viewing changes to accomplishments/gui/PreferencesTrophyinfoDialog.py

  • Committer: Jono Bacon
  • Date: 2012-04-08 22:11:10 UTC
  • Revision ID: jono@ubuntu.com-20120408221110-3ihxpctu5kryp460
Creating ubuntu package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
 
### BEGIN LICENSE
3
 
# This file is in the public domain
4
 
### END LICENSE
5
 
 
6
 
# This is your preferences dialog.
7
 
#
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.
11
 
 
12
 
 
13
 
import gettext
14
 
from gettext import gettext as _
15
 
import logging
16
 
 
17
 
from gi.repository import Gio # pylint: disable=E0611
18
 
 
19
 
from accomplishments.gui.base.PreferencesDialog import PreferencesDialog
20
 
 
21
 
 
22
 
gettext.textdomain('trophyinfo')
23
 
logger = logging.getLogger('trophyinfo')
24
 
 
25
 
 
26
 
class PreferencesTrophyinfoDialog(PreferencesDialog):
27
 
 
28
 
    __gtype_name__ = "PreferencesTrophyinfoDialog"
29
 
 
30
 
    def finish_initializing(self, builder): # pylint: disable=E1002
31
 
        """Set up the preferences dialog"""
32
 
        super(PreferencesTrophyinfoDialog, self).finish_initializing(builder)
33
 
 
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)
38
 
 
39
 
        # Code for other initialization actions should be added here.