[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: globals.nw
User: danmc
Date: 05/08/04 22:49:48
Modified: . globals.nw parsecmd.nw x_log.nw x_window.nw
Log:
add a new commandline option '-p' which automatically places the
main gschem window and the gschem log window at startup time rather
than letting the window manager figure out what to do. This is
useful when doing batch processing of schematics and you want to
call gschem several times with no manual interaction.
Revision Changes Path
1.8 +1 -0 eda/geda/devel/gschem/noweb/globals.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: globals.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/globals.nw,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- globals.nw 27 Jun 2005 03:01:48 -0000 1.7
+++ globals.nw 5 Aug 2005 02:49:48 -0000 1.8
@@ -100,6 +100,7 @@
int quiet_mode = FALSE;
int verbose_mode = FALSE;
int stroke_info_mode = FALSE;
+int auto_place_mode = FALSE;
/* Global buffers */
OBJECT *object_buffer[MAX_BUFFERS];
1.7 +6 -1 eda/geda/devel/gschem/noweb/parsecmd.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: parsecmd.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/parsecmd.nw,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- parsecmd.nw 4 Feb 2005 22:40:55 -0000 1.6
+++ parsecmd.nw 5 Aug 2005 02:49:48 -0000 1.7
@@ -67,7 +67,7 @@
<<parsecmd.c : macro>>=
-#define OPTIONS "hqvr:s:o:t"
+#define OPTIONS "hqvr:s:o:pt"
@ %def OPTIONS
@@ -94,6 +94,7 @@
" -r filename Rc filename\n"
" -s filename Script (guile) filename\n"
" -o filename Output filename (for printing)\n"
+ " -p Automatically place the window\n"
" -t Print stroke information\n"
" -h Help; this message\n"
"\n"), cmd);
@@ -141,6 +142,10 @@
output_filename = g_strdup (optarg);
break;
+ case 'p':
+ auto_place_mode = TRUE;
+ break;
+
case 'h':
usage(argv[0]);
break;
1.20 +3 -1 eda/geda/devel/gschem/noweb/x_log.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_log.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/x_log.nw,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- x_log.nw 28 Feb 2005 18:26:04 -0000 1.19
+++ x_log.nw 5 Aug 2005 02:49:48 -0000 1.20
@@ -121,6 +121,8 @@
x_log_update_func = (void*)x_log_message;
+ if( auto_place_mode )
+ gtk_widget_set_uposition( log_dialog, 10, 10);
gtk_widget_show (log_dialog);
} else {
g_assert (IS_LOG (log_dialog));
1.30 +9 -3 eda/geda/devel/gschem/noweb/x_window.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_window.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/x_window.nw,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- x_window.nw 19 Jun 2005 00:08:51 -0000 1.29
+++ x_window.nw 5 Aug 2005 02:49:48 -0000 1.30
@@ -528,9 +528,15 @@
* set a size of the main window. The drawing area's size is fixed,
* see below
*/
- /* commented out so that window manager prompts for the location
- * gtk_widget_set_uposition (w_current->main_window, 0, 0);
+
+ /*
+ * normally we let the window manager handle locating and sizing
+ * the window. However, for some batch processing of schematics
+ * (generating a pdf of all schematics for example) we want to
+ * override this. Hence "auto_place_mode".
*/
+ if( auto_place_mode )
+ gtk_widget_set_uposition (w_current->main_window, 10, 10);
/* I could not get the destroy signal to work. always got a: */
/* Gdk-ERROR **: an x io error occurred */