~thomas-deruyter-3/qreator/qreator

« back to all changes in this revision

Viewing changes to qreator/PreferencesQreatorDialog.py

  • Committer: David Planella
  • Date: 2012-01-15 07:02:18 UTC
  • Revision ID: david.planella@ubuntu.com-20120115070218-ce81y8a9icgsom54
Initial project creation with Quickly!

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.qreator.gschema.xml
 
10
# See http://developer.gnome.org/gio/stable/GSettings.html for more info.
 
11
 
 
12
from gi.repository import Gio # pylint: disable=E0611
 
13
 
 
14
import gettext
 
15
from gettext import gettext as _
 
16
gettext.textdomain('qreator')
 
17
 
 
18
import logging
 
19
logger = logging.getLogger('qreator')
 
20
 
 
21
from qreator_lib.PreferencesDialog import PreferencesDialog
 
22
 
 
23
class PreferencesQreatorDialog(PreferencesDialog):
 
24
    __gtype_name__ = "PreferencesQreatorDialog"
 
25
 
 
26
    def finish_initializing(self, builder): # pylint: disable=E1002
 
27
        """Set up the preferences dialog"""
 
28
        super(PreferencesQreatorDialog, self).finish_initializing(builder)
 
29
 
 
30
        # Bind each preference widget to gsettings
 
31
        settings = Gio.Settings("net.launchpad.qreator")
 
32
        widget = self.builder.get_object('example_entry')
 
33
        settings.bind("example", widget, "text", Gio.SettingsBindFlags.DEFAULT)
 
34
 
 
35
        # Code for other initialization actions should be added here.