[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Information on PCB



On Fri, 2009-10-23 at 12:47 +0000, Kai-Martin Knaak wrote:
> On Wed, 21 Oct 2009 09:39:00 +0200, Bert Timmerman wrote:
> Here it comes again:

Having had a quick read over this, it seems fine - although can I ask
you to confirm that it doesn't effect any GUI hids when running action
scripts?

The net effect seems to be that the action script will be run before the
GUI is "booted" - which might not be desirable in some cases. It might
even cause breakage if the GUI code relies on do_export() being called
before other actions.

The fact you had to remove the CRASH; line in hidnogui.c suggests that
the action script is triggering attempts to redraw - so this is the kind
of thing which could upset the GUI HIDs.


> diff --git a/src/hid/common/hidnogui.c b/src/hid/common/hidnogui.c
> index 57509dc..2b625c3 100644
> --- a/src/hid/common/hidnogui.c
> +++ b/src/hid/common/hidnogui.c
> @@ -58,7 +58,7 @@ nogui_invalidate_wh (int x, int y, int width, int 
> height, int last)
>  static void
>  nogui_invalidate_lr (int l, int r, int t, int b, int last)
>  {
> -  CRASH;
> +/*  CRASH; */
>  }
>  
>  static void
> diff --git a/src/main.c b/src/main.c
> index a0b38f3..bdcb4c6 100644
> --- a/src/main.c
> +++ b/src/main.c
> @@ -966,6 +966,19 @@ main (int argc, char *argv[])
>        LayerStringToLayerStack (Settings.InitialLayerStack);
>      }
>  
> +  if (Settings.ScriptFilename)
> +    {
> +      Message (_("Executing startup script file %s\n"),
> +	       Settings.ScriptFilename);
> +      hid_actionl ("ExecuteFile", Settings.ScriptFilename, NULL);
> +    }
> +
> +  if (Settings.ActionString)
> +    {
> +      Message (_("Executing startup action %s\n"), 
> Settings.ActionString);
> +      hid_parse_actions (Settings.ActionString, 0);
> +    }
> +
>    if (gui->printer || gui->exporter)
>      {
>        gui->do_export (0);
> @@ -998,18 +1011,6 @@ main (int argc, char *argv[])
>     */
>    Settings.init_done = 0;
>  
> -  if (Settings.ScriptFilename)
> -    {
> -      Message (_("Executing startup script file %s\n"),
> -	       Settings.ScriptFilename);
> -      hid_actionl ("ExecuteFile", Settings.ScriptFilename, NULL);
> -    }
> -  if (Settings.ActionString)
> -    {
> -      Message (_("Executing startup action %s\n"), 
> Settings.ActionString);
> -      hid_parse_actions (Settings.ActionString, 0);
> -    }
> -
>    if (Settings.init_done == 0)
>      {
>        Settings.init_done = 1;
> 
> ---<(kaimartin)>---




_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user