[git] Pinentry - branch, master, updated. pinentry-0.9.5-8-gd70a106

by Neal H. Walfield cvs at cvs.gnupg.org
Sun Jul 26 20:07:49 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The standard pinentry collection".

The branch, master has been updated
       via  d70a106d71dbcaf90e2246ed8e72c14d9c2cf266 (commit)
       via  c9c3576b5e2e3139fd9f6af3426b5f5e727deadd (commit)
      from  676b1ac38d0c1db754492b6817bbc6195dcef300 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d70a106d71dbcaf90e2246ed8e72c14d9c2cf266
Author: Neal H. Walfield <neal at gnu.org>
Date:   Sun Jul 26 20:04:47 2015 +0200

    gtk2: Use gtk_widget_get_window instead of accessing the struct.
    
    * gtk+-2/pinentry-gtk-2.c (make_transient): Don't directly access the
    window field of WIN.  Use gtk_widget_get_window instead.
    (grab_keyboard): Likewise.
    (ungrab_keyboard): Likewise.
    
    Patch-by: Dimitri John Ledkov <dimitri.j.ledkov at intel.com>.

diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c
index 21fabc8..fdfdeaf 100644
--- a/gtk+-2/pinentry-gtk-2.c
+++ b/gtk+-2/pinentry-gtk-2.c
@@ -139,7 +139,7 @@ make_transient (GtkWidget *win, GdkEvent *event, gpointer data)
   /* Make window transient for the root window.  */
   screen = gdk_screen_get_default ();
   root = gdk_screen_get_root_window (screen);
-  gdk_window_set_transient_for (win->window, root);
+  gdk_window_set_transient_for (gtk_widget_get_window (win), root);
 }
 
 
@@ -152,7 +152,8 @@ grab_keyboard (GtkWidget *win, GdkEvent *event, gpointer data)
   if (! pinentry->grab)
     return FALSE;
 
-  if (gdk_keyboard_grab (win->window, FALSE, gdk_event_get_time (event)))
+  if (gdk_keyboard_grab (gtk_widget_get_window (win),
+			 FALSE, gdk_event_get_time (event)))
     {
       g_critical ("could not grab keyboard");
       grab_failed = 1;
@@ -173,7 +174,7 @@ ungrab_keyboard (GtkWidget *win, GdkEvent *event, gpointer data)
   /* gdk_window_set_transient_for cannot be used with parent = NULL to
      unset transient hint (unlike gtk_ version which can).  Replacement
      code is taken from gtk_window_transient_parent_unrealized.  */
-  gdk_property_delete (win->window,
+  gdk_property_delete (gtk_widget_get_window (win),
                        gdk_atom_intern_static_string ("WM_TRANSIENT_FOR"));
   return FALSE;
 }

commit c9c3576b5e2e3139fd9f6af3426b5f5e727deadd
Author: Neal H. Walfield <neal at gnu.org>
Date:   Sun Jul 26 20:03:14 2015 +0200

    gtk2: Use newer tooltips functions, if available.
    
    * gtk+-2/pinentry-gtk-2.c (tooltips): Don't declare for Gtk+ >=2.12.0.
    (create_window): Gtk+ >=2.12.0, use gtk_widget_set_tooltip_text
    instead of gtk_tooltips_set_tip.
    
    Patch-by: Dimitri John Ledkov <dimitri.j.ledkov at intel.com>.

diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c
index bfc94af..21fabc8 100644
--- a/gtk+-2/pinentry-gtk-2.c
+++ b/gtk+-2/pinentry-gtk-2.c
@@ -68,7 +68,9 @@ static GtkWidget *entry;
 static GtkWidget *repeat_entry;
 static GtkWidget *error_label;
 static GtkWidget *qualitybar;
+#if !GTK_CHECK_VERSION (2, 12, 0)
 static GtkTooltips *tooltips;
+#endif
 static gboolean got_input;
 static guint timeout_source;
 static int confirm_mode;
@@ -377,7 +379,9 @@ create_window (pinentry_t ctx)
 
   repeat_entry = NULL;
 
+#if !GTK_CHECK_VERSION (2, 12, 0)
   tooltips = gtk_tooltips_new ();
+#endif
 
   /* FIXME: check the grabbing code against the one we used with the
      old gpg-agent */
@@ -514,8 +518,15 @@ create_window (pinentry_t ctx)
 				     QUALITYBAR_EMPTY_TEXT);
 	  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (qualitybar), 0.0);
           if (pinentry->quality_bar_tt)
-            gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), qualitybar,
-                                  pinentry->quality_bar_tt, "");
+	    {
+#if !GTK_CHECK_VERSION (2, 12, 0)
+	      gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), qualitybar,
+				    pinentry->quality_bar_tt, "");
+#else
+	      gtk_widget_set_tooltip_text (qualitybar,
+					   pinentry->quality_bar_tt);
+#endif
+	    }
 	  gtk_table_attach (GTK_TABLE (table), qualitybar, 1, 2, nrow, nrow+1,
 	  		    GTK_EXPAND|GTK_FILL, GTK_EXPAND|GTK_FILL, 0, 0);
           nrow++;

-----------------------------------------------------------------------

Summary of changes:
 gtk+-2/pinentry-gtk-2.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
The standard pinentry collection
http://git.gnupg.org




More information about the Gnupg-commits mailing list