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