Re: [pygtk] broken Reordable TreeView & 2.22?
Quoting "Alessandro Dentella" : I just realized that pygtk 2.22 has broken .set_reordable(). Given a TreeView with set_reordable() I can grab the row and move it around, but the selection underneath does not change and it not possible to drop it in a different position. I verified this behaviour on 2 XP boxes with gtk installed from the all-in-one installer. I attach a simple script that shows the problem: under XP + 2.22.1 I can't drop the lines in new positions. Is this a known issue? do other people verify this? This is a known issue with GTK+ 2.22 on windows (just tested against GTK+-2.24 and the problem has not yet been solved). Refer to https://bugzilla.gnome.org/show_bug.cgi?id=641924 for more info. As noted on that bug report, manually handling DnD like is done in http://git.gnome.org/browse/pygtk/tree/examples/gtk/treeview_dnd.py still works fine. mvg, Dieter This message was sent using IMP, the Internet Messaging Program. ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
[pygtk] broken Reordable TreeView & 2.22?
hi, I just realized that pygtk 2.22 has broken .set_reordable(). Given a TreeView with set_reordable() I can grab the row and move it around, but the selection underneath does not change and it not possible to drop it in a different position. I verified this behaviour on 2 XP boxes with gtk installed from the all-in-one installer. I attach a simple script that shows the problem: under XP + 2.22.1 I can't drop the lines in new positions. Is this a known issue? do other people verify this? sandro *:-) -- Sandro Dentella *:-) http://www.reteisi.org Soluzioni libere per le scuole http://sqlkit.argolinux.orgSQLkit home page - PyGTK/python/sqlalchemy ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Hide glade window while running external script
Il giorno mer, 06/04/2011 alle 08.31 -0300, Vinicius Massuchetto ha scritto: > 2011/4/6 Pietro Battiston : > > Il giorno mer, 06/04/2011 alle 08.00 -0300, Vinicius Massuchetto ha > > scritto: > >> Hi list! > >> > >> I think I must be missing some signals concepts here, but I having > >> trouble reproducing the following behavior: > >> > >> 1. Click on a button; > >> 2. Hide the current window; > >> 3. Run an external script (that will open another program's window); > >> 4. Show again the PyGTK window after the external program is closed. > >> > >> For that, I've tried something like: > >> > >> class Foo: > >> > >> def __init__(self): > >> self.gladefile = gladefile > >> self.gladetree = gtk.glade.XML(self.gladefile, 'some_window') > >> self.window = self.gladetree.get_widget('some_window') > >> events = { 'on_code_submit_clicked' : self.submit } > >> self.gladetree.signal_autoconnect(events) > >> > >> def submit(self): > >> self.window.hide() > >> os.system('external_script') > >> self.window.show() > >> > >> What's happening, is that when the button is clicked, it stay pressed, > >> then the script runs, and after the external program is closed, the > >> window "blinks", being hidden and shown again. > >> > >> I also tried the "pressed" and "released" signals. > >> > >> What I can imagine is that the event is being run _during_ the > >> _clicked_ event, not after. That's why the window remain opened. I > >> couldn't find something like `gtk_signal_connect_after` [1] on the > >> glade page [2], that leaves me totally lost about it. > >> > > > > > > There may be cleaner solutions, but the first thing which comes to my > > mind is replacing > >os.system('external_script') > > with > >glib.idle_add(os.system, 'external_script') > > (and maybe replacing "os.system" with "subprocess.call" - but that's not > > pygtk-related). > > Doing `glib.idle_add (subprocess.call, ['external_script', 'param'])` > will make the window to: > > 1. Disappear; > 2. Appear with no content; > 3. Run the external script; > 4. Fill the window with content when closing the external program > You see, that's already something! Seriously, replacing "self.window.show()" with "glib.idle_add(self.window.show)" should now get you done. Or in alternative replacing os.system('external_script') self.window.show() with glib.idle_add(self.run_script) def run_script(self): subprocess.call(['external_script', 'param']) self.window.show() Pietro ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
Re: [pygtk] Hide glade window while running external script
Il giorno mer, 06/04/2011 alle 08.00 -0300, Vinicius Massuchetto ha scritto: > Hi list! > > I think I must be missing some signals concepts here, but I having > trouble reproducing the following behavior: > > 1. Click on a button; > 2. Hide the current window; > 3. Run an external script (that will open another program's window); > 4. Show again the PyGTK window after the external program is closed. > > For that, I've tried something like: > > class Foo: > > def __init__(self): > self.gladefile = gladefile > self.gladetree = gtk.glade.XML(self.gladefile, 'some_window') > self.window = self.gladetree.get_widget('some_window') > events = { 'on_code_submit_clicked' : self.submit } > self.gladetree.signal_autoconnect(events) > > def submit(self): > self.window.hide() > os.system('external_script') > self.window.show() > > What's happening, is that when the button is clicked, it stay pressed, > then the script runs, and after the external program is closed, the > window "blinks", being hidden and shown again. > > I also tried the "pressed" and "released" signals. > > What I can imagine is that the event is being run _during_ the > _clicked_ event, not after. That's why the window remain opened. I > couldn't find something like `gtk_signal_connect_after` [1] on the > glade page [2], that leaves me totally lost about it. > There may be cleaner solutions, but the first thing which comes to my mind is replacing os.system('external_script') with glib.idle_add(os.system, 'external_script') (and maybe replacing "os.system" with "subprocess.call" - but that's not pygtk-related). Pietro ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
[pygtk] Hide glade window while running external script
Hi list! I think I must be missing some signals concepts here, but I having trouble reproducing the following behavior: 1. Click on a button; 2. Hide the current window; 3. Run an external script (that will open another program's window); 4. Show again the PyGTK window after the external program is closed. For that, I've tried something like: class Foo: def __init__(self): self.gladefile = gladefile self.gladetree = gtk.glade.XML(self.gladefile, 'some_window') self.window = self.gladetree.get_widget('some_window') events = { 'on_code_submit_clicked' : self.submit } self.gladetree.signal_autoconnect(events) def submit(self): self.window.hide() os.system('external_script') self.window.show() What's happening, is that when the button is clicked, it stay pressed, then the script runs, and after the external program is closed, the window "blinks", being hidden and shown again. I also tried the "pressed" and "released" signals. What I can imagine is that the event is being run _during_ the _clicked_ event, not after. That's why the window remain opened. I couldn't find something like `gtk_signal_connect_after` [1] on the glade page [2], that leaves me totally lost about it. [1] http://sunsite.ualberta.ca/Documentation/Graphics/by-node/gtk+-1.1.1/gtk_4.html [2] http://www.pygtk.org/docs/pygtk/class-gladexml.html Many Thanks. -- Vinicius Massuchetto http://vinicius.soylocoporti.org.br ___ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/