Questions tagged [gtkbuilder]
76 questions
11
votes
3 answers
How to repeatedly show a Dialog with PyGTK / Gtkbuilder?
I have created a PyGTK application that shows a Dialog when the user presses a button.
The dialog is loaded in my __init__ method with:
builder = gtk.Builder()
builder.add_from_file("filename")
builder.connect_signals(self)
self.myDialog =…

Julian
- 994
- 1
- 9
- 19
11
votes
3 answers
Using custom widgets with glade / Gtkbuilder
I'm developing an application with Gtk and Glade. My impression is that it's common practice to create a subclass of GtkWindow for your main window, but I'm stuck on how I would construct my subclass from a GtkBuilder definition. Does anyone know…

Masterofpsi
- 769
- 6
- 17
6
votes
1 answer
Dialog breaks when using GtkBuilder to automatically connect signals, but works when manually connecting signals
I want to have a dialog window where some buttons close the dialog and others don't. The way I do this is by using the response signal from the Gtk.Dialog to call emit_stop_by_name('response') on the dialog. (If someone knows of a better way of…

dumbmatter
- 9,351
- 7
- 41
- 80
6
votes
2 answers
GtkBuilder and "names"
I've been trying to get the "names" of all GtkWidgets in a GtkBuilder object.
I've managed to get all objects from the builder object via gtk_builder_get_objects() and store them in a GSList.
However, when I use gtk_widget_get_name() on the gobjects…

seininn
- 411
- 5
- 13
5
votes
2 answers
What are the steps to convert from using libglade to GtkBuilder? (Python)
I have a small project that uses libglade and use the following to load the xml file:
self.gladefile = "sdm.glade"
self.wTree = gtk.glade.XML(self.gladefile)
self.window = self.wTree.get_widget("MainWindow")
if (self.window):
…

lfaraone
- 49,562
- 17
- 52
- 70
5
votes
1 answer
Custom Gtk Widget with template UI
I've created a custom Gtk Widget with a template, and I want to use it on other Gtk Builder file.
What I've done:
Wrote a .ui file with
Wrote widget source code (.c/.h)
when I create it with…

Victor Aurélio
- 2,355
- 2
- 24
- 48
5
votes
0 answers
Unable to set translate domain for gtk builder file, GTK+ 2
I want to internationalize my gtk+2 app. I can do it if i've strings in source code(_("String")). I extracted all strings from .ui file using the xgettext. It's OK. I translated it.
I want to set text domain for my interface file…

poxip
- 909
- 8
- 25
4
votes
1 answer
How to write an extended gtk.CellRendererText() to have an image beside the text
I am doing a simple file browser in python and GtkBuilder. I am using a Treeview that has one TreeViewColumn with cells that are rendered like:
self.cell = gtk.CellRendererText()
As I mentioned I am creating a file browser. So I want to have a…

dlock
- 9,447
- 9
- 47
- 67
4
votes
2 answers
Connecting Signals with Perl and GtkBuilder
I'm trying to figure how to access a widget from within a signal handler.
I've got a label called "lblVerify" that I just want to change the text to "verified" when I click on the button. I know I need to use something like Gtk2::Label->set_text…

Chad P
- 143
- 5
4
votes
1 answer
How to reuse a widget tree from a glade file with GtkBuilder?
i want to populate a gtk.notebook on-the-fly. everytime a user opens a file, a new notebook-tab is generated. pretty straight forward. my problem is, that i use glade to build the ui and the notebook-tab should have a child widget tree…

Fookatchu
- 7,125
- 5
- 28
- 26
4
votes
1 answer
How to get avoid assertion failure when loading gtk About dialog box?
I've programmed a software gui using glade and gtk. The main window has an About button. When I click on the button for the first time, the GtkAboutDialogBox runs perfectly. The action area is correctly bound to the events. But when I close it and…

C--
- 16,393
- 6
- 53
- 60
4
votes
1 answer
gtk.Builder, container subclass and binding child widgets
I'm trying to use custom container widgets in gtk.Builder definition files. As far as instantiating those widgets, it works great:
#!/usr/bin/env python
import sys
import gtk
class MyDialog(gtk.Dialog):
__gtype_name__ = "MyDialog"
if…

Dimitri Tcaciuc
- 5,053
- 5
- 20
- 22
3
votes
2 answers
How can I prevent the menu bar delay?
In every GTK 3 application I have seen there is a delay of about one second before the menu bar appears when an application is launched. I also have this problem with the application I'm currently working on. Is there a way to prevent this delay?

August Karlstrom
- 10,773
- 7
- 38
- 60
3
votes
1 answer
ruby glade3/gtkbuilder example
I'm trying to use glade3 with Ruby, but unfortunately examples of this are few and far between. Looking at what's available, I've come up with the following code, but there's still something missing, as the window does not display. There doesn't…

paul88888
- 336
- 5
- 13
3
votes
4 answers
pygtk gtk.Builder.connect_signals onto multiple objects?
I am updating some code from using libglade to GtkBuilder, which is supposed to be the way of the future.
With gtk.glade, you could call glade_xml.signal_autoconnect(...) repeatedly to connect signals onto objects of different classes corresponding…

poolie
- 9,289
- 1
- 47
- 74