Convert to GtkBuilder from Libglade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Decibel Audio Player |
Fix Released
|
Low
|
Anonym25712 |
Bug Description
since libglade is long deprecated, and totally gone in gtk3 converting to gtkbuilder makes sense,
im not an expert coder but i tried everything i could think of and everything seems to still be fine, i couldnt figure out how to make a patch, so i did it as follows,
1, open all .glade files in glade 3.8
Edit -> Preferences and Select GtkBuilder then save, (gtk-builder-
2, run this command in the src directory
find . -name "*.py" -print | xargs sed -i 's/get_
3, change tools/init.py and gui/window.py as follows
tools/init.py
def loadGladeFile(file, root=None):
""" Load the given Glade file and return the tree of widgets """
builder = gtk.Builder()
if root is None:
builder.
return builder
else:
builder.
widget = builder.
return widget, builder
gui/window.py
def __init__(self, resFile, container, modName, title, defaultWidth, defaultHeight):
""" Constructor """
self.wTree, self.wBuilder = tools.loadGlade
if tools.prefs.
def getWidget(self, name):
""" Return the widget with the given name """
return self.wBuilder.
4, in decibel-
decibel-
#gtk.glade.
#gtk.glade.
5, uninstall python-glade2 and watch decibel still run fine
Fixed on trunk.