antiright-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Antiright-devel] antiright/gtkshell Makefile gshterm main.c


From: Jeffrey Bedard
Subject: [Antiright-devel] antiright/gtkshell Makefile gshterm main.c
Date: Sun, 10 Jun 2007 21:18:31 +0000

CVSROOT:        /sources/antiright
Module name:    antiright
Changes by:     Jeffrey Bedard <jefbed> 07/06/10 21:18:31

Added files:
        gtkshell       : Makefile gshterm main.c 

Log message:
        Re-added.  

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/Makefile?cvsroot=antiright&rev=1.38
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/gshterm?cvsroot=antiright&rev=1.6
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/main.c?cvsroot=antiright&rev=1.26

Patches:
Index: Makefile
===================================================================
RCS file: Makefile
diff -N Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ Makefile    10 Jun 2007 21:18:31 -0000      1.38
@@ -0,0 +1,53 @@
+###############################################################################
+#
+#    AntiRight
+#    (c) 2004-2007 Jeffrey Bedard
+#    address@hidden
+# 
+#    This file is part of AntiRight.
+#
+#     AntiRight is free software; you can redistribute it and/or modify
+#     it under the terms of the GNU General Public License as published by
+#     the Free Software Foundation; either version 2 of the License, or
+#     (at your option) any later version.
+#
+#     AntiRight is distributed in the hope that it will be useful,
+#     but WITHOUT ANY WARRANTY; without even the implied warranty of
+#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#     GNU General Public License for more details.
+#
+#     You should have received a copy of the GNU General Public License
+#     along with AntiRight; if not, write to the Free Software
+#     Foundation, Inc., 51 Franklin Street, Fifth Floor, 
+#     Boston, MA  02110-1301  USA              
+#
+###############################################################################
+
+include ../config.mk
+
+CFLAGS+=$(DEFS) $(INCLUDE)
+GTKFLAGS=$(LDFLAGS)
+ARFLAGS=-L../libantiright -L../libshell -lshell -lantiright
+
+#LDFLAGS+=-lefence
+
+objects=main.o 
+
+all: gtkshell
+
+gtkshell: $(objects) 
+       $(CC) -o gtkshell $(objects) $(ARFLAGS) $(LDFLAGS)
+
+clean:
+       rm -f gtkshell *.o libgtkshell.a 
+
+install:
+       install gtkshell $(PREFIX)/bin
+       install gshterm $(PREFIX)/bin
+
+test:
+       ./gtkshell -oh -or 4 test_button\
+               test_menubutton::item::item,gtk-execute\
+               -at echo -aT -aul date -aup 'echo 0.5' -al test_label\
+               -otf 'Mono 8' -otw 48 -oth 16 -as ksh
+

Index: gshterm
===================================================================
RCS file: gshterm
diff -N gshterm
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ gshterm     10 Jun 2007 21:18:31 -0000      1.6
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+gshterm_usage()
+{
+       echo 'gshterm [e command][f font][s size][h]'
+}
+
+FONT=""
+GEOMETRY=""
+COMMAND=""
+DEBUG="FALSE"
+APP_MODE=""
+TRANSPARENT=""
+
+while [ $# -gt 0 ]; do
+       case "$1" in
+       -a)
+               APP_MODE="-oa File::Exit___ 'Help::gtkshell -da & # About'"
+               break
+               ;;
+       -e)
+               shift
+               COMMAND="\"$*\""
+               break
+               ;;
+       -g)
+               GEOMETRY="$2"
+               shift
+               ;;
+       -f)
+               FONT="$2"
+               shift
+               ;;
+       -h)
+               gshterm_usage
+               ;;
+       -s)
+               FONT="$FONT $2"
+               shift
+               ;;
+       -t)
+               TRANSPARENT="-ott"
+               break
+               ;;
+       esac
+       shift
+done
+
+ARGS=""
+
+if [ "$GEOMETRY" != "" ]; then
+       ARGS="$ARGS -og $GEOMETRY"
+fi
+if [ "$FONT" != "" ]; then
+       ARGS="$ARGS -otf \"$FONT\""
+else
+       ARGS="$ARGS -otf 'Mono 12'"
+fi
+
+#echo $*
+
+if [ "$COMMAND" = "" ]; then
+       COMMAND=$SHELL
+fi
+
+
+COMMAND="gtkshell $APP_MODE -oF $ARGS -oT $COMMAND -as $COMMAND"
+
+if [ "$DEBUG" = "TRUE" ]; then
+       echo $COMMAND
+fi
+
+exec sh -c "$COMMAND"
+

Index: main.c
===================================================================
RCS file: main.c
diff -N main.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ main.c      10 Jun 2007 21:18:31 -0000      1.26
@@ -0,0 +1,58 @@
+/*
+  AntiRight
+  (c) 2002-2007 Jeffrey Bedard
+  address@hidden
+
+  This file is part of AntiRight.
+
+  AntiRight is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  AntiRight is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with AntiRight; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+*/
+
+#include "../libshell/gtkshell.h"
+
+#ifdef LIBGC
+#include <gc.h>
+#endif /* LIBGC */
+
+static void
+setup_gui(struct GSH * gsh, const gint argc, const gchar ** argv)
+{
+       $(gsh, init);
+       $(gsh, parse, argc, argv); /* Setup GUI.  */ 
+       $(gsh, finalize);
+}
+
+int
+main(int argc, char **argv)
+{
+       struct GSH * gsh;
+
+#ifdef LIBGC
+       GC_INIT();
+#endif /* LIBGC */
+       gtk_init(&argc, &argv);
+       gsh=ARNEW(gsh, GSH);
+       setup_gui(gsh, (const gint)argc, (const gchar **)argv);
+#ifdef LIBGC
+       GC_gcollect();
+#endif /* LIBGC */
+       gtk_main(); /* application main loop  */
+#ifndef LIBGC
+       /* Cleanup when finished.  */
+       $(gsh, delete);
+#endif /* not LIBGC */
+
+       return (EXIT_SUCCESS);
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]