1
# -*- coding: utf-8 -*-
3
# This file is in the public domain
8
from python_name.helpers import get_builder
11
from gettext import gettext as _
12
gettext.textdomain('project_name')
14
class dialog_camel_case_nameDialog(gtk.Dialog):
15
__gtype_name__ = "dialog_camel_case_nameDialog"
18
"""Special static method that's automatically called by Python when
19
constructing a new instance of this class.
21
Returns a fully instantiated dialog_camel_case_nameDialog object.
23
builder = get_builder('dialog_camel_case_nameDialog')
24
new_object = builder.get_object('dialog_python_name_dialog')
25
new_object.finish_initializing(builder)
28
def finish_initializing(self, builder):
29
"""Called when we're finished initializing.
31
finish_initalizing should be called after parsing the ui definition
32
and creating a dialog_camel_case_nameDialog object with it in order to
33
finish initializing the start of the new dialog_camel_case_nameDialog
36
# Get a reference to the builder and set up the signals.
37
self.builder = builder
38
self.builder.connect_signals(self)
40
def ok(self, widget, data=None):
41
"""The user has elected to save the changes.
43
Called before the dialog returns gtk.RESONSE_OK from run().
47
def cancel(self, widget, data=None):
48
"""The user has elected cancel changes.
50
Called before the dialog returns gtk.RESPONSE_CANCEL for run()
55
if __name__ == "__main__":
56
dialog = dialog_camel_case_nameDialog()