[svn] pinentry - r227 - in trunk: . gtk+-2
svn author wk
cvs at cvs.gnupg.org
Mon Apr 19 15:01:16 CEST 2010
Author: wk
Date: 2010-04-19 15:01:15 +0200 (Mon, 19 Apr 2010)
New Revision: 227
Modified:
trunk/ChangeLog
trunk/gtk+-2/gtksecentry.c
trunk/gtk+-2/pinentry-gtk-2.c
Log:
Fix segv when using -g.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-04-16 02:11:33 UTC (rev 226)
+++ trunk/ChangeLog 2010-04-19 13:01:15 UTC (rev 227)
@@ -1,3 +1,15 @@
+2010-04-19 Werner Koch <wk at g10code.com>
+
+ * gtk+-2/gtksecentry.c (gtk_secure_entry_delete_cb)
+ (gtk_secure_entry_toggle_overwrite, activate_cb)
+ (unichar_chosen_func): Comment out these unused functions.
+ (secentry_malloc): Fix format string error.
+
+2010-04-19 Stanislav Ochotnicky <sochotnicky at redhat.com> (wk)
+
+ * gtk+-2/pinentry-gtk-2.c (ungrab_keyboard): Fix segv when using
+ option -g.
+
2010-04-16 Marcus Brinkmann <marcus at g10code.de>
* secmem/util.c: Fix inverted test.
Modified: trunk/gtk+-2/gtksecentry.c
===================================================================
--- trunk/gtk+-2/gtksecentry.c 2010-04-16 02:11:33 UTC (rev 226)
+++ trunk/gtk+-2/gtksecentry.c 2010-04-19 13:01:15 UTC (rev 227)
@@ -277,7 +277,7 @@
else
p = (gpointer) malloc(size);
if (!p)
- g_error("could not allocate %ld bytes", size);
+ g_error("could not allocate %lu bytes", (unsigned long)size);
return p;
}
@@ -1844,21 +1844,21 @@
gtk_secure_entry_pend_cursor_blink(entry);
}
-static void
-gtk_secure_entry_delete_cb(GtkSecureEntry * entry)
-{
- GtkEditable *editable = GTK_EDITABLE(entry);
- gint start, end;
+/* static void */
+/* gtk_secure_entry_delete_cb(GtkSecureEntry * entry) */
+/* { */
+/* GtkEditable *editable = GTK_EDITABLE(entry); */
+/* gint start, end; */
- if (gtk_editable_get_selection_bounds(editable, &start, &end))
- gtk_editable_delete_text(editable, start, end);
-}
+/* if (gtk_editable_get_selection_bounds(editable, &start, &end)) */
+/* gtk_editable_delete_text(editable, start, end); */
+/* } */
-static void
-gtk_secure_entry_toggle_overwrite(GtkSecureEntry * entry)
-{
- entry->overwrite_mode = !entry->overwrite_mode;
-}
+/* static void */
+/* gtk_secure_entry_toggle_overwrite(GtkSecureEntry * entry) */
+/* { */
+/* entry->overwrite_mode = !entry->overwrite_mode; */
+/* } */
static void
gtk_secure_entry_real_activate(GtkSecureEntry * entry)
@@ -3119,13 +3119,13 @@
/* Quick hack of a popup menu
*/
-static void
-activate_cb(GtkWidget * menuitem, GtkSecureEntry * entry)
-{
- const gchar *signal =
- g_object_get_data(G_OBJECT(menuitem), "gtk-signal");
- g_signal_emit_by_name(entry, signal);
-}
+/* static void */
+/* activate_cb(GtkWidget * menuitem, GtkSecureEntry * entry) */
+/* { */
+/* const gchar *asignal = */
+/* g_object_get_data(G_OBJECT(menuitem), "gtk-signal"); */
+/* g_signal_emit_by_name(entry, asignal); */
+/* } */
static gboolean
@@ -3137,13 +3137,13 @@
}
-static void
-unichar_chosen_func(const char *text, gpointer data)
-{
- GtkSecureEntry *entry = GTK_SECURE_ENTRY(data);
+/* static void */
+/* unichar_chosen_func(const char *text, gpointer data) */
+/* { */
+/* GtkSecureEntry *entry = GTK_SECURE_ENTRY(data); */
- gtk_secure_entry_enter_text(entry, text);
-}
+/* gtk_secure_entry_enter_text(entry, text); */
+/* } */
/* We display the cursor when
*
Modified: trunk/gtk+-2/pinentry-gtk-2.c
===================================================================
--- trunk/gtk+-2/pinentry-gtk-2.c 2010-04-16 02:11:33 UTC (rev 226)
+++ trunk/gtk+-2/pinentry-gtk-2.c 2010-04-19 13:01:15 UTC (rev 227)
@@ -145,7 +145,11 @@
{
gdk_keyboard_ungrab (gdk_event_get_time (event));
/* Unmake window transient for the root window. */
- gdk_window_set_transient_for (win->window, NULL);
+ /* 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_atom_intern_static_string ("WM_TRANSIENT_FOR"));
}
More information about the Gnupg-commits
mailing list