segadude Jun 23rd, 2013 (edited) 32 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
- ### BEGIN LICENSE
- # This file is in the public domain
- ### END LICENSE
- from gi.repository import Gtk # pylint: disable=E0611
- from brandsonicweb_lib.helpers import get_builder
- import locale
- from locale import gettext as _
- class QuicksitesDialog(Gtk.Dialog):
- __gtype_name__ = "QuicksitesDialog"
- def __new__(cls):
- """Special static method that's automatically called by Python when
- constructing a new instance of this class.
- Returns a fully instantiated QuicksitesDialog object.
- builder = get_builder('QuicksitesDialog')
- new_object = builder.get_object('quicksites_dialog')
- return new_object
- def finish_initializing(self, builder):
- """Called when we're finished initializing.
- finish_initalizing should be called after parsing the ui definition
- and creating a QuicksitesDialog object with it in order to
- finish initializing the start of the new QuicksitesDialog
- # Get a reference to the builder and set up the signals.
- self.builder = builder
- self.ui = builder.get_ui(self)
- self.google = self.builder.get_object("google")
- def on_btn_ok_clicked(self, widget, data=None):
- """The user has elected to save the changes.
- Called before the dialog returns Gtk.ResponseType.OK from run().
- def on_btn_cancel_clicked(self, widget, data=None):
- """The user has elected cancel changes.
- Called before the dialog returns Gtk.ResponseType.CANCEL for run()
- if __name__ == "__main__":
- dialog = QuicksitesDialog()
RAW Paste Data