Fix RuntimeError: could not create signal for _closing
On Ubuntu 20.04 with GTK 3.24.13, importing sugar3.activity.activity fails with RuntimeError: could not create signal for _closing, preceeded by an assertion is_valid_signal_name failed. Cause is upstream 89f955d ("gsignal: Canonicalise signal names at installation time ") which requires application signal names to not start with a hyphen or underscore. Remove the prefix from our signal name. The signal remains reserved and private to the Activity class.
This commit is contained in:
parent
aca045bde2
commit
88adb38a42
@ -328,7 +328,7 @@ class Activity(Window, Gtk.Container):
|
||||
'joined': (GObject.SignalFlags.RUN_FIRST, None, ([])),
|
||||
# For internal use only, use can_close() if you want to perform extra
|
||||
# checks before actually closing
|
||||
'_closing': (GObject.SignalFlags.RUN_FIRST, None, ([])),
|
||||
'closing': (GObject.SignalFlags.RUN_FIRST, None, ([])),
|
||||
}
|
||||
|
||||
def __init__(self, handle, create_jobject=True):
|
||||
@ -1301,7 +1301,7 @@ class Activity(Window, Gtk.Container):
|
||||
|
||||
def _do_close(self, skip_save):
|
||||
self.busy()
|
||||
self.emit('_closing')
|
||||
self.emit('closing')
|
||||
if not self._closing:
|
||||
if not self._prepare_close(skip_save):
|
||||
return
|
||||
|
@ -189,7 +189,7 @@ class TitleEntry(Gtk.ToolItem):
|
||||
self.add(self.entry)
|
||||
|
||||
activity.metadata.connect('updated', self.__jobject_updated_cb)
|
||||
activity.connect('_closing', self.__closing_cb)
|
||||
activity.connect('closing', self.__closing_cb)
|
||||
|
||||
def __activate_cb(self, entry, activity):
|
||||
self.save_title(activity)
|
||||
|
Loading…
Reference in New Issue
Block a user