Revision: 1414 http://svn.sourceforge.net/geany/?rev=1414&view=rev Author: ntrel Date: 2007-03-23 09:03:52 -0700 (Fri, 23 Mar 2007)
Log Message: ----------- Add Edit button to Keyboard Shortcuts dialog.
Modified Paths: -------------- trunk/ChangeLog trunk/src/dialogs.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-03-22 15:51:39 UTC (rev 1413) +++ trunk/ChangeLog 2007-03-23 16:03:52 UTC (rev 1414) @@ -1,3 +1,9 @@ +2007-03-23 Nick Treleaven nick.treleaven@btinternet.com + + * src/dialogs.c: + Add Edit button to Keyboard Shortcuts dialog. + + 2007-03-22 Enrico Tröger enrico.troeger@uvena.de
* THANKS, doc/geany.docbook, src/keybindings.c, src/keybindings.h,
Modified: trunk/src/dialogs.c =================================================================== --- trunk/src/dialogs.c 2007-03-22 15:51:39 UTC (rev 1413) +++ trunk/src/dialogs.c 2007-03-23 16:03:52 UTC (rev 1414) @@ -51,6 +51,7 @@ #include "ui_utils.h" #include "keybindings.h" #include "encodings.h" +#include "prefs.h"
#if ! GEANY_USE_WIN32_DIALOG @@ -1304,10 +1305,12 @@ GString *text_keys = g_string_sized_new(600); gchar *shortcut; guint i; - gint height; + gint height, response;
dialog = gtk_dialog_new_with_buttons(_("Keyboard shortcuts"), GTK_WINDOW(app->window), - GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL, NULL); + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_EDIT, GTK_RESPONSE_APPLY, + GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL, NULL); vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog)); gtk_box_set_spacing(GTK_BOX(vbox), 6);
@@ -1348,10 +1351,26 @@ gtk_box_pack_start(GTK_BOX(vbox), label3, FALSE, FALSE, 6); gtk_box_pack_start(GTK_BOX(vbox), swin, TRUE, TRUE, 0);
- g_signal_connect((gpointer) dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); - gtk_widget_show_all(dialog); + response = gtk_dialog_run(GTK_DIALOG(dialog)); + if (response == GTK_RESPONSE_APPLY) + { + GtkWidget *wid;
+ dialogs_show_prefs_dialog(); + // select the KB page + wid = lookup_widget(app->prefs_dialog, "frame22"); + if (wid != NULL) + { + GtkNotebook *nb = GTK_NOTEBOOK(lookup_widget(app->prefs_dialog, "notebook2")); + + if (nb != NULL) + gtk_notebook_set_current_page(nb, gtk_notebook_page_num(nb, wid)); + } + } + + gtk_widget_destroy(dialog); + g_string_free(text_names, TRUE); g_string_free(text_keys, TRUE); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.