[Fai-commit] r5886 - in trunk: . bin debian pixmaps pixmaps/small

Thomas Lange lange at alioth.debian.org
Wed Jul 28 02:24:59 UTC 2010


Author: lange
Date: 2010-07-28 02:24:59 +0000 (Wed, 28 Jul 2010)
New Revision: 5886

Added:
   trunk/pixmaps/small/
   trunk/pixmaps/small/bar.gif
   trunk/pixmaps/small/begin.gif
   trunk/pixmaps/small/fail.gif
   trunk/pixmaps/small/minor.gif
   trunk/pixmaps/small/ok.gif
   trunk/pixmaps/small/warning.gif
Modified:
   trunk/Makefile
   trunk/bin/faimond-gui
   trunk/debian/changelog
Log:
* faimond-gui: add option -s
* Makefile: add support for small pixmaps in faimond-gui

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2010-07-27 22:44:16 UTC (rev 5885)
+++ trunk/Makefile	2010-07-28 02:24:59 UTC (rev 5886)
@@ -25,7 +25,7 @@
 install: 
 	mkdir -p $(DESTDIR)/{sbin,man} $(DESTDIR)/etc/{modutils,dhcp3,apt/apt.conf.d}
 	mkdir -p $(DESTDIR)/usr/{sbin,bin} $(DESTDIR)/usr/lib/fai $(DESTDIR)/etc/fai/apt
-	mkdir -p $(DESTDIR)/etc/{init,init.d} $(DESTDIR)/usr/share/fai/{pixmaps,setup-storage}
+	mkdir -p $(DESTDIR)/etc/{init,init.d} $(DESTDIR)/usr/share/fai/{pixmaps/small,setup-storage}
 	install man/* $(DESTDIR)/man
 	pod2man -c '' -r '' -s8 bin/dhcp-edit > $(DESTDIR)/man/dhcp-edit.8
 	$(MAKE) -C doc install
@@ -45,7 +45,8 @@
 	install -m644 conf/menu.lst.boot-only $(DESTDIR)/usr/share/fai/menu.lst
 	install -m644 conf/upstart-fai.conf $(DESTDIR)/etc/init/fai.conf
 	install -m755 lib/fai-abort $(DESTDIR)/etc/init.d
-	install -p -m644 pixmaps/*.gif $(DESTDIR)/usr/share/fai/pixmaps
+	cp -a pixmaps/*.gif $(DESTDIR)/usr/share/fai/pixmaps
+	cp -a pixmaps/small/*.gif $(DESTDIR)/usr/share/fai/pixmaps/small
 	perl -pi -e 's/FAIVERSIONSTRING/$(VERSIONSTRING)/' $(DESTDIR)/usr/sbin/fai
 	cp -a examples $(DOCDIR)
 	cp -a utils $(DOCDIR)/examples

Modified: trunk/bin/faimond-gui
===================================================================
--- trunk/bin/faimond-gui	2010-07-27 22:44:16 UTC (rev 5885)
+++ trunk/bin/faimond-gui	2010-07-28 02:24:59 UTC (rev 5886)
@@ -6,7 +6,7 @@
 # faimond-gui: graphical FAI monitor daemon
 #
 # This script is part of FAI (Fully Automatic Installation)
-# Copyright (C) 2007,2009 Thomas Lange, lange at informatik.uni-koeln.de
+# Copyright (C) 2007-2010 Thomas Lange, lange at informatik.uni-koeln.de
 # Universitaet zu Koeln
 #
 #*********************************************************************
@@ -29,6 +29,7 @@
 
 # TODO: Add support for TASKERROR
 
+use Getopt::Std;
 use Tk;
 use Tk::HList;
 use Tk::ItemStyle;
@@ -36,9 +37,9 @@
 
 my $tcounter;
 my $n;
+our ($opt_s);
 
 $debug = 0;
-$icondir='/usr/share/fai/pixmaps';
 
 #@tasklist = qw/hostname confdir defclass action partition mountdisks extrbase mirror debconf prepareapt instsoft configure chboot savelog faiend reboot/;
 @tasklist = qw/hostname confdir defclass partition extrbase debconf instsoft configure tests savelog faiend reboot/;
@@ -71,13 +72,13 @@
   $defstyle = $hlist->ItemStyle("imagetext",
 				-foreground => $forecolor,
 				-background => $backcolor,
-				-font => $font,
+				-font => $font2,
 			       );
 
   $headerstyle = $hlist->ItemStyle("imagetext",
 				   -bg=>$backcolor,
 				   -fg=>$headercolor,
-				   -font=>$font
+				   -font=>$font1
 				  );
 
   # not yet used
@@ -140,19 +141,46 @@
 
 }
 # -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+sub usage {
+
+  print << "EOF";
+faimond-gui, graphical FAI monitor daemon
+
+   Copyright (C) 2007-2010 by Thomas Lange
+
+Usage: faimond | faimond-gui -
+
+   -s                   Use smaller icons.
+
+EOF
+  exit 0;
+}
+# -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
 # main program
 
-open(INP, "<$ARGV[0]") or die "Can't open input file. $@";
+getopts('s') || usage;
 
+if ($opt_s) {
+  $font1="Sans 13";
+  $font2="Sans 7";
+  $icondir='/usr/share/fai/pixmaps/small';
+} else {
+  $font1="Sans 15";
+  $font2="Sans 10";
+  $icondir='/usr/share/fai/pixmaps';
+}
+
 $backcolor="#76716f";
 $forecolor="#ffffff";
 $headercolor="#ffffff";
-$font="Sans 15";
 
+open(INP, "<$ARGV[0]") or die "Can't open input file. $@";
+
 $top = new MainWindow;
 #$top->configure(-background=> $backcolor);
 $hlist = $top->Scrolled("HList",
             -header => 1,
+            -font => $font2,
             -columns => $#tasklist+1,
             -scrollbars => 'oe',
             -width => 102,

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2010-07-27 22:44:16 UTC (rev 5885)
+++ trunk/debian/changelog	2010-07-28 02:24:59 UTC (rev 5886)
@@ -5,6 +5,7 @@
     (thanks to Waldemar Brodkorb for the initial patch)
   * dhcp-edit: new command that adds or removes entries to/from dhcpd.conf
     add $modified, add more messages, fix code for adding a host
+  * faimond-gui: add option -s
   * make-fai-nfsroot.conf: set NFSROOT_HOOKS by default
   * make-fai-nfsroot: fix typo, remove redundant rm command
   * mkramdisk: use exit in main routine (closes: #583289)
@@ -69,6 +70,7 @@
   * subroutines: adjust to new option of mkramdisks
   * subroutines: new subroutine umount_csspace, so it can be used in user
     hooks (thanks to Waldemar for the patch)
+  * Makefile: add support for small pixmaps in faimond-gui
   
   [ Michael Tautschnig ]
   * control: Move setup-storage to its own package (fai-setup-storage). Thanks

Added: trunk/pixmaps/small/bar.gif
===================================================================
(Binary files differ)


Property changes on: trunk/pixmaps/small/bar.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/pixmaps/small/begin.gif
===================================================================
(Binary files differ)


Property changes on: trunk/pixmaps/small/begin.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/pixmaps/small/fail.gif
===================================================================
(Binary files differ)


Property changes on: trunk/pixmaps/small/fail.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/pixmaps/small/minor.gif
===================================================================
(Binary files differ)


Property changes on: trunk/pixmaps/small/minor.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/pixmaps/small/ok.gif
===================================================================
(Binary files differ)


Property changes on: trunk/pixmaps/small/ok.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/pixmaps/small/warning.gif
===================================================================
(Binary files differ)


Property changes on: trunk/pixmaps/small/warning.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream




More information about the Fai-commit mailing list