Re: [pygtk] TreeView and CellRenders
Omar Kilani wrote: Hello, I was wondering if someone could advise on a way of doing conditional colouring of cells. Say I have: -|--| one | four | -|--| two | five | -|--| three| six | And I wanted to give each cell a different colour (based on its contents or cell data.) How would I do it? CellRendererText seems to apply the background/foreground colours to the whole column. Do I need to implement my own cell renderer? I may be able to do it with treeview.get_cell_area, but I'm not sure how to pass in the GdkRectangle argument. Simply create a column in your model of type string which contains the colour you want for the cell. Then when setting up the tree view column, map that column to the cell_foreground or cell_background properties of the cell renderer. James. -- Email: [EMAIL PROTECTED] | Linux.conf.au http://linux.conf.au/ WWW: http://www.daa.com.au/~james/ | Jan 22-25 Perth, Western Australia. ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Pixmap path with libglade
Hello, I'm testing libglade to use with my application and I have a little doubt with Pixmaps. I have the following directory structure: -+ App root | +-+ glade | +- pixmaps All my pixmaps are in the 'pixmaps' diretory and all glade files are in the 'glade' directory. While design with glade thats all ok, but when I start my application I got the error: Gdk-CRITICAL **: file gdkdraw.c: line 380 (gdk_draw_pixmap): assertion `src != NULL' failed. and the pixmaps don't appear. It seems that libglade does not follow the glade pixmap directory. The question is: Can I indicate the pixmap directory in libglade? Thanks, Ricardo. ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] TreeView and CellRenders
On Tue, 2003-01-14 at 09:44, James Henstridge wrote: Omar Kilani wrote: Hello, I was wondering if someone could advise on a way of doing conditional colouring of cells. Say I have: -|--| one | four | -|--| two | five | -|--| three| six | And I wanted to give each cell a different colour (based on its contents or cell data.) How would I do it? CellRendererText seems to apply the background/foreground colours to the whole column. Do I need to implement my own cell renderer? I may be able to do it with treeview.get_cell_area, but I'm not sure how to pass in the GdkRectangle argument. Simply create a column in your model of type string which contains the colour you want for the cell. Then when setting up the tree view column, map that column to the cell_foreground or cell_background properties of the cell renderer. Hi, I wondered about the same thing some weeks ago. Sorry for being silly, but I don't understand how that method is going to give you different colors in individual cells and not just alter the colors in different columns. Best regards Øistein ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Pixmap path with libglade
On Tue, Jan 14, 2003 at 09:08:44AM -0200, Ricardo Caesar Lenzi wrote: All my pixmaps are in the 'pixmaps' diretory and all glade files are in the 'glade' directory. While design with glade thats all ok, but when I start my application I got the error: Gdk-CRITICAL **: file gdkdraw.c: line 380 (gdk_draw_pixmap): assertion `src != NULL' failed. and the pixmaps don't appear. It seems that libglade does not follow the glade pixmap directory. The question is: Can I indicate the pixmap directory in libglade? Heh. Coincidences. We decided to look into this last week because it was a serious problem to us. The issue is as follows: - Glade saves only the pixmap filename in the XML file. It *does* allow specifying a pixmap directory (configurable through the project options dialog) which is included in the top of the file, but that section is never parsed by libglade. - Glade copies the pixmaps you indicate from the original directory to the directory specified in the pixmaps directory option. - libglade, since all it knows is the pixmap filename, tries to load all pixmaps from the same directory as it loads the glade file. Since your pixmaps are not in there, it doesn't find them, and they are never loaded. There are a couple of solutions to this problem: - Make links from the pixmap directory XPMs to the glade directory. This works, but CVS doesn't create links and you will need to run a script to generate this upon checkout/update. - Hack libglade to support the pixmap directory. This is only a problem if you consider the issue of relative paths (you would need to configure the pixmap path relative to the glade file, and in my case, I have: App1/ App1/glade/*.glade App2/ App2/glade/*.glade components/dialog1/ components/dialog1/glade/*.glade components/dialog2/ components/dialog2/glade/*.glade data/ data/pixmaps/*.xpm which would force me to use ../data/pixmaps/ in the parameter, and since I have multiple glade files, I would need to use a different path per gladefile) This is not difficult to implement if you decide to, and it might be a clean solution. - Hack libglade and glade to support a GLADE_PIXMAP_PATH environment variable, which indicates where the pixmap is to be found. Johan hacked this for us last week and I have the diffs here. I am hoping James will comment on this approach and let me know if it is acceptable for integration with CVS libglade (nothing was changed beyond looking in this environment variable). Glade was changed to also look in the path for pixmaps. We didn't implement option b. because I thought it was less clean, and also because I thought James was less likely to accept the patch, but if he does it should be easy to change these patches to do it. HTH! Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL diff -ur libglade-0.17/glade/glade-gtk.c libglade-0.17-new/glade/glade-gtk.c --- libglade-0.17/glade/glade-gtk.c 2001-09-04 23:01:32.0 -0300 +++ libglade-0.17-new/glade/glade-gtk.c 2003-01-08 19:38:25.0 -0200 @@ -25,6 +25,7 @@ #include stdlib.h #include string.h +#include unistd.h #include glade/glade-build.h #include glade/glade-private.h #include gmodule.h @@ -37,6 +38,35 @@ #undef _ #define _(msgid) (glade_xml_gettext(xml, msgid)) +char * +find_in_glade_pixmap_path (const char *filename) +{ + gchar *env, *pixmap; + gchar **parts; + gint i; + + env = g_getenv(GLADE_PIXMAP_PATH); + if (env == NULL) { + return NULL; + } + + parts = g_strsplit(env, :, 255); + for (i = 0; parts[i] != NULL; i++) { + pixmap = g_strdup_printf(%s/%s, parts[i], + g_basename(filename)); + + /* Check if the pixmap exist and is readable */ + if (!access(pixmap, R_OK)) { + return pixmap; + } + + g_free(parts[i]); + g_free(pixmap); + } + g_free(parts); + return NULL; +} + /* functions to actually build the widgets */ static void @@ -580,6 +610,7 @@ g_free (vboxname); } + static void toolbar_build_children (GladeXML *xml, GtkWidget *w, GladeWidgetInfo *info, const char *longname) @@ -628,6 +659,13 @@ if (icon) { GdkPixmap *pix; GdkBitmap *mask = NULL; + gchar *full_path; + + full_path = find_in_glade_pixmap_path(icon); + if (full_path != NULL) { +
Re: [pygtk] TreeView and CellRenders
Oistein Aanensen wrote: On Tue, 2003-01-14 at 09:44, James Henstridge wrote: Omar Kilani wrote: Hello, I was wondering if someone could advise on a way of doing conditional colouring of cells. Say I have: -|--| one | four | -|--| two | five | -|--| three| six | And I wanted to give each cell a different colour (based on its contents or cell data.) How would I do it? CellRendererText seems to apply the background/foreground colours to the whole column. Do I need to implement my own cell renderer? I may be able to do it with treeview.get_cell_area, but I'm not sure how to pass in the GdkRectangle argument. Simply create a column in your model of type string which contains the colour you want for the cell. Then when setting up the tree view column, map that column to the cell_foreground or cell_background properties of the cell renderer. Hi, I wondered about the same thing some weeks ago. Sorry for being silly, but I don't understand how that method is going to give you different colors in individual cells and not just alter the colors in different columns. Attached is a simple example that displays each cell in the tree view in different colours, based on data in the tree model. James. -- Email: [EMAIL PROTECTED] | Linux.conf.au http://linux.conf.au/ WWW: http://www.daa.com.au/~james/ | Jan 22-25 Perth, Western Australia. import gtk rows = [ ('foo', 'red', 'bar', 'blue'), ('baz', 'green', 'foo', 'yellow'), ('bar', 'orange', 'baz', 'magenta') ] # set up the data in the model model = gtk.ListStore(str, str, str, str) for row in rows: iter = model.append() model.set_value(iter, 0, row[0]) model.set_value(iter, 1, row[1]) model.set_value(iter, 2, row[2]) model.set_value(iter, 3, row[3]) win = gtk.Window() win.set_title('Tree cells') win.connect('destroy', gtk.mainquit) swin = gtk.ScrolledWindow() swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) win.add(swin) treeview = gtk.TreeView(model) # assign model column 0 to the text property, and # column 1 to the cell_foreground property. cell = gtk.CellRendererText() column = gtk.TreeViewColumn('Column 1', cell, text=0, foreground=1) treeview.append_column(column) cell = gtk.CellRendererText() column = gtk.TreeViewColumn('Column 2', cell, text=2, foreground=3) treeview.append_column(column) swin.add(treeview) win.show_all() gtk.main()
Re: [pygtk] can't find gnome.ui module.
What can i do to make it work? Try installing pyorbit (http://ftp.gnome.org/pub/GNOME/pyorbit/1.99/), then rebuilding gnome-python. A fair number of gnome libraries require that the CORBA bindings exist. This not precisely the first time we get this sort of question. I think i good solution for the end users would be to include information after configure is done eg. The following bindings will be built: gconf zvt canvas The following bindings will NOT be built: bonobo bonobo.ui gnome gnome.ui And if something is included in the last, add a note and link to PyORBit. I know that a lot of gnome programs already do this, glade and nautilus for example. A better example would be xine and gst-plugins though. James, what do you think? -- Johan Dahlin [EMAIL PROTECTED] Async Open Source ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Pixmap path with libglade
Ricardo Caesar Lenzi wrote: Hello, I'm testing libglade to use with my application and I have a little doubt with Pixmaps. I have the following directory structure: -+ App root | +-+ glade | +- pixmaps All my pixmaps are in the 'pixmaps' diretory and all glade files are in the 'glade' directory. While design with glade thats all ok, but when I start my application I got the error: Gdk-CRITICAL **: file gdkdraw.c: line 380 (gdk_draw_pixmap): assertion `src != NULL' failed. and the pixmaps don't appear. It seems that libglade does not follow the glade pixmap directory. The question is: Can I indicate the pixmap directory in libglade? libglade checks for files such as pixmap files in the same directory as the glade file. If you set the pixmap directory to . in the project options, then things should all work fine. James. -- Email: [EMAIL PROTECTED] | Linux.conf.au http://linux.conf.au/ WWW: http://www.daa.com.au/~james/ | Jan 22-25 Perth, Western Australia. ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Replacing the snake icon for windows on MSWindows
Hans, Christian, Thanks for your input about replacing the snake icon. It's true that the icon embedded in the python.exe is used as the topleft window icon. Perhaps a solution for me is to create an .exe file using p2exe. See http://starship.python.net/crew/theller/py2exe/ That .exe file, I give an icon, and that icon will be used I think. Thanks and best whishes, Rene Olsthoorn. -- __ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup Meet Singles http://corp.mail.com/lavalife ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] interesting treeview selection behavior
I know that this probably is a GTK+ issue not a pygtk issue, but I was wondering if anyone else had seen this and come up with a suitable workaround using pygtk... Problem: I have a TreeView that is using a ListStore model to supply 1-dimensional data. I have connected the changed signal of the treeview's selection object to my application. Right now, I'm just printing a message when it changes, but the intent is to have a separate view updated when the user selects things. Similar to the pygtk sample... ...except, that I don't want an initial selection in the list. After I load the data, I call selection.unselect_all() and, visually, there's nothing in the list. If I call selection.selected_foreach() immediately after I do the unselect, there's nothing in the selection. Problem is that when I actually select an item in the list (somewhere in the middle), I get the following: --- Selected idx = 0; val = '110127612040731.zip' --- --- Selected idx = 7; val = 'applets' --- where 'applets' was the one that I actually clicked. Subsequent clicks (currently using single-select mode) generate what you'd expect, but after about an hour and a half of trying to work around this with 'mouse-pressed/released' and switches among other things, I'm running out of ideas. Any suggestions? Am I losing my mind, or, more likely, missing something with the way you're supposed to use the API? Thanks in advance, ast Oh, after my earlier attempts to use the gnome.ui and having crashes, I reverted back to the stock RedHat 8 RPMS for everything so that I wouldn't get crashes. Relevant versions are: gtk2-2.0.6-8 ORBit2-2.4.4 pygtk2-1.99.12-7 orbit-python-1.99.0-4 gnome-python2-1.99.11-8 I had earlier tried to upgrade to the CVS versions of the relevant python bindings, but I was having problems running anything that had to do with gnome. I'm planning to use the GnomeIconList or GnomeCanvas, so that's why I went back to a known point. -- Andrew S. Townley [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
Re: [pygtk] type of bitmap_create_from_data
Eddie Kohler [EMAIL PROTECTED] writes: Right, but the actual data string passed to gtk_bitmap_create_from_data() is not a C string, but a packed array of bytes. (Bitmap data.) The correct type for such a string seems to be const-guchar*; if you use const-gchar*, pygtk barfs when you try to pass a string with embedded zero characters, which are perfectly legal for bitmap data. I'm currently trying to get Sketch to work with GTK 2 and I came across this bug as well. FWIW, the fix Eddie proposes seems to work fine with 1.99.14. It would probably also apply to gdk_pixmap_create_from_data, BTW. Bernhard -- Intevation GmbH http://intevation.de/ Sketch http://sketch.sourceforge.net/ MapIt! http://www.mapit.de/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] can't find gnome.ui module.
James: I downloaded and built pyorbit (the latest one) and compiled it without any problem. I also rebuilt pygtk and gnome-python. I saw that iumodule.c was built but it did not installed it... What else??? Tnks.. Johan: Great idea about including information about what is to compile and what not. I 'd like to submit a patch for it, but i dont get along with autoconf nor automake .. :-S So all that i can do is wait your new release. Best regards from Mexico. Slaudos desde Mexico. --- Johan Dahlin [EMAIL PROTECTED] escribió: What can i do to make it work? Try installing pyorbit (http://ftp.gnome.org/pub/GNOME/pyorbit/1.99/), then rebuilding gnome-python. A fair number of gnome libraries require that the CORBA bindings exist. This not precisely the first time we get this sort of question. I think i good solution for the end users would be to include information after configure is done eg. The following bindings will be built: gconf zvt canvas The following bindings will NOT be built: bonobo bonobo.ui gnome gnome.ui And if something is included in the last, add a note and link to PyORBit. I know that a lot of gnome programs already do this, glade and nautilus for example. A better example would be xine and gst-plugins though. James, what do you think? -- Johan Dahlin [EMAIL PROTECTED] Async Open Source _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] more interesting behavior with selections, treeviews andscrolling
This time I've included an example of what I'm trying to do. It serves to illustrate both my previous double selection signal issue as well as something different. To watch the first one, make sure the checkbox isn't checked, then click load. Choose a row, say the 4th one, and you'll see the double signals. The second one seems to be that the treeview isn't capable of scrolling to a set position initially after it is loaded. Subsequent requests after reload work, but the first one never does. I'm guessing that it has to do with the phantom selection of row 0. To watch this one (unless it randomly selects 0 or something), run test2.py and click the checkbox before clicking load. Subsequent reloads always seem to work, but it is just the first one. Any ideas? Thanks in advance, ast versions: gtk2-2.0.6-8 ORBit2-2.4.4 pygtk2-1.99.12-7 orbit-python-1.99.0-4 gnome-python2-1.99.11-8 -- Andrew S. Townley [EMAIL PROTECTED] PIX_WIDTH = 64 import gtk import gobject from gtk import TRUE, FALSE class Test2: def __init__(self, width=150): self.width = width self.tmodel = gtk.ListStore(gobject.TYPE_STRING, gtk.gdk.Pixbuf) self.tree = gtk.TreeView(self.tmodel) self.widget = gtk.ScrolledWindow() self.widget.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS) self.widget.add(self.tree) self.widget.set_shadow_type(gtk.SHADOW_ETCHED_IN) # load the image image = gtk.Image() image.set_from_file(/usr/share/pixmaps/gnome-home.png) self.pix = image.get_pixbuf() # configure the columns col = gtk.TreeViewColumn(Name, gtk.CellRendererText(), text = 0) col.set_min_width(self.width - PIX_WIDTH - 20) col.set_max_width(self.width - PIX_WIDTH - 20) col.set_fixed_width(self.width - PIX_WIDTH - 20) self.tree.append_column(col) renderer = gtk.CellRendererPixbuf() renderer.set_property(xalign, 1) col = gtk.TreeViewColumn(active, renderer, pixbuf = 1) col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) col.set_fixed_width(PIX_WIDTH) col.set_max_width(PIX_WIDTH) col.set_min_width(PIX_WIDTH) self.tree.append_column(col) # hide the headers self.tree.set_headers_visible(FALSE) # fix our max width self.widget.set_size_request(self.width, -1) # take care of all the signals sel = self.tree.get_selection() sel.connect(changed, self._sel_changed) def clear(self): self.tmodel.clear() def showList(self, fils): for f in fils: iter = self.tmodel.append() if f[1] 3: self.tmodel.set(iter, 0, f[0], 1, self.pix) else: self.tmodel.set(iter, 0, f[0]) # since we have to do a lot of work managing the # selection ourselves, we need to determine what it is # right now sel = self.tree.get_selection() sel.unselect_all() sel.selected_foreach(self._sel_foreach) self.widget.show_all() def _sel_foreach(self, model, path, iter): This method is used to walk the selection. print --- print Selected idx = %d; val = '%s' % (path[0], model.get_value(iter, 0)) print --- def _sel_changed(self, selection): This method is responsible for handling all selection changed events and making some sort of intelligent decision about what's really going on so that it can propigate it to the appropriate listeners. selection.selected_foreach(self._sel_foreach) from whrandom import randrange if __name__ == __main__: scroll = FALSE def doit(*args): data = [] view.clear() for i in range(200): x = randrange(0, 32767) data.append((www.gnome.org + str(i), x % 5)) view.showList(data) if scroll: sel = view.tree.get_selection() col = view.tree.get_column(0) idx = randrange(0, 200) print supposed to select row %d % idx sel.select_path(idx) view.tree.scroll_to_cell(idx, col, TRUE, 1, 0) def toggle(*args): global scroll if scroll: scroll = FALSE else: scroll = TRUE win = gtk.Window() win.connect(destroy, lambda win: gtk.main_quit()) view = Test2(width=300) box = gtk.VBox(FALSE, 5) box.pack_start(view.widget, expand=TRUE, fill=TRUE) box2 = gtk.HBox(FALSE, 5) cb = gtk.CheckButton(select row) cb.connect(toggled, toggle) box2.pack_start(cb, expand=FALSE) input = gtk.Button(load) input.connect(clicked, doit) box2.pack_start(input, expand=TRUE, fill=TRUE) box.pack_start(box2, expand=FALSE, fill=TRUE) win.set_default_size(-1, 400) win.add(box) win.show_all() gtk.main() signature.asc Description: This is a digitally signed message part
[pygtk] Pango and french
Hello, I am trying to transform onr programm with pygtk 0.6 in pygtk2. It is a list of titles of books in french (with gtk.Treeview) from a mysql base with much é è or à in the titles. I have this error : (liste4.py:1881): WARNING **: Invalid UTF8 string passed to pango_layout_set_text() I read the faq, the reference for gtk2 but i understand nothing about pango... What can i do for show my spefifics letters ? Thank for an idea :-) I work with redhat 7.3 Xfree86 4.2.0-8 and pango 1.0.0 -- Marie-Claude Collilieux Bretagne ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] configure status for gnome-python
I added some status output to the configure script for gnome-python, so the user will see what modules that's built and not. And if pyorbit isn't found a warning will be printed (with an url) On my system the last 50 lines or so from configure looks like this: configure: creating ./config.status config.status: creating Makefile config.status: creating gconf/Makefile config.status: creating gtkhtml2/Makefile config.status: creating gnome/Makefile config.status: creating gnomeprint/Makefile config.status: creating bonobo/Makefile config.status: creating gnome-python.spec config.status: creating gnome-python-2.0.pc config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands The following modules will be built: gnome gnome.ui gnome.canvas gnome.vfs gconf gtkhtml2 bonobo bonobo.activation bonobo.ui gnome.applet nautilus gnomeprint gnomeprint.ui The following modules will NOT be built: zvt Now type 'make' to compile gnome-python. -- Johan Dahlin [EMAIL PROTECTED] Async Open Source ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] Pango and french
tis 2003-01-14 klockan 21.49 skrev mc collilieux: Hello, I am trying to transform onr programm with pygtk 0.6 in pygtk2. It is a list of titles of books in french (with gtk.Treeview) from a mysql base with much é è or à in the titles. I have this error : (liste4.py:1881): WARNING **: Invalid UTF8 string passed to pango_layout_set_text() Before inserting data into the liststore, convert them to utf-8. First you need to convert to a unicode object, this can be done like this: obj = unicode(some_string, 'latin-1') Then you can convert it to utf-8: utf8string = obj.encode('utf-8') and that string is what you should insert into your model (GtkListStore/GtkTreeStore) -- Johan Dahlin [EMAIL PROTECTED] Async Open Source ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] GtkClipboard
These aren't implemented in PyGTK 1.99.x - what's the reason? Are they likely to be implemented in the future? A comment in gtk-types.defs seems to indicate GTK+ 2.2. Thanks John ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] Problems with gdkpixbuf
I've just installed pygtk 1.99 in hopes of being able to use gdkpixbuf. Now, the bindings in gtk itself do not include the functions to load images from files. So I looked in the faq and it said to import a module called gdkpixbuf. Now, when I attempt this, python cannot find this module. I can find no documentation on this module outside of what the faq lists. My question is, is this something I have to get separately or is it something that I have to tell pygtk 1.99 (I have 1.99.14 btw) to compile? What would a valid code snippet look like that was using pygtk to load an image file? -Bob ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] more interesting behavior with selections, treeviews and scrolling
On Tue, Jan 14, 2003 at 10:20:32PM +, Andrew S. Townley wrote: This time I've included an example of what I'm trying to do. It serves to illustrate both my previous double selection signal issue as well as something different. One thing is that you're passing an integer as a path when (I think) you should be passing in a tuple (but pygtk doesn't seem to mind shrug). However, using a tuple doesn't seem to make a difference. I know I've gotten scroll_to_cell to work just fine in my own app, but I can't see what's going wrong here. To watch the first one, make sure the checkbox isn't checked, then click load. Choose a row, say the 4th one, and you'll see the double signals. I think this is the correct behavior for the first time something is selected. But then I'm never sure what the intentions of the gtk authors really are. The second one seems to be that the treeview isn't capable of scrolling to a set position initially after it is loaded. Subsequent requests after reload work, but the first one never does. I'm guessing that it has to do with the phantom selection of row 0. To watch this one (unless it randomly selects 0 or something), run test2.py and click the checkbox before clicking load. Subsequent reloads always seem to work, but it is just the first one. Any ideas? Nope. I don't why it's not working. Dave Cook ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/