pygtk

update table in gtk

I have window that contains a table on screen, now I want to attach a widget to that table I use gtk_table_attach(GTK_TABLE(table), label, ...) the function is correct and it runs without any error but table does not respond to that line I mean there is no change on my table, I think I need something to tell that table update it self...

Requesting information from the user inside a GTK main loop

Hello, I am learning Python by building a simple PyGTK application that fetches data from some SVN repositories, using pysvn. The pysvn Client has a callback you can specify that it calls when Subversion needs authentication information for a repository. When that happens, I would like to open a dialog to ask the user for the credential...

Setting opacity on a PyGTK label

Is there a way to make a PyGTK widget partly transparent, so that the widgets behind it can be seen through it? Specifically I'm trying to do this on a label, for typographic effect; I don't want to change the color instead, as it may not look right on all themes. ...

Pyinotify doesn't run with pygtk

Hi everyone, I'm newbie in python and I'm trying to use pyinotify with a GUI interface using pygtk. I have two classes, my gtk class which doesn't do much, only displays stuff, and a class that handles the monitoring. When I run them separately they do their work but when I try to load the gtk class from the other one, it only runs the ...

Can't embed correctly Window in PyGTK with Socket

I'm following the the tutorial on PyGTK socket where you embed a xterm window to another application. I downloaded the file from here: http://www.pygtk.org/pygtk2tutorial/examples/socket.py When I run it following this: http://faq.pygtk.org/index.py?req=show&file=faq19.015.htp I get two different results: On Ubuntu Karmic Koala ...

List available languages for PyGTK UI strings

I'm cleaning up some localisation and translation settings in our PyGTK application. The app is only intended to be used under GNU/Linux systems. One of the features we want is for users to select the language used for the applications (some prefer their native language, some prefer English for consistency, some like French because it so...

create a gtk.window under a gtk.widget

Hi all, I wanna show a gtk.Window under a gtk.widget. But I don't know how to retrieve the gtk.widget's coordinates for my gtk.window. Anyone knows ? Thanks. ...

How do I get a GtkTreePath or GtkTreeIter to the last row in a GtkTreeModel?

I want to get a GtkTreePath or GtkTreeIter to the last row in a GtkTreeModel, but GtkTreeModel does not have a function for that. I'll be happy with answers and examples in either C, or Python, or both ;). ...

How refresh a DrawingArea in PyGTK ?

I have an interface created with Glade. It contains a DrawingArea and buttons. I tried to create a Thread to refresh every X time my Canva. After a few seconds, I get error messages like: "X Window Server 0.0", "Fatal Error IO 11" Here is my code : import pygtk pygtk.require("2.0") import gtk import Canvas import threading as T impor...

Making pygtksourceview work in windows

So, I'm trying to get gtksourceview python bindings work under windows (I'm developing a cross platform gtk application that shows code, so gtksourceview seemed like a natural choice). I have pygtk installed and working (I followed the instructions in http://www.pygtk.org/downloads.html) I tried the instructions in http://projects.gnom...

PyGTK Progress Bar of commands.getstatusoutput.

HI! I've been trying to get a PyGTK Progress Bar working by tracking the progress of rsync. TO rsync I'm using commands.getstatusoutput. Does anyone has an idea how to track the progress of rsync and display it on the PyGTK progress bar? Thank you! ...

Ubuntu quickly (python/gtk) - how to monitor stdin?

I'm starting to work with Ubuntu's "quickly" framework, which is python/gtk based. I want to write a gui wrapper for a textmode C state-machine that uses stdin/stdout. I'm new to gtk. I can see that the python print command will write to the terminal window, so I assume I could redirect that to my C program's stdin. But how can I get m...

How to make a simple clipboard monitor in python

Hi! I was wondering how to make a simple Clipboard Monitor in python, for GUI I'm using PyGTK. I found gtk.clipboard class and all that but I couldn't find any solution to get the "signals" to trigger the event when the clipboard content has changed :( Any ideas? Thanks you! :) ...

pygtk rename a item on treeview

has anyone know how to rename a item on a gtk.treeview? please help! ...

How do I create a Status Icon / System Tray Icon with custom text and transparent background using Python and GTK?

Here is the code that I have so far to define the icon: icon_bg = gtk.gdk.pixbuf_new_from_file('gmail.png') w, h = icon_bg.get_width(), icon_bg.get_height() cmap = gtk.gdk.Colormap(gtk.gdk.visual_get_system(), False) drawable = gtk.gdk.Pixmap(None, w, h, 24) drawable.set_colormap = cmap gc = drawable.new_gc() drawable.draw_pixbuf(gc, i...

Custom pyGTK button

I would like to create a button that I can control the look of the button using pyGTK. How would I go about doing this? I would like to be able to point to a new image for each 'state' the button is in (i.e. Pressed, mouse over, normal...etc.) ...

How to corelate gtk.ListStore items with my own models

Hello, I have a list of Project objects, that I display in a GTK TreeView. I am trying to open a dialog with a Project's details when the user double-clicks on the item's row in the TreeView. Right now I get the selected value from the TreeView (which is the name of the Project) via get_selection(), and search for that Project by name...

How to force GTK window to stay at a certain width, even when widgets try to expand?

How do I force a GTK window object to stay the same size, even when a table inside of it tries to expand? I've tried using gtk.SHRINK when attaching children to the table, but the TextViews within the table still keep expanding to way beyond an acceptable width and expanding the window along with it. ...

alpha blending in gtk

How can you draw semi-transparent primitives such as filled polygons to a Drawable in GTK? Its 2010, and I google isn't finding how to put an alpha value into a colour for me. What am I missing? ...

PyGTK: Manually render an existing widget at a given Rectangle? (TextView in a custom CellRenderer)

Hello! I am trying to draw a TextView into the cell of a TreeView. (Why? I would like to have custom tags on text, so they can be clickable and trigger different actions/popup menus depending on where user clicks). I have been trying to write a customized CellRenderer for this purpose, but so far I failed because I find it extremely di...