gtkbuilder

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 __name__ == "__main__": builder = gtk.Builder() builder.add_from_file("mydialog.glade"...

What are the steps to convert from using libglade to GtkBuilder? (Python)

Hi, 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): self.window.connect("destroy", gtk.main_quit) dic = { "on_button1_clicked" : self.button1_clicked, ...

ruby glade/gtkbuilder example?

hello I was using ruby and glade2 to design the user interface for a while in the new version of glade3 i can use gtkbuilder format to generated xml file instead of libglade. is there any example? i searched google but i had no luck! ...

How do I connect glade signals using GtkBuilder in C#?

In python, I could just do builder.connect_signals(self). It doesn't seem like this method exists in C#, and after looking at the GtkBuilder documentation, it looks like python is the exception, rather than the rule. How would I accomplish the same thing in C#? ...

Glade and static linking

If I'm statically linking a GTK+ program under FreeBSD 8, gtk_builder_add_from_file() suddenly returns with an error: Invalid object type `GtkWindow' How to fix that? With dynamic linking everything works fine. Update: linking is done by: cc -o foobar foo.o bar.o main.o -Wall -pedantic -std=c99 D_THREAD_SAFE -DORBIT2=1 -D_REENTRAN...

In Gtk, when is it better to use Glade/GtkBuilder than native code?

Glade helped me get started on a project quickly, but I've found it harder to maintain in the long run, and I'm thinking about switching it all to native code. In what circumstances would you choose glade, and when would you use native code? ...

Window management with pygtk

I'm having an issue with PyGTK and GTK Builder windows. Here's a simplified version of my code. class GUI: def __init__(self,parent): builder_file = "./ui/window.builder" self.builder = gtk.Builder() self.builder.add_from_file(builder_file) self.window = self.builder.get_object('main') self.builder.connect_signals( ...

How to connect GtkTextView to GtkMenuItem

I'm making a trivial text editor (as an exercise) in GTK using Glade, GtkBuilder, and C. I have an edit menu with Cut, Copy, and Paste as well as a GtkTextView for the text. GtkTextView automatically binds the cut/copy/paste sequences for itself (and even provides menu items if you right click). I want to connect the Cut, Copy, and Pa...

Why does Gtk2::Builder mix up my signals?

I'm having this perl code: #!/usr/bin/perl use warnings; use strict; use Data::Dumper; use Gtk2 '-init'; my $data; my $builder_file = "lists.glade"; my $builder = Gtk2::Builder->new(); $builder->add_from_file( $builder_file ) or die "Couldn't read $builder_file"; $builder->connect_signals( undef ); my $window = $builder->get_...

Where can I find the gtk-builder-convert script?

I've built a small GUI app for work that uses some .glade files for pop-up windows. Recently, the ground beneath me was shifted - my environment was upgraded. Newer pyGTK versions require GTKBuilder and .xml files instead of Glade and .glade files and now my poor app is broken. I need to convert the .glade file to the newer .xml file....

How do I programmatically add a widget to a container created from GtkBuilder?

I've created a window that has some containers and widgets in it, and I want to add a new widget dynamically at run-time to one of the Vboxes in this window. So I have this code, which brings up the window: gtk_builder_add_from_file( g_builder, "window.xml", NULL ); mainwindow = GTK_WIDGET( gtk_builder_get_object( g_builder, "window"...

Python Glade GTKBuilder Checkbutton

How do I find if a GTKBuilder Checkbutton is checked? ...

Using custom widgets with glade / Gtkbuilder

Hi all. 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 how? ...

Can I load a gtkbuilder app into a "parent" gtkbuilder frame?

I am using Glade-3 to build a suite of Gtk applications. The applications are supposed to have a common look-and-feel, and we have decided on a common "frame" that all apps will share, that includes a menu bar, toolbar, status-bar(s), a vertical panel - and a space in the middle that will be filled out by each application. This common ...

c code for gtk+ vs glade generated .glade files

I am new in the field of gtk+ programming. I'm still exploring many options to use. I will be coding in C language. I have the following questions: Which is better? Writing code or using the .glade files generated by glade? Which is better to use? libglade or gtkbuilder? Why is using the build option in glade2 discouraged? ...