Re: [pygtk] How to modify python scripts at install time with distutils (was: How to build a PyGTK application with autotools for Windows)

2009-12-27 Thread Paul Pogonyshev
Leonardo Ferreira Fontenelle wrote: [...] Do anyone has advice on how do I get the setup script to edit a python a file at install time with such data? Maybe not in the best possible way, but Py-gtktree [*] does that. Check files 'gtktree/__init__.py.in' and 'setup.py'. [*]

Re: [pygtk] Problem with window.set_modal()

2009-11-26 Thread Paul Pogonyshev
Mauro Giacomini wrote: I have a problem with the set_modal function in a pygtk program I'm writing. The situation: I have a main window; when the user clicks on a button, a new window came up for the selection of a particular item in a treeview. When the user confirm the selection with the

Re: [pygtk] Get width from a pane

2009-11-25 Thread Paul Pogonyshev
Henning Bredel wrote: I want to load an image in the right pane of a gtk.HPaned. The image shall fit in the pane (I don't want to use a scrolled pane for that). How can I determine the currently used width of the right pane? Untested: paned.get_children () [1].allocation.width Paul

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

2009-10-17 Thread Paul Pogonyshev
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 li...@necoro.eu wrote: Well -- you are not initializing gtk.Image. So it's your very own mistake. I don't see a pygtk issue here.

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

2009-10-17 Thread Paul Pogonyshev
Pietro Battiston wrote: What I mean is: where is it written that every crash is a bug, if Pygtk developers themselves are not so clear on that (and I'm possibly too ignorant)? I am a PyGTK developer (not active currently), Matthias Classen is not. He is a developer of GTK+ itself. I think it

Re: [pygtk] ToggleButton args break with python2.6

2009-05-30 Thread Paul Pogonyshev
Thomas Mills Hinkle wrote: After a recent OS upgrade, I found that my code broke with the following: self.pause = gtk.ToggleButton(_('_Pause'),True) [...] python2.6 / pygtk 2.14: error There is a typo in PyGTK code. Can you check if the following helps? Paul diff --git

Re: [pygtk] try/except won't trap DeprecationWarning from OptionMenu

2009-01-21 Thread Paul Pogonyshev
Alessandro Dentella wrote: I'd like to use deprecated OptionMenu, but I can't stop the DeprecationWarning. Why is it different from a self produced one? It is not different. Please see the 'warnings' module. Last time I checked the warnings filters described there could be used to

Re: [pygtk] scrolledwindows and treeview

2008-12-28 Thread Paul Pogonyshev
francesco wrote: Hi, i have a treeview inside a scrolledwindows when i append a new row scrolledwindows daesn't scroll until bottom but stay up, if i scrolled by hand until bottom and so append a new row it scroll a bit and cover the last row inserted. HOw can i make scrolledwindows to

Re: [pygtk] Setting value of gtk.SpinButton without triggering the value-changed event.

2008-11-21 Thread Paul Pogonyshev
Osmo Maatta wrote: I need to change the self.width_spin (gtk.SpinButton) value, but in some cases I do not want the changed event to fire. [...] Actually you don't. There can be some handlers that you don't know of, e.g. GTK+ itself can install some handlers for its own purposes. Then, if

Re: [pygtk] PyGTK and threading

2008-08-17 Thread Paul Pogonyshev
Vláďa wrote: [...] However the are some things which are unclear to me. First I read that I have to use gtk.gdk.threads_enter() and gtk.gdk.threads_leave() whenever I want to modify something in main GUI. But if I remove these commands I don't see any change. It still works. What exactly

Re: [pygtk] Multilevel ListStore

2008-07-06 Thread Paul Pogonyshev
Shadi Azoum wrote: Any help would be greatly appreciated. Use gtk.TreeStore instead. Paul ___ 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/pygtk/

Re: [pygtk] gobject.type_register for class hierarchy?

2007-04-11 Thread Paul Pogonyshev
Skip Montanaro wrote: Suppose I have this sort of class relationship: class A(gobject.GObject): def __init__(self): gobject.GObject.__init__(self) ... class B(A): ... A is abstract. Do I need to call gobject.type_register for just A,

Re: [pygtk] pygtk.require(2.0) changed sys.path[0]

2007-03-18 Thread Paul Pogonyshev
Preben Randhol wrote: Hi If I do: try: import pygtk pygtk.require(2.0) except: pass then sys.path[0] will point towards /usr/lib/python2.4/site-packages/gtk-2.0 in stead of the script. Is this expected behavior? Yes, I think. require() above changes sys.path so

Re: [pygtk] Re: Re: Cannot subclass gtk.Widget

2007-03-09 Thread Paul Pogonyshev
John Dennis wrote: Could it be that 'do_' method naming is not subclassing but rather auto-magic signal connecting via method naming convention? Either way, I never did find any documentation on it. It could be, but is not the case. do_*() methods *do* override default class handlers. Paul

Re: [pygtk] Re: Cannot subclass gtk.Widget

2007-03-08 Thread Paul Pogonyshev
Jeffrey Barish wrote: I still don't understand what to do if my widget is composed of other widgets (rather than Cairo drawing and text). Normally, you just use boxes or something else to align those widgets. Or subclass e.g. gtk.HBox. However, if you feel adventurous, you can play with this

Re: [pygtk] HButtonBox and homogeneous

2007-01-17 Thread Paul Pogonyshev
Yann Le Boulanger wrote: Hi all, When I add 2 button in a HButtonBox, both have the same size, even if text in first button is smaller than text in second one. buttonbox.get_homogeneous() returns False. Same behaviour if I add buttons with buttonbox.add(button) or

Re: [pygtk] Submenu not getting focus

2006-12-29 Thread Paul Pogonyshev
Ian Larsen wrote: I believe I've encountered a bug in pygtk. When creating a context menu with a submenu, the submenu doesn't get focus until the menu item it's attached to is clicked (even though the submenu appears when the mouse is over the menu item.) Your code shows submenu after a

[pygtk] do_forall() and inheritance

2006-12-25 Thread Paul Pogonyshev
Hi, I derive a custom container from gtk.VBox. In it, I add a private widget, so I need to override do_forall() to return it in case `include_internals' is True. How do I call the original method? Calling gtk.VBox.do_forall() doesn't work: AttributeError: type object 'gtk.VBox' has no

Re: [pygtk] Activate a window

2006-12-17 Thread Paul Pogonyshev
Marcus Habermehl (BMH1980) wrote: Peter Morgan schrieb: Is there a way to disable just the maximize button on a windows bar, leaving only the minimize/iconify and close ? Please searching but cannot find.. Do you searching for set_resizable(False)? I also have this in a custom

Re: [pygtk] How do I access CellRenderer for a gtk.ComboBoxEntry?

2006-12-15 Thread Paul Pogonyshev
John Green wrote: According to the pygtk reference documentation for gtk.ComboBoxEntry: A new combo box entry is created and packed with a gtk.CellRendererText but no attribute mappings are set on the cell renderer. Some of the entries in the list are quite long and so I'd like to set

Re: [pygtk] Selecting a treeView row

2006-12-15 Thread Paul Pogonyshev
Brian wrote: On Fri, 2006-15-12 at 14:52 +, Peter Morgan wrote: Am going round the houses with this problem (and a pygtk newbie) I've got the function below load_data() and wish to keep the current col sort (which works) and the selected row. The number of rows does not change

Re: [pygtk] Displaying mathematical equations

2006-12-12 Thread Paul Pogonyshev
Martin Remie wrote: Hello, does someone know a way to display a math equation in a Glade/PyGTK GUI on a label(well, or something looking like a label)? Preferably by using LaTeX scripts I already have, e.g. for the equation below. A quick search turned this:

Re: [pygtk] update notification signals

2006-12-06 Thread Paul Pogonyshev
Mikael Lindqvist wrote: Hello, Is there a way of distinguishing if the value of a control is changed by the user or by code in some part of my program? To clarify, I'm setting the value of a spinbutton with code, i.e. spinbutton.set_value(...) . This causes the value_changed signal to be

Re: [pygtk] is GObject initialized?

2006-12-03 Thread Paul Pogonyshev
Johan Dahlin wrote: Is there a non-hackish way to find if GObject is initialized or not? It seems non-initialized objects have zero hash, while initialized have non-zero, but it is probably a hack to depend on it... Using the hash is fine. It's currently implemented like this:

[pygtk] is it possible to use custom class wrappers?

2006-12-03 Thread Paul Pogonyshev
Hi, Is it possible to use custom wrappers for GTK+-created objects? E.g. a combo box entry creates an entry (from C code, not from Python code.) Can I have a custom Python class (derived from gtk.Entry of course) instantiated as a wrapper for it? Paul

Re: [pygtk] g_markup_escape_text ()

2006-12-02 Thread Paul Pogonyshev
Gian Mario Tagliaretti wrote: 2006/12/1, Paul Pogonyshev [EMAIL PROTECTED]: It is probably added in latest versions. Not present in PyGTK 2.5. IIRC it was added in unstabòe 2.7 (stable 2.8) Is there something to use for the old versions? Or do I have to write my own workaround

[pygtk] is GObject initialized?

2006-12-02 Thread Paul Pogonyshev
Hi, Is there a non-hackish way to find if GObject is initialized or not? It seems non-initialized objects have zero hash, while initialized have non-zero, but it is probably a hack to depend on it... Paul ___ pygtk mailing list pygtk@daa.com.au

[pygtk] do_response() missing?

2006-12-02 Thread Paul Pogonyshev
Hi, I can't find do_response() method in PyGTK (version 2.6.1.) Is it really missing or is there some other approach? Paul ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ:

[pygtk] g_markup_escape_text ()

2006-12-01 Thread Paul Pogonyshev
Hi, What do I use in place of g_markup_escape_text()? I can't find the wrapper (is it missing?) Paul ___ 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/pygtk/

Re: [pygtk] g_markup_escape_text ()

2006-12-01 Thread Paul Pogonyshev
Gian Mario Tagliaretti wrote: 2006/12/1, Paul Pogonyshev [EMAIL PROTECTED]: What do I use in place of g_markup_escape_text()? I can't find the wrapper (is it missing?) import gobject gobject.markup_escape_text built-in function markup_escape_text It is probably added in latest