# HG changeset patch # User zas_ # Date 1208638392 0 # Node ID 83103524088545797ba9e43eddeb239b9d7856f0 # Parent af843364b3ea2667d465709c9fda6b614a9dff5e Let toggle marks with numeric keypad. diff -r af843364b3ea -r 831035240885 src/layout_util.c --- a/src/layout_util.c Sat Apr 19 20:19:27 2008 +0000 +++ b/src/layout_util.c Sat Apr 19 20:53:12 2008 +0000 @@ -1311,7 +1311,9 @@ layout_actions_setup_mark(lw, mark, "SetMark%d", _("_Set mark %d"), NULL, G_CALLBACK(layout_menu_set_mark_sel_cb)); layout_actions_setup_mark(lw, mark, "ResetMark%d", _("_Reset mark %d"), NULL, G_CALLBACK(layout_menu_res_mark_sel_cb)); layout_actions_setup_mark(lw, mark, "ToggleMark%d", _("_Toggle mark %d"), "%d", G_CALLBACK(layout_menu_toggle_mark_sel_cb)); + layout_actions_setup_mark(lw, mark, "ToggleMark%dAlt1", _("_Toggle mark %d"), "KP_%d", G_CALLBACK(layout_menu_toggle_mark_sel_cb)); layout_actions_setup_mark(lw, mark, "SelectMark%d", _("_Select mark %d"), "%d", G_CALLBACK(layout_menu_sel_mark_cb)); + layout_actions_setup_mark(lw, mark, "SelectMark%dAlt1", _("_Select mark %d"), "KP_%d", G_CALLBACK(layout_menu_sel_mark_cb)); layout_actions_setup_mark(lw, mark, "AddMark%d", _("_Add mark %d"), NULL, G_CALLBACK(layout_menu_sel_mark_or_cb)); layout_actions_setup_mark(lw, mark, "IntMark%d", _("_Intersection with mark %d"), NULL, G_CALLBACK(layout_menu_sel_mark_and_cb)); layout_actions_setup_mark(lw, mark, "UnselMark%d", _("_Unselect mark %d"), NULL, G_CALLBACK(layout_menu_sel_mark_minus_cb)); @@ -1332,8 +1334,15 @@ g_string_append(desc, " " - " " - "" ); + " "); + for (mark = 1; mark <= FILEDATA_MARKS_SIZE; mark++) + { + g_string_append_printf(desc, + "" + "", + mark, mark); + } + g_string_append(desc, "" ); error = NULL; if (!gtk_ui_manager_add_ui_from_string(lw->ui_manager, desc->str, -1, &error))