I would like to include a rich text editor in a pygtk drawing area for an application i am developing. The editor ( a small resizable widget ) should be able to move around the drawing area like a rectangle. I am not sure how to start as I am pretty new to PyGTK. thank you !
...
Hi
I have this OSS Project called Monocaffe connections manager which uses the Gtk.VteTerminal widget from PyGTK. A nice feature is that it allows the users to send commands to different servers' consoles (cluster mode) using a Gtk.TextView for the input.
The way I send key strokes to each Gtk.VteTerminal is by using the feed_child met...
I have to mount a WebDav location and wait for the operation to be finished before to proceed (it's a script).
So I'm using the library in this way:
location = gio.File("dav://server.bb")
location.mount_enclosing_volume(*args,**kw) # The setup is not much relevant
location.get_path() # Returns None because it's not yet mounted since the...
I'm working on a PyGTK app with some Buttons that, when clicked, give a text entry dialog, then set the text on the button to whatever was entered in the box. The problem is that if the text is longer than the button can show, the button changes size to accomodate. How do I keep GTK Buttons from resizing when the text changes?
...
I have a two column TreeView attached to a ListStore. Both columns are CellRenderCombo combo boxes.
When the user selects an entry in the first box, I need to dynamically load a set of options in the second.
For example, the behavior I want is:
On row 0, the user selects "Alphabet" in the first column box.
The second column box ...
You can know if the event stack is empty calling the gtk.events_pending() method, but I want to manipulate the pending events and filter it before the next gtk loop cycle, this data must be stored somewhere, but where?
Thanks.
...
I'm trying to make a very large file editor (where the editor only stores a part of the buffer in memory at a time), but I'm stuck while building my textview object. Basically- I know that I have to be able to update the text view buffer dynamically, and I don't know hot to get the scrollbars to relate to the full file while the textvie...
I've writing a Gnome window-switcher applet in PyGtk+ using menu items to represent the different applications running on the desktop. One thing I'd like to do is to activate the menu item under the cursor when I hover over the menubar. I can connect to the 'enter-notify-event' on the menu bar, but I don't know what to when it is trigger...
Hi,
Does anybody know how to create a text field using PyGTK that only accepts number. I am using Glade to build my UI.
Cheers,
...
I have to display some data in a treeview. The "real" data model is huge and I cannot copy all the stuff in a TreeStore, so I guess I should use a GenericTreeModel to act like a virtual treeview. Btw the first column is the classic icon+text style and I think I should declare a column with a CellRendererPixbuf (faq sample), but I'm not s...
The official tutorial hasn't been updated in years. Is there a more up-to-date one elsewhere?
...
How do I find if a GTKBuilder Checkbutton is checked?
...
I've got some code in a class that extends gtk.TreeView, and this is the init method. I want to create a tree view that has 3 columns. A toggle button, a label, and a drop down box that the user can type stuff into. The code below works, except that the toggle button doesn't react to mouse clicks and the label and the ComboEntry aren't d...
Hi everyone!
Is there a way to find out which icon to use for a given MIME type, using GTK/pygtk?
I know about gio.File(filename).query_info("standard::icon").get_icon(), but I need to find the icon without having to read the file.
...
Hello!
In my PyGTK application I currently use 'editable' to make cells editable. But since my cell contents sometimes are really really large I want to ask the user for changes in a new window when he doubleclicks on a cell. But I could not find out how to hook on double-clicks on specific cellrenderers - I don't want to edit the whole...
I'm trying to create a multiline button with PyGTK. I have a label added to my subclass of gtk.Button, but I'm having trouble sizing the label to the button. If the label makes it's own size, there is no text wrapping even with label.set_line_wrap(True) because the label simply resizes beyond the bounds of the button. I would set the siz...
I have a simple gtk.TreeView with a gtk.ListStore model and set_reorderable(True), I want to catch the signal/event emited when the user reorder through drag&drop the list, but the documentation does not help much:
"The application can listen to these changes by connecting to the model's signals"
So I tried to connect the model (ListS...
I tried to install the following dependencies for PyGTK 2.16.0 (the Python GIMP Tool Kit) on Mac OS 10.6.3:
glib 2.25.5
gettext-0.18
libiconv-1.13.1
When I tried to install glib, I got the following error message:
gconvert.c:55:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv
The libiconv web page tal...
I'm having a problem with the code below. When I run it the progress bar will pulse for around 10 secs as meant to and then move on to downloading and will show the progress but when finished it will not move on to the next step it just locks up.
import sys
import time
import pygtk
import gtk
import gobject
import threading
import urlli...
The following PyGTk code, gives a combo-box without an active item.
This serves a case where we do not want to have a default,
and force the user to select.
Still, is there a way to have the empty combo-bar show something like:
"Select an item..."
without adding a dummy item?
import gtk
import sys
say = sys.stdout.write
def cb_chan...