[pygtk] Unicode String
Hi guys! I want to know suggestion on how to convert a string to unicode... The gtk requires unicode strings on the widgets, now either I define the string as u'some string' or I define an attribute enconding (self.enc='iso8859-1') and for each string I use unicode(string, self.enc)... To access the string I use string.decode(self.enc)... Is this the best way to convert string to unicode? thanks for all help! = -- Michel Thadeu Sabchuk Curitiba/PR __ Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis! http://br.geocities.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/
Re: [pygtk] Executing commands without callbacks...
Hi Christian, sorry I mail you a private message, I didn't see the message was to you... The best choice for me is the idle_add(...) function. I will make a checklist, a couple of tests will be make and each interaction I want to do another thing... I do something simple: ... self.iteraction=0 gtk.idle_add(make_test) ... def make_test(self): ret=test(self.iteraction) self.iteraction+=1 return ret ... def test(self, iteraction): list=(self.test1, self.test2, self.test3, self.test4) try: self.model.append(row=lista[n]()) except: return 0 return 1 ... The model is a gtk.ListStore widget and each function in the list return a tuple formated to this model... The problem is that in the 3rd test I need to open a popup window calling some user interaction (inserting a floppy)... The popup opens but the idle_add stills running (I want the idle_add stops when the popup opens and start when the popup closes... I have some ideas I will try to implement, but if someone have another suggestion :) Thanks for all help Chistian! = -- Michel Thadeu Sabchuk Curitiba/PR __ Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis! http://br.geocities.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] Executing commands without callbacks...
Hi guys! I am working on a checklist program, it's a simple program, I create a window with a close button and a treeview... In this treeview I have a liststore with 2 columns, the first with CellRendererToggle, and another with CellRendererText... The problem is that I execute a gtk.main() to put the program in the mainloop... I need to populate the liststore, but or I populate before showing all the widgets with gtk.main() or I execute next to the gtk.main(), in this case the list are populated only when I close the app... Is there a way to define a callback when the program shows the app? thanks for all help and sorry my poor english :) = -- Michel Thadeu Sabchuk Curitiba/PR __ Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis! http://br.geocities.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] How can I load a .glade file as string?
Hi guys! I want to put the glade xml file in a string inside my program, is there a way to load the xml file from this string? I try to create a tmpfile with os.tmpfile() and then use this file to load xml, but I can't get the name of this file... Do someone have an idea? thanks for the help... = -- Michel Thadeu Sabchuk Curitiba/PR __ Yahoo! Mail: 6MB, anti-spam e antivírus gratuito! Crie sua conta agora: http://mail.yahoo.com.br ___ 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] How to implement a drag'n drop?
Hi guys! I have working with drag and drop... It's a simple case, I have 2 TreeView with the smae type of columns each... Both are drag_source and both are drag_dest... When the signal drag_drop occours, I remove the line from the first list and append to the second list... This are working ok but I want to know if this is the best way... I look at examples with drag_data_get and drag_data_received, I couldn't make the signal drag_data_received occour, so I use the drag_drop signal... I won't send the program code coz I need to translate and comment it :) But I will send tomorrow if is necessary. thanks for the help and sorry my poor english... = -- Michel Thadeu Sabchuk Curitiba/PR __ Yahoo! Mail: 6MB, anti-spam e antivírus gratuito! Crie sua conta agora: http://mail.yahoo.com.br ___ 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] How change the foreground color of a entry?
Hi guys! I want to know how to change the foreground color of a GtkEntry... I tried entry.set_use_markup(gtk.TRUE) and then use the pango markup to edit the color, but the entry does not have a set_use_markup method. I tried to use style setting (style['fg']=color_red) but I couldn't change the foreground, changing the background set the border of the entry to the color I chose, is there a ocult label in the entry? I think I can use the rc_parse or something like to change the color and it will work, but I need to make the color changing dinamic... thanks for any help! = -- Michel Thadeu Sabchuk Curitiba/PR Yahoo! Mail - o melhor webmail do Brasil http://mail.yahoo.com.br ___ 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] Where can I found gnome documentation?
Hi guys! I want to use gnome bindings in my gtk apps... Where can I found good documentation like pygtk2reference for gnome module? Thanks for help! = -- Michel Thadeu Sabchuk Curitiba/PR ___ Conheça o novo Cadê? - Rápido, fácil e preciso. 42 milhões de páginas brasileiras, busca por imagens e muito mais! http://www.cade.com.br ___ 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 or py + tk ?
Hi guys! I want to know about IDEs, either for pygtk, tk or wxwindows... And want to know if wxwindows can equiparate to pygtk... I use glade+vim to build my programs, but I know programs like pycrust, but the pycrust is a shell, I want a editor with the same functionality... I use anjuta for c/c++ in debian, is there anjuta for python? And what about scintilla? Is it a editor or a library (maybe it was a silly question, but I can found a executable made after the compilation of scintilla)... And what about programs like glade? I found wxglade and boa-contructor, the second is cool... thanks... -- Michel Thadeu Sabchuk Curitiba - Paraná - Brasil = -- Michel Thadeu Sabchuk Curitiba/PR ___ Yahoo! Mail Mais espaço, mais segurança e gratuito: caixa postal de 6MB, antivírus, proteção contra spam. http://br.mail.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/
Re: [pygtk] How to work with popup windows?
On Wed, 26 Mar 2003 14:26:22 -0500 John K Luebs [EMAIL PROTECTED] wrote: On Wed, Mar 26, 2003 at 11:20:16AM -0600, John Hunter wrote: Michel == Michel Thadeu Sabchuk [EMAIL PROTECTED] writes: Michel Hi guys! I'm learning gtk and pygtk (I started with Michel pygtk) and I want to know about a thing... I made a window Michel and I want, when I press a button, my program create a Michel popup window with a alert... I made it but I connect the Michel gtk.mainquit signal to the popup and all the windows are Michel killed! How to close only the popup window? Don't connect mainquit to the popup window. It does what it says -- quits the main program. Instead, you want to do something like Just as a clarification: gtk.mainquit() only quits the current (innermost) mainloop. You can actually nest a gtk.mainloop in your code somewhere which will run until gtk.mainquit is called. Control will then be returned to the nested mainloop caller. Ok, I understand... I knew that gtk.mainquit would destroy all windows, but I ned to start at some point ;) Now I know that I need just to use self.window.destroy(), I found my true problem, I need to learn gtk and pygtk, not just python-libglade :) Now I will read all the pygtk tutorial, i have much time now in my holydays! Thanks and sorry about my poor english again :) -- Michel Thadeu Sabchuk Curitiba - Paraná - Brasil ___ 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] How to work with popup windows?
Hi guys! I'm learning gtk and pygtk (I started with pygtk) and I want to know about a thing... I made a window and I want, when I press a button, my program create a popup window with a alert... I made it but I connect the gtk.mainquit signal to the popup and all the windows are killed! How to close only the popup window? Thanks for help and sorry my poor english :) -- Michel Thadeu Sabchuk Curitiba - Paraná - Brasil ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/