|
|
|
@ -67,6 +67,7 @@ class _IdleObject(gobject.GObject):
|
|
|
|
|
Override gobject.GObject to always emit signals in the main thread |
|
|
|
|
by emmitting on an idle handler |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
def __init__(self): |
|
|
|
|
gobject.GObject.__init__(self) |
|
|
|
|
|
|
|
|
@ -82,12 +83,11 @@ class _WorkerThread(threading.Thread, _IdleObject):
|
|
|
|
|
"completed": ( |
|
|
|
|
gobject.SIGNAL_RUN_LAST, |
|
|
|
|
gobject.TYPE_NONE, |
|
|
|
|
(gobject.TYPE_PYOBJECT,)), # list/networkdata |
|
|
|
|
(gobject.TYPE_PYOBJECT, )), # list/networkdata |
|
|
|
|
"exception": ( |
|
|
|
|
gobject.SIGNAL_RUN_LAST, |
|
|
|
|
gobject.TYPE_NONE, |
|
|
|
|
(gobject.TYPE_PYOBJECT,)) # The exception |
|
|
|
|
} |
|
|
|
|
(gobject.TYPE_PYOBJECT, ))} # The exception |
|
|
|
|
|
|
|
|
|
def __init__(self, function, *args, **kwargs): |
|
|
|
|
threading.Thread.__init__(self) |
|
|
|
@ -666,9 +666,8 @@ class Interface(object):
|
|
|
|
|
|
|
|
|
|
popup.show_all() |
|
|
|
|
popup.popup(None, None, None, event.button, event.time) |
|
|
|
|
|
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------ |
|
|
|
|
# Widget callback functions |
|
|
|
@ -730,7 +729,7 @@ class Interface(object):
|
|
|
|
|
gtk.main_quit() |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
def _grid_resize(self, widget, requisition, data=None): |
|
|
|
|
def _grid_resize(self, widget, requisition, data=None): |
|
|
|
|
"""Called when the window is resized. We use it to set the proper |
|
|
|
|
word-wrapping in the message column.""" |
|
|
|
|
|
|
|
|
@ -786,8 +785,8 @@ class Interface(object):
|
|
|
|
|
cannot do.""" |
|
|
|
|
|
|
|
|
|
(model, iter) = view.get_selection().get_selected() |
|
|
|
|
if not iter: |
|
|
|
|
return |
|
|
|
|
if not iter: |
|
|
|
|
return |
|
|
|
|
data = model.get_value(iter, 0) |
|
|
|
|
|
|
|
|
|
self._delete_action.set_property('sensitive', |
|
|
|
@ -847,7 +846,7 @@ class Interface(object):
|
|
|
|
|
parent=self._main_window, |
|
|
|
|
flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, |
|
|
|
|
buttons=(gtk.STOCK_OK, 0)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# the tabs |
|
|
|
|
tabs = gtk.Notebook() |
|
|
|
|
|
|
|
|
|