show/hide ipython window instead of create/destroy
This commit is contained in:
parent
88f7abd795
commit
6d8dd51db0
|
@ -2820,11 +2820,10 @@ class Interface:
|
|||
sw.add(view)
|
||||
window.add(sw)
|
||||
window.show_all()
|
||||
window.connect('delete_event',lambda x,y:False)
|
||||
def on_destroy(win):
|
||||
gajim.ipython_window = None
|
||||
def on_delete(win, event):
|
||||
win.hide()
|
||||
return True
|
||||
window.connect('destroy', on_destroy)
|
||||
window.connect('delete_event',on_delete)
|
||||
view.updateNamespace({'gajim': gajim})
|
||||
gajim.ipython_window = window
|
||||
|
||||
|
|
|
@ -479,8 +479,11 @@ class SignalObject(dbus.service.Object):
|
|||
''' shows/hides the ipython window '''
|
||||
win = gajim.ipython_window
|
||||
if win:
|
||||
win.destroy()
|
||||
gajim.ipython_window = None
|
||||
if win.window.is_visible():
|
||||
gobject.idle_add(win.hide)
|
||||
else:
|
||||
win.show_all()
|
||||
win.present()
|
||||
else:
|
||||
gajim.interface.create_ipython_window()
|
||||
|
||||
|
|
Loading…
Reference in New Issue