Handle non-object (function) gramplets' active setting

svn: r14172
This commit is contained in:
Doug Blank 2010-01-29 23:56:47 +00:00
parent 4aea0543b2
commit 53358c2179

View File

@ -223,6 +223,7 @@ class GrampletWindow(ManagedWindow.ManagedWindow):
gramplet.detached_height) gramplet.detached_height)
self.window.add_button(gtk.STOCK_HELP, gtk.RESPONSE_HELP) self.window.add_button(gtk.STOCK_HELP, gtk.RESPONSE_HELP)
# add gramplet: # add gramplet:
if self.gramplet.pui:
self.gramplet.pui.active = True self.gramplet.pui.active = True
self.gramplet.mainframe.reparent(self.window.vbox) self.gramplet.mainframe.reparent(self.window.vbox)
self.window.connect('response', self.handle_response) self.window.connect('response', self.handle_response)
@ -288,6 +289,7 @@ class GrampletWindow(ManagedWindow.ManagedWindow):
column = viewpage.columns[col] column = viewpage.columns[col]
parent = self.gramplet.viewpage.get_column_frame(self.gramplet.column) parent = self.gramplet.viewpage.get_column_frame(self.gramplet.column)
self.gramplet.mainframe.reparent(parent) self.gramplet.mainframe.reparent(parent)
if self.gramplet.pui:
self.gramplet.pui.active = self.gramplet.viewpage.active self.gramplet.pui.active = self.gramplet.viewpage.active
for gframe in stack: for gframe in stack:
gramplet = viewpage.frame_map[str(gframe)] gramplet = viewpage.frame_map[str(gframe)]
@ -1182,8 +1184,6 @@ class GrampletView(PageView):
self._popup_xy[0], self._popup_xy[1], 0) self._popup_xy[0], self._popup_xy[1], 0)
else: else:
self.drop_widget(self.widget, gramplet, 0, 0, 0) self.drop_widget(self.widget, gramplet, 0, 0, 0)
#if g.pui:
# g.pui.update()
else: else:
print "Can't make gramplet of type '%s'." % name print "Can't make gramplet of type '%s'." % name