[Gpa-commits] r865 - trunk/src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Mar 27 23:08:36 CET 2008
Author: marcus
Date: 2008-03-27 23:08:35 +0100 (Thu, 27 Mar 2008)
New Revision: 865
Modified:
trunk/src/ChangeLog
trunk/src/encryptdlg.c
trunk/src/expirydlg.c
trunk/src/filesigndlg.c
trunk/src/gpakeyselector.c
trunk/src/gpawidgets.c
trunk/src/gpawidgets.h
trunk/src/gpawizard.c
trunk/src/gtktools.c
trunk/src/gtktools.h
trunk/src/keyeditdlg.c
trunk/src/keygendlg.c
trunk/src/keygenwizard.c
trunk/src/keyimpseldlg.c
trunk/src/keysigndlg.c
Log:
2008-03-27 Marcus Brinkmann <marcus at g10code.de>
* gtktools.h (gpa_window_destroy, gpa_buttonCancel_new)
(gpa_button_set_text, gpa_check_button_new, gpa_radio_button_new)
(gpa_button_new, gpa_toggle_button_new, gpa_space_new)
(gpa_widget_hjustified_new, gpa_radio_button_new_from_widget):
(gpa_xpm_label_box, gpa_button_cancel_new): Removed prototype.
* gtktools.c (gpa_window_destroy, gpa_buttonCancel_new)
(gpa_button_set_text, gpa_check_button_new, gpa_radio_button_new)
(gpa_button_new, gpa_toggle_button_new, gpa_space_new)
(gpa_widget_hjustified_new, gpa_radio_button_new_from_widget)
(gpa_xpm_label_box, gpa_button_cancel_new): Removed function.
* keyimpseldlg.c (gpa_key_import_selection_dialog_run): Replace
gpa_button_new and gpa_button_cancel_new by stock button.
* keyeditdlg.c (gpa_key_edit_dialog_constructor): Use
gtk_button_new_with_mnemonic instead of gpa_button_new. Remove
accelerator group.
* gpawizard.c (gpa_wizard_new): Use stock buttons.
* encryptdlg.c (gpa_file_encrypt_dialog_constructor): Use
gtk_check_button_new_with_mnemonic instead of
gpa_check_button_new.
* filesigndlg.c (gpa_file_sign_dialog_constructor): Likewise.
* keysigndlg.c (gpa_key_sign_run_dialog): Likewise. Remove accelerator group.
* gpawidgets.h (gpa_expiry_frame_new): Remove argument accelGroup from prototype.
* keygendlg.c (gpa_key_gen_run_dialog): Change caller of gpa_expiry_frame_new.
* filesigndlg.c (gpa_file_sign_dialog_constructor): Use
gtk_radio_button_new_with_mnemonic instead of gpa_radio_button_new
and gtk_radio_button_new_with_mnemonic_from_widget instead fo
gpa_radio_button_new_from_widget.
* expirydlg.c (gpa_expiry_dialog_run): Likewise.
* gpawidgets.c (gpa_expiry_frame_new): Likewise. Remove argument
accelGroup.
* encryptdlg.c (gpa_file_encrypt_dialog_constructor): Set shadow around keylist.
* filesigndlg.c (gpa_file_sign_dialog_constructor): Set shadow
type around keylist.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/ChangeLog 2008-03-27 22:08:35 UTC (rev 865)
@@ -1,5 +1,39 @@
2008-03-27 Marcus Brinkmann <marcus at g10code.de>
+ * gtktools.h (gpa_window_destroy, gpa_buttonCancel_new)
+ (gpa_button_set_text, gpa_check_button_new, gpa_radio_button_new)
+ (gpa_button_new, gpa_toggle_button_new, gpa_space_new)
+ (gpa_widget_hjustified_new, gpa_radio_button_new_from_widget):
+ (gpa_xpm_label_box, gpa_button_cancel_new): Removed prototype.
+ * gtktools.c (gpa_window_destroy, gpa_buttonCancel_new)
+ (gpa_button_set_text, gpa_check_button_new, gpa_radio_button_new)
+ (gpa_button_new, gpa_toggle_button_new, gpa_space_new)
+ (gpa_widget_hjustified_new, gpa_radio_button_new_from_widget)
+ (gpa_xpm_label_box, gpa_button_cancel_new): Removed function.
+ * keyimpseldlg.c (gpa_key_import_selection_dialog_run): Replace
+ gpa_button_new and gpa_button_cancel_new by stock button.
+ * keyeditdlg.c (gpa_key_edit_dialog_constructor): Use
+ gtk_button_new_with_mnemonic instead of gpa_button_new. Remove
+ accelerator group.
+ * gpawizard.c (gpa_wizard_new): Use stock buttons.
+ * encryptdlg.c (gpa_file_encrypt_dialog_constructor): Use
+ gtk_check_button_new_with_mnemonic instead of
+ gpa_check_button_new.
+ * filesigndlg.c (gpa_file_sign_dialog_constructor): Likewise.
+ * keysigndlg.c (gpa_key_sign_run_dialog): Likewise. Remove accelerator group.
+ * gpawidgets.h (gpa_expiry_frame_new): Remove argument accelGroup from prototype.
+ * keygendlg.c (gpa_key_gen_run_dialog): Change caller of gpa_expiry_frame_new.
+ * filesigndlg.c (gpa_file_sign_dialog_constructor): Use
+ gtk_radio_button_new_with_mnemonic instead of gpa_radio_button_new
+ and gtk_radio_button_new_with_mnemonic_from_widget instead fo
+ gpa_radio_button_new_from_widget.
+ * expirydlg.c (gpa_expiry_dialog_run): Likewise.
+ * gpawidgets.c (gpa_expiry_frame_new): Likewise. Remove argument
+ accelGroup.
+ * encryptdlg.c (gpa_file_encrypt_dialog_constructor): Set shadow around keylist.
+ * filesigndlg.c (gpa_file_sign_dialog_constructor): Set shadow
+ type around keylist.
+
* Makefile.am (tip_files): Removed variable.
(pkgdata_DATA): Remove $(tip_files).
(EXTRA_DIST): Remove $(tip_files).
Modified: trunk/src/encryptdlg.c
===================================================================
--- trunk/src/encryptdlg.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/encryptdlg.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -162,6 +162,8 @@
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (vboxEncrypt), scrollerKeys, TRUE, TRUE, 0);
gtk_widget_set_size_request (scrollerKeys, 400, 200);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollerKeys),
+ GTK_SHADOW_IN);
clistKeys = gpa_key_selector_new (FALSE);
g_signal_connect (G_OBJECT (gtk_tree_view_get_selection
@@ -174,8 +176,7 @@
_("_Public Keys"));
- checkerSign = gpa_check_button_new (accelGroup, _("_Sign"));
-
+ checkerSign = gtk_check_button_new_with_mnemonic (_("_Sign"));
gtk_box_pack_start (GTK_BOX (vboxEncrypt), checkerSign, FALSE, FALSE, 0);
dialog->check_sign = checkerSign;
gtk_signal_connect (GTK_OBJECT (checkerSign), "toggled",
@@ -212,7 +213,7 @@
gtk_widget_set_sensitive (scrollerWho, FALSE);
#endif
- checkerArmor = gpa_check_button_new (accelGroup, _("A_rmor"));
+ checkerArmor = gtk_check_button_new_with_mnemonic (_("A_rmor"));
gtk_box_pack_start (GTK_BOX (vboxEncrypt), checkerArmor, FALSE, FALSE, 0);
dialog->check_armor = checkerArmor;
Modified: trunk/src/expirydlg.c
===================================================================
--- trunk/src/expirydlg.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/expirydlg.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -101,13 +101,10 @@
GtkWidget * vbox;
GtkWidget * radio;
GtkWidget * calendar;
- GtkAccelGroup * accel_group;
unsigned long expiry_date;
GPAExpiryDialog dialog;
- accel_group = gtk_accel_group_new ();
-
window = gtk_dialog_new_with_buttons (_("Change expiry date"),
GTK_WINDOW (parent),
GTK_DIALOG_MODAL,
@@ -119,19 +116,17 @@
gtk_dialog_set_default_response (GTK_DIALOG (window), GTK_RESPONSE_OK);
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
dialog.window = window;
- accel_group = gtk_accel_group_new ();
- gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
vbox = GTK_DIALOG (window)->vbox;
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
- radio = gpa_radio_button_new (accel_group, _("_never expire"));
+ radio = gtk_radio_button_new_with_mnemonic (NULL, _("_never expire"));
dialog.radio_never = radio;
gtk_box_pack_start (GTK_BOX (vbox), radio, FALSE, FALSE, 0);
- radio = gpa_radio_button_new_from_widget (GTK_RADIO_BUTTON (radio),
- accel_group, _("_expire on:"));
+ radio = gtk_radio_button_new_with_mnemonic_from_widget
+ (GTK_RADIO_BUTTON (radio), _("_expire on:"));
dialog.radio_date = radio;
gtk_box_pack_start (GTK_BOX (vbox), radio, FALSE, FALSE, 0);
Modified: trunk/src/filesigndlg.c
===================================================================
--- trunk/src/filesigndlg.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/filesigndlg.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -149,20 +149,19 @@
gtk_container_set_border_width (GTK_CONTAINER (vboxMode), 5);
gtk_container_add (GTK_CONTAINER (frameMode), vboxMode);
- radio_sign_comp = gpa_radio_button_new (accelGroup, _("si_gn and compress"));
+ radio_sign_comp = gtk_radio_button_new_with_mnemonic (NULL, _("si_gn and compress"));
gtk_box_pack_start (GTK_BOX (vboxMode), radio_sign_comp, FALSE, FALSE, 0);
dialog->radio_comp = radio_sign_comp;
radio_sign =
- gpa_radio_button_new_from_widget (GTK_RADIO_BUTTON (radio_sign_comp),
- accelGroup, _("_cleartext signature"));
+ gtk_radio_button_new_with_mnemonic_from_widget
+ (GTK_RADIO_BUTTON (radio_sign_comp), _("_cleartext signature"));
gtk_box_pack_start (GTK_BOX (vboxMode), radio_sign, FALSE, FALSE, 0);
dialog->radio_sign = radio_sign;
radio_sign_sep =
- gpa_radio_button_new_from_widget (GTK_RADIO_BUTTON (radio_sign_comp),
- accelGroup,
- _("_detached signature"));
+ gtk_radio_button_new_with_mnemonic_from_widget
+ (GTK_RADIO_BUTTON (radio_sign_comp), _("_detached signature"));
gtk_box_pack_start (GTK_BOX (vboxMode), radio_sign_sep, FALSE, FALSE, 0);
dialog->radio_sep = radio_sign_sep;
@@ -177,6 +176,8 @@
scrollerWho = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_size_request (scrollerWho, 400, 200);
gtk_box_pack_start (GTK_BOX (vboxWho), scrollerWho, TRUE, TRUE, 0);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollerWho),
+ GTK_SHADOW_IN);
clistWho = gpa_key_selector_new (TRUE);
dialog->clist_who = clistWho;
@@ -184,7 +185,7 @@
gpa_connect_by_accelerator (GTK_LABEL (labelWho), clistWho, accelGroup,
_("Sign _as "));
- checkerArmor = gpa_check_button_new (accelGroup, _("A_rmor"));
+ checkerArmor = gtk_check_button_new_with_mnemonic (_("A_rmor"));
gtk_container_set_border_width (GTK_CONTAINER (checkerArmor), 5);
gtk_box_pack_start (GTK_BOX (vboxSign), checkerArmor, FALSE, FALSE, 0);
dialog->check_armor = checkerArmor;
Modified: trunk/src/gpakeyselector.c
===================================================================
--- trunk/src/gpakeyselector.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/gpakeyselector.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -1,8 +1,8 @@
/* gpakeyselector.c - The GNU Privacy Assistant key selector.
Copyright (C) 2003 Miguel Coca.
- Copyright (C) 2005 g10 Code GmbH.
+ Copyright (C) 2005, 2008 g10 Code GmbH.
- This file is part of GPA
+ This file is part of GPA.
GPA is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Modified: trunk/src/gpawidgets.c
===================================================================
--- trunk/src/gpawidgets.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/gpawidgets.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -159,7 +159,7 @@
}
GtkWidget *
-gpa_expiry_frame_new (GtkAccelGroup * accelGroup, GDate * expiryDate)
+gpa_expiry_frame_new (GDate * expiryDate)
{
gint i;
GtkWidget *expiry_frame;
@@ -184,16 +184,15 @@
gtk_container_add (GTK_CONTAINER (expiry_frame), vboxExpire);
gtk_container_set_border_width (GTK_CONTAINER (vboxExpire), 5);
- radioDont = gpa_radio_button_new (accelGroup, _("_indefinitely valid"));
+ radioDont = gtk_radio_button_new_with_mnemonic (NULL, _("_indefinitely valid"));
frame->radioDont = radioDont;
gtk_box_pack_start (GTK_BOX (vboxExpire), radioDont, FALSE, FALSE, 0);
hboxAfter = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vboxExpire), hboxAfter, FALSE, FALSE, 0);
- radioAfter = gpa_radio_button_new_from_widget (GTK_RADIO_BUTTON (radioDont),
- accelGroup,
- _("expire _after"));
+ radioAfter = gtk_radio_button_new_with_mnemonic_from_widget
+ (GTK_RADIO_BUTTON (radioDont), _("expire _after"));
frame->radioAfter = radioAfter;
gtk_box_pack_start (GTK_BOX (hboxAfter), radioAfter, FALSE, FALSE, 0);
entryAfter = gtk_entry_new ();
@@ -212,8 +211,8 @@
gtk_widget_set_sensitive (comboAfter, FALSE);
/* FIXME: Set according to expiry date. */
- radioAt = gpa_radio_button_new_from_widget (GTK_RADIO_BUTTON (radioDont),
- accelGroup, _("expire o_n:"));
+ radioAt = gtk_radio_button_new_with_mnemonic_from_widget
+ (GTK_RADIO_BUTTON (radioDont), _("expire o_n:"));
frame->radioAt = radioAt;
gtk_box_pack_start (GTK_BOX (vboxExpire), radioAt, FALSE, FALSE, 0);
calendar = gtk_calendar_new ();
Modified: trunk/src/gpawidgets.h
===================================================================
--- trunk/src/gpawidgets.h 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/gpawidgets.h 2008-03-27 22:08:35 UTC (rev 865)
@@ -25,8 +25,7 @@
extern GtkWidget *gpa_key_info_new (gpgme_key_t key);
-extern GtkWidget *gpa_expiry_frame_new (GtkAccelGroup *accelGroup,
- GDate *expiryDate);
+extern GtkWidget *gpa_expiry_frame_new (GDate *expiryDate);
extern gchar *gpa_expiry_frame_validate (GtkWidget *expiry_frame);
extern gboolean gpa_expiry_frame_get_expiration(GtkWidget *expiry_frame,
GDate **date,
Modified: trunk/src/gpawizard.c
===================================================================
--- trunk/src/gpawizard.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/gpawizard.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -1,29 +1,30 @@
/* keygendlg.c - The GNU Privacy Assistant
- * Copyright (C) 2001 G-N-U GmbH.
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify
- * 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.
- *
- * GPA 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+ Copyright (C) 2001 G-N-U GmbH.
+ Copyright (C) 2008 g10 Code GmbH.
+ This file is part of GPA
+ GPA is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ GPA 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, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
/*
* A simple general purpose Wizard implementation
*/
-#include <config.h>
-
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "gpa.h"
@@ -211,7 +212,7 @@
}
-/* Create a new GPA Wizard */
+/* Create a new GPA Wizard. */
GtkWidget *
gpa_wizard_new (GtkAccelGroup * accel_group,
GtkSignalFunc close_func, gpointer close_data)
@@ -256,37 +257,32 @@
gtk_button_box_set_layout (GTK_BUTTON_BOX (button_box), GTK_BUTTONBOX_END);
gtk_button_box_set_spacing (GTK_BUTTON_BOX (button_box), 10);
- /*button = gtk_button_new_from_stock (GTK_STOCK_GO_BACK);*/
- button = gpa_button_new (accel_group, _("_Back"));
+ button = gtk_button_new_from_stock (GTK_STOCK_GO_BACK);
wizard->prev_button = button;
gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gpa_wizard_prev), (gpointer) wizard);
- /*button = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD);*/
- button = gpa_button_new (accel_group, _("_Forward"));
+ button = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD);
wizard->next_button = button;
gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gpa_wizard_next), (gpointer) vbox);
- /*button = gtk_button_new_from_stock (GTK_STOCK_APPLY);*/
- button = gpa_button_new (accel_group, _("_Apply"));
+ button = gtk_button_new_from_stock (GTK_STOCK_APPLY);
wizard->finish_button = button;
gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gpa_wizard_next), (gpointer) vbox);
- /*button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);*/
- button = gpa_button_new (accel_group, _("_Close"));
+ button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
wizard->close_button = button;
gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 5);
gtk_signal_connect (GTK_OBJECT (button), "clicked", close_func, close_data);
gtk_widget_add_accelerator (button, "clicked", accel_group, GDK_Escape,
0, 0);
- /*button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);*/
- button = gpa_button_new (accel_group, _("_Cancel"));
+ button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
wizard->cancel_button = button;
gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 5);
gtk_signal_connect (GTK_OBJECT (button), "clicked", close_func, close_data);
Modified: trunk/src/gtktools.c
===================================================================
--- trunk/src/gtktools.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/gtktools.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -1,29 +1,30 @@
/* gtktools.c - The GNU Privacy Assistant
- * Copyright (C) 2000, 2001 G-N-U GmbH.
- * Copyright (C) 2008 g10 Code GmbH.
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * GPA 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, see <http://www.gnu.org/licenses/>.
- */
+ Copyright (C) 2000, 2001 G-N-U GmbH.
+ Copyright (C) 2008 g10 Code GmbH.
+ This file is part of GPA.
+
+ GPA is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ GPA 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, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
/* NOTE: Here are a lot of old GTK+ functions and wrappers. They
should be replaced by modern GTK+ code and some of the wrappers are
not needed anymore. */
-#include <config.h>
-
#include <stdlib.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
@@ -38,9 +39,8 @@
/* Show all children of the GtkWindow widget, realize it, set its
- * position so that it's in the center of the parent and show the window
- * itself.
- */
+ position so that it's in the center of the parent and show the
+ window itself. */
void
gpa_window_show_centered (GtkWidget * widget, GtkWidget * parent)
{
@@ -63,253 +63,22 @@
gtk_widget_set_uposition (widget, center_x, center_y);
gtk_window_set_transient_for(GTK_WINDOW(widget), GTK_WINDOW(parent));
gtk_widget_show_all (widget);
-} /* gpa_window_show_centered */
-
-
-void
-gpa_window_destroy (gpointer param)
-{
-/* var */
- gpointer *localParam;
- GpaWindowKeeper *keeper;
-
-/* commands */
- localParam = (gpointer *) param;
- keeper = (GpaWindowKeeper *) localParam[0];
- gpa_windowKeeper_release (keeper);
-} /* gpa_window_destroy */
-
-GtkWidget *
-gpa_space_new (void)
-{
- return gtk_label_new ("");
-} /* gpa_space_new */
-
-GtkWidget *
-gpa_widget_hjustified_new (GtkWidget * widget, GtkJustification jtype)
-{
-/* objects */
- GtkWidget *result;
- GtkWidget *space;
-/* commands */
- switch (jtype)
- {
- case GTK_JUSTIFY_LEFT:
- result = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (result), widget, FALSE, FALSE, 0);
- space = gpa_space_new ();
- gtk_box_pack_start (GTK_BOX (result), space, TRUE, TRUE, 0);
- break;
- case GTK_JUSTIFY_RIGHT:
- result = gtk_hbox_new (FALSE, 0);
- space = gpa_space_new ();
- gtk_box_pack_start (GTK_BOX (result), space, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (result), widget, FALSE, FALSE, 0);
- break;
- default:
- result = widget;
- } /* switch */
- return result;
-} /* gpa_widget_hjustified_new */
-
-GtkWidget *
-gpa_button_new (GtkAccelGroup * accelGroup, gchar * labelText)
-{
-/* var */
- guint accelKey;
-/* objects */
- GtkWidget *button;
-/* commands */
- button = gtk_button_new_with_label ("");
- accelKey =
- gtk_label_parse_uline (GTK_LABEL (GTK_BIN (button)->child), labelText);
- gtk_widget_add_accelerator (button, "clicked", accelGroup, accelKey,
- GDK_MOD1_MASK, 0);
- return (button);
-} /* gpa_button_new */
-
-/* Create a new hbox with an image and a label packed into it
- * and return the box. Then treat the accelerators. */
-GtkWidget *
-gpa_xpm_label_box( GtkWidget *parent,
- const char *xpm_name,
- gchar *label_text,
- GtkWidget * button,
- GtkAccelGroup * accelGroup)
-{
- guint accelKey;
- GtkWidget *box1;
- GtkWidget *label;
- GtkWidget *pixmapwid;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
-
- /* Create box for xpm and label */
- box1 = gtk_hbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (box1), 2);
-
- /* Now on to the xpm stuff */
- pixmap = gpa_create_icon_pixmap ( parent, xpm_name, &mask );
- pixmapwid = gtk_pixmap_new (pixmap, mask);
-
- /* Create a label for the button */
- label = gtk_label_new (label_text);
-
- /* accelerators for gpa */
- accelKey = gtk_label_parse_uline (GTK_LABEL(label), label_text);
- gtk_widget_add_accelerator (button, "clicked", accelGroup, accelKey,
- GDK_MOD1_MASK, 0);
-
- /* Pack the pixmap and label into the box */
- gtk_box_pack_start (GTK_BOX (box1),
- pixmapwid, FALSE, FALSE, 3);
-
- gtk_box_pack_start (GTK_BOX (box1), label, FALSE, FALSE, 3);
-
- gtk_widget_show(pixmapwid);
- gtk_widget_show(label);
-
- return(box1);
}
-GtkWidget *
-gpa_buttonCancel_new (GtkAccelGroup * accelGroup, gchar * labelText,
- gpointer * param)
-{
-/* objects */
- GtkWidget *buttonCancel;
-/* commands */
- buttonCancel = gpa_button_new (accelGroup, labelText);
- gtk_signal_connect_object (GTK_OBJECT (buttonCancel), "clicked",
- GTK_SIGNAL_FUNC (gpa_window_destroy),
- (gpointer) param);
- gtk_widget_add_accelerator (buttonCancel, "clicked", accelGroup, GDK_Escape,
- 0, 0);
- return (buttonCancel);
-} /* gpa_buttonCancel_new */
-/* an extended version of gpa_buttonCancel_new */
-GtkWidget *
-gpa_button_cancel_new (GtkAccelGroup * accel, gchar * label,
- GtkSignalFunc func, gpointer param)
-{
- GtkWidget *button;
-
- button = gpa_button_new (accel, label);
- gtk_signal_connect_object (GTK_OBJECT (button), "clicked", func, param);
- gtk_widget_add_accelerator (button, "clicked", accel, GDK_Escape, 0, 0);
- return button;
-} /* gpa_button_cancel_new */
-
-
-GtkWidget *
-gpa_check_button_new (GtkAccelGroup * accelGroup, gchar * labelText)
-{
-/* var */
- guint accelKey;
-/* objects */
- GtkWidget *checker;
-/* commands */
- checker = gtk_check_button_new_with_label ("");
- accelKey =
- gtk_label_parse_uline (GTK_LABEL (GTK_BIN (checker)->child), labelText);
- gtk_widget_add_accelerator (checker, "clicked", accelGroup, accelKey,
- GDK_MOD1_MASK, 0);
- return (checker);
-} /* gpa_check_button_new */
-
-GtkWidget *
-gpa_radio_button_new (GtkAccelGroup * accelGroup, gchar * labelText)
-{
-/* var */
- guint accelKey;
-/* objects */
- GtkWidget *radio;
-/* commands */
- radio = gtk_radio_button_new_with_label (NULL, "");
- accelKey =
- gtk_label_parse_uline (GTK_LABEL (GTK_BIN (radio)->child), labelText);
- gtk_widget_add_accelerator (radio, "clicked", accelGroup, accelKey,
- GDK_MOD1_MASK, 0);
- return (radio);
-} /* gpa_radio_button_new */
-
-GtkWidget *
-gpa_radio_button_new_from_widget (GtkRadioButton * widget,
- GtkAccelGroup * accelGroup,
- gchar * labelText)
-{
-/* var */
- guint accelKey;
-/* objects */
- GtkWidget *radio;
-/* commands */
- radio = gtk_radio_button_new_with_label_from_widget (widget, "");
- accelKey =
- gtk_label_parse_uline (GTK_LABEL (GTK_BIN (radio)->child), labelText);
- gtk_widget_add_accelerator (radio, "clicked", accelGroup, accelKey,
- GDK_MOD1_MASK, 0);
- return (radio);
-} /* gpa_radio_button_new_from_widget */
-
-GtkWidget *
-gpa_toggle_button_new (GtkAccelGroup * accelGroup, gchar * labelText)
-{
-/* var */
- guint accelKey;
-/* objects */
- GtkWidget *toggle;
-/* commands */
- toggle = gtk_toggle_button_new_with_label ("");
- accelKey =
- gtk_label_parse_uline (GTK_LABEL (GTK_BIN (toggle)->child), labelText);
- gtk_widget_add_accelerator (toggle, "clicked", accelGroup, accelKey,
- GDK_MOD1_MASK, 0);
- return (toggle);
-} /* gpa_toggle_button_new */
-
void
gpa_connect_by_accelerator (GtkLabel * label, GtkWidget * widget,
GtkAccelGroup * accelGroup, gchar * labelText)
{
-/* var */
guint accelKey;
-/* commands */
+
accelKey = gtk_label_parse_uline (label, labelText);
gtk_widget_add_accelerator (widget, "grab_focus", accelGroup, accelKey,
GDK_MOD1_MASK, 0);
-} /* gpa_connect_by_accelerator */
+}
-/* Set the text of the GtkButton button to text, remove existing
- * accelerators and and add new accelerators if accel_group is not NULL
- */
void
-gpa_button_set_text (GtkWidget * button, gchar * text,
- GtkAccelGroup * accel_group)
-{
- GtkWidget * label = GTK_BIN (button)->child;
- guint accel;
-
- accel = gtk_label_parse_uline (GTK_LABEL (label), text);
-
-#if 0 /* @@@@@@ */
- /* In GTK 1.2.8, the visible_only parameter of
- * gtk_widget_remove_accelerators is not even looked at, it always
- * behaves as if it were TRUE. Therefore make sure that
- * gtk_widget_add_accelerator is called with the GTK_ACCEL_VISIBLE
- * flag set to make remvoing the accels work.
- */
- gtk_widget_remove_accelerators (button, "clicked", TRUE);
- if (accel_group && accel != GDK_VoidSymbol)
- {
- gtk_widget_add_accelerator (button, "clicked", accel_group,
- accel, GDK_MOD1_MASK, GTK_ACCEL_VISIBLE);
- }
-#endif
-}
-
-void
gpa_window_error (const gchar *message, GtkWidget *messenger)
{
GtkWidget *windowError;
@@ -340,8 +109,9 @@
gtk_widget_show_all (windowError);
gtk_dialog_run (GTK_DIALOG (windowError));
gtk_widget_destroy (windowError);
-} /* gpa_window_error */
+}
+
void
gpa_window_message (gchar * message, GtkWidget * messenger)
{
@@ -373,14 +143,13 @@
gtk_widget_show_all (window);
gtk_dialog_run (GTK_DIALOG (window));
gtk_widget_destroy (window);
-} /* gpa_window_message */
+}
/* END of old unchecked code (wk 2008-03-07) */
-
/* Set a tooltip TEXT to WIDGET. TEXT and WIDGET may both be NULL.
This function is useful so that GPA can be build with older GTK+
versions. */
Modified: trunk/src/gtktools.h
===================================================================
--- trunk/src/gtktools.h 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/gtktools.h 2008-03-27 22:08:35 UTC (rev 865)
@@ -1,57 +1,32 @@
/* gtktools.h - The GNU Privacy Assistant
- * Copyright (C) 2000, 2001 G-N-U GmbH.
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify
- * 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.
- *
- * GPA 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+ Copyright (C) 2000, 2001 G-N-U GmbH.
+ Copyright (C) 2008 g10 Code GmbH.
+
+ This file is part of GPA
+
+ GPA is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ GPA 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, see <http://www.gnu.org/licenses/>. */
+
+
#ifndef GTK_TOOLS_H_
#define GTK_TOOLS_H_
#include <gtk/gtk.h>
-extern void gpa_window_destroy (gpointer param);
-extern GtkWidget *gpa_space_new (void);
-extern GtkWidget *gpa_widget_hjustified_new (GtkWidget * widget,
- GtkJustification jtype);
-extern GtkWidget *gpa_button_new (GtkAccelGroup * accelGroup,
- gchar * labelText);
-extern GtkWidget *gpa_xpm_label_box( GtkWidget *parent,
- const char *xpm_name,
- gchar *label_text,
- GtkWidget * button,
- GtkAccelGroup * accelGroup);
-extern GtkWidget *gpa_buttonCancel_new (GtkAccelGroup * accelGroup,
- gchar * labelText, gpointer * param);
-extern GtkWidget *gpa_button_cancel_new (GtkAccelGroup * accel, gchar * label,
- GtkSignalFunc func, gpointer param);
-extern GtkWidget *gpa_check_button_new (GtkAccelGroup * accelGroup,
- gchar * labelText);
-extern GtkWidget *gpa_radio_button_new (GtkAccelGroup * accelGroup,
- gchar * labelText);
-extern GtkWidget *gpa_radio_button_new_from_widget (GtkRadioButton * widget,
- GtkAccelGroup *
- accelGroup,
- gchar * labelText);
-extern GtkWidget *gpa_toggle_button_new (GtkAccelGroup * accelGroup,
- gchar * labelText);
extern void gpa_connect_by_accelerator (GtkLabel * label, GtkWidget * widget,
GtkAccelGroup * accelGroup,
gchar * labelText);
-void gpa_button_set_text (GtkWidget * button, gchar * text, GtkAccelGroup *);
extern void gpa_window_show_centered (GtkWidget * widget, GtkWidget * parent);
extern void gpa_window_error (const gchar * message, GtkWidget * messenger);
extern void gpa_window_message (gchar * message, GtkWidget * messenger);
Modified: trunk/src/keyeditdlg.c
===================================================================
--- trunk/src/keyeditdlg.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/keyeditdlg.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -1,26 +1,27 @@
/* keyeditdlg.c - The GNU Privacy Assistant
- * Copyright (C) 2000, 2001 G-N-U GmbH.
- * Copyright (C) 2003, Miguel Coca.
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify
- * 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.
- *
- * GPA 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+ Copyright (C) 2000, 2001 G-N-U GmbH.
+ Copyright (C) 2003 Miguel Coca.
+ Copyright (C) 2008 g10 Code GmbH.
-#include <config.h>
+ This file is part of GPA
+ GPA is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ GPA 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, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <time.h>
@@ -133,7 +134,6 @@
GtkWidget *label;
GtkWidget *button;
GtkWidget *table;
- GtkAccelGroup *accel_group;
gchar *date_string;
@@ -144,15 +144,12 @@
dialog = GPA_KEY_EDIT_DIALOG (object);
/* Initialize */
- accel_group = gtk_accel_group_new ();
-
gtk_window_set_title (GTK_WINDOW (dialog), _("Edit Key"));
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
_("_Close"),
GTK_RESPONSE_CLOSE,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
- gtk_window_add_accel_group (GTK_WINDOW (dialog), accel_group);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
vbox = GTK_DIALOG (dialog)->vbox;
@@ -162,7 +159,7 @@
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, TRUE, 0);
/* change passphrase */
- button = gpa_button_new (accel_group, _("Change _passphrase"));
+ button = gtk_button_new_with_mnemonic (_("Change _passphrase"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 5);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (gpa_key_edit_change_passphrase), dialog);
@@ -182,7 +179,7 @@
dialog->expiry = label;
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
- button = gpa_button_new (accel_group, _("Change _expiration"));
+ button = gtk_button_new_with_mnemonic (_("Change _expiration"));
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_set_sensitive (button,(gpa_keytable_lookup_key
(gpa_keytable_get_secret_instance(),
Modified: trunk/src/keygendlg.c
===================================================================
--- trunk/src/keygendlg.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/keygendlg.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -261,7 +261,7 @@
gtk_table_attach (GTK_TABLE (table), entryRepeat, 1, 2, 6, 7,
GTK_FILL, GTK_SHRINK, 0, 0);
- frameExpire = gpa_expiry_frame_new (accelGroup, NULL);
+ frameExpire = gpa_expiry_frame_new (NULL);
dialog.frameExpire = frameExpire;
gtk_container_set_border_width (GTK_CONTAINER (frameExpire), 5);
gtk_box_pack_start (GTK_BOX (vboxGenerate), frameExpire, FALSE, FALSE, 0);
Modified: trunk/src/keygenwizard.c
===================================================================
--- trunk/src/keygenwizard.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/keygenwizard.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -1,25 +1,26 @@
/* keygendlg.c - The GNU Privacy Assistant
- * Copyright (C) 2000, 2001 G-N-U GmbH.
- *
- * This file is part of GPA
- *
- * GPA is free software; you can redistribute it and/or modify
- * 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.
- *
- * GPA 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
+ Copyright (C) 2000, 2001 G-N-U GmbH.
+ Copyright (C) 2008 g10 Code GmbH.
-#include <config.h>
+ This file is part of GPA
+ GPA is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ GPA 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, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <sys/stat.h>
#include <gtk/gtk.h>
#include <errno.h>
@@ -363,15 +364,13 @@
gtk_label_set_line_wrap (GTK_LABEL (description), TRUE);
gtk_label_set_justify (GTK_LABEL (description), GTK_JUSTIFY_LEFT);
- radio = gpa_radio_button_new (keygen_wizard->accel_group,
- _("Create _backup copy"));
+ radio = gtk_radio_button_new_with_mnemonic (NULL, _("Create _backup copy"));
gtk_box_pack_start (GTK_BOX (vbox), radio, FALSE, TRUE, 5);
gtk_object_set_data (GTK_OBJECT (vbox), "gpa_keygen_backup",
(gpointer)radio);
- radio = gpa_radio_button_new_from_widget (GTK_RADIO_BUTTON (radio),
- keygen_wizard->accel_group,
- _("Do it _later"));
+ radio = gtk_radio_button_new_with_mnemonic_from_widget
+ (GTK_RADIO_BUTTON (radio), _("Do it _later"));
gtk_box_pack_start (GTK_BOX (vbox), radio, FALSE, TRUE, 5);
return vbox;
Modified: trunk/src/keyimpseldlg.c
===================================================================
--- trunk/src/keyimpseldlg.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/keyimpseldlg.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -1,26 +1,26 @@
/* keyimpseldlg.c - The GNU Privacy Assistant - Key import selection dialog
- * Copyright (C) 2002 G-N-U GmbH
- * Copyright (C) 2008 g10 Code GmbH.
- *
- * This file is part of GPA.
- *
- * GPA is free software; you can redistribute it and/or modify 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.
- *
- * GPA 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 GPA. If not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
+ Copyright (C) 2002 G-N-U GmbH
+ Copyright (C) 2008 g10 Code GmbH.
-#include <config.h>
+ This file is part of GPA
+ GPA is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ GPA 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, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <string.h>
@@ -150,15 +150,21 @@
GTK_BUTTONBOX_END);
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hButtonBoxSelect), 10);
gtk_container_set_border_width (GTK_CONTAINER (hButtonBoxSelect), 5);
- buttonSelect = gpa_button_new (accelGroup, "_OK");
+
+ buttonSelect = gtk_button_new_from_stock (GTK_STOCK_OK);
gtk_signal_connect_object (GTK_OBJECT (buttonSelect), "clicked",
GTK_SIGNAL_FUNC (key_import_selection_ok),
(gpointer) &dialog);
gtk_container_add (GTK_CONTAINER (hButtonBoxSelect), buttonSelect);
- buttonCancel = gpa_button_cancel_new (accelGroup, _("_Cancel"),
- (GtkSignalFunc) key_import_selection_cancel, (gpointer) &dialog);
+
+ buttonCancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
+ gtk_signal_connect (GTK_OBJECT (button), "clicked",
+ key_import_selection_cancel, &dialog);
+ gtk_widget_add_accelerator (buttonCancel, "clicked", accelGroup, GDK_Escape,
+ 0, 0);
gtk_container_add (GTK_CONTAINER (hButtonBoxSelect), buttonCancel);
+
gtk_container_add (GTK_CONTAINER (windowSelect), vboxSelect);
gpa_window_show_centered (windowSelect, parent);
gtk_window_set_modal (GTK_WINDOW (windowSelect), TRUE);
Modified: trunk/src/keysigndlg.c
===================================================================
--- trunk/src/keysigndlg.c 2008-03-27 18:30:35 UTC (rev 864)
+++ trunk/src/keysigndlg.c 2008-03-27 22:08:35 UTC (rev 865)
@@ -1,6 +1,6 @@
/* keysigndlg.c - The GNU Privacy Assistant
Copyright (C) 2000, 2001 G-N-U GmbH.
- Copyright (C) 2005 g10 Code GmbH.
+ Copyright (C) 2005, 2008 g10 Code GmbH.
This file is part of GPA
@@ -46,7 +46,6 @@
gpa_key_sign_run_dialog (GtkWidget * parent, gpgme_key_t key,
gboolean * sign_locally)
{
- GtkAccelGroup *accelGroup;
GtkWidget *window;
GtkWidget *vboxSign;
GtkWidget *check = NULL;
@@ -67,9 +66,6 @@
gtk_dialog_set_default_response (GTK_DIALOG (window), GTK_RESPONSE_YES);
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
- accelGroup = gtk_accel_group_new ();
- gtk_window_add_accel_group (GTK_WINDOW (window), accelGroup);
-
vboxSign = GTK_DIALOG (window)->vbox;
gtk_container_set_border_width (GTK_CONTAINER (vboxSign), 5);
@@ -136,9 +132,9 @@
gtk_box_pack_start (GTK_BOX (vboxSign), label, FALSE, TRUE, 5);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- if (!gpa_options_get_simplified_ui (gpa_options_get_instance ()))
+ if (! gpa_options_get_simplified_ui (gpa_options_get_instance ()))
{
- check = gpa_check_button_new (accelGroup, _("Sign only _locally"));
+ check = gtk_check_button_new_with_mnemonic (_("Sign only _locally"));
gtk_box_pack_start (GTK_BOX (vboxSign), check, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), *sign_locally);
}
More information about the Gpa-commits
mailing list