Commit 90271713 authored by Andreas J. Guelzow 's avatar Andreas J. Guelzow

Add a keyboard shortcut to jump to the current cell indicator. [#699710]

2013-05-27  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* component/Gnumeric-embed.xml.in: add accelerator
	* src/GNOME_Gnumeric-gtk.xml.in: add accelerator
	* src/wbc-gtk-actions.c (cb_edit_goto_cell_indicator): new
	(EditGotoCellIndicator): new
	* src/wbc-gtk.c (cb_post_activate): do not interfere with EditGotoCellIndicator
	(wbcg_focus_current_cell_indicator): new
	* src/wbc-gtk.h (wbcg_focus_current_cell_indicator): new

2013-05-27  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* appendix-keybindings.xml: add some keybindings info
parent c2c2cbc0
......@@ -3,6 +3,16 @@
* src/mathfunc.c (pnorm2): Drop log_p argument. We don't need it
and we aren't very good at it.
2013-05-27 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* component/Gnumeric-embed.xml.in: add accelerator
* src/GNOME_Gnumeric-gtk.xml.in: add accelerator
* src/wbc-gtk-actions.c (cb_edit_goto_cell_indicator): new
(EditGotoCellIndicator): new
* src/wbc-gtk.c (cb_post_activate): do not interfere with EditGotoCellIndicator
(wbcg_focus_current_cell_indicator): new
* src/wbc-gtk.h (wbcg_focus_current_cell_indicator): new
2013-05-27 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* component/Gnumeric-embed.xml.in: ctrl-a will be handled in gnm-pane.c
......
......@@ -11,6 +11,8 @@ Andreas:
* Warn when encountering extLst in xlsx import. [#700018]
* Use ctrl-a only to select the whole sheet, if the sheet
has focus. [#699746]
* Add a keyboard shortcut to jump to the current cell indicator.
[#699710]
Darrell Tangman:
* Update documentation for Edit and Insert menus. [#700596]
......
......@@ -417,5 +417,6 @@
<accelerator name="FormatClearBorders" action="FormatClearBorders"/>
<accelerator name="Repeat" action="Repeat"/>
<accelerator name="EditDeleteCellsXL" action="EditDeleteCellsXL"/>
<accelerator name="EditGotoCellIndicator" action="EditGotoCellIndicator"/>
<accelerator name="InsertCellsXL" action="InsertCellsXL"/>
</ui>
2013-05-27 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* appendix-keybindings.xml: add some keybindings info
2013-05-25 Andreas J. Guelzow <aguelzow@pyrshep.ca>
for Darrell Tangman <dgtangman@acm.org>
......
......@@ -160,6 +160,18 @@
Toggles strikethrough of the current selection.
</para>
</listitem>
<listitem>
<para>
<keycap>Shift-Ctrl-G</keycap>
Changes the keyboard focus to the current cell indicator described in <xref linkend="data-entry-currentcell" />.
</para>
</listitem>
<listitem>
<para>
<keycap>Ctrl-a</keycap>
Select all cells on the currently focused sheet.
</para>
</listitem>
</itemizedlist>
</appendix>
......@@ -423,5 +423,6 @@
<accelerator name="FormatClearBorders" action="FormatClearBorders"/>
<accelerator name="Repeat" action="Repeat"/>
<accelerator name="EditDeleteCellsXL" action="EditDeleteCellsXL"/>
<accelerator name="EditGotoCellIndicator" action="EditGotoCellIndicator"/>
<accelerator name="InsertCellsXL" action="InsertCellsXL"/>
</ui>
......@@ -677,6 +677,11 @@ static GNM_ACTION_DEF (cb_edit_goto)
{
dialog_goto_cell (wbcg);
}
static GNM_ACTION_DEF (cb_edit_goto_cell_indicator)
{
if (IS_WBC_GTK (wbcg))
wbcg_focus_current_cell_indicator (WBC_GTK (wbcg));
}
static GNM_ACTION_DEF (cb_edit_recalc)
{
......@@ -2259,6 +2264,11 @@ static GtkActionEntry const actions[] = {
{ "EditGoto", GTK_STOCK_JUMP_TO, N_("_Go to Cell..."),
"<control>G", N_("Jump to a specified cell"),
G_CALLBACK (cb_edit_goto) },
/* Tis is a navigational aid that is not supposed to appear */
/* in the menu */
{ "EditGotoCellIndicator", NULL, "Go to Current Cell Indicator",
"<shift><control>G", "Go to Current Cell Indicator",
G_CALLBACK (cb_edit_goto_cell_indicator) },
/* Edit */
{ "Repeat", NULL, N_("Repeat"),
......
......@@ -4418,9 +4418,9 @@ cb_disconnect_proxy (G_GNUC_UNUSED GtkUIManager *ui,
}
static void
cb_post_activate (WBCGtk *wbcg)
cb_post_activate (G_GNUC_UNUSED GtkUIManager *manager, GtkAction *action, WBCGtk *wbcg)
{
if (!wbcg_is_editing (wbcg))
if (!wbcg_is_editing (wbcg) && strcmp(gtk_action_get_name (action), "EditGotoCellIndicator") != 0)
wbcg_focus_cur_scg (wbcg);
}
......@@ -5662,7 +5662,7 @@ wbc_gtk_init (GObject *obj)
"signal::add_widget", G_CALLBACK (cb_add_menus_toolbars), wbcg,
"signal::connect_proxy", G_CALLBACK (cb_connect_proxy), wbcg,
"signal::disconnect_proxy", G_CALLBACK (cb_disconnect_proxy), wbcg,
"swapped_object_signal::post_activate", G_CALLBACK (cb_post_activate), wbcg,
"signal::post_activate", G_CALLBACK (cb_post_activate), wbcg,
NULL);
gtk_ui_manager_insert_action_group (wbcg->ui, wbcg->permanent_actions, 0);
gtk_ui_manager_insert_action_group (wbcg->ui, wbcg->actions, 0);
......@@ -5981,3 +5981,10 @@ wbcg_find_for_workbook (Workbook *wb,
return candidate;
}
void
wbcg_focus_current_cell_indicator (WBCGtk const *wbcg)
{
gtk_widget_grab_focus (GTK_WIDGET (wbcg->selection_descriptor));
gtk_editable_select_region (GTK_EDITABLE (wbcg->selection_descriptor), 0, -1);
}
......@@ -83,6 +83,8 @@ void wbcg_set_entry (WBCGtk *wbc,
GnmExprEntry *new_entry);
gboolean wbcg_entry_has_logical (WBCGtk const *wbcg);
void wbcg_focus_current_cell_indicator (WBCGtk const *wbcg);
G_END_DECLS
#endif /* _GNM_WBC_GTK_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment