This doesn't work well:
image_log = gtk.Image()
image_log.set_from_file("test.png")
self.out_button = gtk.Button()
self.out_button.add(image_log)
self.err_button = gtk.Button()
self.err_button.add(image_log)
another_box.pack_start(self.out_button, False)
another_box.pack_start(self.err_button, False)
...
Hey everyone,
I'm writing a small html editor in python mostly for personal use and have integrated a gtksourceview2 object into my Python code. All the mayor functions seem to work more or less, but I'm having trouble getting a search function to work. Obvioiusly the GUI work is already done, but I can't figure out how to somehow build...
I want main window to "gray, freeze, stop working", when some other window is opened. Is there some default way to do it? Pretty much the same as gtk.Dialog is working.
EDIT: Currently I'm just replacing all contents by a text line, but I guess there should be better way.
...
Quick question.
I'm using Linux and I want to try making GUI with Python. I've heard about something like Qt, GTK+ and PyGTK but I don't know what they are exactly and what the difference between them is.
Is there any difference on how they work with different DEs like GNOME, KDE, XFCE etc.? Is there any IDE that allows you to create GU...
The problem is basically this, in python's gobject and gtk bindings. Assume we have a class that binds to a signal when constructed:
class ClipboardMonitor (object):
def __init__(self):
clip = gtk.clipboard_get(gtk.gdk.SELECTION_CLIPBOARD)
clip.connect("owner-change", self._clipboard_changed)
The problem is now that, no inst...
So the issue is if the combobox of the row is open (pop'd up) and I update the progress bar value
self.store.set(iter, 2, self.core.progress )
Then the combo box immediately closes, if the update happens a couple of times a second the combobox is useless...
Is there a way to update the progress bar without causing the combobox to c...
i'm doing application that locks the PC using pyGtk, but i have a problem, when i click on the ok button the function of the button should get the time from the textbox, hide the window then sleep for a while, and at last lock the pc using a bash command. but it just don't hide.
and here is the complete program
...
I'm writing an app for gnome which will support plugins.
Each plugin will contain a glade file and a python script.
How do I embed the glade file from the plugin in the main interface.
Plugin glade files should contain a page/tab and will be embeded into a notebook in the main interface.
please help.
...
How to get list opened windows in PyGTK or GTK or other programming language? in Ubuntu?
edit:
i want get list paths opened directories on desktop!
...
Hi,
I would like to remove border on a gtk.Button and also set its size fixed. How can I accomplish that?
My button looks like that:
b = gtk.Button()
b.set_relief(gtk.RELIEF_NONE)
Thanks!
p.d: I'm using pygtk
...
I'm trying to write something very similar to an IM client (for learning purposes only). I don't know how to write the Chat window. I want to display Users picture, name and message as any other IM client. The problem is that I don't know which gtk widget is best suited for it. Currently I use TextView and TextBuffers but I can't display...
The basic code that I have so far is below. How do I thread gtk.main() so that the code after Display is initialized runs asynchronously?
import pygtk
pygtk.require("2.0")
import gtk
class Display():
def __init__(self):
self.fail = "This will fail to display"
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
window....
I am learning Python and PyGTK.
I'm trying to write a Twitter client. Which widget is best suited for displaying the Tweets (Timeline). I can do it easily with textview but it doesn't support sub widgets to display users image.
Tried using TreeView but it seems to be an overkill and is too complex.
I'm using Glade
...
I am just starting to learn Glade with pyGTK. Since Glade makes XML files instead of actual python code, is there a good way to start a project with Glade and then hand code more or tweak it?
Are there times or reasons it would be preferrable to hand code all of it instead of starting with glade?
...
Hi,
In my application, we want to present the user with a typical spreadsheet/table (OO.O/Excel-style), and then pull out the values and do something with them internally.
Is there a preexisting widget for PyGTK that does this? The PyGTK FAQ mentions GtkGrid, but the link is dead and I can't find a tarball anywhere.
...
Presenting symptom: autogen disables the build of slideshowshuffle and pythonconsole, reporting "no python support." Platform is Ubuntu 9.04, Jaunty Jackalope; Gnome 2.26.1.
Log extract:
checking for a Python interpreter with version >= 2.3... python
checking for python... /usr/bin/python
checking for python version... 2.6
checking fo...
How do I combine:
button.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("Green"))
button.modify_bg(gtk.STATE_ACTIVE, gtk.gdk.color_parse("Green"))
button.modify_bg(gtk.STATE_SELECTED, gtk.gdk.color_parse("Green"))
etc.
Into a one-liner wildcard covering all of the possible states (See Doc)
...
I'm working on making a py2exe version of my app. Py2exe fails at copying some
modules in. My original app loads .png files fine, but the exe version does not:
Traceback (most recent call last):
File "app.py", line 1, in <module>
from gui.main import run
File "gui\main.pyc", line 14, in <module>
File "gui\controllers.pyc", li...
When I do the following in my setup file,
windows=[
{
'script': 'gulhane.py',
'icon_resources': [(1, "icon.ico")]
}
],
Python crashes and I am unable to run the script using python setup.py py2exe.
So, I do not use the icon_resources field in "windows" but I add the file in the form of a data_file,
data_files=[
('gui', [
'gui/icon.i...
Please take a look at this picture:
http://www.uzbozor.com/uploads/Screenshot.png
I want to create a list container as shown in that picture. How do i do it in pygtk using glade? What is that item called?
Thanks
...