Browse Source

n/pinentry: Patched to fix not-floating dialogs.

slackware-14.2
Damien Goutte-Gattat 5 years ago
parent
commit
db21fc8764
  1. 49
      n/pinentry/pinentry-1.0.0-gtk2-floating-dialog.patch
  2. 41
      n/pinentry/pinentry-1.0.0-gtk2-grab.patch
  3. 1
      n/pinentry/pinentry-1.0.0.tar.bz2.sha1
  4. 1
      n/pinentry/pinentry-1.0.0.tar.bz2.sha256
  5. 12
      n/pinentry/pinentry.SlackBuild

49
n/pinentry/pinentry-1.0.0-gtk2-floating-dialog.patch

@ -0,0 +1,49 @@
commit c693cc177fe79de8d173086fb578fe525a1b2a6b
Author: Damien Goutte-Gattat <dgouttegattat@incenp.org>
Date: Wed Jul 5 11:12:56 2017 +0200
gtk: Always set the window as transient.
* gtk+-2/pinentry-gtk-2.c (create_window): Setup the make_transient
callback whether we ask for a passphrase or not.
--
Making the window transient seems necessary for (some) tiling window
managers to make sure the dialog is floating.
GnuPG-bug-id: T3253
diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c
index dee0360..d467ec5 100644
--- a/gtk+-2/pinentry-gtk-2.c
+++ b/gtk+-2/pinentry-gtk-2.c
@@ -113,9 +113,9 @@ constrain_size (GtkWidget *win, GtkRequisition *req, gpointer data)
}
-/* Realize the window as transient if we grab the keyboard. This
- makes the window a modal dialog to the root window, which helps the
- window manager. See the following quote from:
+/* Realize the window as transient. This makes the window a modal
+ dialog to the root window, which helps the window manager.
+ See the following quote from:
https://standards.freedesktop.org/wm-spec/wm-spec-1.4.html#id2512420
Implementing enhanced support for application transient windows
@@ -586,12 +586,12 @@ create_window (pinentry_t ctx)
#endif
g_signal_connect (G_OBJECT (win), "size-request",
G_CALLBACK (constrain_size), NULL);
+
+ g_signal_connect (G_OBJECT (win),
+ "realize", G_CALLBACK (make_transient), NULL);
+
if (!confirm_mode)
{
- if (pinentry->grab)
- g_signal_connect (G_OBJECT (win),
- "realize", G_CALLBACK (make_transient), NULL);
-
/* We need to grab the keyboard when its visible! not when its
mapped (there is a difference) */
g_object_set (G_OBJECT(win), "events",

41
n/pinentry/pinentry-1.0.0-gtk2-grab.patch

@ -1,41 +0,0 @@
diff -Naur pinentry-1.0.0.orig/gtk+-2/pinentry-gtk-2.c pinentry-1.0.0/gtk+-2/pinentry-gtk-2.c
--- pinentry-1.0.0.orig/gtk+-2/pinentry-gtk-2.c 2016-11-07 10:55:43.000000000 +0100
+++ pinentry-1.0.0/gtk+-2/pinentry-gtk-2.c 2017-02-18 15:45:40.468599077 +0100
@@ -478,28 +478,17 @@
GtkToggleButton *button = GTK_TOGGLE_BUTTON (widget);
GtkWidget *label = data;
const char *text;
- char *tooltip;
gboolean reveal;
if (!gtk_toggle_button_get_active (button) || !confirm_unhiding ())
{
text = "<span font=\"Monospace\" size=\"xx-small\">abc</span>";
- tooltip = pinentry_utf8_validate (pinentry->default_tt_visi);
- if (!tooltip)
- {
- tooltip = g_strdup ("Make the passphrase visible");
- }
gtk_toggle_button_set_active (button, FALSE);
reveal = FALSE;
}
else
{
text = "<span font=\"Monospace\" size=\"xx-small\">***</span>";
- tooltip = pinentry_utf8_validate (pinentry->default_tt_hide);
- if (!tooltip)
- {
- tooltip = g_strdup ("Hide the passphrase");
- }
reveal = TRUE;
}
@@ -510,8 +499,6 @@
}
gtk_label_set_markup (GTK_LABEL(label), text);
- gtk_widget_set_tooltip_text (GTK_WIDGET(button), tooltip);
- g_free (tooltip);
}

1
n/pinentry/pinentry-1.0.0.tar.bz2.sha1

@ -1 +0,0 @@
85d9ac81ebad3fb082514c505c90c39a0456f1f6 pinentry-1.0.0.tar.bz2

1
n/pinentry/pinentry-1.0.0.tar.bz2.sha256

@ -0,0 +1 @@
1672c2edc1feb036075b187c0773787b2afd0544f55025c645a71b4c2f79275a pinentry-1.0.0.tar.bz2

12
n/pinentry/pinentry.SlackBuild

@ -23,8 +23,6 @@
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest pinentry sourcecode is available at: <https://gnupg.org/>.
#
# Depends: l/libassuan
# Source package infos
NAMESRC=${NAMESRC:-pinentry}
@ -34,7 +32,7 @@ WGET=${WGET:-https://www.gnupg.org/ftp/gcrypt/pinentry/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-pinentry}
BUILD=${BUILD:-2GGD}
BUILD=${BUILD:-3GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@ -77,7 +75,7 @@ if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
@ -85,9 +83,9 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
# Apply suggested fix for Gtk2 grabbing problem
# (https://lists.gnupg.org/pipermail/gnupg-devel/2017-February/032608.html)
patch -p 1 < $CWD/pinentry-1.0.0-gtk2-grab.patch
# Apply fix for not-floating dialog windows
# (https://dev.gnupg.org/T3253)
patch -p 1 < $CWD/pinentry-1.0.0-gtk2-floating-dialog.patch
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \

Loading…
Cancel
Save