wow, thank you. This is exactly what I was looking for :)
def get_treestore(n=1):
if n:
return gtk.TreeStore(*((str,) * n))
return gtk.TreeStore(str)
Thank you,
-Alex Goretoy
http://launchpad.net/~a1g
On Sun, Nov 28, 2010 at 1:40 AM, Marco Giusti wrote:
> On Sat
On Sat, Nov 27, 2010 at 08:40:46PM -0600, alex goretoy wrote:
> Currently I am having to do this in my application to create dynamic
> treestore; is the a better way to do this?
>
> def get_treestore(n):
> if n == 0:
> treestore = gtk.TreeStore(str);
> elif n == 1:
On Sun, 2010-11-28 at 00:48 -0600, alex goretoy wrote:
> This is essential what I am looking to do, but it doesn't work. I
> appreciate your response.
import gtk
ts = gtk.ListStore(object)
ts.append((["a","b"],))
ts.append((["c","d"],))
tv = gtk.TreeView(ts)
r = gtk.CellRendererText()
c = gtk.T
This is essential what I am looking to do, but it doesn't work. I appreciate
your response.
>>> gtk.TreeStore( str * 5 )
Traceback (most recent call last):
File "", line 1, in
TypeError: unsupported operand type(s) for *: 'type' and 'int'
>>> gtk.TreeStore( [str] * 5 )
Traceback (most recent ca
On Sat, 2010-11-27 at 20:40 -0600, alex goretoy wrote:
> Currently I am having to do this in my application to create dynamic
> treestore; is the a better way to do this?
You could do
treestore = gtk.TreeStore(object)
where obj contains the list of strings. However you would then have to
write y
Currently I am having to do this in my application to create dynamic
treestore; is the a better way to do this?
def get_treestore(n):
if n == 0:
treestore = gtk.TreeStore(str);
elif n == 1:
treestore = gtk.TreeStore(str);
elif n == 2:
Hi all,
I'm having some troubles with how my gnome panel looks. I've attached some
screenshots so you can see what I mean.
The left applet is the "hamster applet" for time tracking. The applet on the
right is my applet.
As you can see in the first screenshot (Screenshot-3.png) the background of
I use UImanager to build the menubar in my program. Like this:
Now I'd like to have this PersonMenu also show up as I right click on a row
in a treeview, this to avoid maintaining 2 menus when I add/remove/edit
entries. Is it possibl