[pygtk] TreeView reorderable

2008-07-09 Thread Seltzer
Hi, I have a tree view which contains a list of media items to be played, and some information about them. I would like to be able to let the user re-order this list, but if i just use "set_reorderable(True)" than they can actually drop one item onto another, and make the dropped item the child o

[pygtk] Shaped Buttons

2008-07-03 Thread Seltzer
Hi all, Ive been looking arround and i cant find a way to shape buttons. Specifically, i want to make a round button. I found some sources that recommended using the my_button.shape_combine_mask(pixmap,0,0) function, but i have not been able to get it to work. i keep getting a warning ( gtk_widg

[pygtk] Threading, Linux to Windows.

2008-03-04 Thread Seltzer
Hi, I'm having difficulty porting an application from linux to windows, mostly due to threads. I keep getting: AssertionError: Thread.__init__() not called >From a class that uses the threading class. On linux it was written as: class MyClass(threading.Thread): def __init__(self,otherstuff):

Re: [pygtk] Check if value-changed signal is emitted by user action

2008-02-26 Thread Seltzer
I had the same poblem for a long time. Right now we let the backend change the value normaly, and dont activate a value changed callback. For user interaction, we catch both the "button-press-event" and the "button-release-event" from the hscale. When we catch a button press event, i unblock the "

Re: [pygtk] gtk.Notebook

2008-01-07 Thread Seltzer
if using PyGTK 2.4, maybe try moving your connect down further, and sending the index that append_page returns to your handler. something like... ... page = self.mdi_book.append_page(scroller,hbox) btn.connect('clicked', self.on_close_btn, page) ... def on_close_btn(self, widget,da

[pygtk] xlib error

2007-12-08 Thread Seltzer
Hello, Every once in a while i get this error: Xlib: unexpected async reply (sequence 0x13cb)! It started happening after i rebuilt our gui using glade instead of just hand coding it. I cant get it to repeat with any regularity, but it happens often enough to be concerning. Ive never debugged an

Re: [pygtk] How to open a window from of other?

2007-12-05 Thread Seltzer
from what i understand, the __name__ property of a module is only set to main if the module is being run by itself. For example: __name__ does equal '__main__' in this case... $> python MyModule.py BUT in the following situation... $>python >>>import MyModule.py __name__ DOES NOT equal '__main_

[pygtk] vte term, log file

2007-12-05 Thread Seltzer
Hello, I have been trying to grab the standard out and send it both to a file, and a terminal window in my app for logging purposes, and have been having trouble getting it to show up in a vte.Terminal. This is mainly because i cant find the stdin of the terminal. Has any one else done a similar t

Re: [pygtk] Terminal Resizing

2007-11-29 Thread Seltzer
's change their size > acording to the users preferences, so that one terminal will expand and the > other one shrink. > > I have done just that using the gtk.VPaned and gtk.HPaned classes. They > can hold two widgest each so I just packed gtk.Paned inside gtk.Panedobjec

[pygtk] Terminal Resizing

2007-11-27 Thread Seltzer
Hello, i have three vte widgets arranged in a vertical box. each vte widget is inside of an hbox to group it with its scrollbar, and a frame to label it, like so. f_sos_out = gtk.Frame("stream control") term_sos_out = vte.Terminal() hb_sos_out = gtk.HBox() sb_sos_ou

[pygtk] TreeViewColumn background color

2007-10-23 Thread Seltzer
Hello, I was wondering if their was a way to set the whole cell background to be a single color. Right now I'm doing it with gtk.TreeViewColumn('Column Title', cell_renderer, text=0, foreground=1) Which works fine... although it sets the background with some white space around it. I would like

[pygtk] Rounded Windows

2007-10-14 Thread Seltzer
Hello I was wondering if any one knows of a tutorial/example set of how to use PyGtk in conjunction with Cairo to create rounded/transparent windows. Using Cairo isn't that important, any well documented way of doing this would be fine. I have already been to Cairo's home page, but most/all of t

Re: [pygtk] Pygtk app and hangs.

2007-10-08 Thread Seltzer
i use gtk.gdk.threads_init() as well, and don't wrap the main loop in threads enter/leave, all seems to work well... hope it helps, felix On 9/23/07, John Stowers <[EMAIL PROTECTED]> wrote: > > > > > Q. Anything I missed, or any suggestions. Is there a > > comprehensive list/scheme on how to writ

[pygtk] Splash Screen/Threading

2007-10-06 Thread Seltzer
Hello, I'm having some trouble getting a splash screen to work. After looking around for a while, i found advice to do it like so: gtk.threads_init() gtk.gdk.threads_init() ... sp = splash() sp.do_show() while gtk.events_pending(): gtk.main_iteration() gobject.timeout_add(9000, sp.destroy)

Re: [pygtk] Change background color?

2007-06-27 Thread Seltzer
that works for most windows, as does modify_bg(...), but ... """ modify_bg() only affects widgets that have an associated gtk.gdk.Window. Widgets that do not have an associated window include

[pygtk] mpeg4 preview?

2007-06-22 Thread Seltzer
hello, I need to be able to make a preview of an mpeg4, and display it in a gtk.Image, or a similar object. I also only have gtk2.4 at the most, and no access PIL, (development platform requirements...) any ideas on how to do something like this? thanks, felix. ___

Re: [pygtk] FileChooserButton - signal when the dialog closes

2007-06-22 Thread Seltzer
i catch the "delete_event", and attach it to a custom hander. If you want to be able to open the same FileChooser again, than make sure that you return True from your custom handler, so the signal wont propagate. also, i have added my own "ok" and "cancel" buttons to the bottom of the dialog, and

[pygtk] Re: unknown freeze bug

2007-06-18 Thread Seltzer
problem like this? Whats out there? Where would you look? thanks again, felix. On 6/18/07, Seltzer <[EMAIL PROTECTED]> wrote: hi all, iv been getting a weird bug lately from a threaded pygtk program, and im not sure where to start. The gui has a pop up window that the user can open. This

[pygtk] unknown freeze bug

2007-06-18 Thread Seltzer
hi all, iv been getting a weird bug lately from a threaded pygtk program, and im not sure where to start. The gui has a pop up window that the user can open. This pop up than needs to inactivate the main window, stopping user interaction, until the user closes the pup up. I also have real time upd

Re: [pygtk] PyGtk, Standard way to thread?

2007-06-16 Thread Seltzer
You can use the threading module to create a thread class, and then call its functions, etc. something like: class my_thread( threading.Thread ): def __init__( self, channel, details ): threading.Thread.__init__ ( self ) ##you need this self.my_args = "hello" d