| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
| X-Recipient: | geda-user AT delorie DOT com |
| Message-ID: | <20120814174853.4373.qmail@stuge.se> |
| Date: | Tue, 14 Aug 2012 19:48:53 +0200 |
| From: | Peter Stuge <peter AT stuge DOT se> |
| To: | geda-user AT delorie DOT com |
| Subject: | Re: [geda-user] silk layer names |
| Mail-Followup-To: | geda-user AT delorie DOT com |
| References: | <20120813012700 DOT 2106039c AT akka> <k0d64k$ett$1 AT dough DOT gmane DOT org> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <k0d64k$ett$1@dough.gmane.org> |
| Reply-To: | geda-user AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | geda-user AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
Kai-Martin Knaak wrote:
> See attached an obvious expansion of the patch mentioned above. It makes the
> GUI show the actual name of the currently active silk layer rather than a
> hard coded string "silk".
>
> If both patches are applied, the text of the silk layer button in the GUI
> toggles between "top silk" and "bottom silk" when the view is changed with
> the tab key. This makes it more obvious, which of the two silk layers is
> currently active.
All right. And thanks for the layer name comment in the other mail.
I'm obviously not completely up to date with the code. :)
> +++ b/src/hid/gtk/gui-top-window.c
..
> @@ -487,7 +487,10 @@ layer_process (gchar **color_string, char **text, int *set, int i)
> {
> case LAYER_BUTTON_SILK:
> *color_string = Settings.ElementColor;
> - *text = _( "silk");
> + if (Settings.ShowSolderSide)
> + *text = (char *)UNKNOWN (PCB->Data->Layer[solder_silk_layer].Name);
> + else
> + *text = (char *)UNKNOWN (PCB->Data->Layer[component_silk_layer].Name);
How about:
*text = (char *)UNKNOWN (PCB->Data->Layer[Settings.ShowSolderSide ? solder_silk_layer : component_silk_layer].Name);
The if looks not great.
And those identifiers are way too long in my taste. :)
//Peter
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |