Permalink
Browse files

* faimond-gui: add option -s

* Makefile: add support for small pixmaps in faimond-gui
  • Loading branch information...
1 parent 71d5829 commit 2d6e2b444ba9de6abb97a0d04434969b50320441 @Mrfai Mrfai committed Jul 28, 2010
View
@@ -25,7 +25,7 @@ veryclean: clean
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:
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
View
@@ -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@informatik.uni-koeln.de
+# Copyright (C) 2007-2010 Thomas Lange, lange@informatik.uni-koeln.de
# Universitaet zu Koeln
#
#*********************************************************************
@@ -29,16 +29,17 @@
# TODO: Add support for TASKERROR
+use Getopt::Std;
use Tk;
use Tk::HList;
use Tk::ItemStyle;
#use Tk::Balloon;
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 @@ sub mkgraphics {
$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 hostentry {
}
# - - - - - - - - - - - - - - - - - -
+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,
View
@@ -5,6 +5,7 @@ fai (3.4~beta6) unstable; urgency=low
(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 @@ fai (3.4~beta6) unstable; urgency=low
* 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
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2d6e2b4

Please sign in to comment.