Hello community,

here is the log from the commit of package totem for openSUSE:Factory checked 
in at 2020-01-16 18:17:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/totem (Old)
 and      /work/SRC/openSUSE:Factory/.totem.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "totem"

Thu Jan 16 18:17:46 2020 rev:143 rq:763799 version:3.34.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/totem/totem.changes      2019-11-29 
16:03:27.452792123 +0100
+++ /work/SRC/openSUSE:Factory/.totem.new.26092/totem.changes   2020-01-16 
18:17:47.476857736 +0100
@@ -1,0 +2,6 @@
+Sat Jan 11 20:05:25 UTC 2020 - Bjørn Lie <[email protected]>
+
+- Add totem-Fix-bracket-keys-and-backspace.patch: variable-rate:
+  Fix bracket keys and backspace not working in search entry.
+
+-------------------------------------------------------------------

New:
----
  totem-Fix-bracket-keys-and-backspace.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ totem.spec ++++++
--- /var/tmp/diff_new_pack.cIDvz5/_old  2020-01-16 18:17:48.268858184 +0100
+++ /var/tmp/diff_new_pack.cIDvz5/_new  2020-01-16 18:17:48.280858191 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package totem
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,6 +27,8 @@
 Source0:        
https://download.gnome.org/sources/totem/3.34/%{name}-%{version}.tar.xz
 # PATCH-FEATURE-OPENSUSE totem-revert-vaapi-disable.patch -- Revert upstreams 
disabling of vaapi support
 Patch0:         totem-revert-vaapi-disable.patch
+# PATCH-FIX-UPSTREAM totem-Fix-bracket-keys-and-backspace.patch -- 
variable-rate: Fix bracket keys and backspace not working
+Patch1:         totem-Fix-bracket-keys-and-backspace.patch
 
 BuildRequires:  appstream-glib
 BuildRequires:  fdupes

++++++ totem-Fix-bracket-keys-and-backspace.patch ++++++
>From af5c6473920f30b4d0d65dc702fe91bf2da7ba7d Mon Sep 17 00:00:00 2001
From: Gabor Karsay <[email protected]>
Date: Mon, 21 Oct 2019 12:24:31 +0200
Subject: [PATCH] variable-rate: Fix bracket keys and backspace not working in
 search entry

Let plugin handle key press events only in player mode and propagate them
in all other modes, e.g. to the search entry.

Closes: #212
---
 .../totem-variable-rate-plugin.c              | 28 ++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/src/plugins/variable-rate/totem-variable-rate-plugin.c 
b/src/plugins/variable-rate/totem-variable-rate-plugin.c
index 792c0cb69..c59a31078 100644
--- a/src/plugins/variable-rate/totem-variable-rate-plugin.c
+++ b/src/plugins/variable-rate/totem-variable-rate-plugin.c
@@ -48,8 +48,10 @@
 typedef struct {
        TotemObject       *totem;
        guint              handler_id_key_press;
+       guint              handler_id_main_page;
        GSimpleAction     *action;
        GMenuItem         *submenu_item;
+       gboolean           player_page;
 } TotemVariableRatePluginPrivate;
 
 #define NUM_RATES 6
@@ -161,12 +163,24 @@ change_rate (TotemVariableRatePlugin *pi,
        g_action_change_state (G_ACTION (priv->action), state);
 }
 
+static void
+on_totem_main_page_notify (GObject *object, GParamSpec *spec, 
TotemVariableRatePlugin *plugin)
+{
+       TotemVariableRatePlugin *pi = TOTEM_VARIABLE_RATE_PLUGIN (plugin);
+       char *main_page;
+
+       g_object_get (pi->priv->totem, "main-page", &main_page, NULL);
+       pi->priv->player_page = (g_strcmp0 (main_page, "player") == 0);
+       g_free (main_page);
+}
+
 static gboolean
 on_window_key_press_event (GtkWidget *window, GdkEventKey *event, 
TotemVariableRatePlugin *plugin)
 {
        TotemVariableRatePlugin *pi = TOTEM_VARIABLE_RATE_PLUGIN (plugin);
 
-       if (event->state == 0 ||
+       if (!pi->priv->player_page ||
+           event->state == 0 ||
            event->state & (GDK_CONTROL_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK 
| GDK_META_MASK)) {
                return FALSE;
        }
@@ -200,6 +214,12 @@ impl_activate (PeasActivatable *plugin)
 
        priv->totem = g_object_get_data (G_OBJECT (plugin), "object");
 
+       /* Cache totem's main page */
+       priv->handler_id_main_page = g_signal_connect (G_OBJECT(priv->totem),
+                                                      "notify::main-page",
+                                                      G_CALLBACK 
(on_totem_main_page_notify),
+                                                      pi);
+
        /* Key press handler */
        window = totem_object_get_main_window (priv->totem);
        priv->handler_id_key_press = g_signal_connect (G_OBJECT(window),
@@ -245,6 +265,12 @@ impl_deactivate (PeasActivatable *plugin)
                g_object_unref (window);
        }
 
+       if (priv->handler_id_main_page != 0) {
+               g_signal_handler_disconnect (G_OBJECT(priv->totem),
+                                            priv->handler_id_main_page);
+               priv->handler_id_main_page = 0;
+       }
+
        /* Remove the menu */
        totem_object_empty_menu_section (priv->totem, 
"variable-rate-placeholder");
 
-- 
2.24.1


Reply via email to