Revision: 2536 http://geany.svn.sourceforge.net/geany/?rev=2536&view=rev Author: eht16 Date: 2008-04-27 08:43:47 -0700 (Sun, 27 Apr 2008)
Log Message: ----------- Allow Ctrl-A (or whatever "Select All" has been set to) to select all text in the scribble text widget (closes #1952335).
Modified Paths: -------------- trunk/ChangeLog trunk/src/keybindings.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-04-27 15:05:40 UTC (rev 2535) +++ trunk/ChangeLog 2008-04-27 15:43:47 UTC (rev 2536) @@ -18,6 +18,9 @@ * src/document.c: Fix crash when trying to change the encoding of a file (introduced in r2529). + * src/keybindings.c: + Allow Ctrl-A (or whatever "Select All" has been set to) to select + all text in the scribble text widget (closes #1952335).
2008-04-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2008-04-27 15:05:40 UTC (rev 2535) +++ trunk/src/keybindings.c 2008-04-27 15:43:47 UTC (rev 2536) @@ -1522,7 +1522,17 @@ { gint idx = document_get_cur_idx(); GtkWidget *focusw = gtk_window_get_focus(GTK_WINDOW(app->window)); + static GtkWidget *scribble_widget = NULL;
+ /* special case for Select All in the scribble widget */ + if (scribble_widget == NULL) /* lookup the scribble widget only once */ + scribble_widget = lookup_widget(app->window, "textview_scribble"); + if (key_id == GEANY_KEYS_SELECT_ALL && focusw == scribble_widget) + { + g_signal_emit_by_name(scribble_widget, "select-all", TRUE); + return; + } + /* keybindings only valid when scintilla widget has focus */ if (! DOC_IDX_VALID(idx) || focusw != GTK_WIDGET(doc_list[idx].sci)) return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.