cleaned up the gtk plugin and window manager. rock and roll!

This commit is contained in:
sccolbert
2009-11-02 17:50:00 +01:00
parent fdea274262
commit 5a17a208d0
4 changed files with 35 additions and 15 deletions
+9 -5
View File
@@ -40,10 +40,14 @@ else:
iw = ImageWindow(arr, window_manager)
iw.show()
def show():
window_manager.register_callback(gtk.main_quit)
gtk.main()
def gtk_show():
if window_manager.has_images():
window_manager.register_callback(gtk.main_quit)
gtk.main()
else:
print 'no images to display'
plugin.register('gtk', show=gtk_imshow, appshow=gtk_show)
plugin.register('gtk', show=gtk_imshow)
plugin.register('gtk', appshow=show)