Questions tagged [pygtk]

PyGTK is the Python binding for the GTK+ widget library.

PyGTK lets you easily create programs with a graphical user interface using the Python programming language and the GTK+ library. GTK+ provides all kinds of visual elements and utilities, and is the official toolkit of the GNOME Desktop.

PyGTK applications are multiplatform and able to run, unmodified, on Linux, Windows, MacOS X and other platforms.

For more information, see the Wikipedia page of PyGTK.

2238 questions
7
votes
1 answer

python pygtk windows 7 64 bit

I have been working with pygtk on linux for some time.I just want to make my app more distributable. Now I have used pygtk for 32 bit, but now I'd like to use pygtk for 64bit using pygtk 64bit. I have downloaded the all in one installer. I have…
LUser
  • 1,127
  • 4
  • 23
  • 39
7
votes
3 answers

pygtk+glade+localization

Default locale in my system (Linux) - en_US. When I change locale to russian (LANG=ru_RU ./show_form.py), python string "hello to me" shows correctly (in console), other (glade form) - in english. (LANG=ru_RU.utf-8 ./show_form.py - same…
huan-kun
  • 195
  • 8
7
votes
2 answers

How can I change the font size in GTK?

Is there an easy way to change the font size of text elements in GTK? Right now the best I can do is do set_markup on a label, with something silly like: lbl.set_markup("%s" % text) This 1) requires me to set the…
Claudiu
  • 224,032
  • 165
  • 485
  • 680
7
votes
1 answer

A sorted and filtered treemodel in Python Gtk+3..?

I am trying to get a treemodel (a liststore in fact) that can be filtered and also sorted. I have the following piece of code self.modelfilter = self.liststore.filter_new() self.modelfilter.set_visible_func(\ …
Vijay Murthy
  • 841
  • 2
  • 9
  • 19
7
votes
3 answers

How do I develop and create a self-contained PyGTK application bundle for MacOS, with native-looking widgets?

I have read that it is possible to build GTK+ on MacOS X. I know that it's possible to create a bundle of a GTK+ application on MacOS. I also know that it's possible to create widgets that look sort of native. However, searching around I am not…
Glyph
  • 31,152
  • 11
  • 87
  • 129
7
votes
1 answer

Python Window-positioning?

I tried to open a new window at the same position as another window. My Code: window2.set_position(window1.get_position()) But it doesn't work.
MarcoQu
  • 73
  • 1
  • 3
7
votes
1 answer

Webkit threads with PyGObject on Gtk3

I am trying to load a webkit view on a different thread than main thread for gtk. I see the example PyGTK, Threads and WebKit I slightly modify for support PyGObject and GTK3: from gi.repository import Gtk from gi.repository import Gdk from…
shakaran
  • 10,612
  • 2
  • 29
  • 46
7
votes
1 answer

Why order of buttons and default button change with the user executing a PyGTK/GTK program?

I'm debugging a user experience bug in a PyGTK program (although the question will probably be applicable to GTK as well), and suddenly realized that the bug is 'triggered' depending on the user executing the program. I reduced the issue to a very…
Ender
  • 529
  • 1
  • 3
  • 14
7
votes
1 answer

multiline gtk entry in pygtk

I know there is a PyGTK class for a single-line entry, but what about multi-line entries (like entering a description of an item)? I've searched through the web, but didn't find anything.
Gonzo
  • 1,533
  • 16
  • 28
6
votes
1 answer

display leading zero in a gtk.SpinButton

i'd like to have a leading zero in a spinbutton in order to always have two digits displayed. adj_hour = gtk.Adjustment(int(time.strftime("%H")),0,24,1,1) entry_hour = gtk.SpinButton() entry_hour.set_adjustment(adj_hour) problem is that…
jkd
  • 1,327
  • 14
  • 29
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
1 answer

pygtk window with box that ignores all X(mouse)events (passes them through)

I'd like to do the following: Create a fullscreen, always on top pygtk window with a webkit widget displaying some html, but with a box that is completely transparent, so that the windows below are visible. (This seems to be possible: Is it possible…
Rumex
  • 165
  • 6
6
votes
1 answer

refresh drawing area in gtk

I have a bunch of drawing areas (they are actually cairo surfaces, but I don't think it matters too much) in a scrolled window, and I would like to refresh the drawings. However, when I redraw the images, they are not shown till I scroll the window…
v923z
  • 1,237
  • 5
  • 15
  • 25
6
votes
1 answer

What does gobject.type_register() do?

In PyGTK, what does gobject.type_register() do? The documentation merely says registers the specified Python class as a PyGTK type Well, duh. What does registering a class as a PyGtk type do?
Nathan
  • 5,272
  • 2
  • 26
  • 28
6
votes
3 answers

Getting py2exe to work with zope.interface

I have a Python app based on Twisted and PyGTK. Twisted itself depends on zope.interface, and I don't import it directly. Unfortunately, when I try to run my app, the following error ends up in the error log: Traceback (most recent call last): …
detly
  • 29,332
  • 18
  • 93
  • 152