Logo Search packages:      
Sourcecode: xdiagnose version File versions  Download package

AboutXDiagnoseDialog.py

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Bryce Harrington <bryce@ubuntu.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


import gtk

from helpers import get_builder

import gettext
from gettext import gettext as _
gettext.textdomain('xdiagnose')

00034 class AboutXDiagnoseDialog(gtk.AboutDialog):
    __gtype_name__ = "AboutXDiagnoseDialog"

00037     def __new__(cls):
        """Special static method that's automatically called by Python when 
        constructing a new instance of this class.
        
        Returns a fully instantiated AboutXDiagnoseDialog object.
        """
        builder = get_builder('AboutXDiagnoseDialog')
        new_object = builder.get_object("about_xdiagnose_dialog")
        new_object.finish_initializing(builder)
        return new_object

00048     def finish_initializing(self, builder):
        """Called while initializing this instance in __new__

        finish_initalizing should be called after parsing the ui definition
        and creating an AboutXDiagnoseDialog object with it in order to
        finish initializing the start of the new AboutXDiagnoseDialog
        instance.
        
        Put your initialization code in here and leave __init__ undefined.
        """
        # Get a reference to the builder and set up the signals.
        self.builder = builder
        self.builder.connect_signals(self)

        # Code for other initialization actions should be added here.


if __name__ == "__main__":
    dialog = AboutXDiagnoseDialog()
    dialog.show()
    gtk.main()

Generated by  Doxygen 1.6.0   Back to index