Fix Gtk deprecation Widget.reparent
This commit is contained in:
parent
831c7f9c66
commit
4d0e86a2e8
@ -175,7 +175,8 @@ class PaperFrame(Gtk.Box):
|
|||||||
|
|
||||||
self.paper_grid.show_all()
|
self.paper_grid.show_all()
|
||||||
# Shift the grid from glade toplevel window to this box
|
# Shift the grid from glade toplevel window to this box
|
||||||
self.paper_grid.reparent(self)
|
self.paper_grid.get_parent().remove(self.paper_grid)
|
||||||
|
self.add(self.paper_grid)
|
||||||
# need to get rid of glade toplevel now that we are done with it.
|
# need to get rid of glade toplevel now that we are done with it.
|
||||||
self.top.destroy()
|
self.top.destroy()
|
||||||
|
|
||||||
|
@ -701,7 +701,8 @@ class DetachedWindow(ManagedWindow):
|
|||||||
self.gramplet.detached_width = size[0]
|
self.gramplet.detached_width = size[0]
|
||||||
self.gramplet.detached_height = size[1]
|
self.gramplet.detached_height = size[1]
|
||||||
self.gramplet.detached_window = None
|
self.gramplet.detached_window = None
|
||||||
self.gramplet.reparent(self.grampletbar)
|
self.notebook.remove(self.gramplet)
|
||||||
|
self.grampletbar.add(self.gramplet)
|
||||||
ManagedWindow.close(self, *args)
|
ManagedWindow.close(self, *args)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@ -246,7 +246,8 @@ class GrampletWindow(ManagedWindow):
|
|||||||
# add gramplet:
|
# add gramplet:
|
||||||
if self.gramplet.pui:
|
if self.gramplet.pui:
|
||||||
self.gramplet.pui.active = True
|
self.gramplet.pui.active = True
|
||||||
self.gramplet.mainframe.reparent(self.window.vbox)
|
self.gramplet.mainframe.get_parent().remove(self.gramplet.mainframe)
|
||||||
|
self.window.vbox.add(self.gramplet.mainframe)
|
||||||
self.window.connect('response', self.handle_response)
|
self.window.connect('response', self.handle_response)
|
||||||
self.show()
|
self.show()
|
||||||
# After we show, then we hide:
|
# After we show, then we hide:
|
||||||
@ -310,7 +311,8 @@ class GrampletWindow(ManagedWindow):
|
|||||||
expand = self.gramplet.gstate == "maximized" and self.gramplet.expand
|
expand = self.gramplet.gstate == "maximized" and self.gramplet.expand
|
||||||
column = pane.columns[col]
|
column = pane.columns[col]
|
||||||
parent = self.gramplet.pane.get_column_frame(self.gramplet.column)
|
parent = self.gramplet.pane.get_column_frame(self.gramplet.column)
|
||||||
self.gramplet.mainframe.reparent(parent)
|
self.gramplet.mainframe.get_parent().remove(self.gramplet.mainframe)
|
||||||
|
parent.add(self.gramplet.mainframe)
|
||||||
if self.gramplet.pui:
|
if self.gramplet.pui:
|
||||||
self.gramplet.pui.active = self.gramplet.pane.pageview.active
|
self.gramplet.pui.active = self.gramplet.pane.pageview.active
|
||||||
for gframe in stack:
|
for gframe in stack:
|
||||||
|
Loading…
Reference in New Issue
Block a user