I'm trying hard to find out how to use the file chooser button properly. Reading the reference manual on GtkFileChooserButton, GtkFileChooserDialog and GtkFileChooser didn't help so far. I've tried connecting to the undocumented signal file-set of GtkFileChooserButton and calling get_filename() from here, but it seems to behave quite unr...
I'm creating a network animator (similar to nam, if you have used it before).
Basically, I have nodes represented as small dots on a GTK+ DrawingArea, and I update the positions of these nodes and redraw the DrawingArea in a loop.
The resulting animation is fast, but not smooth (there's a lot of flicker). This is probably because I fil...
I'm new to GUI programming with python and gtk, so this is a bit of a beginners question.
I have a function that is called when a button is pressed which does various tasks, and a TextView widget which I write to after each task is completed. The problem is that the TextView widget doesn't update until the entire function has finished. ...
I have an AboutDialog box made in glade, but the Close button doesn't work. I don't know how to connect this button to a separate function, since it sits in a widget called dialog-action_area.
Another problem is if I use the close button created by the window manager, I can't open it again because it has been destroyed. How can I cha...
Is there any way to set a widget's opacity in PyGTK?
I know there's a function for windows:
gtk.Window.set_opacity(0.85)
but there seems to be no equivalent for arbitrary widgets.
Anyone have any ideas?
Thanks in advance for your help.
...
I have a simple pygtk app using urllib2, what changes should I make to add working twisted code?
The pbgtk2.py example it's confusing
...
I want to show a dialog box with an OK button that is disabled for a short period of time (perhaps 5 seconds). The other buttons would still need to be responsive during this time.
...
I need to use Gtk2 for a project. I will be using python/ruby for it. The problem is that packing seems kind of mystical to me. I tried using a VBox so that I could have the following widgets in my window ( in the following order ):
menubar
toolbar
text view/editor control
I've managed to "guess" my way with pack_start and get the la...
I need to change the display text of a MenuItem. Is there any way of doing this without removing the MenuItem and then adding another one with a different text?
...
I have a Window with a TextView, and I would like to perform some actions when the user pastes some text.
I would also like to know what signal(s) should I catch in order to perform something when the user presses a key inside the TextView.
Can you tell me what are the signals I must connect?
...
I'm having some problems threading my pyGTK application. I give the thread some time to complete its task, if there is a problem I just continue anyway but warn the user. However once I continue, this thread stops until gtk.main_quit is called. This is confusing me.
The relevant code:
class MTP_Connection(threading.Thread):
def ...
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,
...
Is there a way to force a gtk.Window object to ignore the Window Manager's show/hide commands, such as "iconify" and "show desktop?"
I'm trying to create a persistent window, stuck to the desktop, that will not disappear with all other windows when the desktop is exposed.
EDIT: I guess what I'm wondering specifically is whether or not ...
Hi, i'm trying to make a GTK application in python where I can just draw a loaded image onto the screen where I click on it. The way I am trying to do this is by loading the image into a pixbuf file, and then drawing that pixbuf onto a drawing area.
the main line of code is here:
def drawing_refresh(self, widget, event):
#clear the...
I have a problem with threads in pygtk. My application consist of a program that downloads pictures off the internet and then displays it with pygtk. The problem is that in order to do this and keep the GUI responsive, I need to use threads.
So I got into a callback after the user clicked on the button "Download pictures" and I call th...
I have a Combobox with over a hundred of entries and it is very awkward to skim through with out a scrollbar.
I want to do exactly what is in the picture. With the scrollbar on the right so It'd be easier to move through the entries. I used gtk.Combo to make that example but the problem is that is deprecated.
I need an example of ho...
When my gtk application loads, the first item on the toolbar is automatically selected (it is highlighted, it is pressed when it hit enter). This is just a minor problem, but I would prefer for nothing to be selected by default.
Here is some basic sample code:
import gtk
import gtk.glade
window_tree = gtk.glade.XML('testtoolbar.glade'...
I want to add a widget to the bottom of a scrolled window, then scroll to the bottom of that window. However, the window thinks it is already at the bottom, because the widget has still not been allocated. I.e., this returns -1:
widget.get_allocation().y
Why is this? Is there any way to force the widget to be allocated immediately, so...
When python raise an exception in the middle of a pygtk signal handling callback, the exception is catched by the gtk main loop, its value printed and the main loop just continue, ignoring it.
If you want to debug, with something like pdb (python -m pdb myscript.py), you want that when the exception occure PDB jump on it and you can sta...
I've searched on this, but nothing has what I'm looking for.
http://www.mail-archive.com/[email protected]/msg10529.html -- Nobody answered him. This is exactly what I'm experiencing. When I set the foreground on a graphics context, it doesn't seem to actually change.
I've been through the tutorial and FAQ, but neither say much. They e...