[totem] opensubtitles: Fix delete-event callback signature
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] opensubtitles: Fix delete-event callback signature
- Date: Mon, 5 Dec 2016 22:59:04 +0000 (UTC)
commit 9e321b17f0e94652a74c17477e1421301714a290
Author: vrishab <gnome vrb gmail com>
Date: Tue Dec 6 00:13:49 2016 +0530
opensubtitles: Fix delete-event callback signature
gtk_widget_hide_on_delete (widget) is not a callback function. Using
it as a callback function to "widget::delete-event" signal ( which
takes 3 args for callback ) in C code works, though this is not
correct. Python checks for argument count of callbacks, and so this
hack doesn't work for python code. So, we move it UI file to trigger
native callback.
https://bugzilla.gnome.org/show_bug.cgi?id=775657
src/plugins/opensubtitles/opensubtitles.py | 1 -
src/plugins/opensubtitles/opensubtitles.ui | 1 +
2 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/opensubtitles/opensubtitles.py b/src/plugins/opensubtitles/opensubtitles.py
index f2c39e3..81ea57e 100644
--- a/src/plugins/opensubtitles/opensubtitles.py
+++ b/src/plugins/opensubtitles/opensubtitles.py
@@ -498,7 +498,6 @@ class OpenSubtitles (GObject.Object, # pylint: disable-msg=R0902
# Set up signals
combobox.connect ('changed', self.__on_combobox__changed)
- self._dialog.connect ('delete-event', self._dialog.hide_on_delete)
self._dialog.set_transient_for (self._totem.get_main_window ())
self._dialog.set_position (Gtk.WindowPosition.CENTER_ON_PARENT)
diff --git a/src/plugins/opensubtitles/opensubtitles.ui b/src/plugins/opensubtitles/opensubtitles.ui
index 44fd176..07eef43 100644
--- a/src/plugins/opensubtitles/opensubtitles.ui
+++ b/src/plugins/opensubtitles/opensubtitles.ui
@@ -29,6 +29,7 @@
<property name="default_width">400</property>
<property name="default_height">400</property>
<property name="type_hint">dialog</property>
+ <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/>
<child>
<object class="GtkBox" id="vbox1">
<property name="orientation">vertical</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]