[git] Pinentry - branch, master, updated. pinentry-0.8.1-3-g671a1a7

by Werner Koch cvs at cvs.gnupg.org
Tue Jun 28 20:01:50 CEST 2011


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  671a1a70eceb7a31feb0df997fbc8eb25f722895 (commit)
      from  8f64210ccec8c298fe6430246368966634486732 (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 671a1a70eceb7a31feb0df997fbc8eb25f722895
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Jun 28 19:22:56 2011 +0200

    Get rid of the runtime warning about "editing-canceled".
    
    Actually this property is only used by GtkTreeView which we don't use.
    However newer gtk versions require this to be a property and thus we
    implement it as a dummy.

diff --git a/ChangeLog b/ChangeLog
index e84517c..9b208d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-28  Werner Koch  <wk at g10code.com>
+
+	* gtk+-2/gtksecentry.c (PROP_EDITING_CANCELED): New.
+	(gtk_secure_entry_class_init, gtk_secure_entry_set_property)
+	(gtk_secure_entry_get_property): Implement as dummy it to get rid
+	of a runtime warning.
+
 2010-12-16  Werner Koch  <wk at g10code.com>
 
 	Release 0.8.1.
diff --git a/gtk+-2/gtksecentry.c b/gtk+-2/gtksecentry.c
index 146cec7..cfe6aea 100644
--- a/gtk+-2/gtksecentry.c
+++ b/gtk+-2/gtksecentry.c
@@ -22,7 +22,7 @@
  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
  * file for a list of people on the GTK+ Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
 /*
@@ -70,7 +70,8 @@ enum {
     PROP_ACTIVATES_DEFAULT,
     PROP_WIDTH_CHARS,
     PROP_SCROLL_OFFSET,
-    PROP_TEXT
+    PROP_TEXT,
+    PROP_EDITING_CANCELED
 };
 
 static guint signals[LAST_SIGNAL] = { 0 };
@@ -425,6 +426,10 @@ gtk_secure_entry_class_init(GtkSecureEntryClass * class)
     class->delete_from_cursor = gtk_secure_entry_delete_from_cursor;
     class->activate = gtk_secure_entry_real_activate;
 
+    g_object_class_override_property (gobject_class,
+                                      PROP_EDITING_CANCELED,
+                                      "editing-canceled");
+
     g_object_class_install_property(gobject_class,
 				    PROP_CURSOR_POSITION,
 				    g_param_spec_int("cursor_position",
@@ -705,6 +710,14 @@ gtk_secure_entry_set_property(GObject * object,
 	gtk_secure_entry_set_text(entry, g_value_get_string(value));
 	break;
 
+    case PROP_EDITING_CANCELED:
+      /* We may want to implement the GtkCelllEditable methods.
+         However it is only used by GtkTreeView and we don't use that
+         here.  We provide this property only to get rid of a Gtk+
+         runtime warning.  */
+        entry->editing_canceled = g_value_get_boolean (value);
+        break;
+
     case PROP_SCROLL_OFFSET:
     case PROP_CURSOR_POSITION:
     default:
@@ -748,6 +761,9 @@ gtk_secure_entry_get_property(GObject * object,
     case PROP_TEXT:
 	g_value_set_string(value, gtk_secure_entry_get_text(entry));
 	break;
+    case PROP_EDITING_CANCELED:
+        g_value_set_boolean (value, entry->editing_canceled);
+        break;
 
     default:
 	G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
@@ -2655,14 +2671,14 @@ gtk_secure_entry_new(void)
  *   be clamped to the range 0-65536.
  *
  * Creates a new #GtkSecureEntry widget with the given maximum length.
- * 
+ *
  * Note: the existence of this function is inconsistent
  * with the rest of the GTK+ API. The normal setup would
  * be to just require the user to make an extra call
  * to gtk_secure_entry_set_max_length() instead. It is not
  * expected that this function will be removed, but
  * it would be better practice not to use it.
- * 
+ *
  * Return value: a new #GtkSecureEntry.
  **/
 GtkWidget *
@@ -2735,7 +2751,7 @@ gtk_secure_entry_set_position(GtkSecureEntry * entry, gint position)
  * gtk_secure_entry_set_invisible_char:
  * @entry: a #GtkSecureEntry
  * @ch: a Unicode character
- * 
+ *
  * Sets the character to use in place of the actual text when
  * gtk_secure_entry_set_visibility() has been called to set text visibility
  * to %FALSE. i.e. this is the character used in "password mode" to
@@ -2743,7 +2759,7 @@ gtk_secure_entry_set_position(GtkSecureEntry * entry, gint position)
  * invisible char is an asterisk ('*').  If you set the invisible char
  * to 0, then the user will get no feedback at all; there will be
  * no text on the screen as they type.
- * 
+ *
  **/
 void
 gtk_secure_entry_set_invisible_char(GtkSecureEntry * entry, gunichar ch)
@@ -2766,7 +2782,7 @@ gtk_secure_entry_set_invisible_char(GtkSecureEntry * entry, gunichar ch)
  * for entries with visisbility set to false. See gtk_secure_entry_set_invisible_char().
  *
  * Return value: the current invisible char, or 0, if the entry does not
- *               show invisible text at all. 
+ *               show invisible text at all.
  **/
 gunichar
 gtk_secure_entry_get_invisible_char(GtkSecureEntry * entry)
@@ -2809,7 +2825,7 @@ gtk_secure_entry_select_region(GtkSecureEntry * entry,
  * @max: the maximum length of the entry, or 0 for no maximum.
  *   (other than the maximum length of entries.) The value passed in will
  *   be clamped to the range 0-65536.
- * 
+ *
  * Sets the maximum allowed length of the contents of the widget. If
  * the current contents are longer than the given length, then they
  * will be truncated to fit.
@@ -2859,7 +2875,7 @@ gtk_secure_entry_get_max_length(GtkSecureEntry * entry)
  * (For experts: if @setting is %TRUE, the entry calls
  * gtk_window_activate_default() on the window containing the entry, in
  * the default handler for the "activate" signal.)
- * 
+ *
  **/
 void
 gtk_secure_entry_set_activates_default(GtkSecureEntry * entry,
@@ -2877,9 +2893,9 @@ gtk_secure_entry_set_activates_default(GtkSecureEntry * entry,
 /**
  * gtk_secure_entry_get_activates_default:
  * @entry: a #GtkSecureEntry
- * 
+ *
  * Retrieves the value set by gtk_secure_entry_set_activates_default().
- * 
+ *
  * Return value: %TRUE if the entry will activate the default widget
  **/
 gboolean
@@ -2900,7 +2916,7 @@ gtk_secure_entry_get_activates_default(GtkSecureEntry * entry)
  * <emphasis>request</emphasis>, the size can still be affected by
  * how you pack the widget into containers. If @n_chars is -1, the
  * size reverts to the default entry size.
- * 
+ *
  **/
 void
 gtk_secure_entry_set_width_chars(GtkSecureEntry * entry, gint n_chars)
@@ -2917,9 +2933,9 @@ gtk_secure_entry_set_width_chars(GtkSecureEntry * entry, gint n_chars)
 /**
  * gtk_secure_entry_get_width_chars:
  * @entry: a #GtkSecureEntry
- * 
+ *
  * Gets the value set by gtk_secure_entry_set_width_chars().
- * 
+ *
  * Return value: number of chars to request space for, or negative if unset
  **/
 gint
@@ -2934,7 +2950,7 @@ gtk_secure_entry_get_width_chars(GtkSecureEntry * entry)
  * gtk_secure_entry_set_has_frame:
  * @entry: a #GtkSecureEntry
  * @setting: new value
- * 
+ *
  * Sets whether the entry has a beveled frame around it.
  **/
 void
@@ -2955,9 +2971,9 @@ gtk_secure_entry_set_has_frame(GtkSecureEntry * entry, gboolean setting)
 /**
  * gtk_secure_entry_get_has_frame:
  * @entry: a #GtkSecureEntry
- * 
+ *
  * Gets the value set by gtk_secure_entry_set_has_frame().
- * 
+ *
  * Return value: whether the entry has a beveled frame
  **/
 gboolean
@@ -2972,7 +2988,7 @@ gtk_secure_entry_get_has_frame(GtkSecureEntry * entry)
 /**
  * gtk_secure_entry_get_layout:
  * @entry: a #GtkSecureEntry
- * 
+ *
  * Gets the #PangoLayout used to display the entry.
  * The layout is useful to e.g. convert text positions to
  * pixel positions, in combination with gtk_secure_entry_get_layout_offsets().
@@ -2983,7 +2999,7 @@ gtk_secure_entry_get_has_frame(GtkSecureEntry * entry)
  * gtk_secure_entry_layout_index_to_text_index() and
  * gtk_secure_entry_text_index_to_layout_index() are needed to convert byte
  * indices in the layout to byte indices in the entry contents.
- * 
+ *
  * Return value: the #PangoLayout for this entry
  **/
 PangoLayout *
@@ -3003,12 +3019,12 @@ gtk_secure_entry_get_layout(GtkSecureEntry * entry)
  * gtk_secure_entry_layout_index_to_text_index:
  * @entry: a #GtkSecureEntry
  * @layout_index: byte index into the entry layout text
- * 
+ *
  * Converts from a position in the entry contents (returned
  * by gtk_secure_entry_get_text()) to a position in the
  * entry's #PangoLayout (returned by gtk_secure_entry_get_layout(),
  * with text retrieved via pango_layout_get_text()).
- * 
+ *
  * Return value: byte index into the entry contents
  **/
 gint
@@ -3040,11 +3056,11 @@ gtk_secure_entry_layout_index_to_text_index(GtkSecureEntry * entry,
  * gtk_secure_entry_text_index_to_layout_index:
  * @entry: a #GtkSecureEntry
  * @text_index: byte index into the entry contents
- * 
+ *
  * Converts from a position in the entry's #PangoLayout(returned by
  * gtk_secure_entry_get_layout()) to a position in the entry contents
  * (returned by gtk_secure_entry_get_text()).
- * 
+ *
  * Return value: byte index into the entry layout text
  **/
 gint
@@ -3082,7 +3098,7 @@ gtk_secure_entry_text_index_to_layout_index(GtkSecureEntry * entry,
  * Also useful to convert mouse events into coordinates inside the
  * #PangoLayout, e.g. to take some action if some part of the entry text
  * is clicked.
- * 
+ *
  * Note that as the user scrolls around in the entry the offsets will
  * change; you'll need to connect to the "notify::scroll_offset"
  * signal to track this. Remember when using the #PangoLayout
@@ -3093,7 +3109,7 @@ gtk_secure_entry_text_index_to_layout_index(GtkSecureEntry * entry,
  * gtk_secure_entry_layout_index_to_text_index() and
  * gtk_secure_entry_text_index_to_layout_index() are needed to convert byte
  * indices in the layout to byte indices in the entry contents.
- * 
+ *
  **/
 void
 gtk_secure_entry_get_layout_offsets(GtkSecureEntry * entry,
diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c
index 232b4c7..da4dc77 100644
--- a/gtk+-2/pinentry-gtk-2.c
+++ b/gtk+-2/pinentry-gtk-2.c
@@ -11,12 +11,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
-  
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-  
+
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
@@ -97,7 +97,7 @@ constrain_size (GtkWidget *win, GtkRequisition *req, gpointer data)
 				 GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
 }
 
- 
+
 /* 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:
@@ -273,7 +273,7 @@ changed_text_handler (GtkWidget *widget)
       snprintf (textbuf, sizeof textbuf, "%d%%", percent);
       color.green = 0xffff;
     }
-  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (qualitybar), 
+  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (qualitybar),
                                  (double)percent/100.0);
   gtk_progress_bar_set_text (GTK_PROGRESS_BAR (qualitybar), textbuf);
   gtk_widget_modify_bg (qualitybar, GTK_STATE_PRELIGHT, &color);
@@ -327,7 +327,7 @@ create_window (int confirm_mode)
 			G_CALLBACK (ungrab_keyboard), NULL);
     }
   gtk_window_add_accel_group (GTK_WINDOW (win), acc);
-  
+
   wvbox = gtk_vbox_new (FALSE, HIG_LARGE * 2);
   gtk_container_add (GTK_CONTAINER (win), wvbox);
   gtk_container_set_border_width (GTK_CONTAINER (wvbox), HIG_LARGE);
@@ -435,7 +435,7 @@ create_window (int confirm_mode)
 	     2, 0);
 	  gtk_box_pack_start (GTK_BOX (sbox), time_out, FALSE, FALSE, 0);
 	  gtk_widget_show (time_out);
-	  
+
 	  w = gtk_label_new ("seconds");
 	  gtk_box_pack_start (GTK_BOX (sbox), w, FALSE, FALSE, 0);
 	  gtk_widget_show (w);
@@ -483,7 +483,7 @@ create_window (int confirm_mode)
 			(gpointer) CONFIRM_CANCEL);
       GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
     }
-  
+
   if (confirm_mode && !pinentry->one_button && pinentry->notok)
     {
       msg = pinentry_utf8_validate (pinentry->notok);
@@ -496,7 +496,7 @@ create_window (int confirm_mode)
 			(gpointer) CONFIRM_NOTOK);
       GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT);
     }
-  
+
   if (pinentry->ok)
     {
       msg = pinentry_utf8_validate (pinentry->ok);
@@ -506,7 +506,7 @@ create_window (int confirm_mode)
   else if (pinentry->default_ok)
     {
       GtkWidget *image;
-      
+
       msg = pinentry_utf8_validate (pinentry->default_ok);
       w = gtk_button_new_with_mnemonic (msg);
       g_free (msg);
@@ -540,7 +540,7 @@ create_window (int confirm_mode)
   gtk_window_set_keep_above (GTK_WINDOW (win), TRUE);
   gtk_widget_show_all (win);
   gtk_window_present (GTK_WINDOW (win));  /* Make sure it has the focus.  */
-  
+
   return win;
 }
 
@@ -595,7 +595,7 @@ main (int argc, char *argv[])
   g_mem_set_vtable (&secure_mem);
 
   pinentry_init (PGMNAME);
-    
+
 #ifdef FALLBACK_CURSES
   if (pinentry_have_display (argc, argv))
     gtk_init (&argc, &argv);
@@ -611,9 +611,9 @@ main (int argc, char *argv[])
       printf(PGMNAME " " VERSION "\n");
       exit(EXIT_SUCCESS);
     }
-  
+
   if (pinentry_loop ())
     return 1;
-  
+
   return 0;
 }

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

Summary of changes:
 ChangeLog               |    7 +++++
 gtk+-2/gtksecentry.c    |   66 +++++++++++++++++++++++++++++-----------------
 gtk+-2/pinentry-gtk-2.c |   26 +++++++++---------
 3 files changed, 61 insertions(+), 38 deletions(-)


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




More information about the Gnupg-commits mailing list