From 3aa703e432409a8dba2ee72e072ab0029becd404 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 5 Oct 2005 23:01:45 +0000 Subject: [PATCH] app/dialogs/dialogs-constructors.c include a check button for the 2005-10-06 Sven Neumann * app/dialogs/dialogs-constructors.c * app/dialogs/keyboard-shortcuts-dialog.[ch]: include a check button for the "save-accels" gimprc property. --- ChangeLog | 6 ++++++ app/dialogs/dialogs-constructors.c | 2 +- app/dialogs/keyboard-shortcuts-dialog.c | 12 +++++++++++- app/dialogs/keyboard-shortcuts-dialog.h | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e51a1903a7..6a6da0d468 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-10-06 Sven Neumann + + * app/dialogs/dialogs-constructors.c + * app/dialogs/keyboard-shortcuts-dialog.[ch]: include a check + button for the "save-accels" gimprc property. + 2005-10-06 Sven Neumann * plug-ins/help/domain.c: try to improve the error message that is diff --git a/app/dialogs/dialogs-constructors.c b/app/dialogs/dialogs-constructors.c index c69587e9c2..bcf438c5e8 100644 --- a/app/dialogs/dialogs-constructors.c +++ b/app/dialogs/dialogs-constructors.c @@ -140,7 +140,7 @@ dialogs_keyboard_shortcuts_get (GimpDialogFactory *factory, GimpContext *context, gint preview_size) { - return keyboard_shortcuts_dialog_new (); + return keyboard_shortcuts_dialog_new (context->gimp); } GtkWidget * diff --git a/app/dialogs/keyboard-shortcuts-dialog.c b/app/dialogs/keyboard-shortcuts-dialog.c index 002bb882b0..70dd1a97c9 100644 --- a/app/dialogs/keyboard-shortcuts-dialog.c +++ b/app/dialogs/keyboard-shortcuts-dialog.c @@ -24,6 +24,8 @@ #include "dialogs-types.h" +#include "core/gimp.h" + #include "widgets/gimpactionview.h" #include "widgets/gimphelp-ids.h" #include "widgets/gimpuimanager.h" @@ -34,7 +36,7 @@ GtkWidget * -keyboard_shortcuts_dialog_new (void) +keyboard_shortcuts_dialog_new (Gimp *gimp) { GtkWidget *dialog; GtkWidget *vbox; @@ -43,6 +45,9 @@ keyboard_shortcuts_dialog_new (void) GtkWidget *view; GtkWidget *image; GtkWidget *label; + GtkWidget *button; + + g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL); dialog = gimp_dialog_new (_("Configure Keyboard Shortcuts"), "gimp-keyboard-shortcuts-dialog", @@ -100,5 +105,10 @@ keyboard_shortcuts_dialog_new (void) gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); + button = gimp_prop_check_button_new (G_OBJECT (gimp->config), "save-accels", + _("_Save keyboard shortcuts on exit")); + gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); + gtk_widget_show (button); + return dialog; } diff --git a/app/dialogs/keyboard-shortcuts-dialog.h b/app/dialogs/keyboard-shortcuts-dialog.h index b1b9d00989..479fb5469e 100644 --- a/app/dialogs/keyboard-shortcuts-dialog.h +++ b/app/dialogs/keyboard-shortcuts-dialog.h @@ -20,7 +20,7 @@ #define __KEYBOARD_SHORTCUTS_DIALOG_H__ -GtkWidget * keyboard_shortcuts_dialog_new (void); +GtkWidget * keyboard_shortcuts_dialog_new (Gimp *gimp); #endif /* __KEYBOARD_SHORTCUTS_DIALOG_H__ */