antiright-devel
[Top][All Lists]
Advanced

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

[Antiright-devel] antiright ACE-desktop/ACE ACE-desktop/hacks/juk...


From: Jeffrey Bedard
Subject: [Antiright-devel] antiright ACE-desktop/ACE ACE-desktop/hacks/juk...
Date: Fri, 27 Jul 2007 01:13:36 +0000

CVSROOT:        /sources/antiright
Module name:    antiright
Changes by:     Jeffrey Bedard <jefbed> 07/07/27 01:13:36

Modified files:
        ACE-desktop    : ACE 
        ACE-desktop/hacks: juke.sh local_loads.sh 
        gtkshell       : main.c 
Added files:
        ACE-desktop/hacks: open_file.sh 

Log message:
        Added license headers to hack scripts.  Began consolidating globals for
        threaded gtkshell.  Split ACE -A ARO to open_file.sh (ACE -A Hack 
open_file).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/antiright/ACE-desktop/ACE?cvsroot=antiright&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/antiright/ACE-desktop/hacks/juke.sh?cvsroot=antiright&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/antiright/ACE-desktop/hacks/local_loads.sh?cvsroot=antiright&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/antiright/ACE-desktop/hacks/open_file.sh?cvsroot=antiright&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/antiright/gtkshell/main.c?cvsroot=antiright&r1=1.28&r2=1.29

Patches:
Index: ACE-desktop/ACE
===================================================================
RCS file: /sources/antiright/antiright/ACE-desktop/ACE,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- ACE-desktop/ACE     27 Jul 2007 00:25:54 -0000      1.46
+++ ACE-desktop/ACE     27 Jul 2007 01:13:35 -0000      1.47
@@ -1,4 +1,4 @@
-#!/bin/sh -m
+#!/bin/sh
 
 #    AntiRight (c) 2002-2007 Jeffrey Bedard address@hidden
 
@@ -16,7 +16,8 @@
 #     AntiRight; if not, write to the Free Software Foundation, Inc.,
 #     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
-# /bin/sh should have job control enabled.  (-m)
+ARSHELL=gtkshell
+AWK=awk
 
 ACE_Init()
 {
@@ -62,7 +63,6 @@
        echo $TMPDIR/ACE.$1.$$
 }
 
-
 Prepare_Temp()
 {
        rm -f $1
@@ -78,10 +78,6 @@
        echo '#!/bin/sh' >> $1
 }
 
-
-ARSHELL=gtkshell
-AWK=awk 
-
 GUIDL()
 {
        exec $ARSHELL -f $datadir/$1.gdl
@@ -110,9 +106,14 @@
 }
 ACE_Check_Configuration_File()
 {
-       if [ ! -f ~/.antiright ]; then
-               cp $PREFIX/share/ACE-desktop/system.antiright\
-                       ~/.antiright
+       local ARRC="~/.antiright"
+
+       if [ ! -f $ARRC ]; then
+               cp $PREFIX/share/ACE-desktop/system.antiright $ARRC
+       fi
+       # Fix missing Terminal app definition for old config files.  
+       if [ "$(grep Terminal: $ARRC)" = "" ]; then
+               echo 'Terminal: gshterm' >> $ARRC
        fi
 }
 
@@ -171,7 +172,8 @@
 }
 Prompt_User()
 {
-       $ARSHELL -oT Prompt -oe -al "Enter $1:" -at echo
+       $ARSHELL -oT Prompt -oe -al "Enter $1:" -at echo\
+               'Exit___ Cancel,gtk-close'
 }
 Binary_Command()
 {
@@ -237,7 +239,7 @@
        CMD="gtkshell -oT 'File Manager' -f $datadir/File_Manager.gdl"
        local FILE
        for FILE in *; do
-               CMD="$CMD \"ACE -A ARO $FILE & # $FILE\",gtk-file"
+               CMD="$CMD \"ACE -A Hack open_file $FILE & # $FILE\",gtk-file"
        done
                if [ "$DEBUG" = "1" ]; then
                echo $CMD
@@ -262,12 +264,6 @@
        exec sh -c "$CMD"
 }
 
-taskbar_update()
-{
-       # From the NetBSD date man page
-       date '+%m/%d/%y%n%H:%M:%S'
-}
-
 Sticky_Note()
 {
        nice $ARSHELL -oT 'Note' -aT -og 175x200 
@@ -283,60 +279,6 @@
                GUIDL Horizontal_Deskbar
        fi
 }
-ARO()
-{
-#      TMP=Get_Temp ARO
-#      TMP=Prepare_Temp $TMP
-#      echo $@
-       if [ $# -gt 0 ]; then
-               TMP=/tmp/ARO.$$
-               file $1 > $TMP
-               if grep script $TMP; then
-                       $@ &
-               elif grep HTML $TMP; then
-                       ACE Browser $1 & 
-               elif grep text $TMP; then
-                       ACE Text_Editor $1 &
-               elif grep executable $TMP; then
-                       # Execute the file and any arguments.  
-                       $@ &
-               elif grep gzip $TMP; then
-                       # Decompress the file.  
-                       gzip -d $1 &
-               elif grep tar $TMP; then
-                       # Untar the file.  
-                       tar xf $1 &
-               elif grep emacs $TMP; then
-               # Open the file in GNU Emacs.  No xterm is needed because most
-               # modern emacs builds link to the X libraries.
-                       emacs $1 &
-               elif grep MP3 $TMP; then
-                       ACE Terminal -e mpg123 $1 &
-               elif grep image $TMP; then
-                       ACE Image_Editor $1 &
-               elif grep MS $TMP; then
-                       # Wine is used to run MS programs.
-                       wine $1 & 
-               elif grep "No such file or directory" $TMP; then
-                       touch $1
-                       ACE Text_Editor $1 &
-               elif grep empty $TMP; then
-                       ACE Text_Editor $1 &
-               elif grep directory $TMP; then
-                       local AR_IN_FM=0
-                       cd $1 && File_Manager
-               else
-                       # Execute the file.  
-                       $@ &
-               fi
-               rm -f $TMP
-       else
-               $ARSHELL -de "No arguments were specified" &
-       fi
-       if [ "$AR_IN_FM" = "1" ]; then
-               File_Manager
-       fi
-}
 Read_Man_Page()
 {
        ACE Terminal -e man $1 $2
@@ -353,15 +295,12 @@
        done
        CMD="$CMD \"ACE -A Man_Browse_Section $1 # Back\""
 
-if [ "DEBUG" = "1" ]; then
-       echo $CMD
-fi
        exec sh -c "$CMD"
 }
 
 OS_Specific()
 {
-       $ARSHELL -di 'No OS specific functionality available.'
+       $ARSHELL -di 'FIXME No OS specific functionality available.'
 }
 Command()
 {
@@ -578,8 +517,8 @@
 {
        Get_Largest_Files
 
-       for file in "cat /tmp/ACE.du.$$"; do
-               ask_del $file
+       for LARGE_FILE in "$(cat /tmp/ACE.du.$$)"; do
+               ask_del "$LARGE_FILE"
        done
 }
 ACE_show_usage_and_exit()

Index: ACE-desktop/hacks/juke.sh
===================================================================
RCS file: /sources/antiright/antiright/ACE-desktop/hacks/juke.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ACE-desktop/hacks/juke.sh   25 Jul 2007 04:42:38 -0000      1.3
+++ ACE-desktop/hacks/juke.sh   27 Jul 2007 01:13:36 -0000      1.4
@@ -1,5 +1,23 @@
 #!/bin/sh
 
+#    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
+
+
+
 MUSIC_DIR=$(ACE mp3_dir)
 cd $MUSIC_DIR
 MUSIC_PLAYER=$(ACE mp3_player)

Index: ACE-desktop/hacks/local_loads.sh
===================================================================
RCS file: /sources/antiright/antiright/ACE-desktop/hacks/local_loads.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ACE-desktop/hacks/local_loads.sh    22 Jul 2007 08:15:18 -0000      1.1
+++ ACE-desktop/hacks/local_loads.sh    27 Jul 2007 01:13:36 -0000      1.2
@@ -1,5 +1,23 @@
 #!/bin/sh
 
+#    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
+
+
+
 if [ "$1" = "--hostload" ]; then
 LOAD="$(uptime | tr ' ' '\n' | awk -F, 'BEGIN{is_load=0}\
        /averages/{is_load=1} {{if((is_load>0)&&(++is_load > 2))\

Index: gtkshell/main.c
===================================================================
RCS file: /sources/antiright/antiright/gtkshell/main.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- gtkshell/main.c     20 Jul 2007 01:26:35 -0000      1.28
+++ gtkshell/main.c     27 Jul 2007 01:13:36 -0000      1.29
@@ -31,7 +31,7 @@
 }
 
 int
-main(int argc, char **argv)
+thread_main(int argc, char **argv)
 {
        struct GSH * gsh;
 
@@ -52,3 +52,9 @@
 
        return (EXIT_SUCCESS);
 }
+
+int
+main(int argc, char ** argv)
+{
+       return thread_main(argc, argv);
+}

Index: ACE-desktop/hacks/open_file.sh
===================================================================
RCS file: ACE-desktop/hacks/open_file.sh
diff -N ACE-desktop/hacks/open_file.sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ACE-desktop/hacks/open_file.sh      27 Jul 2007 01:13:36 -0000      1.1
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+#    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
+
+Main()
+{
+       if [ $# -gt 0 ]; then
+               TMP=/tmp/ARO.$$
+               file $1 > $TMP
+               if grep HTML $TMP; then
+                       ACE Browser $1 & 
+               elif grep text $TMP; then
+                       ACE Text_Editor $1 &
+               elif grep executable $TMP; then
+                       # Execute the file and any arguments.  
+                       $@ &
+               elif grep gzip $TMP; then
+                       # Decompress the file.  
+                       gzip -d $1 &
+               elif grep tar $TMP; then
+                       # Untar the file.  
+                       tar xf $1 &
+               elif grep emacs $TMP; then
+               # Open the file in GNU Emacs.  No xterm is needed because most
+               # modern emacs builds link to the X libraries.
+                       emacs $1 &
+               elif grep MP3 $TMP; then
+                       ACE mp3_player $1 &
+               elif grep image $TMP; then
+                       ACE Image_Editor $1 &
+               elif grep MS $TMP; then
+                       # Wine is used to run MS programs.
+                       # Keep command line arguments.  
+                       local PROG="$1"
+                       shift
+                       wine $1 & 
+               elif grep "No such file or directory" $TMP; then
+                       touch $1
+                       ACE Text_Editor $1 &
+               elif grep empty $TMP; then
+                       ACE Text_Editor $1 &
+               elif grep directory $TMP; then
+                       AR_IN_FM=0
+                       cd $1 && ACE -A File_Manager
+               else
+                       # Execute the file.  
+                       /bin/sh -c "$*" &
+               fi
+               rm -f $TMP
+       else
+               gtkshell -de "No arguments were specified" &
+       fi
+       if [ "$AR_IN_FM" = "1" ]; then
+               ACE -A File_Manager
+       fi
+}
+
+#---
+
+Main $@
+
+




reply via email to

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