~ubuntu-app-review-contributors/ubuntu-app-reviews/easydownloader

« back to all changes in this revision

Viewing changes to easydownloader/PreferencesEasydownloaderDialog.py

  • Committer: App Bot
  • Author(s): Francisco Gómez
  • Date: 2012-05-15 21:22:33 UTC
  • Revision ID: appbot@holba.ch-20120515212233-t61tuuwp7t1kj1xc
Tags: 0.1
Initial 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.easydownloader.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('easydownloader')
 
17
 
 
18
import logging
 
19
logger = logging.getLogger('easydownloader')
 
20
 
 
21
from easydownloader_lib.PreferencesDialog import PreferencesDialog
 
22
 
 
23
class PreferencesEasydownloaderDialog(PreferencesDialog):
 
24
    __gtype_name__ = "PreferencesEasydownloaderDialog"
 
25
 
 
26
    def finish_initializing(self, builder): # pylint: disable=E1002
 
27
        """Set up the preferences dialog"""
 
28
        super(PreferencesEasydownloaderDialog, self).finish_initializing(builder)
 
29
 
 
30
        # Bind each preference widget to gsettings
 
31
        settings = Gio.Settings("net.launchpad.easydownloader")
 
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.