Re: [pygtk] #gtk channel on irc.freenode.org

2007-09-29 Thread David M. Cook
On Sat, Sep 29, 2007 at 10:29:15AM -0700, Steven Brown wrote: > Use #gtk+ And there's also #pygtk, #kiwi. Dave Cook ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/py

Re: [pygtk] How to add a keyboard shortcut to a widget?

2007-04-15 Thread David M. Cook
On Sun, Apr 15, 2007 at 06:12:15AM -0300, Gabriel Falcão wrote: >self.desktop = gtk.gdk.get_default_root_window() >self.deskEvent = gtk.gdk.Event(gtk.gdk.BUTTON_PRESS) >gtk.binding_entry_add_signal(self.deskEvent, gtk.keysyms.F12, > gtk.keysyms.Control_L, 'button-press-even

Re: [pygtk] How to add a keyboard shortcut to a widget?

2007-04-14 Thread David M. Cook
On Sat, Apr 14, 2007 at 11:49:47PM -0300, Gabriel Falcão wrote: > I want to "connect" a keyboard keys combo ato emit a signal in some widget. > Using glade its easy, mas i cant use glade. > How i add this feature directly from code? > > im using pygtk2.8 See http://www.async.com.br/faq/pygtk/ind

Re: [pygtk] Best pattern for keyboard accelerators in dialog

2007-01-28 Thread David M. Cook
On Fri, Jan 26, 2007 at 08:49:51AM +, Richard Taylor wrote: > I would like to provide keyboard accelerators that move the focus to the > appropriate Widget. I want to underline a letter in each label and link > Alt- to switch to the Edit widget alongside the Label. I would like > these acce

Re: [pygtk] handling events

2006-10-22 Thread David M. Cook
On Sun, Oct 22, 2006 at 09:57:47AM +0200, Pascal DUCHATELLE wrote: > I could add a status bar to each notebook page but this is no elegent way... I'd put the status bar handling code in its own module. Then import that module wherever it's needed. If you want to reduce coupling in your code, y

Re: [pygtk] PyGTK .app bundle for MacOS X?

2006-10-18 Thread David M. Cook
On Wed, Oct 18, 2006 at 09:29:27PM -0700, David M. Cook wrote: > Both of them also have a tendency to > overdo dependencies IMO. I should take that back about dependencies. Darwinports does a pretty straightforward job with this: david-cooks-computer:~ davidcook$ sudo port install p

Re: [pygtk] PyGTK .app bundle for MacOS X?

2006-10-18 Thread David M. Cook
On Wed, Oct 18, 2006 at 11:39:51PM +0200, Wolfgang Keller wrote: > I'm looking for a way that allows a clueless Python scripting dilettant like > me to build a double-clickable .app bundle of a PyGTK application for MacOS > X. > > Any ideas? Such as e.g. a pre-made "empty" .app bundle that incl

Re: [pygtk] Wait until a thread is ended

2006-09-28 Thread David M. Cook
On Thu, Sep 28, 2006 at 09:16:20PM +0200, Adolfo González Blázquez wrote: > I would like to know if someone can point me a solution to make a > function run as a separate thread, and wait until it is ended, without > blocking the gui. > In my application, i'm getting a long file listing using glo

Re: [pygtk] event handling

2006-09-03 Thread David M. Cook
On Sun, Sep 03, 2006 at 08:37:13AM +0200, Pascal DUCHATELLE wrote: > dic = {"on_mainWindow_destroy" : gtk.main_quit, > "on_hello_key_press_event" : self.hellorecompile} > followed by this: > self.wTree.signal_autoconnect(dic) > Is there a way to use the second so

Re: [pygtk] The "row-changed" in gtk.TreeModel Signal

2006-08-07 Thread David M. Cook
On Mon, Aug 07, 2006 at 09:10:26AM -0700, Shehnaaz Kagdi wrote: > 2) Whenever this happens - > self.liststore.append(["john","smith", > "blabla","bla"]) > I would like the treeview to display the latest > data/row in the liststore You shouldn't need to call row_changed after an append. Is your

Re: [pygtk] button queue

2006-07-31 Thread David M. Cook
On Mon, Jul 31, 2006 at 07:11:56AM -0700, Mr Jason Cupp wrote: > I am pretty new to pygtk. I wrote a program where there are several buttons that are connected to a method that plays different wav files using pymedia. My problem is that if I keep pressing buttons while a wav is being played, it

Re: [pygtk] Implementing command history with a gtk.Entry

2006-07-25 Thread David M. Cook
On Mon, Jul 24, 2006 at 10:47:44AM -0700, N. French wrote: > My problem is: how do I catch the up/down arrow keypresses? I was I know of two ways to catch the up/down arrows: - connect to the key-press event - Create your own Entry subclass with up/down arrow keybindings See the FAQ for the l

Re: [pygtk] Bug in TreeView.scroll_to_cell()

2006-07-13 Thread David M. Cook
On Thu, Jul 13, 2006 at 03:21:02PM +0200, Alessandro Pellizzari wrote: > It works pretty good until circa row 900, showing the cell at the top of > the treeview, then it begins going wrong, showing cell 930 (or similar) > at the top and not scrolling down, even for cell, e.g., 1200, which goes > o

Re: [pygtk] Setting gtk.TreeViewColumn width

2006-07-12 Thread David M. Cook
On Tue, Jul 11, 2006 at 01:26:35PM -0600, Adam Olsen wrote: > I guess I should have specified that I looked there. I can only see a way > to set a max width, a min width, and a fixed width. I'd just like to set > the width, but allow the user to be able to resize it as well. Yeah, you're right,

Re: [pygtk] Setting gtk.TreeViewColumn width

2006-07-11 Thread David M. Cook
On Tue, Jul 11, 2006 at 11:00:50AM -0600, Adam Olsen wrote: > Is there a way to set gtk.TreeViewColumn widths programmatically? Yes. Take a look at the API reference at pygtk.org. Dave Cook ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.a

Re: [pygtk] Need help with Tree/List view

2006-06-10 Thread David M. Cook
On Fri, Jun 09, 2006 at 03:31:49PM -0400, Hussein Vastani wrote: > Now my question is. How do I indicate to the user which cell in the row is > editable. If he/she has selected a particular row, then there is no clear This seems to be a problem with a lot of themes that use a really thin, hard

Re: [pygtk] how to install pyGTK

2006-05-30 Thread David M. Cook
On Tue, May 30, 2006 at 09:14:13AM -0700, arya jain wrote: > am not able to install the graphic tool kit pyGTK from the site You need to install the following: Gtk+/Win32 Development Environment: http://gladewin32.sourceforge.net/modules/news/ pycairo and pygtk: http://www.mapr.ucl.ac.b

Re: [pygtk] gtk.TreeModelRowIter.next

2006-05-16 Thread David M. Cook
On Tue, May 16, 2006 at 10:54:40PM -0700, Brian wrote: > It says: > > When there are no more rows left the StopIteration exception is raised. > > But I can't find out any more about the StopIteration. ie. where is it > defined, where do you import it from. I can't find it in any of the > gtk.Co

Re: [pygtk] New Gtk/PyGtk Book

2006-04-27 Thread David M. Cook
On Tue, Apr 25, 2006 at 11:47:26AM -0700, [EMAIL PROTECTED] wrote: > I'd definitely love to see a Python/Glade book. Is there a better way of > quickly developing linux apps? Add in Kiwi and let Gazpacho mature some more, and I'd say no, but I've never really given PyQt or wxPython much of a cha

Re: [pygtk] PyGTK on Mac OS X

2006-04-07 Thread David M. Cook
On Thu, Apr 06, 2006 at 04:13:13PM -0400, Pierre Thibault wrote: > PyGTK is mostly used by Linux users, is it the case? I think it works fairly well on win32 as well. On OS X an X Windows System (X11) server is required as gtk2 has not been ported. This is included on the OS X install disc, and

Re: [pygtk] PyGTK on Mac OS X

2006-04-06 Thread David M. Cook
On Wed, Apr 05, 2006 at 05:26:27PM -0400, Pierre Thibault wrote: >*** Could not run GLIB test program, checking why... Try setting PKG_CONFIG_PATH, e.g. env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig ./configure Dave Cook _

[pygtk] gtk.binding_entry_add with existing object

2006-03-25 Thread David M. Cook
I want to do something like what's described in http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq23.034.htp except I want to do it for existing entry objects loaded from a glade file. Is this possible? TIA, Dave Cook ___ pygtk mailing list

Re: [pygtk] how to get selected rows at the time user selects a row ('cursor-changed' does not do it)

2006-02-06 Thread David M. Cook
On Mon, Feb 06, 2006 at 10:04:51PM +0200, Nikos Kouremenos wrote: > thanks Dave. your recipe (hehe Cook :-*) works. /me wonders if PyGTK > REF says it, else needs to be added in a FAQ It's in the FAQ: http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq13.011.htp Dave Cook _

Re: [pygtk] how to get selected rows at the time user selects a row ('cursor-changed' does not do it)

2006-02-05 Thread David M. Cook
On Sun, Feb 05, 2006 at 03:48:17PM +0200, Nikos Kouremenos wrote: > so which signal to connect to so when user has a row selected and goes > to select another one (with SHIFT) when he presses the row I can get > both 2? (cursor-changed returns 1) Use the selection objects "changed" signal. The G

Re: [pygtk] Adding columns to a TreeView/TreeStore?

2006-02-05 Thread David M. Cook
On Wed, Feb 01, 2006 at 03:26:11AM +1100, John Pye wrote: > The issue appears to be that there is no way of adding columns to a > *TreeStore* -- so I must copy the data from the existing TreeStore to a > new one with an extra column, then re-set the model for the TreeView to > the new TreeStore.

Re: [pygtk] Getting selected rows.

2005-10-06 Thread David M. Cook
On Thu, Oct 06, 2005 at 03:15:21PM +0200, Robert Bigaignon wrote: > PS : I use PyGTK 1.99, so unfortunately get_selected_rows() is not > available. The trick with that old version was to visit each selected row with TreeSelection.selected_foreach() and save it in a list. But you really should up

Re: [pygtk] New version of the PyGTK Reference Manual

2005-09-21 Thread David M. Cook
On Tue, Sep 20, 2005 at 10:35:03AM -0700, John Finlay wrote: > gobject.spawn_async() functions, The docs say Eventually you must call g_spawn_close_pid() on the child_pid, in order to free resources which may be associated with the child process. Looks like something left over from the C d

Re: [pygtk] Undo and Redo

2005-09-04 Thread David M. Cook
On Sun, Sep 04, 2005 at 09:51:11AM +0200, N. Volbers wrote: > Look at "Documentation" and then at the "Developer's Guide". This is a > very nice introduction to an undo mechanism that basically works like > this: If you call an undoable function, then it must return an > undo-tuple which contain

Re: [pygtk] what is equal to a list box?

2005-09-01 Thread David M. Cook
On Thu, Sep 01, 2005 at 01:15:42PM -0500, nephish wrote: > is always down. like what i think a list box is, but cant seem to find that. > you know, just a box with a list of items that can be selected in it. You want a TreeView with a ListStore. See the tutorial. Dave Cook

Re: [pygtk] progress bar question

2005-08-21 Thread David M. Cook
On Sun, Aug 21, 2005 at 11:20:21PM +0200, dimitri pater wrote: > def progress_timeout(pbobj): > new_val = pbobj.pbar.get_fraction() + 0.01 > if new_val > 1.0: > new_val = 0.0 > pbobj.pbar.set_fraction(new_val) You need to execute a main loop iteration here. while gtk.events_pending(): gtk.ma

Re: [pygtk] Installing pygtk on OS X

2005-08-12 Thread David M. Cook
On Fri, Aug 12, 2005 at 02:23:13PM -0400, Jared Dziedzic wrote: > I'm having a lot of issues installing pygtk on OS X (10.3). I was wondering > how everyone else installed it. Fink ends up messing up python by installing > two versions (regular python for Mac, then python on X11). Don't instal

Re: [pygtk] Documentation recommendations

2005-08-12 Thread David M. Cook
On Fri, Aug 12, 2005 at 07:15:01AM -0400, Andrew Conkling wrote: > OK, Dave, I'll check it out; thanks. What would it do in, say, Xfce? If the default doesn't work, you can fall back on the Netscape('firefox') or Netscape('mozilla') browser objects, e.g. # untested code! import webbrowser # web

Re: [pygtk] Documentation recommendations

2005-08-11 Thread David M. Cook
On Thu, Aug 11, 2005 at 05:33:06PM -0400, Andrew Conkling wrote: > chintzy. The only other option of which I can think is some HTML > pages, but I don't know how I'd use them in my program (other than > launching a browser). Well, that might not be so bad. Take a look at the webbrowser module

Re: [pygtk] PyGTK for MacOS X?

2005-08-10 Thread David M. Cook
On Wed, Aug 10, 2005 at 04:35:31PM +0200, Wolfgang Keller wrote: > is there a PyGTK installer for MacOS X available somewhere? I use darwinports to install gtk (but not pygtk), and then just use the setup script in the pygtk tarball. Dave Cook ___ pygt

Re: [pygtk] pyGTK Chapter in new book

2005-08-07 Thread David M. Cook
On Sat, Aug 06, 2005 at 09:22:00PM -0400, Dave Aitel wrote: > http://www.amazon.com/exec/obidos/tg/detail/-/0764596543/ Good job. If you search inside the book for pygtk, you can read a few pages of that section. Dave Cook ___ pygtk mailing list py

Re: [pygtk] sorting in treeView

2005-08-06 Thread David M. Cook
On Sat, Aug 06, 2005 at 04:29:24PM +, Vinay Reddy wrote: > In case of a tie while sorting on a particular column other columns > are considered at all. I want the sorting function to sort based on > the other columns in case of a tie (in the main column). Use a sort function. See the tutoria

Re: [pygtk] Updating the app

2005-07-06 Thread David M. Cook
On Wed, Jul 06, 2005 at 09:23:44AM -0300, Jose de Paula Eufrasio Junior wrote: > I'm making a pygtk app and got several fields wich values are inserted > (like textviews, spinbuttons) and these values can be changed with > values from other widgets on the app. > I'm not very friendly to the idea o

Re: [pygtk] need advises on treeview use for memory puprose

2005-07-05 Thread David M. Cook
On Tue, Jul 05, 2005 at 04:10:25PM +0200, [EMAIL PROTECTED] wrote: > I'm using lot of treeviews. > Is it better in memory purpose to: > 1. use the gtk.treestore as data storage. (have an entry in the model > for each simple type str ... or use a more complex object ?). It's a lot more flexible

Re: [pygtk] gtk.TreeStore with variable column count ?

2005-06-01 Thread David M. Cook
On Wed, Jun 01, 2005 at 08:54:52AM +, Adrian Immler wrote: > how can i create a gtk.TreeStore with a variable count of the columns ? > how can i add/remove columns from a TreeStore ? I don't think it's possible to add/remove columns from an existing store. Instead I would suggest using obj

Re: [pygtk] Detect that all windows are closed

2005-05-29 Thread David M. Cook
On Sun, May 29, 2005 at 09:11:34PM +0200, Calle Erlandsson wrote: > But this create a new problem: When I've closed all the windows the app > is still running because I haven't run the gtk.main_quit(). > How do I solve this problem? The function gtk.window_list_toplevels() may be helpful here.

Re: [pygtk] Adding large amounts of data to a ListStore

2005-05-26 Thread David M. Cook
On Thu, May 26, 2005 at 04:50:35AM -0400, Jody Steele wrote: > self.list.set_sort_func(0, self.__Sort,(column0.get_sort_order,0)) > self.list.set_sort_func(1, self.__Sort,(column1.get_sort_order,1)) > self.list.set_sort_func(2, self.__Sort,(column2.get_sort_order,2)) I'm guessing these sort funcs

Re: [pygtk] Adding large amounts of data to a ListStore

2005-05-26 Thread David M. Cook
On Thu, May 26, 2005 at 04:13:20AM -0400, Jody Steele wrote: > for i in data: > row = (i,data[i].size_str(),data[i].date) > self.iter = self.list.append(row) Has a sort_column_id been set before this point (well, it would have to be if you are reusing the store)? According to the tutorial "O

Re: [pygtk] Adding large amounts of data to a ListStore

2005-05-26 Thread David M. Cook
On Thu, May 26, 2005 at 03:49:23AM -0400, Jody Steele wrote: > Currenty I am using the append() function to insert data into my > ListStore, and that is all fine and dandy except when the dataset is > fairly large (7520 entries in one test). > > It ended up taking about 500 seconds to insert

Re: [pygtk] GNOME Bindings or GTK

2005-05-25 Thread David M. Cook
On Wed, May 25, 2005 at 08:49:17PM -0400, Martin Grondin wrote: > I'm using Glade-2 to create a GUI for a program I'm working on and I was > wondering if the gnome bindings (via import gnome and gnome.ui) are > deprecated. I thought I heard that elsewhere but I am not sure. If they > aren't dep

Re: [pygtk] Inheriting window with widgets

2005-05-18 Thread David M. Cook
On Tue, May 17, 2005 at 06:22:46PM -0400, Samantha wrote: > 2. If #1 is not available, here is what I am trying to do. I have a main > window with a tree on the left side of a window. The tree is in a > table. When the user clicks on a tree widget(?), something happens on > the right side. I have

Re: [pygtk] Signal emitted when a row in TreeView is selected?

2005-05-15 Thread David M. Cook
On Sun, May 15, 2005 at 04:23:37PM +0100, Magnus Therning wrote: > I can't seem to find what signal will be emitted when a row in a > TreeView (with ListStore) is selected. I've tried the following signals: You connect to the TreeView's selected object's "changed" signal, then in your call back yo

Re: [pygtk] ANNOUNCE: Gazpacho 0.5.3

2005-04-12 Thread David M. Cook
On Mon, Apr 11, 2005 at 12:46:51PM -0300, Christian Robottom Reis wrote: > This is Kiwi used to do, what Kiwi2 does, Kiwi2? Where? Dave Cook ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: ht

Re: [pygtk] Is there an automated way to create IconSources/IconSets/IconFactories ?

2004-11-19 Thread David M. Cook
On Thu, Nov 18, 2004 at 11:12:48AM -0500, Chris Lambacher wrote: > I am attempting to use UIManager to generate a ToolBar and a MenuBar. > I want to add icons that are not stock icons, but UIManger requires > that you use stock icons. That means that an IconFactory needs to be > created for the i

Re: [pygtk] Packing widgets inside a Cell

2004-10-27 Thread David M. Cook
On Wed, Oct 27, 2004 at 06:56:19PM -0300, Fernando San Mart?n Woerner wrote: > I need to pack a gtk.Expander inside a cell in a treeview, is this > possible?, Not currently. For any particular widget you want in a cell a CellRenderer needs to be implemented. gtk+ 2.4 has CellRenderers for text

Re: [pygtk] ctree "look" pygtk2.2/gtk2.4

2004-10-21 Thread David M. Cook
On Thu, Oct 21, 2004 at 10:17:44AM -0300, Christian Robottom Reis wrote: > On Thu, Oct 21, 2004 at 02:12:19PM +0100, Stuart Hughes wrote: > > I did see those, but I wanted the style to have the little box with a > > '+' in it for unexpanded nodes and '-' for expanded nodes. Also I > > wanted li

Re: [pygtk] initialize a combo list

2004-10-05 Thread David M. Cook
On Tue, Oct 05, 2004 at 05:12:21PM -0400, Thomas Mills Hinkle wrote: > Okay -- that's what I'd thought. So we return to the problem, > unfortunately. In my case, connecting to the 'changed' signal is too > expensive -- it makes response visibly sluggish while the user types. Yeah, I was thinking

Re: [pygtk] initialize a combo list

2004-10-05 Thread David M. Cook
On Mon, Oct 04, 2004 at 06:22:30AM -0400, Thomas Mills Hinkle wrote: > Will the refiltering really happen automatically if I just make the > function call Entry.get_text() directly? (if so, when does this happen? > If not, I still need to connect the refilter() call to some event) Ah, I remember

Re: [pygtk] initialize a combo list

2004-10-04 Thread David M. Cook
On Mon, Oct 04, 2004 at 05:32:28AM -0400, Thomas Mills Hinkle wrote: > I am using the ComboBoxEntry but I was still hoping for an answer to the > above query -- how to connect to the combo-list popup event. In my case, > I have a very large model which gets filtered based on other > EntryWidgets i

Re: [pygtk] initialize a combo list

2004-10-03 Thread David M. Cook
On Sun, Oct 03, 2004 at 02:43:58PM +0200, Matthias Teege wrote: > I have a lot of combo widgets in a small application. The data for the > combo-list-items come from a database. It is necessary to update the > combo-lists when the user clicks on the combo item. So I try to > connect to the button_

Re: [pygtk] pygtk + glade: code decomposition best practices?

2004-09-30 Thread David M. Cook
On Thu, Sep 30, 2004 at 01:18:04PM +0300, Ruslan wrote: > I would like to ask people using pygtk + glade to share their approach > on code decomposition. For example, there is GUI(made in glade) - > Notebook with different pages containing a lot of widgets that needs to > be connected with signals

Re: [pygtk] Using ListStores for popup menus (ala ComboBoxEntries)

2004-09-15 Thread David M. Cook
On Wed, Sep 15, 2004 at 06:28:37AM -0400, Thomas Mills Hinkle wrote: > Currently, I'm using popup menus in TreeViews as a hack since I can't > pack a ComboBoxEntry into a TreeView. It would be convenient to use the > same TreeModel for both these popup menus and ComboBoxEntries elsewhere > inthe U

Re: [pygtk] CList

2004-09-15 Thread David M. Cook
On Tue, Sep 14, 2004 at 02:37:40PM -0400, Jamey Cribbs wrote: > Every few months, I grab the latest version of pygtk and attempt to > duplicate the CList functionality using TreeView, but to no avail. I > have done a lot of reading, attempted to use > Liststore/TreeModelSort/TreeView combinati

Re: [pygtk] IronPython

2004-09-11 Thread David M. Cook
On Fri, Sep 10, 2004 at 08:16:25AM -0400, Dave Aitel wrote: > Has anyone looked at IronPython? I think you could write a pyGTK that > used (wrapped) the GTK# libraries so all our great pyGTK programs could > run on Mono. http://usefulinc.com/edd/blog/contents/2004/08/24-monoadn-ex/read Dave Cook

[pygtk] Lazy tree implementation

2004-08-19 Thread David M. Cook
Thought I'd share my lazy tree implementation. The idea is that child rows in a tree are not filled in until the user clicks on the expander for that row. Until then, an single unset row is used as a placeholder for the the child rows. http://members.cox.net/davecook/pygtk/LazyTreeStore.py To u

Re: [pygtk] PyGTK for Mac OS X?

2004-08-19 Thread David M. Cook
On Thu, Aug 19, 2004 at 11:31:35AM +0400, Mikhail Sobolev wrote: > I looked around for PyGTK port for Mac OS X, and it looks like such a > thing does not exist (at least, as an official release). Is my > impression correct? Pygtk runs fine under Apple's X11 server http://www.apple.com/macosx/fe

Re: [pygtk] ListStore newbie question

2004-08-18 Thread David M. Cook
On Wed, Aug 18, 2004 at 10:29:10AM -0600, Cristian Prieto wrote: > Yep, I know already about gtk.CellRendererText(), gtk.CellRendererPixbuf > () and gtk.CellRendererToggle() > I need to insert a gtk.ComboBox and a gtk.CheckBox, I guess I need to > pass a list to the gtk.ComboBox in the model a

Re: [pygtk] Tutorial Question...

2004-08-08 Thread David M. Cook
On Sun, Aug 08, 2004 at 05:45:38AM -0400, dave wrote: > Are we supposed to be talking about TreeStore's here instead of liststores? > > I'm currently doing a search on a TreeStore: > for row in treestore: > if row[0]==searchedthing: > return row Here's what I came up with when someone asked

Re: [pygtk] How to get the text from (new style) ComboBoxEntry

2004-07-09 Thread David M. Cook
> Nikos Kouremenos wrote: > >but I couldn't understand [sorry I'm new in the GTK world] how to get > >the text from the selection that the user has finally done! I missing some parts of this thread, so don't know if anyone gave this answer: entry = combo_box_entry.get_child() text = entry.get_t

Re: [pygtk] traversing a TreeView

2004-07-07 Thread David M. Cook
On Wed, Jul 07, 2004 at 01:13:28AM +, Christian Bird wrote: > I've got a question about the best way to iterate over the items in a > TreeView starting with an arbitrary item in the treeview. I'm trying #untested back-of-the-envelope coding! #Uses the gtk standard of returning False on mat

Re: [pygtk] PyGTK2 Tutorial v.2.1

2004-07-07 Thread David M. Cook
On Tue, Jul 06, 2004 at 12:06:28PM -0700, John Finlay wrote: > In addition to receiving comments about tutorial problems, errors and > enhancements, I'm interested in hearing from poeple who have used the > GenericTreeModel. Specifically, I'm interested in what applications > require a custom t

[pygtk] Fun with TreeModelFilter

2004-07-03 Thread David M. Cook
This class solved a problem that has been bothering me for a long time: how to do interactive searches when your store contains only objects. The TreeView wants to access a column of strings to do this. Also, the new ComboBoxEntry can use a TreeModel, but again it wants to access a column directl

Re: [pygtk] Progress Cell Renderer

2004-06-25 Thread David M. Cook
On Fri, Jun 25, 2004 at 04:32:30PM +0200, Lorenzo Gil Sanchez wrote: > I'm not sure what do you mean. There is a bug in GTK+ about having a > CellRendererCombo: > > http://bugzilla.gnome.org/show_bug.cgi?id=139347 > > Wrapping it in pygtk after that would be pretty easy. > > If you mean if we

Re: [pygtk] Progress Cell Renderer

2004-06-24 Thread David M. Cook
On Wed, Jun 23, 2004 at 11:39:21AM -0300, Gustavo Niemeyer wrote: > I haven't found this anywhere, so I thought someone else might > be interested as well. Here is a cell renderer which mimicks > progress bars, based on current gtk+ code. Has anybody done a cell renderer for combo boxes? Dave Co

Re: [pygtk] treeview typeahead

2004-06-11 Thread David M. Cook
On Wed, Jun 09, 2004 at 08:33:27PM +0200, Danny Milosavljevic wrote: > Can this internal search box be called(shown) per code (i.e. on first > keypress, on toolbutton) ? I don't know, I can't find an API for it. You might want to ask for the feature in bugzilla. Dave Cook

Re: [pygtk] Subclassing GtkWidget in PyGTK

2004-06-08 Thread David M. Cook
On Fri, Jun 04, 2004 at 01:35:37PM +0200, Johan Dahlin wrote: > That demonstrates how to subclass a GtkWidget in PyGTK. What about when constructors require arguments? Is this still an issue? Dave Cook ___ pygtk mailing list [EMAIL PROTECTED] http:/

Re: [pygtk] treeview typeahead

2004-06-06 Thread David M. Cook
On Mon, Jun 07, 2004 at 12:36:27AM +0200, Danny Milosavljevic wrote: > Except dead (f.e. acute) chars which modify the next character. > I wonder how to fix that. The built-in search feature (activated with ctrl-f (or ctrl-s with the emacs keybindings)) should be able to handle special characte

Re: [pygtk] MVC and TreeView

2004-06-05 Thread David M. Cook
On Fri, Jun 04, 2004 at 11:11:28PM +0100, Jonathon McKitrick wrote: > > Hi David, > > the tips you gave me were very helpful. I have a working prototype now that > has helped me understand the basics. But what if I want to still have > multiple columns? I'm still not quite sure where those sho

Re: [pygtk] MVC and TreeView

2004-06-04 Thread David M. Cook
On Fri, Jun 04, 2004 at 06:20:04PM +0100, Jonathon McKitrick wrote: > if I have a set of objects and show their properties in a TreeView, is it > better to change the original objects then rebuild the ListStore, or extract the > changes from the ListStore and modify the original objects? Best to

Re: [pygtk] genericCellRenderer and CellEditable...

2004-05-26 Thread David M. Cook
On Mon, May 24, 2004 at 11:42:46PM +0200, Lorenzo Gil Sanchez wrote: > I'm sorry at the moment there is no way to create a CellEditable since > it is a GInterface (not a Class) and you can't implement a GInterface in > pygtk so far. I know it because I wanted to do the same thing as you. > See the

Re: [pygtk] what documentation?

2004-05-17 Thread David M. Cook
On Mon, May 17, 2004 at 08:48:34AM +0200, gabor wrote: > is there a reference like documentation specially for pygtk? Yes, it's linked in the FAQ below: ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyG

Re: [pygtk] Problem with TreeView.scroll_to_cell()

2004-05-07 Thread David M. Cook
On Fri, May 07, 2004 at 03:27:33PM +0200, Igor Stroh wrote: > treeview.scroll_to_cell(path, col, gtk.TRUE, 0.5, 0) Try putting the scroll_to_cell in a idle_add call: gtk.idle_add(treeview.scroll_to_cell, path, col, gtk.TRUE, 0.5, 0) Dave Cook ___ pygt

Re: [pygtk] how to delete a father without kill the children in a TreeStore ?

2004-04-12 Thread David M. Cook
On Tue, Apr 13, 2004 at 02:12:12AM +0200, Riccardo Galli wrote: > I can't figure out how can I (in a nice way) delete a row with children without loose the children, in a TreeStore > a working way would be to recursively copy the children before the parent, > and then delete the parent, but it s

Re: [pygtk] Storing a TreeView

2004-04-03 Thread David M. Cook
On Sat, Apr 03, 2004 at 02:12:28PM +0200, Nemesis wrote: > Hmm, I think that the n.1 is the most simple, but however you have to > cicle the list and rebuild the tree, as far I can see. > I'm not sure I understood n.2, The idea is to subclass TreeStore and override TreeStore.set/set_value (and a

Re: [pygtk] Storing a TreeView

2004-04-03 Thread David M. Cook
On Sat, Apr 03, 2004 at 11:00:40AM +0200, Nemesis wrote: > Hi all, >I'm writing a newsreader with python+pygtk. I'm using a TreeView > in order to show the articles (in a threaded fashion). I'd like to > store the model so I don't have to rebuild the threads every time I > select the group. >

Re: [pygtk] color of selected row in TreeView

2004-03-28 Thread David M. Cook
On Sun, Mar 28, 2004 at 07:08:07PM -0500, Yann Le Boulanger wrote: > I'd like to change the color of selected row in a treeview. > As CellRenderer and TreeIter are not Widgets, I can't use > style.bg[gtk.STATE_SELECTED] > > Is there a solution ? You can do that for the whole TreeView, but I don'

Re: [pygtk] treeview. how to "non indent" column ?

2004-03-25 Thread David M. Cook
On Fri, Mar 26, 2004 at 12:05:57AM +0100, Riccardo Galli wrote: > Is possible not to "indent" a column in a treeview ? > I draw a picture to explain You can add some xpadding using the "xpad" property of the cell renderer (in the same way you might set background color or font on a cell; see the

Re: [pygtk] Non-homogenous treeview

2004-03-16 Thread David M. Cook
On Tue, Mar 16, 2004 at 06:19:19AM -0600, David G. Mackay wrote: > That's all very good, but if I want to view a parent with 20 columns, > and then a child with 10 distinct columns, then it's going to get pretty > unwieldy. If each node must have different types in each position, you're going t

Re: [pygtk] Non-homogenous treeview

2004-03-15 Thread David M. Cook
On Mon, Mar 15, 2004 at 10:26:37PM -0600, David G. Mackay wrote: > Is there any way to implement a treeview (other than deriving a new > class from scratch) with allows child nodes to be differently formatted > from the parent nodes? I would like to use a treeview to view > information from a dat

Re: [pygtk] PyGtk usage question

2004-03-13 Thread David M. Cook
On Fri, Mar 12, 2004 at 02:00:21PM -0600, Alex Roitman wrote: > pygtk is in Debian since very long ago. Debian has arguably one of the And in Red Hat since they've used it for their installer and admin tools for years (since 6.0 or thereabouts IIRC). Dave Cook __

Re: [pygtk] How to focos a TreeView's cell?

2004-03-13 Thread David M. Cook
On Sat, Mar 13, 2004 at 01:45:58AM -0600, Mauricio Téllez wrote: > Hi, I have a ListStore with 3 column of type gobject.TYPE_STRING, the > first and thirth columns are editable, but the second is not. I have an > "Add" button that when I click it append a new row to the model, so I > want that the

Re: [pygtk] Selection issues with TreeModelSort

2004-03-11 Thread David M. Cook
On Thu, Mar 11, 2004 at 04:43:33PM -0700, Don Allingham wrote: > I have created a custom tree model, derived from GenericTreeModel. I use > text strings as iters for the model. This is working well. When I get > the current selection, I get the string that I was using as an iter. > >model = M

Re: [pygtk] Tooltips inside a TreeView

2004-02-09 Thread David M. Cook
On Mon, Feb 09, 2004 at 11:39:37AM +, Graham Ashton wrote: > I was wondering if it's possible to do row specific tooltips. See http://bugzilla.gnome.org/show_bug.cgi?id=80980 Though this is per cell. Don't know if per row is possible. Dave Cook _

Re: [pygtk] ComboCellEditor

2004-01-17 Thread David M. Cook
On Fri, Jan 16, 2004 at 03:52:09PM -0200, Christian Robottom Reis wrote: > Aren't there bugs open on this subject? This has been discussed at > length here, and IIRC there was some consensus that something needs to > be fixed (in PyGTK, IIRC). As to whether you should rewrite the Doesn't gtk 2.3

Re: [pygtk] TreeView, Windows Look & Feel

2004-01-05 Thread David M. Cook
On Fri, Jan 02, 2004 at 09:40:58AM +0800, Bert Marco Schuldes wrote: > Icons and especially visible lines connecting > the nodes of the tree. I think that's what this RFE is about: http://bugzilla.gnome.org/show_bug.cgi?id=106406 But there seems to be some confusion there between grid lines as

Re: [pygtk] Some gtk-noob TreeStore problems :]

2003-12-31 Thread David M. Cook
On Tue, Dec 30, 2003 at 10:14:19PM +0100, Daniel Kirkegaard Mouritsen wrote: > Hey everybody, > > I'm having problems with the gtk.CellRendererToggle() renderer, I have a > TreeStore with three column defined like this: > > tree_store = gtk.TreeStore(gobject.GObject, gobject.TYPE_STRING, > gobjec

Re: [pygtk] Unapplied patches

2003-12-19 Thread David M. Cook
On Wed, Dec 17, 2003 at 03:35:37PM -0700, Don Allingham wrote: > work for more than just trivial cases (proper handling of iters with a > value of None). Oh, I thought this was "just the way it was"! This gave me fits for a day or so. I got around this by using instances of a "Stub" class in pl

Re: [pygtk] treeview

2003-12-03 Thread David M. Cook
On Wed, Dec 03, 2003 at 11:43:02PM +0100, asterix wrote: > 1/ in my gtk.treestore, i have a "column" with a value witch can be 'g' > or 'u'. If it's 'g' i'd like the background color of the treeiter to be > blue for example, and another color if it's 'u'. One way is the have an extra color colu

Re: [pygtk] signal on title colum of GtkTreeView

2003-11-13 Thread David M. Cook
On Thu, Nov 13, 2003 at 12:12:34PM +0100, Harobed wrote: > I would like to show popup window when I click on title column of > TreeView. The TreeViewColumn object has a "clicked" signal: http://tinyurl.com/uuke (scroll to the bottom) So that you know which column was clicked, you can either att

[pygtk] Avoiding extra space in rows without icons in treeview

2003-11-08 Thread David M. Cook
I have a treeview/treemodel with icons for the first column of each row, using TreeViewColumn.pack_start (works great; thanks guys!). However, I'd like some rows to not have icons. I tried putting None for the pixbuf in my treemodel for those cases, which works, but it leaves quite a bit of space

Re: [pygtk] How to remove a row from a GTK.ListStore?

2003-11-01 Thread David M. Cook
On Sat, Nov 01, 2003 at 12:52:56PM -0500, Hans Deragon wrote: > Newbie here. I tried to figure out how to remove a row from a > GTK.ListStore on the web (documentation and mailing list archives), but I > could not figure it out. The documentation is pretty poor. > > What I want to figure

Re: [pygtk] hide certain rows in treeview

2003-10-13 Thread David M. Cook
On Thu, Oct 09, 2003 at 11:10:09AM -0700, David M. Cook wrote: > On Thu, Oct 09, 2003 at 10:43:54AM -0700, Yang Zheng wrote: > > > Is it possible to not show certain rows in a treeview that is attached > > to a treestore? I know you can display only certain columns, but wha

Re: [pygtk] nonstandard widgets in pygtk?

2003-10-12 Thread David M. Cook
On Tue, Oct 07, 2003 at 11:36:36AM -1000, Tim Newsham wrote: > Hi, I would like to compile some nonstandard gtk extensions > written in C into pygtk. What is involved in this process? > Is there any documentation that covers pygtk internals? Are > interfaces generated or defined manually? Thi

Re: [pygtk] hide certain rows in treeview

2003-10-12 Thread David M. Cook
On Thu, Oct 09, 2003 at 10:43:54AM -0700, Yang Zheng wrote: > Is it possible to not show certain rows in a treeview that is attached > to a treestore? I know you can display only certain columns, but what > if there are some rows in a treestore structure that I do not want to be > displayed? Can

Re: [pygtk] Several TreeViews with Common Model

2003-09-29 Thread David M. Cook
On Mon, Sep 29, 2003 at 10:36:40AM +0700, mige wrote: > I'm trying to use a treemodel [store] in both views (showing as a tree > and a list), just like file explorer. > The tree view is working fine. > But, I need to show the direct childrens in the list view if I click the > node. Is there any

Re: [pygtk] 'About' strangeness.

2003-09-01 Thread David M. Cook
On Mon, Sep 01, 2003 at 12:40:11AM -0700, Colin Fox wrote: > In addition to my previous message about the missing yellow star in the > About menu, the "Gnome About" dialog itself is causing me some grief. > > If I show the about box, then dismiss it, then show it again, my program > aborts immedi

  1   2   3   >