I am coding a desktop application which shows contents from text file in a gtk.label, i update that text file, say once in every 15 mints. Are are there any methods to make the application to read the text file in constant intervals and display it without restarting the window
...
I am trying to get an image to appear next to a menu item but it isn't working.
In order to make this as simple as possible, I have created a very simple example below that highlights the problem:
import pygtk
pygtk.require('2.0')
import gtk
class MenuExample:
def __init__(self):
window = gtk.Window()
window.set_...
I am writting a PyGTK application. I am using the glade interface designer for layouts.
I want to know if there is any standard way of naming a Widget object.
eg : For a button called "Configure" how should I name it ? eg : ConfigureBt, ButtonConfigure, ConfigureButton, etc
I want the app to be accepted in the default ubuntu/debian/gn...
In my code I've connected to the WebView's load-finished event. The particular callback function takes a webview object and frame object as arguments. Then I tried executing get_dom_document() on the frame & the webview objects respectively. It seems this method doesn't exist for those objects...
PS: i started with the tips i got here h...
I'm using the libnotify library to display a notification in Ubuntu. I would ideally like to display a battery of some sort (since my app is a battery meter).
The types of icons I can use are:
a URI specifying the icon file name (e.g. file://path/to/my-icon.png)
a 'stock' icon name. One that would succeed in a call to gtk_icontheme_...
I have a pygtk application and would like to provide a text-based fallback mode for it. When mporting gtk without a X display available I see only a GtkWarning on stderr but no exception I could take advantage of and checking for DISPLAY seems like an ugly hack. How can I implement this?
...
Is there an easy way to request that a GTK widget have a minimum width/height? I know you can do it on the column of a TreeView, but is it available for general widgets?
...
After following the official tutorial here: tutorial
I'm still having issues adding rows/creating a TreeIter object. Here's what my code looks like:
builder = gtk.Builder()
self.treeview = builder.get_object("treeview")
self.treestore = gtk.TreeStore(str)
self.treeview.set_model(self.treestore)
self.id = gtk.TreeV...
I use GtkAboutDialog and everything works fine except the close button of this widget. All other buttons works fine, I don't know how but all buttons have default callbacks and they create and destroy the windows.
But the "Close" button of GtkAboutDialog widget does not work. I can not even see it's widget. So, can I access it?
[CLARIF...
I need to open a new window from my applications main window. This new window need to be
modal, I need to be able to get a result from the modal window based on user interaction with it.
I have figured out how to make the window modal. But I can't figure out how to return a result from the modal window and pass it back to the main windo...
I've gotten a sortable treeview working. Clicking on the columns makes it sort by ascending order, and clicking it again makes it sort by descending order. However, if I click on the column header a third time, it goes to some "unsorted" state, instead of back to ascending. I connected a function to the clicked signal of the column, and ...
hello there
i am trying to do this script:
PY WYSIWYG
and it says i need gtk and webkit.
i think i got the right stuff is this what i need:
gtk
WEBKIT
so i downloaded the webkit but i got a folder but installer or install information do i move it into the python folder or what do i do
Thanks
...
many programmers import both gtk and pygtk in this way:
import gtk
import pygtk
I have created a simple program using only gtk and it works:
import gtk
window = gtk.Window()
window.set_size_request(800, 700)
window.set_position(gtk.WIN_POS_CENTER)
window.connect("destroy", gtk.main_quit)
button = gtk.Button("Vai")
button.set_size_r...
What's the point of doing the Gtk::Main::iteration() on the last two lines of the answer to this question? I'm using pygtk, so the equivalent question would be, why do gtk.main_iteration_do()? Isn't the main loop that's running already taking care of this?
...
I have written this simple script in python:
import gtk
window = gtk.Window()
window.set_size_request(800, 700)
window.show()
gtk.main()
now I want to load in this window an image from web ( and not from my PC ) like this:
http://www.dailygalaxy.com/photos/uncategorized/2007/05/05/planet_x.jpg
How can I do that ?
P.S. I don't wan...
I am trying to add a global shortcut to a gtk.MenuItem which has a sub menu.
Here is my code:
import pygtk, gtk
import keybinder
dlg = gtk.Dialog('menu test')
dlg.set_size_request(200, 40)
menubar = gtk.MenuBar()
menubar.show()
menuitem = gtk.MenuItem('foo')
menuitem.show()
menubar.append(menuitem)
mitem = gtk.MenuItem('bar')
mitem....
I'm attempting to write a Gnome applet using Python and pygtk. Sadly all sources of information that I have been able to find are from 2004 or older, and while the general structures presented are still valid, most of the particulars are out-of-date. Even the example applets I've found through web searches no longer work.
Does anyone kn...
Can I create a window without this topbar? :
I want a window like this:
...
What is the most used of these library and why ?
What are the differences ?
...
What signal can I catch to detect when a column changes size in a gtk.TreeView? I can't seem to find it in the docs.
...