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

gEDA-cvs: pcb.git: branch: master updated (b274cf8fe9c8caf5bcd4edc28935c88cf5bab7f4)



The branch, master has been updated
       via  b274cf8fe9c8caf5bcd4edc28935c88cf5bab7f4 (commit)
      from  337fa8ba8094cee1ed291cec7bf29895ac7c9d72 (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/lesstif/menu.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)


=================
 Commit Messages
=================

commit b274cf8fe9c8caf5bcd4edc28935c88cf5bab7f4
Author: Tibor Palinkas <igor2@xxxxxxxxxxx>
Date:   Wed Mar 25 02:00:43 2009 -0400

    pass context in lesstif
    
    Minor patch to get the action context properly passed to actions
    with lesstif, which doesn't use hid_actionv() for some reason.

:100644 100644 ca8ff4c... dce6773... M	src/hid/lesstif/menu.c

=========
 Changes
=========

commit b274cf8fe9c8caf5bcd4edc28935c88cf5bab7f4
Author: Tibor Palinkas <igor2@xxxxxxxxxxx>
Date:   Wed Mar 25 02:00:43 2009 -0400

    pass context in lesstif
    
    Minor patch to get the action context properly passed to actions
    with lesstif, which doesn't use hid_actionv() for some reason.

diff --git a/src/hid/lesstif/menu.c b/src/hid/lesstif/menu.c
index ca8ff4c..dce6773 100644
--- a/src/hid/lesstif/menu.c
+++ b/src/hid/lesstif/menu.c
@@ -813,12 +813,13 @@ lesstif_get_coords (const char *msg, int *px, int *py)
 int
 lesstif_call_action (const char *aname, int argc, char **argv)
 {
-  int px, py;
+  int px, py, ret;
   HID_Action *a;
+  void *context, *old_context;
 
   if (!aname)
     return 1;
-  a = hid_find_action (aname, NULL);
+  a = hid_find_action (aname, &context);
   if (!a)
     {
       int i;
@@ -848,7 +849,11 @@ lesstif_call_action (const char *aname, int argc, char **argv)
 	printf ("%s%s", i ? "," : "", argv[i]);
       printf (")\033[0m\n");
     }
-  return a->trigger_cb (argc, argv, px, py);
+  old_context = hid_action_context;
+  hid_action_context = context;
+  ret = a->trigger_cb (argc, argv, px, py);
+  hid_action_context = old_context;
+  return ret;
 }
 
 static void




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