~thomas-deruyter-3/qreator/qreator

« back to all changes in this revision

Viewing changes to qreator/PreferencesQreatorDialog.py

  • Committer: David Planella
  • Date: 2012-05-17 08:12:32 UTC
  • Revision ID: david.planella@ubuntu.com-20120517081232-uq92gvxfji2v68gi
First working version ready for release

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.