diff options
author | Krifa75 <yahiaoui.fakhri@gmail.com> | 2022-11-19 19:34:07 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-11-23 12:38:09 +0100 |
commit | 1e0b0b189492f37f5652fd4ce2b1c3c870010977 (patch) | |
tree | 47a89bc8a2cd254644f4d7c4ee98ed925d98be68 | |
parent | 078f29d065ae3a1718e796da3159130ae72508da (diff) | |
download | totem-1e0b0b189492f37f5652fd4ce2b1c3c870010977.tar.gz |
main: Connect to BaconVideoWidget properties in GtkBuilder
-rw-r--r-- | data/totem.ui | 2 | ||||
-rw-r--r-- | src/totem-object.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/data/totem.ui b/data/totem.ui index bd11cae59..80af565c8 100644 --- a/data/totem.ui +++ b/data/totem.ui @@ -325,6 +325,8 @@ <object class="BaconVideoWidget" id="bvw"> <property name="visible">True</property> <property name="events">GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK</property> + <signal name="notify::volume" handler="property_notify_cb_volume"/> + <signal name="notify::seekable" handler="property_notify_cb_seekable"/> <signal name="subtitles-changed" handler="totem_subtitles_menu_update" swapped="yes"/> <signal name="languages-changed" handler="totem_languages_menu_update" swapped="yes"/> <signal name="button-press-event" handler="on_video_button_press_event" after="yes"/> diff --git a/src/totem-object.c b/src/totem-object.c index 2ffc2585c..25c07d0e4 100644 --- a/src/totem-object.c +++ b/src/totem-object.c @@ -157,6 +157,8 @@ G_MODULE_EXPORT void drop_video_cb (GtkWidget *wid guint info, guint _time, Totem *totem); +G_MODULE_EXPORT void property_notify_cb_volume (BaconVideoWidget *bvw, GParamSpec *spec, TotemObject *totem); +G_MODULE_EXPORT void property_notify_cb_seekable (BaconVideoWidget *bvw, GParamSpec *spec, TotemObject *totem); enum { PROP_0, @@ -2783,13 +2785,13 @@ update_volume_sliders (TotemObject *totem) g_signal_handlers_unblock_by_func (totem->volume, volume_button_value_changed_cb, totem); } -static void +void property_notify_cb_volume (BaconVideoWidget *bvw, GParamSpec *spec, TotemObject *totem) { update_volume_sliders (totem); } -static void +void property_notify_cb_seekable (BaconVideoWidget *bvw, GParamSpec *spec, TotemObject *totem) { update_seekable (totem); @@ -3993,10 +3995,6 @@ totem_callback_connect (TotemObject *totem) action_set_sensitive ("previous-chapter", FALSE); /* Volume */ - g_signal_connect (G_OBJECT (totem->bvw), "notify::volume", - G_CALLBACK (property_notify_cb_volume), totem); - g_signal_connect (G_OBJECT (totem->bvw), "notify::seekable", - G_CALLBACK (property_notify_cb_seekable), totem); update_volume_sliders (totem); } |