[Glade-users] Glade3 and more windows
- From: phracek at redhat.com (Petr Hracek)
- Subject: [Glade-users] Glade3 and more windows
- Date: Thu, 21 Feb 2013 14:11:13 +0100
Hi,
I have a short question:
I have glade3 (libglade file which contains 5 windows - not dialogs)
From Python I would like to have one python file per one window like
mainWindow.py will have mainWindow (from glade)
In my source devel-assistant.py code I am using:
gladeFile = "devel-assistants.glade"
class mainWindow(object):
builder = Gtk.Builder()
builder.add_from_file(gladeFile)
self.mainWin = builder.get_object("mainWindow")
self.pathWin = builder.get_object("pathWindow")
handlers = { "on_nextBtn_clicked": self.nextWindow }
def nextWindow(self):
self.mainWin.hide()
self.pathWin.show()
When some signals are defined in window "pathWindow" (second window)
in that case it shown me messages like:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/gi/overrides/Gtk.py", line
357, in _full_callback
raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_prevPathBtn_clicked not found
It means that all signals should be defined in mainWindow class?
How should I handle that errors?
It should be one python file per one glade file?
Thanks for answers.
--
S pozdravem / Best regards
Petr Hracek
Red Hat Czech s.r.o.
BaseOS Core Services Brno
Email: phracek at redhat.com
Web: www.cz.redhat.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]