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

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



The branch, master has been updated
       via  04d8ae5526d9d2660572972d0cbeaf0ec53a8878 (commit)
       via  148680c87c58ee7e6ab44c7bbb6a6c6927478b67 (commit)
       via  a33ca03099f2010fcb6cfe61edbb4c09303653aa (commit)
       via  55ab14d1b62783e4daa687ef33521e7739b7398f (commit)
       via  76a44ff86dc19a352c15bb17f4727c3f3fe1ec4e (commit)
      from  fcb24561236102bbb7a7e891b97cdc6f38ea5a47 (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/gtkhid-main.c    |    8 ++------
 src/hid/gtk/gui-top-window.c |   22 +++++++++++++---------
 src/hid/lesstif/main.c       |    9 +++++++--
 src/hid/lesstif/menu.c       |   13 +++----------
 src/main.c                   |   29 +++++++++++++++++++++++++++++
 5 files changed, 54 insertions(+), 27 deletions(-)


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

commit 04d8ae5526d9d2660572972d0cbeaf0ec53a8878
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Merge GTK attributes.
    
    Since the new help system only allows one attribute (i.e. command
    line) list per HID, combine the two GTK lists into one.

:100644 100644 8db91c8... 3d3896f... M	src/hid/gtk/gui-top-window.c

commit 148680c87c58ee7e6ab44c7bbb6a6c6927478b67
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Merge lesstif attributes.
    
    Since the new help system only allows one attribute (i.e. command
    line) list per HID, combine the two Lesstif lists into one.

:100644 100644 f423fb2... 3c4ef12... M	src/hid/lesstif/main.c
:100644 100644 59ab80b... 5a43fa8... M	src/hid/lesstif/menu.c

commit a33ca03099f2010fcb6cfe61edbb4c09303653aa
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Print all command line options with help.
    
    Keep track of which attributes we've printed as part of the HID
    help.  After that, print any remaining attributes we know about
    that we haven't already printed.

:100644 100644 3340c7f... ba8c959... M	src/main.c

commit 55ab14d1b62783e4daa687ef33521e7739b7398f
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Export GTK attributes.
    
    The new help system uses export attribute lists for help,
    so the Lesstif HID needs to export them.

:100644 100644 05b2c91... 8c3ff67... M	src/hid/gtk/gtkhid-main.c
:100644 100644 4c00c13... 8db91c8... M	src/hid/gtk/gui-top-window.c

commit 76a44ff86dc19a352c15bb17f4727c3f3fe1ec4e
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Export lesstif attributes.
    
    The new help system uses export attribute lists for help,
    so the Lesstif HID needs to export them.

:100644 100644 e16397e... f423fb2... M	src/hid/lesstif/main.c

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

commit 04d8ae5526d9d2660572972d0cbeaf0ec53a8878
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Merge GTK attributes.
    
    Since the new help system only allows one attribute (i.e. command
    line) list per HID, combine the two GTK lists into one.

diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 8db91c8..3d3896f 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -2591,7 +2591,10 @@ ghid_create_listener (void)
 
 
 /* ------------------------------------------------------------ */
+
 static int stdin_listen = 0;
+static char *pcbmenu_path = "gpcb-menu.res";
+
 HID_Attribute ghid_attribute_list[] = {
   {"listen", "Listen for actions on stdin",
    HID_Boolean, 0, 0, {0, 0, 0}, 0, &stdin_listen},
@@ -2601,6 +2604,9 @@ HID_Attribute ghid_attribute_list[] = {
    HID_String, 0, 0, {0, 0, 0}, 0, &bg_image_file},
 #define HA_bg_image 1
 
+{"pcb-menu", "Location of gpcb-menu.res file",
+   HID_String, 0, 0, {0, PCBLIBDIR "/gpcb-menu.res", 0}, 0, &pcbmenu_path}
+#define HA_pcbmenu 2
 };
 
 REGISTER_ATTRIBUTES (ghid_attribute_list)
@@ -2887,15 +2893,6 @@ HID_Action gtk_topwindow_action_list[] = {
 
 REGISTER_ACTIONS (gtk_topwindow_action_list)
 
-static char *pcbmenu_path = "gpcb-menu.res";
-
-static HID_Attribute pcbmenu_attr[] = {
-{"pcb-menu", "Location of gpcb-menu.res file",
-   HID_String, 0, 0, {0, PCBLIBDIR "/gpcb-menu.res", 0}, 0, &pcbmenu_path}
-};
-
-REGISTER_ATTRIBUTES (pcbmenu_attr) 
-     
 /* 
  * This function is used to check if a specified hotkey in the menu
  * resource file is "special".  In this case "special" means that gtk

commit 148680c87c58ee7e6ab44c7bbb6a6c6927478b67
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Merge lesstif attributes.
    
    Since the new help system only allows one attribute (i.e. command
    line) list per HID, combine the two Lesstif lists into one.

diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index f423fb2..3c4ef12 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -167,6 +167,7 @@ static int n;
 static int use_private_colormap = 0;
 static int stdin_listen = 0;
 static char *background_image_file = 0;
+char *lesstif_pcbmenu_path = "pcb-menu.res";
 
 HID_Attribute lesstif_attribute_list[] = {
   {"install", "Install private colormap",
@@ -179,8 +180,11 @@ HID_Attribute lesstif_attribute_list[] = {
 
   {"bg-image", "Background Image",
    HID_String, 0, 0, {0, 0, 0}, 0, &background_image_file},
-#define HA_bg_image 1
+#define HA_bg_image 2
 
+  {"pcb-menu", "Location of pcb-menu.res file",
+   HID_String, 0, 0, {0, PCBLIBDIR "/pcb-menu.res", 0}, 0, &lesstif_pcbmenu_path}
+#define HA_pcbmenu 3
 };
 
 REGISTER_ATTRIBUTES (lesstif_attribute_list)
diff --git a/src/hid/lesstif/menu.c b/src/hid/lesstif/menu.c
index 59ab80b..5a43fa8 100644
--- a/src/hid/lesstif/menu.c
+++ b/src/hid/lesstif/menu.c
@@ -1401,14 +1401,7 @@ add_resource_to_menu (Widget menu, Resource * node, XtCallbackProc callback)
       }
 }
 
-static char *pcbmenu_path = "pcb-menu.res";
-
-static HID_Attribute pcbmenu_attr[] = {
-  {"pcb-menu", "Location of pcb-menu.res file",
-   HID_String, 0, 0, {0, PCBLIBDIR "/pcb-menu.res", 0}, 0, &pcbmenu_path}
-};
-
-REGISTER_ATTRIBUTES(pcbmenu_attr)
+extern char *lesstif_pcbmenu_path;
 
 Widget
 lesstif_menu (Widget parent, char *name, Arg * margs, int mn)
@@ -1441,8 +1434,8 @@ lesstif_menu (Widget parent, char *name, Arg * margs, int mn)
     filename = "pcb-menu.res";
   else if (home_pcbmenu != NULL && (access (home_pcbmenu, R_OK) == 0))
     filename = home_pcbmenu;
-  else if (access (pcbmenu_path, R_OK) == 0)
-    filename = pcbmenu_path;
+  else if (access (lesstif_pcbmenu_path, R_OK) == 0)
+    filename = lesstif_pcbmenu_path;
   else
     filename = 0;
 

commit a33ca03099f2010fcb6cfe61edbb4c09303653aa
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Print all command line options with help.
    
    Keep track of which attributes we've printed as part of the HID
    help.  After that, print any remaining attributes we know about
    that we haven't already printed.

diff --git a/src/main.c b/src/main.c
index 3340c7f..ba8c959 100644
--- a/src/main.c
+++ b/src/main.c
@@ -142,6 +142,13 @@ u (const char *fmt, ...)
   va_end (ap);
 }
 
+typedef struct UsageNotes {
+  struct UsageNotes *next;
+  HID_Attribute *seen;
+} UsageNotes;
+
+static UsageNotes *usage_notes = NULL;
+
 static void
 usage_attr (HID_Attribute * a)
 {
@@ -202,6 +209,7 @@ usage_hid (HID * h)
 {
   HID_Attribute *attributes;
   int i, n_attributes = 0;
+  UsageNotes *note;
 
   if (h->gui)
     {
@@ -215,6 +223,11 @@ usage_hid (HID * h)
       attributes = exporter->get_export_options (&n_attributes);
       exporter = NULL;
     }
+
+  note = (UsageNotes *) MyMalloc (sizeof (UsageNotes), "usage_hid");
+  note->next = usage_notes;
+  note->seen = attributes;
+  usage_notes = note;
   
   for (i = 0; i < n_attributes; i++)
     usage_attr (attributes + i);
@@ -224,6 +237,8 @@ static void
 usage (void)
 {
   HID **hl = hid_enumerate ();
+  HID_AttrNode *ha;
+  UsageNotes *note;
   int i;
   int n_printer = 0, n_gui = 0, n_exporter = 0;
 
@@ -264,6 +279,20 @@ usage (void)
   for (i = 0; hl[i]; i++)
     if (hl[i]->exporter)
       usage_hid (hl[i]);
+
+  u ("\nCommon options:");
+  for (ha = hid_attr_nodes; ha; ha = ha->next)
+    {
+      for (note = usage_notes; note && note->seen != ha->attributes; note = note->next)
+	;
+      if (note)
+	continue;
+      for (i = 0; i < ha->n; i++)
+	{
+	  usage_attr (ha->attributes + i);
+	}
+    }  
+
   exit (1);
 }
 

commit 55ab14d1b62783e4daa687ef33521e7739b7398f
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Export GTK attributes.
    
    The new help system uses export attribute lists for help,
    so the Lesstif HID needs to export them.

diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 05b2c91..8c3ff67 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -311,12 +311,6 @@ zoom_by (double factor, int x, int y)
 
 /* ------------------------------------------------------------ */
 
-HID_Attribute *
-ghid_get_export_options (int *n_ret)
-{
-  return NULL;
-}
-
 void
 ghid_invalidate_lr (int left, int right, int top, int bottom)
 {
@@ -1128,6 +1122,8 @@ HID_DRC_GUI ghid_drc_gui = {
   ghid_drc_window_throw_dialog,
 };
 
+extern HID_Attribute *ghid_get_export_options (int *);
+
 HID ghid_hid = {
   sizeof (HID),
   "gtk",
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 4c00c13..8db91c8 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -2605,6 +2605,13 @@ HID_Attribute ghid_attribute_list[] = {
 
 REGISTER_ATTRIBUTES (ghid_attribute_list)
 
+HID_Attribute *
+ghid_get_export_options (int *n_ret)
+{
+  *n_ret = sizeof (ghid_attribute_list) / sizeof (HID_Attribute);
+  return ghid_attribute_list;
+}
+
   /* Create top level window for routines that will need top_window
      |  before ghid_create_pcb_widgets() is called.
    */

commit 76a44ff86dc19a352c15bb17f4727c3f3fe1ec4e
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Export lesstif attributes.
    
    The new help system uses export attribute lists for help,
    so the Lesstif HID needs to export them.

diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index e16397e..f423fb2 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -1091,7 +1091,8 @@ DrawBackgroundImage ()
 static HID_Attribute *
 lesstif_get_export_options (int *n)
 {
-  return 0;
+  *n = sizeof (lesstif_attribute_list) / sizeof (HID_Attribute);
+  return lesstif_attribute_list;
 }
 
 static void




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