Re: [pygtk] ANN: PyGUI 2.1.1

2009-11-19 Thread John Finlay
I'm disappointed that I appear to be the only one on this list that finds these announcements objectionable. And contrary to speculation I find them all objectionable (yes that means yours as well Roberto). So far it's been lucky that not all of the hundreds of projects based on pygtk have felt

Re: [pygtk] ANN: PyGUI 2.1

2009-11-17 Thread John Finlay
Pietro Battiston wrote: > Il giorno mar, 17/11/2009 alle 11.19 +1300, Greg Ewing ha scritto: > >> Pietro Battiston wrote: >> >> >>> And I promise I won't come there just saying that PyGUI API sucks >>> >> Okay, that particular remark was a bit rude, and I >> apologise for it. >> >> L

Re: [pygtk] ANN: PyGUI 2.1

2009-11-15 Thread John Finlay
Greg Ewing wrote: > John Finlay wrote: > >> Greg, >> >> Why do you post to mailing lists that are unrelated to your project? I >> would appreciate it if in future you didn't post a message about your >> project ot the PyGTK mailing list. >>

Re: [pygtk] ANN: PyGUI 2.1

2009-11-15 Thread John Finlay
Greg Ewing wrote: > Luis A. Bastiao Silva wrote: > > >> But it just works for application wroted from stratch, otherwise >> application wroted in pygtk need to be ported to work cross-platform. >> > > It's already possible to run pygtk programs on all three > platforms, if you're willing t

Re: [pygtk] Saving and reading images from database

2009-11-13 Thread John Finlay
Timo List wrote: > My program uses the SQLite database. The database holds some > information about persons and I want to add a picture for each person. > Not the path to the file, but the actual image so that the image also > works if the file is deleted on the harddisk. > > I can save the imag

Re: [pygtk] How to add 'clicked' event to treeview cell?

2009-10-17 Thread John Finlay
Taras wrote: > Hello, all! > > > There is a table with some rows. For example, it has 3 columns. > The first one is icon column 'Add/Remove to favorites' with star icon. > I read about pixbuf renderer but I can't find how can I connect > 'clicked' event to this column :( I also research how it mad

Re: [pygtk] pyGtk segfault comparing gtk.Image with 0

2009-10-17 Thread John Finlay
Pietro Battiston wrote: > Il giorno sab, 17/10/2009 alle 20.49 +0300, Paul Pogonyshev ha scritto: > >> Pietro Battiston wrote: >> >>> Il giorno sab, 17/10/2009 alle 17.30 +0100, Tomeu Vizoso ha scritto: >>> On Sat, Oct 17, 2009 at 17:12, René 'Necoro' Neumann wrote:

Re: [pygtk] Styling a text view across the visible line

2009-10-09 Thread John Finlay
Scott Ferguson wrote: > Hi, > > I'm trying to build an integrated diff tool for an app that I'm > writing, and I am styling the text to make certain parts of the diff > more visible (adds are green, removes are red, etc). Typical look and > feel of a diff viewer. > > The styling includes a ba

Re: [pygtk] gtk.entry copy and paste via ctrl-c & ctrl-v

2009-10-05 Thread John Finlay
Kim Adil wrote: > I have an entry and want to use the keyboard shortcuts for > cut/copy/paste. Without any coding by me, popup menu works fine, but > keyboard shortcuts don't work. the tutorial suggests it should be > working by default: > > > 15.1.2. Using Clipboards with Entry, Spinbutt

Re: [pygtk] image on a Button

2009-09-30 Thread John Finlay
Gorse Emmanuel wrote: > Thanks for the answer. > > I'm checking the imgFullFile with os.path.exists() before loading it, > so the absolute path of the image is correct. > > As img.set_from_file() doesn't raise an exception when it can't load > the file, i've tried with this: > > img = gtk.Image() >

Re: [pygtk] Image Resize

2009-09-15 Thread John Finlay
Pete Stapley wrote: > I have a menu bar, an image and a status bar in a vbox. Is there a way > to find out the new size of the image widget when the window is > resized? I can get the size of the complete window with > configure-event signal, but I want just the size of the image widget. > Than

Re: [pygtk] Resizing an hbox

2009-09-12 Thread John Finlay
Fabrice DELENTE wrote: > Hello. > > I have an interface which is a simple toplevel window containing an hbox > which contains a gtk.DrawingArea, designed in glade. > > How can I catch the fact that the hbox or the DrawingArea are resized when > the toplevel is resized in the window manager? > > I t

Re: [pygtk] Drawing a PNG on a gtk.DrawingArea

2009-09-12 Thread John Finlay
Fabrice DELENTE wrote: > Hello. > > I'm still struggling with displaying a PNG image on a gtk.DrawingArea. I > designed a glade interface that is basically a toplevel window with an hbox > in it. I then add() a gtk.DrawingArea in the hbox. > > I'm trying to display the image this way: > > fichi

Re: [pygtk] Problems with button.

2009-09-10 Thread John Finlay
Hidura wrote: > I'm trying to make a button just with the icon, I want to give the > relief of the button to the icon for have more stetic in my project > > On Tue, Sep 8, 2009 at 1:24 PM, John Finlay <mailto:fin...@moeraki.com>> wrote: > > Hidura wrote: >

Re: [pygtk] Multiple Gtk.DrawingArea

2009-09-10 Thread John Finlay
Antoine Cailliau wrote: > Dear, > > >> don't use this since it returns the allocation within the Window not >> within the DA. Use self.window.get_size() to get the width and height >> and use 0, 0 for the x and y in the following. >> > Thanks you a lot for your answer. > > I've on other

Re: [pygtk] Multiple Gtk.DrawingArea

2009-09-09 Thread John Finlay
Antoine Cailliau wrote: > Dear all, > > First of all, a short presentation since I'm new on the ML. I'm student > in Belgium (UCLouvain) in Computer Science (especially computer langages > and software engineering). I just started a small project (a game for > gnome) to get familiar with Cairo and

Re: [pygtk] Disable signals and events to use a button as a container, not as a button?

2009-09-08 Thread John Finlay
Ryan Martin wrote: > When you skin a button (and certain other widgets), you can control > the amount of pixels on top, left right and bottom to remain intact. > Those pixels do not scale when the widget is resized. The rest of the > pixels inside the widget scale as normal. This is what keeps b

Re: [pygtk] Disable signals and events to use a button as a container, not as a button?

2009-09-08 Thread John Finlay
Ryan Martin wrote: > Hey Guys > > For all intensive purposes, an eventBox can have widgets packed into > it as I need and it can also have the background set as a style > property ala "bg_pixmap[NORMAL] = 'something.png'". My problem is that > the background needs to stretch, not tile. Like this

Re: [pygtk] Problems with button.

2009-09-08 Thread John Finlay
Hidura wrote: > Hello, List i have this sub-class of a Button and make me the icon > what i pass in the button but lose the releif when the icon replace > the button how could i change that and give the relief back again. > > > Thanks. > > > ##CODE > class Button(gtk.Button): > """ >

Re: [pygtk] Disable signals and events to use a button as a container, not as a button?

2009-09-08 Thread John Finlay
h and resize. > > If anybody knows a way to make the background pixmap for an event box > stretch, I'd be all set. Any ideas? > > Thanks > Ryan > > > What do you mean by stretch and resize? An example would help to visualize how this would work. > > > > >

Re: [pygtk] Color a ToggleButton

2009-09-07 Thread John Finlay
E.R. Uber wrote: > I agree, it works fine on my Fedora 11 box as well, but not under > Windows XP SP3. > > So do you think this is impossible under XP or that more effort is > required?? > > Thanks > E.R. Uber > > On Sun, Sep 6, 2009 at 8:26 AM, John Finlay <

Re: [pygtk] wrapping custom functions

2009-09-06 Thread John Finlay
gabriele lanaro wrote: > Hi list, > > I'm wrapping a function like that: > > int gtk_scintilla_base_find_text( GtkScintillaBase *sci,int flags, > long start, long end, > char *text, long *ostart, long *oend); > > but codegen can't wrap the function because of the long * type. > > In additi

Re: [pygtk] Color a ToggleButton

2009-09-06 Thread John Finlay
E.R. Uber wrote: > As in? > > widget.modify_bg(gtk.STATE_NORMAL, color_off) > and > widget.modify_bg(gtk.STATE_ACTIVE, color_on) > > That doesn't work either. > > On Sat, Sep 5, 2009 at 7:41 PM, John Finlay <mailto:fin...@moeraki.c

Re: [pygtk] Color a ToggleButton

2009-09-05 Thread John Finlay
E.R. Uber wrote: > After reading PyGTK FAQ 4.6 > at http://faq.pygtk.org/index.py?req=show&file=faq04.006.htp > I thought > perhaps I could change the color of a ToggleButton by copying its > style, updating the style, and setting the

Re: [pygtk] Disable signals and events to use a button as a container, not as a button?

2009-09-04 Thread John Finlay
o idea how to pass the events to the widgets that are > children of the button (the 'button_2' widget and the "entry" widget > in the image above). > > If there is some other way to accomplish my task, I'm all ears. > Currently, I'm struggling trying t

Re: [pygtk] Disable signals and events to use a button as a container, not as a button?

2009-09-04 Thread John Finlay
Ryan Martin wrote: > Hey Guys, > I have a strange situation that I'm having trouble finding a > solution for. In the application I'm building, I would like to use a > button as a container and not necessarily a button. Currently, I have > a text field and another button inside my main button

Re: [pygtk] PyGTK problem

2009-09-04 Thread John Finlay
nipun batra wrote: > I need from this code that var1,var2,var3,var4 should be continuosly > read from file(or serial port) and there value be updated > continuosly.Also i wish to use these 4 variables for plotting in > pygame/matplotlib/VPython .How can i do that.Moreover for every read > cycle

Re: [pygtk] Updating widgets within threads

2009-09-04 Thread John Finlay
Bottiger, Maxwell - AES wrote: > Hi, > > I have an implementation methodology question. I'm putting together an app > which runs a bunch of external devices. All my devices are on different > serial ports and run at different frequencies. I'd like to use one thread to > monitor each device, t

Re: [pygtk] Existing C/GTK application

2009-09-04 Thread John Finlay
Rick Hightower wrote: > I have an existing C/GTK application. I would like to write all new > features in Python using PyGTK. > Is there any way to write widgets in PyGTK and use them easily in a > C/GTK based application? > > Are there examples of this somewhere? > > Essentially I want to add a

Re: [pygtk] Trying to change the "pen color" just before I draw a line

2009-09-02 Thread John Finlay
Rick Hightower wrote: > Here is the full program. It changes the background color and redraws. > I need to be able to draw different color lines. > > import pygtk > pygtk.require("2.0") > import gtk > from gtk import Window, Button > > class Base: > def handle_color_change(self, widget, data) : >

Re: [pygtk] Animation performance - limitation or my code?

2009-09-02 Thread John Finlay
Kim Adil wrote: > I once wrote a gtk program in C that displayed about 30 animations on a > drawing area and they moved around the screen, and performance was > excellent. The drawingarea size was 1600x1200 and the animations were > very smooth. > > I have started to write a similar app using pygtk

Re: [pygtk] Non-blocking subprocess.Popen stop GUI

2009-08-31 Thread John Finlay
Bou Baris wrote: >> Instead of using select() use gobject.io_add_watch() on proc.stdout to >> register a callback function that is used to read the % and set the progress >> bar. >> > > I've modified my code to test gobject.io_add_watch() > I expect that test_io_watch() print in console line r

Re: [pygtk] Non-blocking subprocess.Popen stop GUI

2009-08-31 Thread John Finlay
Bou Baris wrote: >> Instead of using select() use gobject.io_add_watch() on proc.stdout to >> register a callback function that is used to read the % and set the progress >> bar. >> > > I've modified my code to test gobject.io_add_watch() > I expect that test_io_watch() print in console line r

Re: [pygtk] Non-blocking subprocess.Popen stop GUI

2009-08-31 Thread John Finlay
Bou Baris wrote: >> I think this is due to mkvextract not flushing its output because it's not >> connected to a tty. Try using a pty in between to fool mkvextract. Something >> like: >> >> from_mkve, to me = pty.openpty() >> to_me = os.fdopen(to_me, 'r') >> file_flags = fcntl.fcntl(to_me, fcntl.F_

Re: [pygtk] Glade interface and Dialog: buttons don't work

2009-08-30 Thread John Finlay
Fabrice DELENTE wrote: >> Look at: >> >> http://library.gnome.org/devel/pygtk/stable/class-gladexml.html#method-gladexml--signal-autoconnect >> > > I think I don't need this method if I define the callbacks directly in the > glade file. > > You need to call this method to connect the callba

Re: [pygtk] Glade interface and Dialog: buttons don't work

2009-08-30 Thread John Finlay
Fabrice DELENTE wrote: > Hello. > > I designed an interface with Glade, and I want to use it with PyGtk. > > In this interface, there is a Window and a Dialog. The Dialog is popped up > when I click a button in the Window. > > I have a reference to the Dialog: > > dialog = gtk.glade.XML(gladeFile,

Re: [pygtk] Non-blocking subprocess.Popen stop GUI

2009-08-30 Thread John Finlay
Bou Baris wrote: >> Instead of using select() use gobject.io_add_watch() on proc.stdout to >> register a callback function that is used to read the % and set the progress >> bar. >> > > I've modified my code to test gobject.io_add_watch() > I expect that test_io_watch() print in console line r

Re: [pygtk] Non-blocking subprocess.Popen stop GUI

2009-08-30 Thread John Finlay
Bou Baris wrote: > I'm a new user of PyGTK. > I'm writing with Python and PyGTK a little software for decoding MKV > video files using external tool MKV TOOL UNIX. It's a simple graphical > front-end to ffmpeg and MKVTOOLNIX. > I use Ubuntu 9.04 shipped with Python 2.6.2 and PyGTK 2.x > > I've a pr

Re: [pygtk] Sorting every row of a tree regardless of its hierarchy

2009-08-28 Thread John Finlay
Jiri Bajer wrote: > On Wed, 2009-08-26 at 01:47 +0200, John Finlay wrote: > >>> If I store the data in a TreeModel, wrap a TreeModelSort over it and >>> display the result via TreeView, the sorting mechanism is not able to >>> put "Task 2" before &quo

Re: [pygtk] Sorting every row of a tree regardless of its hierarchy

2009-08-25 Thread John Finlay
Jiri Bajer wrote: > Hi, > > I am writing an editor for multi-columned hierarchical data (for example > project tasks or software requirements) and would like to allow the user > to sort the rows as if the data had a flat structure. > > Example TreeView: > > Hierarchy | Task name | Priority | Man-

Re: [pygtk] set_use_markup and gtk.Button

2009-08-07 Thread John Finlay
Art Hunkins wrote: > I have been happily using the set_use_markup property of gtk.Label and > gtk.Frame with XML markup, to create bolded, italic and various sized text. > > I need to do this with gtk.Button as well - to do the same with (callback) > button labels. However, I've not been able. I'

Re: [pygtk] size request in scrolled windows + viewport

2009-08-03 Thread John Finlay
On 08/03/2009 01:27 PM, Alessandro Dentella wrote: > Hi > >I have a table with many widgets inside, so that total dimenstions are >bigger that the screen so that I put it in a ScrolledWindow + ViewPort. > >So far so good. ow I have a Window with all widgets in a pane that scrolls >f

Re: [pygtk] Help with set_cursor() ---- Invisible cursor option

2009-08-03 Thread John Finlay
On 08/03/2009 03:05 PM, DINESHBABU DINAKARABABU wrote: > Hi, > > Now, it throws: > > AttributeError: 'NoneType' object has no attribute 'set_cursor' > > I agree to the fact that it is a gtk.gdk.Window object. Does > win.window invoke a gtk.gdk.Window object? Correct me if am wrong as I > am still

Re: [pygtk] Help with set_cursor() ---- Invisible cursor option

2009-08-03 Thread John Finlay
On 08/03/2009 09:23 PM, John Finlay wrote: DINESHBABU DINAKARABABU wrote: Hi everyone, I am pretty new to Python and Pygtk. I would be grateful if someone could help me out with this issue. I am trying to get a full screen display of an image from some raw data using the

Re: [pygtk] Help with set_cursor() ---- Invisible cursor option

2009-08-03 Thread John Finlay
DINESHBABU DINAKARABABU wrote: > Hi everyone, > > I am pretty new to Python and Pygtk. I would be grateful if someone > could help me out with this issue. > > I am trying to get a full screen display of an image from some raw > data using the pixbuf_new_from_data() method. I want to do away with

Re: [pygtk] Problem in fetching Unicode from URL and displaying it in PyGTK widget

2009-07-17 Thread John Finlay
Bertrand Kintanar wrote: > On 7/17/09 6:39 PM, John Finlay wrote: > >> Bertrand Kintanar wrote: >> >>> On 7/17/09 1:12 PM, John Finlay wrote: >>> >>>> Maybe you could gzip it and base64 encode it before stuffing it into >>>

Re: [pygtk] gtk.ToggleButton not working.

2009-07-17 Thread John Finlay
Neil Dugan wrote: > With pygtk version 2.12.9 this works > "button = gtk.ToggleButton('test',False)" > but on pygtk version 2.16.1 it no longer works :) > > I get the error message > RuntimeError: more argument specifiers than keyword list entries > (remaining format:'):GtkToggleButton.__init__')

Re: [pygtk] Problem in fetching Unicode from URL and displaying it in PyGTK widget

2009-07-17 Thread John Finlay
Bertrand Kintanar wrote: > On 7/17/09 1:12 PM, John Finlay wrote: > >> Maybe you could gzip it and base64 encode it before stuffing it into >> the DB? >> >> John >> > is gzipping it necessary for this to work? > > No but it'll m

Re: [pygtk] Problem in fetching Unicode from URL and displaying it in PyGTK widget

2009-07-16 Thread John Finlay
Bertrand Kintanar wrote: > Hi list > > I've been working on a personal project and for some reason I need to > read a html file and then store what I've read into database. And > since there is huge possibility that the html file contains some > unicode in it (e.g. `ñ' ) I'm having a hard time

Re: [pygtk] warnings from dialog.run in pygtk2-2.14.1

2009-07-15 Thread John Finlay
On 07/15/2009 01:09 AM, Chris Rouch wrote: > Hi, > > I recently upgraded to Fedora 11. Since then every pygtk program I > have has started to produce a warning when dialog.run() is called: > > ./tmp.py:12: GtkWarning: gdk_x11_atom_to_xatom_for_display: assertion > `atom != GDK_NONE' failed > resp

Re: [pygtk] Disappearing pango attributes

2009-06-25 Thread John Finlay
Krzysztof Kotlenga wrote: > Hi, > > I have a program which, I believe, should do the same thing in both > Python and C - set pango attributes on a label. The C version works > as expected. In PyGTK version attributes get applied only on the first > character. Any ideas why does this happen? I attac

Re: [pygtk] gtk.TreeModel.iter_children() method, how often should it be called?

2009-06-22 Thread John Finlay
Try asking this question on the gtk list gtk-l...@gnome.org. It's more likely someone there would have the answer. John Gerald Britton wrote: > I don't think that makes sense. For example, it does stop calling > iter_children at some point and display the tree. In my case, the > first time the

Re: [pygtk] button-press-event on a TreeViewColumn Header?

2009-06-17 Thread John Finlay
Alessandro Dentella wrote: > On Wed, Jun 17, 2009 at 08:16:37PM +0430, saeed wrote: > >> I even tried to use a custom class: >> class MyTreeviewColumn(gtk.TreeViewColumn, gtk.EventBox): >> def __init__(self, *args): >> gtk.TreeViewColumn.__init__(self, *args) >> gtk.EventBox.__

Re: [pygtk] Difficulty with rich text in gtk.TextView

2009-04-19 Thread John Finlay
Dennis Honeyman wrote: > Hi everyone. I've been working on a simple rich text component for a > project I've been working on using a gtk.TextView, and while I have > something that's usable (in a very loose sense of the word =), there > are a couple of problems I'm having that I can't figure out h

Re: [pygtk] Getting string with in pixels

2009-02-14 Thread John Finlay
vlad...@atlas.cz wrote: > Walter Leibbrandt napsal(a) : > > >> Hi, >> >> Vladimír Jícha wrote: >> >>> Hello, >>> >>> I'm trying to get width of a text string. I found a FAQ 4.15 >>> (http://faq.pygtk.org/index.py?req=show&file=faq04.015.htp) which has a >>> solution for this. But unfortu

Re: [pygtk] Fwd: Question

2009-02-10 Thread John Finlay
Johan Dahlin wrote: > -- Forwarded message -- > From: Rodrigo Almeida > Date: Tue, Feb 10, 2009 at 6:37 PM > Subject: Question > To: pygtk-...@async.com.br > > > Hello Friends, > > I'm a programmer from Brasil, and i am doing an application using pygtk. > I would like to know if yo

Re: [pygtk] Simple question on reusing stock item

2009-02-09 Thread John Finlay
Alessandro Dentella wrote: > Hi, > > i'd like to use stock item in menu entries with modified labels to better > suit context. > > * MenuItem doesn't allow to use images (reasonable) > * ImageMenuItem doesn't appearently allow to change label (really???) > > I think I could go with Icon

Re: [pygtk] synchronizing HPaned widgets

2009-02-05 Thread John Finlay
Stephen Langer wrote: > On Feb 5, 2009, at 3:15 PM, John Finlay wrote: > > >> Stephen Langer wrote: >> >>> Hi -- >>> >>> I'm hoping that someone can tell me if this is a bug or if I'm >>> doing something wrong.

Re: [pygtk] synchronizing HPaned widgets

2009-02-05 Thread John Finlay
Stephen Langer wrote: > Hi -- > > I'm hoping that someone can tell me if this is a bug or if I'm doing > something wrong. > > I have two HPaned widgets whose separators I'd like to keep > synchronized. Both Paneds are in the same VBox, so they have the same > width. > > As described at http:

Re: [pygtk] Treeview: How to set Font Size in Column Titles?

2009-02-04 Thread John Finlay
darethehair wrote: > Hello all! > > From the PyGTK docs, I know the various ways to change the font size in > 'treeview' columns/cells, but they appear to only work on the column > *data*, and not the column *titles*. The effect of this is that I can > make my fonts (for example) smaller and g

Re: [pygtk] TreeView selection issue

2009-01-29 Thread John Finlay
A minor nit. The cursor is not the same as the selection. To see the difference press Control-n. The cursor is identified by the outlined box. Of course it's usually the same as the selection. John Alan F wrote: > > > > Is there some reason why you are not using the TreeSelection "changed" > >

Re: [pygtk] Treeview/model: Problems with Expanding and Selecting Rows

2009-01-27 Thread John Finlay
darethehair wrote: > : > > I do not understand why my mouse clicks on the 'expansion' arrow is > interpreted as an entire 'row selection' instead :( > Bug in your program? On my system clicking the expander does not change the seslection. John ___ py

Re: [pygtk] Treeview/model: Problems with Expanding and Selecting Rows

2009-01-27 Thread John Finlay
darethehair wrote: > Hello Folks! > > The PyGTK tutorial example named 'basictreeview.py' works fine for me. > When I click on the 'expander' arrow for a row, it instantly expands to > show the child rows under it. > > In my case, I am using a 'lazy treeview' to only populate the child rows > as I

Re: [pygtk] TreeView selection issue

2009-01-26 Thread John Finlay
Alan F wrote: > Hi > > I am new to GTK programming. I want to create a program that displays > the sub-folders of a main folder in a tree view format. Once I find > the particular sub-folder , I want to be able to click on it to > display the contents of that folder. When the contents of that fo

Re: [pygtk] TreeView/cell/signals

2009-01-23 Thread John Finlay
Alessandro Dentella wrote: > ... the same problem, a different point of view... > > If I enter a CellRendererText in editing mode I can press return and the > mode switched and signal 'edited'is emitted. > > Who is responsable for that? I guess is the editable as I can't imagine > anything else...

Re: [pygtk] Updating a TextBuffer line by line

2009-01-22 Thread John Finlay
Daniel Roesler wrote: > Ok, I tried that, but it's giving an error about the number of > arguments sent to read_output. "TypeError: display_details() takes > exactly 2 arguments (3 given)" > > Here's my code: > -- > gobject.io_add_watch(command.stdout, gobject.IO_IN | gobj

Re: [pygtk] Updating a TextBuffer line by line

2009-01-22 Thread John Finlay
Daniel Roesler wrote: > Howdy again, > > I am running into a problem displaying stdout from a subprocess > command. I have a loop that checks to see if the subprocess is still > active, then reads a line in from stdout and sends it to the text > buffer. However, I can't seem to get my text buffer t

Re: [pygtk] TreeViewColumn sizing

2009-01-14 Thread John Finlay
The "expand" property of a TreeViewColumn is False by default. You have to set_expand(True) the first two columns in your TreeView. John Daniel Hernández Bahr wrote: > this is the thing: > > def init_files(): > for column in self.updates_view.get_columns(): >

Re: [pygtk] Entry.connect_after('changed', ...) doesn't see updated cursor position

2008-12-30 Thread John Finlay
Yang Zhang wrote: > Hi, I have a signal handler connected to an Entry's 'changed' signal, > but it never sees the updated cursor position, only the previous cursor > position. E.g., if I start with an empty Entry and then type 'a', > Entry.get_text() returns 'a', but Entry.get_position() return

Re: [pygtk] Problem with Notebook - stop-emission doubts

2008-12-26 Thread John Finlay
Alessandro Dentella wrote: > On Wed, Dec 24, 2008 at 01:22:49PM +0100, Gian Mario Tagliaretti wrote: > >> On Wed, Dec 24, 2008 at 9:57 AM, Frédéric >> wrote: >> >> >>> PS: BTW, where did you find the stop_emission() method? I can't retreive it >>> in the doc... >>> >> it a gobject m

Re: [pygtk] Problem with Notebook

2008-12-26 Thread John Finlay
Frédéric wrote: > On mercredi 24 décembre 2008, John Finlay wrote: > > >> I don't see how that would happen. I guess a small self-contained >> example would illustrate the problem. >> > > Here is a little example... > > I block switching to the

Re: [pygtk] Problem with Notebook

2008-12-24 Thread John Finlay
Frédéric wrote: > On mercredi 24 décembre 2008, John Finlay wrote: > > >> Since you just want to stay on the same page (assuming you mean the >> currently displayed page) then you should be able to stop the emission >> of the 'switch-page' signal using: >

Re: [pygtk] Problem with Notebook

2008-12-23 Thread John Finlay
Frédéric wrote: > Hello, > > I use a Notebook widget. I added the following callback to > the 'switch-page' signal: > > def __onNoteBookSwitchedPage(self, widget, page, page_num): > if page_num == 0 and self._model.camera.lens.type_ == 'fisheye': > controller = WarningMessageController

Re: [pygtk] hide on delete_event()

2008-12-19 Thread John Finlay
Frédéric wrote: > On vendredi 19 décembre 2008, Frédéric wrote: > > >>> Then don't use run(), connect a callback to the "response" signal and >>> put all the dialog processing in that. You still need to handle the >>> "delete-event" signal to prevent the dialog closing and put the >>> destroy()

Re: [pygtk] hide on delete_event()

2008-12-19 Thread John Finlay
Frédéric wrote: > On vendredi 19 décembre 2008, John Finlay wrote: > > >>> dialog.connect("destroy", destroy) >>> >> You probably mean to connect to the "destroy-event" signal in the above >> though it's not likely tha

Re: [pygtk] hide on delete_event()

2008-12-19 Thread John Finlay
Frédéric wrote: > Le 19/12/2008, "John Finlay" a écrit: > > >> Frédéric wrote: >> >>> It seems that all documentation related to that point refer to gtk.Window >>> widgets, and it works fine. But if the main window opens a gtk.Dialog, >

Re: [pygtk] hide on delete_event()

2008-12-19 Thread John Finlay
Frédéric wrote: > Le 5/12/2008, "Christian Becke" a écrit: > > >> Peyman schrieb: >> >>> I have tried every variation, but I will try it once again...Nope, >>> still doesn't work. I tried returning: True, False, 0, 1, gtk.TRUE, >>> and gtk.FALSE >>> >> This works for me (python 2.5.

Re: [pygtk] Unable to run your tutorial examples

2008-12-16 Thread John Finlay
A.K.Karthikeyan wrote: > Hello PyGTK people, > > I have tried to run *pygtkconsole.py* > and > *gpython.py* > found in http://www.pygtk.org/pygtk2tutorial/ch-Introduction.html

Re: [pygtk] TreeView - Making whole row colored, Again

2008-12-10 Thread John Finlay
Kevin wrote: > Greetings, > > I came across an old message in the archives at > http://www.mail-archive.com/pygtk@daa.com.au/msg15480.html , which sounds a > lot like I want to do (though I want to work with background colors rather > than foreground colors). But I was thinking: couldn't I just

Re: [pygtk] gtk.Image write text inside Image

2008-11-07 Thread John Finlay
Luis Gonzalez wrote: > Hi to all , > > I have a gtk.Image load from file. > > I want to write text inside this Image and then write to a file (jpg or png). > > I try to do use gtk.gdk.Pixbuf but to write text , draw lines , draw > rectangle I need a drawable object like gtk.gdk.Pixmap. > > How can

Re: [pygtk] spinbutton set value and signal

2008-11-05 Thread John Finlay
Frédéric wrote: > On mercredi 05 novembre 2008, Frédéric wrote: > > >> Is there a way to set the value of a spinbutton without having >> its 'value-changed' signal emitted? >> > > I mean set the value from the code, not from the GUI... > > You could save the handler id and use handler_bl

Re: [pygtk] inhibate menu of window manager

2008-11-05 Thread John Finlay
he WM that you don't want to display the close button in the window frame. > John Finlay wrote: > >> awalter1 wrote: >> >>> Hello, >>> >>> In my application python/gtk, I want to inhibate the item "close" from >>> th

Re: [pygtk] inhibate menu of window manager

2008-11-04 Thread John Finlay
awalter1 wrote: > Hello, > > In my application python/gtk, I want to inhibate the item "close" from the > standard menu available in all windows (bottom up of the window) and that > allows actions as : minimize, maximise, ... close. > If it is not possible to do that, which signal may I connect to

Re: [pygtk] pygtk, drawing area

2008-11-03 Thread John Finlay
Tomáš Dohnálek wrote: > Hello, > i have some trouble with drawing area. I am actually not able to > configure colours of lines and other object. > > self.gc.set_foreground(gtk.gdk.Color(1,1,6)) > widget.window.draw_rectangle(self.gc, True, x*70, y*70, 70, 70) > > I thought that this wil

Re: [pygtk] Adding progressbar into a liststore

2008-11-02 Thread John Finlay
Timo wrote: > Hello, I want to make some sort of downloadmanager like Firefox has, but > not that advanced. Just a window that adds a progressbar (and maybe a > label) for each download. But I already get stuck by adding a > progressbar into the liststore. > This is what I have: > > You could

Re: [pygtk] Two models: can I have only one?

2008-10-29 Thread John Finlay
José Luis wrote: > Hello to all! > > First, I explain my situation: > > I have one treeview and one combobox on my GUI. The treeview model > contains objects (it is a ListStore(object)). The ComboBox model has > only strings (ListStore(str)). > > My problem is that the information represented by

Re: [pygtk] returning window.handle from drawingarea

2008-10-26 Thread John Finlay
Patty Ackermann wrote: > hi, > > I have initialized a gtk.DrawingArea() object and am trying to return > window.handle, but it's always returning None. > Anyone have any ideas? If you mean that the drawingarea.window attribute is None it's usually because the drawingarea hasn't been realized so c

Re: [pygtk] How can I suppress redraw of a gtk.ScrolledWindow and children until I'm done changing stuff?

2008-10-26 Thread John Finlay
Joel Hedlund wrote: > Hi all! > > I've got a large widget (W) in an alignment in a viewport in a small > scrolledwindow (S). S overrides the do_scroll_event method, so that > ctrl-scroll zooms by doing W.set_size_request(). Since what's under the > mouse pointer should stay put and not be scroll

Re: [pygtk] Filechooserbutton callback

2008-10-23 Thread John Finlay
Frédéric wrote: > On jeudi 23 octobre 2008, John Finlay wrote: > > >>> Using the selection-changed signal does not work; it is never emited. >>> >> Works for me on: >> >> Python 2.5.1, PyGTK 2.12.0 (Gtk+ 2.12.5) >>

Re: [pygtk] Filechooserbutton callback

2008-10-22 Thread John Finlay
Frédéric wrote: > On mercredi 22 octobre 2008, John Finlay wrote: > > >> AFAICT the FileChooserButton is a replacement for using an entry/label >> and associated file browser button. It only allows selecting one >> existing file or folder and displays the name of

Re: [pygtk] How to do_size_allocate properly in a gtk.Viewport subclass?

2008-10-22 Thread John Finlay
Joel Hedlund wrote: > Hi! > > I was directed here from comp.lang.python, so sorry for the cross-post. > I've also raised this issue on #pygtk and #gtk+ but with no luck. I > haven't been able to solve this even with aid of google, the pygtk > reference and the gtk C source, so pretty please he

Re: [pygtk] Filechooserbutton callback

2008-10-22 Thread John Finlay
Frédéric wrote: > Hello, > > I added a Filechooserbutton in my GUI (using glade-3). When I clik on the > button, it opens the file dialog, and I can choose a file. > > But how can I be notified that the user has used that button? What signal > to bind, so I can retreive what was the user action (Ac

Re: [pygtk] Possible error in the reference manual

2008-10-21 Thread John Finlay
Eric S. Raymond wrote: > I think I've spotted an error in the Reference: > > --- pygtk-gobject.xml (revision 3046) > +++ pygtk-gobject.xml (working copy) > @@ -513,7 +513,7 @@ > connect_object() method. For example, a call with a > function handler: > > - handler_id = object("signal_name

Re: [pygtk] Is the pygtk tutorial still being maintained?

2008-10-19 Thread John Finlay
Eric S. Raymond wrote: > In the course of a recent project, I found myself consultung the pygtk > tutorial and developed some updates abnd additions for it. I mailed > one to John Findlay but received no response. > > Oops. Your email got buried until you reminded me of it. > I have written doc

Re: [pygtk] Table resize

2008-05-22 Thread John Finlay
[EMAIL PROTECTED] wrote: Hi! I have a table with 4 cells. A scrolledwindow attached to the top-left and custom scrollbars top-right and bottom-left. On resizing, the left (vertical) scrollbar should retain its width. The bottom (horizontal) scrollbar should retain its height. I tried various

Re: [pygtk] setting a filter for gtk.FontSelection

2008-05-05 Thread John Finlay
Le Roux Bodenstein wrote: This feature was removed from gtk after 2.2. There should be a note similar to the note in the description of the FontSelectionDialog documentation. Aah thanks. So it is a bug in the documentation? I don't mind just using a normal widget and populating it with t

Re: [pygtk] Pygtk does not play nicely with speech-dispatcher

2008-04-25 Thread John Finlay
James Simmons wrote: Michael, Thanks for the tip! It was a big help. I put gtk.gdk.threads_init() in the __init__ method of my program and I did get callbacks. It looks like I didn't get callbacks for every word, but Pygtk seems to not be the problem anymore. Thanks again, The problem is

Re: [pygtk] CellRendererCombo Question

2008-04-25 Thread John Finlay
Andrea Caminiti wrote: hi john: is there a way to do that wrapping but for rows in the combobox? becuase i have a combobox with 8 elements (image + label) and so the pop down list is very large. it would be great to do that. I must have missed a message. Is the problem that you have a combo

Re: [pygtk] "shrink" property of gtk.Paned

2008-04-23 Thread John Finlay
Geoff Bache wrote: Hi all, Is there any way to set up gtk.Paned such that automatic shrinking on resize never occurs, but shrinking by manually dragging the separator is still allowed? As far as I can see setting shrink=False prevents both from occurring. If I understand your situation the de

Re: [pygtk] liststore (ComboBoxEntry) alignment (justify)

2008-04-23 Thread John Finlay
Andrea Caminiti wrote: - Original Message From: Andrea Caminiti <[EMAIL PROTECTED]> To: John Finlay <[EMAIL PROTECTED]> Sent: Wednesday, April 23, 2008 9:16:24 AM Subject: Re: [pygtk] liststore (ComboBoxEntry) alignment (justify) Andrea Caminiti wrote: hi

  1   2   3   4   >