r45272 - in /desktop/unstable/gnome-shell/debian: changelog patches/50-ShellKeyringPrompt-Strip-out-mnemonics-indicators-fr.patch patches/series
biebl at users.alioth.debian.org
biebl at users.alioth.debian.org
Mon Jun 15 18:56:46 UTC 2015
Author: biebl
Date: Mon Jun 15 18:56:46 2015
New Revision: 45272
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=45272
Log:
Strip out mnemonics indicators from labels. Currently GNOME Shell doesn't
support mnemonics and prompters may send labels with it. Patch
cherry-picked from upstream Git.
Added:
desktop/unstable/gnome-shell/debian/patches/50-ShellKeyringPrompt-Strip-out-mnemonics-indicators-fr.patch
Modified:
desktop/unstable/gnome-shell/debian/changelog
desktop/unstable/gnome-shell/debian/patches/series
Modified: desktop/unstable/gnome-shell/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-shell/debian/changelog?rev=45272&op=diff
==============================================================================
--- desktop/unstable/gnome-shell/debian/changelog [utf-8] (original)
+++ desktop/unstable/gnome-shell/debian/changelog [utf-8] Mon Jun 15 18:56:46 2015
@@ -2,6 +2,9 @@
* Drop debian/patches/10-make-NetworkManager-optional.patch, merged
upstream. Refresh remaining patches.
+ * Strip out mnemonics indicators from labels. Currently GNOME Shell doesn't
+ support mnemonics and prompters may send labels with it. Patch
+ cherry-picked from upstream Git.
-- Michael Biebl <biebl at debian.org> Mon, 15 Jun 2015 20:51:28 +0200
Added: desktop/unstable/gnome-shell/debian/patches/50-ShellKeyringPrompt-Strip-out-mnemonics-indicators-fr.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-shell/debian/patches/50-ShellKeyringPrompt-Strip-out-mnemonics-indicators-fr.patch?rev=45272&op=file
==============================================================================
--- desktop/unstable/gnome-shell/debian/patches/50-ShellKeyringPrompt-Strip-out-mnemonics-indicators-fr.patch (added)
+++ desktop/unstable/gnome-shell/debian/patches/50-ShellKeyringPrompt-Strip-out-mnemonics-indicators-fr.patch [utf-8] Mon Jun 15 18:56:46 2015
@@ -0,0 +1,87 @@
+From 97b6f7fbbcdfb7126a1ff95d2f0e95cff4e56305 Mon Sep 17 00:00:00 2001
+From: Watson Yuuma Sato <yuuma.sato at gmail.com>
+Date: Sun, 7 Jun 2015 18:48:51 -0300
+Subject: [PATCH] ShellKeyringPrompt: Strip out mnemonics indicators from
+ labels
+
+Currently GNOME Shell doesn't support mnemonics and prompters may
+send labels with it.
+
+Remove the mnemonics indicator for now.
+
+Signed-off-by: Stef Walter <stefw at redhat.com>
+ * Fixed style issue
+
+https://bugzilla.gnome.org/show_bug.cgi?id=750465
+
+(cherry-picked from commit 59a18c4eadb3be032208eaeada500eb45a685a12)
+---
+ src/shell-keyring-prompt.c | 34 +++++++++++++++++++++++++++++++---
+ 1 file changed, 31 insertions(+), 3 deletions(-)
+
+diff --git a/src/shell-keyring-prompt.c b/src/shell-keyring-prompt.c
+index e07cd1e..85b4e00 100644
+--- a/src/shell-keyring-prompt.c
++++ b/src/shell-keyring-prompt.c
+@@ -111,6 +111,34 @@ shell_keyring_prompt_init (ShellKeyringPrompt *self)
+
+ }
+
++static gchar *
++remove_mnemonics (const GValue *value)
++{
++ const gchar mnemonic = '_';
++ gchar *stripped_label, *temp;
++ const gchar *label;
++
++ g_return_val_if_fail (value != NULL, NULL);
++ g_return_val_if_fail (G_VALUE_HOLDS_STRING (value), NULL);
++
++ label = g_value_get_string (value);
++ g_return_val_if_fail (label != NULL, NULL);
++
++ /* Stripped label will have the original label lenght at most */
++ stripped_label = temp = g_new (gchar, strlen(label) + 1);
++ g_assert (stripped_label != NULL);
++
++ while (*label != '\0')
++ {
++ if (*label == mnemonic)
++ label++;
++ *(temp++) = *(label++);
++ }
++ *temp = '\0';
++
++ return stripped_label;
++}
++
+ static void
+ shell_keyring_prompt_set_property (GObject *obj,
+ guint prop_id,
+@@ -145,7 +173,7 @@ shell_keyring_prompt_set_property (GObject *obj,
+ break;
+ case PROP_CHOICE_LABEL:
+ g_free (self->choice_label);
+- self->choice_label = g_value_dup_string (value);
++ self->choice_label = remove_mnemonics (value);
+ if (!self->choice_label)
+ self->choice_label = g_strdup ("");
+ g_object_notify (obj, "choice-label");
+@@ -165,12 +193,12 @@ shell_keyring_prompt_set_property (GObject *obj,
+ break;
+ case PROP_CONTINUE_LABEL:
+ g_free (self->continue_label);
+- self->continue_label = g_value_dup_string (value);
++ self->continue_label = remove_mnemonics (value);
+ g_object_notify (obj, "continue-label");
+ break;
+ case PROP_CANCEL_LABEL:
+ g_free (self->cancel_label);
+- self->cancel_label = g_value_dup_string (value);
++ self->cancel_label = remove_mnemonics (value);
+ g_object_notify (obj, "cancel-label");
+ break;
+ case PROP_PASSWORD_ACTOR:
+--
+2.1.4
+
Modified: desktop/unstable/gnome-shell/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-shell/debian/patches/series?rev=45272&op=diff
==============================================================================
--- desktop/unstable/gnome-shell/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gnome-shell/debian/patches/series [utf-8] Mon Jun 15 18:56:46 2015
@@ -2,3 +2,4 @@
27-nm-libexec-path.patch
#30-remoteMenu-Prevent-the-shell-from-becoming-unrespons.patch
41-handle-logind-fail.patch
+50-ShellKeyringPrompt-Strip-out-mnemonics-indicators-fr.patch
More information about the pkg-gnome-commits
mailing list