[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (a040ea606fa0b9808a8287803fcbefc5eb39be9b)
The branch, master has been updated
via a040ea606fa0b9808a8287803fcbefc5eb39be9b (commit)
from b329249936d9f7da50ccd7c0c6064921e8466889 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gtk/gui-top-window.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
=================
Commit Messages
=================
commit a040ea606fa0b9808a8287803fcbefc5eb39be9b
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>
Allow 1..9 accelerator keys to be applied to non-copper layers in gtk
Closes-bug lp-699327
:100644 100644 31be13a... 23d6401... M src/hid/gtk/gui-top-window.c
=========
Changes
=========
commit a040ea606fa0b9808a8287803fcbefc5eb39be9b
Author: Andrew Poelstra <asp11@xxxxxx>
Commit: Andrew Poelstra <asp11@xxxxxx>
Allow 1..9 accelerator keys to be applied to non-copper layers in gtk
Closes-bug lp-699327
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 31be13a..23d6401 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -1066,22 +1066,23 @@ ghid_make_programmed_menu_actions ()
layerpick_toggle_entries[i].is_active = FALSE;
ar = resource_create (0);
+
switch (i)
{
case LAYER_BUTTON_SILK:
sprintf (av, "SelectLayer(Silk) LayersChanged()");
+ if (max_copper_layer < 9)
+ layerpick_toggle_entries[i].accelerator = g_strdup_printf ("<Key>%d", max_copper_layer + 1);
break;
case LAYER_BUTTON_RATS:
+ if (max_copper_layer < 8)
+ layerpick_toggle_entries[i].accelerator = g_strdup_printf ("<Key>%d", max_copper_layer + 2);
sprintf (av, "SelectLayer(Rats) LayersChanged()");
break;
default:
- if (i <= 8)
- layerpick_toggle_entries[i].accelerator =
- g_strdup_printf ("<Key>%d", i + 1);
-
- sprintf (av, "SelectLayer(%d) LayersChanged()",
- i + 1);
-
+ sprintf (av, "SelectLayer(%d) LayersChanged()", i + 1);
+ if (i < 9 && i < max_copper_layer)
+ layerpick_toggle_entries[i].accelerator = g_strdup_printf ("<Key>%d", i + 1);
break;
}
resource_add_val (ar, 0, strdup (av), 0);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs