[pygtk] gobject.GObject - disconnect v. handler_disconnect?

2015-02-18 Thread Skip Montanaro
Is there any difference between GObject.disconnect and GObject.handler_disconnect? The minimal documentation indicates they are identical: http://www.pygtk.org/docs/pygobject/class-gobject.html#method-gobject--handler-disconnect Thx, Skip ___ pygtk

Re: [pygtk] gobject.timeout_add() won't work after calling gtk.threads_init() on windows xp

2013-06-26 Thread Skip Montanaro
Have you tried calling gtk.threads_init() before gobject.timeout_add(...)? On Wed, Jun 26, 2013 at 5:56 AM, Todong Ma gbstac...@gmail.com wrote: Hi, everyone Following simple code will hang forever on windows XP, and the check dialog text is never outputted to console. The window created in

[pygtk] Non-modal dialog?

2013-05-20 Thread Skip Montanaro
If I want a dialog to be non-modal, I can't use its run() method, is that true? I have a dialog which is defined in Glade to be non-modal, but calling its run() method sure makes it seem modal to me. Thx, Skip ___ pygtk mailing list pygtk@daa.com.au

[pygtk] Confused about a widget's name

2013-04-25 Thread Skip Montanaro
the name property in your UI definition. I can't tell what object gtk.Buildable is supposed to refer to. I have a reference to a widget (in this case, a radio button, but I think the problem is more general than that). How do I retrieve the name I gave it in Glade? Thx, Skip Montanaro

Re: [pygtk] Confused about a widget's name

2013-04-25 Thread Skip Montanaro
In a signal callback for a radio button, if I ask for its name (rb.get_name()) I always get GtkRadioButton. If I call get_property with name as the argument, I get the empty string. Looking at the docs for gtk.Builder, I saw this: Objects must be given a name with the id attribute, which

[pygtk] gobject.type_register for class hierarchy?

2007-04-11 Thread Skip Montanaro
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, just B or both? Thanks, -- Skip

Re: [pygtk] How to use a Tkinter widget inside a PyGtk HMI?

2005-05-20 Thread Skip Montanaro
Sebastien I would like to know if there is a method for using a Tkinter Sebastien widget inside a PyGtk or wxPython interface. If you're willing to use two separate processes perhaps you can use the gtk.Socket and/or gtk.Plug widgets:

Re: [pygtk] Application responsiveness problem

2005-03-26 Thread Skip Montanaro
used threads with gtk), but don't you have some sort of gtk thread initialization function(s) to call? See if something in section 20 of the PyGTK FAQ leads to a solution: http://www.async.com.br/faq/pygtk/index.py?req=index -- Skip Montanaro [EMAIL PROTECTED

Re: [pygtk] I must be missing something - can't get label of a menu item

2004-11-21 Thread Skip Montanaro
Christian One alternative which I use daily is, instead of relying on Christian the label, doing a set_data() on the menuitems as you put Christian them into the menu, and then using get_data() to grab it Christian back. I suppose I can figure it out, but is that an option from a

[pygtk] pango markup not working

2004-11-17 Thread Skip Montanaro
with the markup text? Thx, -- Skip Montanaro [EMAIL PROTECTED] http://www.mojam.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/

Re: [pygtk] pango markup not working

2004-11-17 Thread Skip Montanaro
Chris you need to add the the text with set_markup not set_text. The Chris use markup option, in glade only effects the value you give the Chris label in glade. Muchas gracias, seƱor. That did the trick. Skip ___ pygtk mailing list

[pygtk] making selected row visible in FileChooser?

2004-11-16 Thread Skip Montanaro
. Thx, -- Skip Montanaro [EMAIL PROTECTED] http://www.mojam.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/

Re: [pygtk] making selected row visible in FileChooser?

2004-11-16 Thread Skip Montanaro
Johan Have you tried select_filename() ? Yeah. Didn't help as far as I could tell. Skip ___ 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] making selected row visible in FileChooser?

2004-11-16 Thread Skip Montanaro
Tom With open dialogs, the correct file is selected (I believe -- I'm Tom not sure I've actually had reason to implement this). Sure, it's selected, but as far as I can tell the chooser isn't scrolled if necessary to make the selected file visible. Skip

Re: [pygtk] making selected row visible in FileChooser?

2004-11-16 Thread Skip Montanaro
Skip Sure, it's selected, but as far as I can tell the chooser isn't Skip scrolled if necessary to make the selected file visible. John Seems to work OK with GTK+ 2.5.4 and GTK+ 2.4.13 and a quick check John shows this bug: John

[pygtk] how to map modifier keys to bits in modifier masks?

2004-10-18 Thread Skip Montanaro
server v. 11) NumLock is actually MOD2 while Left Alt is MOD4 and Right Alt appears to be unassigned. Other people here at work run various other combinations of OS and X server software, so there is likely to be some variation. Thanks, -- Skip Montanaro [EMAIL PROTECTED] http://www.mojam.com

Re: [pygtk] output gtk.TextView

2004-10-17 Thread Skip Montanaro
it into the TextBuffer associated with your TextView widget. -- Skip Montanaro [EMAIL PROTECTED] http://www.mojam.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/

Re: [pygtk] I must be missing something - can't get label of a menu item

2004-10-15 Thread Skip Montanaro
I can then march through that [optionmenu] to find the active item, but can't find a label property or something similar from which I can extract the text. Johan That's FAQ 16.6: Johan http://www.async.com.br/faq/pygtk/index.py?req=showfile=faq16.006.htp Johan The

[pygtk] I must be missing something - can't get label of a menu item

2004-10-14 Thread Skip Montanaro
item, but can't find a label property or something similar from which I can extract the text. I've tried item.get_children(), item.get_child(), item.get_property(child) and item.forall(). Nothing yields a label widget. Any clues would be gratefully appreciated. Thx, -- Skip Montanaro [EMAIL

[pygtk] Paned widget w/ 2 panes or Box widget w/ resizers?

2004-09-24 Thread Skip Montanaro
that allows independent resizing of its children? As a workaround I could nest one HPaned widget inside another, but that doesn't provide for complete independence of the box sizes. Thx, -- Skip Montanaro Got spam? http://www.spambayes.org/ [EMAIL PROTECTED

Re: [pygtk] CList

2004-09-15 Thread Skip Montanaro
it/poke at it. -- Skip Montanaro Got spam? http://www.spambayes.org/ [EMAIL PROTECTED] ___ 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] Problem incorporating Python-subclassed widget into Glade

2004-09-01 Thread Skip Montanaro
? Thx, -- Skip Montanaro Got spam? http://www.spambayes.org/ [EMAIL PROTECTED] ___ 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] cleaner module reload?

2004-08-12 Thread Skip Montanaro
gobject.type_register(foo) at the module level to register gobject.GObject subclasses. To support module reloading I wrap it: Gustavo No needed for any of these hacks. Since pygtk 2.3.92, pygtk Gustavo allows registering the same python class with the type system

[pygtk] repetitive get_widget() using Glade?

2004-08-11 Thread Skip Montanaro
. How do I convince Glade to create new Window and TextView widgets on subsequent calls to get_widget()? Thx, -- Skip Montanaro Got gigs? http://www.musi-cal.com/submit.html Got spam? http://www.spambayes.org/ [EMAIL PROTECTED] ___ pygtk mailing list

Re: [pygtk] repetitive get_widget() using Glade?

2004-08-11 Thread Skip Montanaro
How do I convince Glade to create new Window and TextView widgets on subsequent calls to get_widget()? Johan Two possible solutions: Johan 1) Don't destroy the window, just hide it. But when the user pokes the x won't the underlying X windows be destroyed? Is there a way to

Re: [pygtk] repetitive get_widget() using Glade?

2004-08-11 Thread Skip Montanaro
John Connect to the 'delete_event' signal on the window. Return False John if you want the default handler to destroy the window and True to John indicate that you've handled the event and the default handler John should not be invoked. Thanks a million. Worked like a charm...

[pygtk] creating signals outside __init__()?

2004-08-02 Thread Skip Montanaro
to create signals? Thx, -- Skip Montanaro Got gigs? http://www.musi-cal.com/submit.html Got spam? http://www.spambayes.org/ [EMAIL PROTECTED] ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http

Re: [pygtk] creating signals outside __init__()?

2004-08-02 Thread Skip Montanaro
Gustavo The code above should work (at least used to work for me), Gustavo except that you need to call gobject.type_register(SomeClass) Gustavo right after the class definition. Thanks, I'll give that a whirl. Skip ___ pygtk mailing list

Re: [pygtk] GtkDial widget (where is pygtk wrapper or port)?

2004-07-29 Thread Skip Montanaro
/.override files. If so, you should be able to modify them slightly. If not, they aren't that tough to write. I'd look at the .def file for a functionally similar widget, such as GtkProgressBar or GtkScale. -- Skip Montanaro Got gigs? http://www.musi-cal.com/submit.html Got spam? http

Re: [pygtk] no signals when paned handles dragged...

2004-07-27 Thread Skip Montanaro
I discovered that some widgets only emit signals when values are changed via keyboard action, not mouse action. Christian It *really* looks like a bug to me, but I'm surprised the Christian SpinButton would have the same issue. Are you sure this is Christian reproducible

[pygtk] no signals when paned handles dragged...

2004-07-26 Thread Skip Montanaro
trait. Is there some logical reason why this stuff is done the way it is or is it just a case of nobody ever needed it? Thx, -- Skip Montanaro Got gigs? http://www.musi-cal.com/submit.html Got spam? http://www.spambayes.org/ [EMAIL PROTECTED

[pygtk] Modification to WidgetSaver.py

2004-07-23 Thread Skip Montanaro
and the corresponding potential for errors. -- Skip Montanaro Got gigs? http://www.musi-cal.com/submit.html Got spam? http://www.spambayes.org/ [EMAIL PROTECTED] ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read

[pygtk] user-controllable treeview column suppression

2004-07-20 Thread Skip Montanaro
Is it possible to give users the ability to suppress display of certain columns of a treeview? Perhaps I should be using a table widget instead. (Treeview widgets seem way too complex for fairly simple use, which I suspect is what they are used for 90% of the time.) Thx, -- Skip Montanaro Got

Re: [pygtk] user-controllable treeview column suppression

2004-07-20 Thread Skip Montanaro
Is it possible to give users the ability to suppress display of certain columns of a treeview? John Should be able to using gtk.TreeViewColumn.set_visible(): John http://www.pygtk.org/pygtk2reference/class-gtktreeviewcolumn.html#method-gtktreeviewcolumn--set-visible Thanks.

Re: [pygtk] user-controllable treeview column suppression

2004-07-20 Thread Skip Montanaro
Steve Kiwi has a nice way of doing it. Its CList object has a popup Steve menu on the right click where the user can decide which columns Steve to display. Thanks for the pointer. I installed it but importing Kiwi failed with an ImportError (no module named libglade). We import

Re: [pygtk] PyGTK in the standard Library

2004-06-18 Thread Skip Montanaro
- Is GTK available on Mac OSX without X11? Tkinter does have the advantage that TkAqua is available for non-X environments. -- Skip Montanaro Got gigs? http://www.musi-cal.com/submit.html Got spam? http://www.spambayes.org/ [EMAIL PROTECTED] ___ pygtk

Re: [pygtk] PyGTK in the standard Library

2004-06-18 Thread Skip Montanaro
1- PyGTK wraps GTK+ for Python. Which life-cycle do we follow, GTK's or Python's? Matt Both this point and the one below are best answered by the library Matt developers, if they are in favour of the idea of course :^) (I Matt should make it clear I _use_ pyGTK, I'm not a

Re: [pygtk] Refreshing windows

2004-05-17 Thread Skip Montanaro
://www.moeraki.com/pygtkreference/pygtk2reference/gobject-functions.html -- Skip Montanaro Got gigs? http://www.musi-cal.com/submit.html Got spam? http://www.spambayes.org/ [EMAIL PROTECTED] ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au

Re: [pygtk] How do I exit?

2004-04-23 Thread Skip Montanaro
seems sufficient. Thanks for the suggestions. -- Skip Montanaro Got gigs? http://www.musi-cal.com/submit.html Got spam? http://www.spambayes.org/ [EMAIL PROTECTED] ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

Re: [pygtk] How do I exit?

2004-04-23 Thread Skip Montanaro
Jan Or simply take a look at the FAQ: Jan http://www.async.com.br/faq/pygtk/index.py?req=showfile=faq20.003.htp Signals... ack! pfft! Thanks for the reminder to check the FAQ, but I like the solution I posted better. Skip ___ pygtk mailing

Re: [pygtk] How do I exit?

2004-04-23 Thread Skip Montanaro
Skip Signals... ack! pfft! Thanks for the reminder to check the FAQ, Skip but I like the solution I posted better. Except it's not working in the context of the larger application... :-( Skip ___ pygtk mailing list [EMAIL PROTECTED]

[pygtk] Gtk/PyGTK on Solaris/Intel

2004-04-05 Thread Skip Montanaro
to eval an object's __gdoc__ attribute seems to avoid the problem. Has anyone else encountered (and hopefully fixed) this problem? Thanks, Skip Montanaro [EMAIL PROTECTED] ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

[pygtk] Re: gtk radio button

2002-10-30 Thread Skip Montanaro
. -- Skip Montanaro - [EMAIL PROTECTED] http://www.mojam.com/ http://www.musi-cal.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/

Re: [pygtk] PyGTK Faq

2002-01-28 Thread Skip Montanaro
Where is the faq ... Christian I'm working on one in my spare time (which is why it is still Christian so short) at http://www.async.com.br/faq/pygtk/ Christian, One thing that might help to generate more input and to lessen your load is to add questions without answers when you

Re: [pygtk] newbie - basic question

2002-01-27 Thread Skip Montanaro
about the GtkPatternSpec* type, so it doesn't currently wrap that function. The second is available once the widget has a window. If w is a realized widget, w.window.get_root_origin() should work. -- Skip Montanaro ([EMAIL PROTECTED] - http://www.mojam.com

Re: [pygtk] newbie - basic question

2002-01-27 Thread Skip Montanaro
(Also looks like gtk.override needs updating.) Make that gtk.defs... -- Skip Montanaro ([EMAIL PROTECTED] - http://www.mojam.com/) ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

Re: [pygtk] Dialogs demo

2002-01-18 Thread Skip Montanaro
', 'PROGRESS_LEFT_TO_RIGHT', 'PROGRESS_RIGHT_TO_LEFT', 'SCROLL_PAGE_RIGHT', 'SCROLL_STEP_RIGHT', 'SIDE_RIGHT', 'STOCK_JUSTIFY_RIGHT', 'TEXT_WINDOW_RIGHT'] -- Skip Montanaro ([EMAIL PROTECTED] - http://www.mojam.com/) ___ pygtk mailing list [EMAIL

Re: [pygtk] GtkSpinButton question

2002-01-18 Thread Skip Montanaro
, val) w = gtk.Window() w.set_title(port slider) w.connect(destroy, gtk.mainquit) s = PortScale(21, 80) s.set_size_request(150, -1) w.add(s) w.show_all() gtk.mainloop() HTH... -- Skip Montanaro ([EMAIL PROTECTED] - http://www.mojam.com

Re: [pygtk] Dialogs demo

2002-01-17 Thread Skip Montanaro
'] YMMV... -- Skip Montanaro ([EMAIL PROTECTED] - http://www.mojam.com/) ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

[pygtk] inserting radio buttons into toolbars?

2002-01-16 Thread Skip Montanaro
I'm confused about the required value of the type arg to gtk.Toolbar .append_element when trying to insert a radio button into the toolbar. The Gtk docs say If type == GTK_TOOLBAR_CHILD_RADIOBUTTON, widget is used to determine the radio group for the new element. In all other cases,

[pygtk] wrapper for gtk_stock_add

2002-01-10 Thread Skip Montanaro
If case anyone wants to add new stock images to their applications, I submitted a patch last night to add a wrapper for gtk_stock_add to PyGtk. It's at http://bugzilla.gnome.org/show_bug.cgi?id=68363 The appended script demonstrates its use. -- Skip Montanaro ([EMAIL PROTECTED] - http

Re: [pygtk] threading support in development pygtk

2002-01-08 Thread Skip Montanaro
Mike To use the locking mechanisms, you'd first intialize the threads Mike with code like: Mike gtk.threads_init () Mike gtk.threads_enter () Mike gtk.mainloop () Mike gtk.threads_leave () Mike #... Now comes other code in another thread

Re: [pygtk] threading support in development pygtk

2002-01-08 Thread Skip Montanaro
James would be nice if the python interpreter lock was recursive :) Somebody recently rewrote most of threading.py in C for Windows. It was suggested that he tackle a number of interpreter lock issues, including recursion. Perhaps it won't be that far off. Skip

[pygtk] `GtkDialogFlags' is not an enum type

2002-01-03 Thread Skip Montanaro
I've been away from the Gtk 1.3 release cycles for a month or two. Upon returning to it yesterday, I got this new warning: `GtkDialogFlags' is not an enum type Is this something I need to worry about or will it go away on its own as new versions of PyGtk are released that accommodate some

[pygtk] GtkHtml2 wrapped into PyGtk

2001-11-30 Thread Skip Montanaro
Jonas, Thanks for the GObject-ified version of HtmlStream. I found the infloop (I had inserted calls to html_stream_close in a couple functions that were registered as close functions to html_stream_new. doh!) I am now able to render entire pages - graphics and all - from Python using Gtk.

Re: [pygtk] Pygtk 1.99 and threading.

2001-11-29 Thread Skip Montanaro
multiple threads (which is no big win as far as I can tell), what does it buy you? -- Skip Montanaro ([EMAIL PROTECTED] - http://www.mojam.com/) ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

Re: [pygtk] adding wrappers for gtkhtml2

2001-11-28 Thread Skip Montanaro
James If you want to see an example of distributing a binding outside James of the pygtk module, take a look at the gnome-python package. It James has been set up to build separately. Matt for example, when I wrapped atk: ... Matt The generic rule in pygtk cvs will

[pygtk] adding wrappers for gtkhtml2

2001-11-27 Thread Skip Montanaro
I decided to wrap the gtkhtml2 library today. Seemed easy enough, small gtkhtml2.defs and gtkhtml2.override files did the trick, or so I thought. Then I started wading through the morass known as autoconf/automake/etc and quickly gave up on trying to do it right. I ended up simply editing

Re: [pygtk] Better support for GError**

2001-11-18 Thread Skip Montanaro
Matt I've implemented this a bit differently (sans memory leak, etc) Matt and checked it in. Much appreciated. Skip ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

[pygtk] HTML widgets that work with latest PyGtk?

2001-11-14 Thread Skip Montanaro
Are there any HTML rendering widgets that work with the Gtk 1.3/2.0 API? Any that have been wrapped into PyGtk yet? Actually, as long as I'm thinking about this, are there any third-party widgets that have been wrapped for the latest PyGtk? Thanks, Skip

[pygtk] kwlist mismatches in gtk/gtk.override

2001-11-14 Thread Skip Montanaro
I've discovered a few kwlist length mismatches in gtk/gtk.override (in the new stuff). If you call one of them from Python, it complains about bad args to an internal function. I don't know if this is a recent addition to Python or not, but it's a nice one. Clued me in... I thought I would

Re: [pygtk] pygtk and pygnome documentation

2001-11-13 Thread Skip Montanaro
for x in names if pat.search(x) is not None] You may find this helpful. -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

Re: [pygtk] Threading problem

2001-11-11 Thread Skip Montanaro
your application so that only a single thread is messing with the display? If not, I'd recommend it. Also, my guess is that Python's thread stuff is going to be easier to use than Gtk's. If nothing else, it provides some higher level objects (Queue.Queue, for example). -- Skip Montanaro ([EMAIL

[pygtk] Better support for GError**

2001-11-07 Thread Skip Montanaro
://bugzilla.gnome.org/show_bug.cgi?id=63980 -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

[pygtk] Wrapping new types?

2001-11-06 Thread Skip Montanaro
I need to get at the IconFactory and IconSet types. It looks like all I need to do is add matcher.register_boxed('GtkIconSet', 'G_TYPE_BOXED') to codegen/argtypes.py in order to wrap the GtkIconSet type (boxed means opaque, right). Anything else? -- Skip Montanaro ([EMAIL PROTECTED

Re: [pygtk] pixmap buttons?

2001-11-01 Thread Skip Montanaro
to something on your local disk. -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ import gtk xpmfile = chicago.xpm class XPMFileButton(gtk.Button): def __init__(self, xpmfile): gtk.Button.__init__(self) self.xpmfile = xpmfile self.eid

[pygtk] Re: changing a combo's popdown strings from select-list callback?

2001-10-31 Thread Skip Montanaro
. Perhaps gtk_combo_set_popdown_strings should do something like this by default. Alternatively, it would be nice if the GtkCombo documentation warned about the potential problems of mucking with the list while it's active. -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi

[pygtk] changing a combo's popdown strings from select-list callback?

2001-10-29 Thread Skip Montanaro
that? Presumably, I need to wait until the Combo has popped down (and no longer has a pointer grab?) to change its popdown strings. (I'm using the CVS version of Gtk+, but I doubt it matters.) Thx, -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com

[pygtk] Why do some stock images not display?

2001-10-24 Thread Skip Montanaro
,c+1,r,r+1, aopt, aopt, 0, 0) r += 1 w.show_all() gtk.mainloop() This is extremely weird, because the pixbufs are hard-coded into Gtk. There are no files that can be missing. Can someone explain to me what's going on? Thanks, -- Skip Montanaro ([EMAIL PROTECTED]) http

[pygtk] how to sort properly by column and display right-justified text?

2001-10-23 Thread Skip Montanaro
I'm building a (not so) little file selector using the latest PyGtk stuff. In list mode I create a list (using the TreeView widget) with four columns: name, size, type and last mod time. I can click the column headers on any of these to sort the list using that column. It works with the

[pygtk] Bug crept into gtk-types.c...

2001-10-22 Thread Skip Montanaro
:38: warning: `PyGtk_FatalExceptions' defined but not used Looking at the code in question, I have to admit I don't understand what's going on (ignoring the errors and warnings for a moment). It sets *self, then Py_INCREFs *other. What's with that? -- Skip Montanaro ([EMAIL PROTECTED]) http

Re: [pygtk] Bug crept into gtk-types.c...

2001-10-22 Thread Skip Montanaro
Matt btw, if you want to know how this function works, see: Matt http://www.python.org/doc/2.2/api/number.html#l2h-229 Thanks, I eventually figured out the coercion stuff. To work around the problem I figured I'd just can float conversion for now. Seems safe enough, since apparently

[pygtk] Can't build gobjectmodule.o - missing CVS checkin?

2001-10-19 Thread Skip Montanaro
(or the .h file got checked in too soon). -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

[pygtk] What are the restrictions on hanging new signals on the widget tree?

2001-10-18 Thread Skip Montanaro
Using the Gtk 2.0 API, I have a subclass of GtkEntry to which I've attached three new signals: history-prev, history-next, and history-menu: class _HEntry(gtk.Entry): def __init__(self, *args): gtk.Entry.__init__(self, *args) self.set_name(_history_)

Re: [pygtk] What are the restrictions on hanging new signals on the widget tree?

2001-10-18 Thread Skip Montanaro
James class _HEntry(gtk.Entry): James def __init__(self): James gobject.GObject.__init__(self) James self.set_name(_history_) James gobject.type_register(_HEntry) James Note the gobject.type_register() call, and chaining to

[pygtk] pygtk, g_log warnings, and gdb

2001-10-10 Thread Skip Montanaro
(I've changed the subject because I take a left turn into gdb-land in the middle of this message.) James I may as well add that one of the aims is to never (or at least James hardly ever) spit out these gtk warnings. Many of the type James checks that might spit out these warnings

Re: [pygtk] How to delete Gtk objects

2001-10-10 Thread Skip Montanaro
(adding python-dev to this conversation because decisions about missing special methods vis a vis PEP 252/253 seem to me to definitely belong in that space.) I think that there may be some problems with extended types and __del__? Matt For example: Matt class

Re: [pygtk] how to set widget's foreground color?

2001-10-08 Thread Skip Montanaro
Matt On Mon, Oct 08, 2001 at 11:09:51AM -0500, Skip Montanaro wrote: gc = w.window.new_gc() color = gtk.gdk.color_parse(red) gc.set_foreground(color) Matt You'd be surprised, but it's actually the background that you want Matt to modify here. Matt

Re: [pygtk] Re: [Python-Dev] a bit confused about the new type/class stuff

2001-10-04 Thread Skip Montanaro
l [Button object (GtkButton) at 0x8293134, Button object (GtkButton) at 0x8296ac4, Button object (GtkButton) at 0x8397fb4] b = l[0] b in l Traceback (most recent call last): File stdin, line 1, in ? TypeError: Button.__cmp__(x,y) requires y to be a

Re: [pygtk] root window dimensions

2001-10-03 Thread Skip Montanaro
Matt Yesterday I bound gtk.gdk.get_default_root_window(), Matt gtk.gdk.screen_width(), etc. Thanks, yesterday I stumbled upon gtk/gdk/gdk.h and added some new entries to the gdk.defs file as well and submitted a request to bugzilla. Skip ___

[pygtk] cvs problem with pygtk/gobjectmodule.c

2001-10-03 Thread Skip Montanaro
access and a big hammer) look into this? Thanks, -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

[pygtk] a bit confused about the new type/class stuff

2001-10-03 Thread Skip Montanaro
, PyGtk, Python and friends. In particular, I believe I have a hierarchy of so-called classic classes. I'm going to toddle off an reread the various PEPs, but would appreciate an insight or two on where this error is coming from. Thx, -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com

[pygtk] Re: cvs problem with pygtk/gobjectmodule.c

2001-10-03 Thread Skip Montanaro
of the cvs server (and perhaps physical access and a big hammer) look into this? Thanks, -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ ___ pygtk mailing list [EMAIL PROTECTED

Re: [pygtk] a bit confused about the new type/class stuff

2001-10-03 Thread Skip Montanaro
... Skip (It's a bunch of wrappers around Gtk widgets. The wrappers happen Skip to use delegation instead of instantiation, so my Button class is Skip not subclassed from gtk.Button. In particular, it's *not* one of Skip the new subclassable types.) God, I was up way too

[pygtk] Re: [Python-Dev] a bit confused about the new type/class stuff

2001-10-03 Thread Skip Montanaro
Guido, Thanks for the various tips. I will check 'em out. Regarding the Don Beaudry hook, PyGtk was using ExtensionClass until recently. James Henstridge has just released the first cut at using your new type/class stuff in the past few days. So if you didn't use it, neither does PyGtk.

Re: [pygtk] gdk_gc_new got longer...

2001-10-02 Thread Skip Montanaro
James The gdk_gc_new_with_values() function is mapped to a method of James GdkDrawable (new_gc). So you can create GCs with: James gc = widget.window.new_gc() Thanks. Worked like a charm... Skip ___ pygtk mailing list [EMAIL

[pygtk] gdk_gc_new got longer...

2001-10-01 Thread Skip Montanaro
Before the recent updates, to get a new gc I called gtk.gdk_gc.new. Now I have to call gtk.gdk.gdk_gc_new. Shouldn't the method name be changed to simply gc_new? Thx, Skip ___ pygtk mailing list [EMAIL PROTECTED]

[pygtk] how to create a button displaying an xpm image?

2001-09-24 Thread Skip Montanaro
. What's the procedure in the 2.0 API to create pixmaps? Thx, -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

Re: [pygtk] how to create a button displaying an xpm image?

2001-09-24 Thread Skip Montanaro
James You should be able to use the James gtk.gdk.pixmap_colormap_create_from_xpm_d function. My gtk module doesn't have a gdk attribute: % python Python 2.1.1 (#6, Sep 24 2001, 09:14:11) [GCC 3.0.1] on linux2 Type copyright, credits or license for more information.

[pygtk] Sytles not stylin'

2001-09-21 Thread Skip Montanaro
this in the context of the GtkDrawingArea at one point. Any ideas why style settings don't seem to work with subclasses of Gtk widgets? Thx, -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ ___ pygtk mailing list

Re: [pygtk] Sytles not stylin'

2001-09-21 Thread Skip Montanaro
to be that the application programmer must name widgets intelligently so users can refer to them. -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman

Re: [pygtk] Sytles not stylin'

2001-09-21 Thread Skip Montanaro
Matt This raises a question - do we want to do gtk_widget_set_name by Matt default on extended classes? I don't think that's necessary, since its available to the application programmer. Besides, that names a widget instance, not a widget class, right? -- Skip Montanaro ([EMAIL

Re: [pygtk] Code snippet causes segfault. Please test.

2001-09-17 Thread Skip Montanaro
Tom Can someone that has installed gtk+ 1.3.7 and pygtk-1.99 test this Tom little script and see if it segfaults? I'm still unsure if this is Tom a local problem or a bug. Segfaults for me. Is multiple inheritance supported by ExtensionClass? -- Skip Montanaro ([EMAIL PROTECTED

[pygtk] pygtk compile errors

2001-09-17 Thread Skip Montanaro
these items to something else? Thanks, -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

[pygtk] pythonic table widget for Gtk+/PyGtk 2.0

2001-09-14 Thread Skip Montanaro
, but could also implement insert. This code is written assuming the new Gtk+ 2.0 API but doesn't yet use the new streamlined class names James announced the other day. I have no idea if it can be adapted to the Gtk+ 1.2 API. All feedback is welcome. -- Skip Montanaro ([EMAIL PROTECTED]) http

Re: [pygtk] how to get containers to recompute size from scratch?

2001-09-13 Thread Skip Montanaro
am still working to make things right. -- Skip Montanaro ([EMAIL PROTECTED]) http://www.mojam.com/ http://www.musi-cal.com/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

Re: [pygtk] Improving Start up time

2001-07-05 Thread Skip Montanaro
distribution). -- Skip Montanaro ([EMAIL PROTECTED]) (847)971-7098 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

Re: [pygtk] everything's black...

2001-07-04 Thread Skip Montanaro
James I have no idea what would cause this. I don't see that error James message (the program runs as expected). ... James if you haven'y already tried it, maybe doing make clean ; make James for at least gtk+ may help. Thanks, I'm in the process of doing that now. Skip

[pygtk] autogen errors, missing codegen/pygtk-codegen-2.0.in

2001-07-03 Thread Skip Montanaro
and will try building with it. -- Skip Montanaro ([EMAIL PROTECTED]) (847)971-7098 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

[pygtk] I'm confused about the abstraction present in pygtk2...

2001-07-02 Thread Skip Montanaro
API. I think it would be beneficial if the stuff that must be done manually tried to be as consistent. -- Skip Montanaro ([EMAIL PROTECTED]) (847)971-7098 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk

  1   2   >