Commit 6a1c93fbe828dad21eaf111e11778328fd7a5670
1 parent
71fa175f
Exists in
master
and in
1 other branch
Fixing default keycode for "PF-12".
Showing
2 changed files
with
4 additions
and
3 deletions
Show diff stats
src/dialogs/settings/accelerator.c
| @@ -431,7 +431,6 @@ static void alternative_edited(GtkCellRendererAccel G_GNUC_UNUSED(*renderer), gc | @@ -431,7 +431,6 @@ static void alternative_edited(GtkCellRendererAccel G_GNUC_UNUSED(*renderer), gc | ||
| 431 | #endif // DEBUG | 431 | #endif // DEBUG |
| 432 | 432 | ||
| 433 | // Check for "single-accel" actions | 433 | // Check for "single-accel" actions |
| 434 | - V3270Accelerator *accel = NULL; | ||
| 435 | GtkTreePath * tree_path = gtk_tree_path_new_from_string(path); | 434 | GtkTreePath * tree_path = gtk_tree_path_new_from_string(path); |
| 436 | GtkTreeIter iter; | 435 | GtkTreeIter iter; |
| 437 | if(gtk_tree_model_get_iter(GTK_TREE_MODEL(widget->store),&iter,tree_path)) | 436 | if(gtk_tree_model_get_iter(GTK_TREE_MODEL(widget->store),&iter,tree_path)) |
| @@ -439,7 +438,6 @@ static void alternative_edited(GtkCellRendererAccel G_GNUC_UNUSED(*renderer), gc | @@ -439,7 +438,6 @@ static void alternative_edited(GtkCellRendererAccel G_GNUC_UNUSED(*renderer), gc | ||
| 439 | GValue value; | 438 | GValue value; |
| 440 | memset(&value,0,sizeof(value)); | 439 | memset(&value,0,sizeof(value)); |
| 441 | gtk_tree_model_get_value(GTK_TREE_MODEL(widget->store), &iter, ACTION, &value); | 440 | gtk_tree_model_get_value(GTK_TREE_MODEL(widget->store), &iter, ACTION, &value); |
| 442 | - accel = (V3270Accelerator *) g_value_get_pointer(&value); | ||
| 443 | g_value_unset(&value); | 441 | g_value_unset(&value); |
| 444 | } | 442 | } |
| 445 | gtk_tree_path_free(tree_path); | 443 | gtk_tree_path_free(tree_path); |
src/terminal/keyboard/init.c
| @@ -92,11 +92,13 @@ | @@ -92,11 +92,13 @@ | ||
| 92 | } else { | 92 | } else { |
| 93 | 93 | ||
| 94 | g_autofree gchar *kn = NULL; | 94 | g_autofree gchar *kn = NULL; |
| 95 | - if(id < 12) | 95 | + if(id < 13) |
| 96 | kn = g_strdup_printf("F%u",id); | 96 | kn = g_strdup_printf("F%u",id); |
| 97 | else | 97 | else |
| 98 | kn = g_strdup_printf("<shift>F%u",id-12); | 98 | kn = g_strdup_printf("<shift>F%u",id-12); |
| 99 | 99 | ||
| 100 | + debug("********* %d - %s",id,kn); | ||
| 101 | + | ||
| 100 | v3270_accelerator_parse((V3270Accelerator *) accelerator,kn); | 102 | v3270_accelerator_parse((V3270Accelerator *) accelerator,kn); |
| 101 | } | 103 | } |
| 102 | 104 | ||
| @@ -225,6 +227,7 @@ | @@ -225,6 +227,7 @@ | ||
| 225 | unsigned short key; | 227 | unsigned short key; |
| 226 | // PF1 - PF24 | 228 | // PF1 - PF24 |
| 227 | for(key = 1; key < 25; key++) { | 229 | for(key = 1; key < 25; key++) { |
| 230 | + | ||
| 228 | accelerators = g_slist_prepend(accelerators,v3270_pfkey_accelerator_new(key,NULL)); | 231 | accelerators = g_slist_prepend(accelerators,v3270_pfkey_accelerator_new(key,NULL)); |
| 229 | 232 | ||
| 230 | if(key == 7) { | 233 | if(key == 7) { |