]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2000-04-03 17:31:52 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Mon, 3 Apr 2000 17:31:52 +0000 (17:31 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Mon, 3 Apr 2000 17:31:52 +0000 (17:31 +0000)
suppress welcome message if display is smaller than 20x2
change lcd4linux.ppm to 32 pixel high so KDE won't stretch the icon

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@37 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

display.c
lcd4linux.c
lcd4linux.kdelnk
lcd4linux.xpm

index 92636b8f6ede9e32ced9491a9b8b270abbfe527f..04c8f40ac29b6dd0be840453147632d420c4a0fe 100644 (file)
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* $Id: display.c,v 1.13 2000/03/30 16:46:57 reinelt Exp $
+/* $Id: display.c,v 1.14 2000/04/03 17:31:52 reinelt Exp $
  *
  * framework for device drivers
  *
  *
  *
  * $Log: display.c,v $
+ * Revision 1.14  2000/04/03 17:31:52  reinelt
+ *
+ * suppress welcome message if display is smaller than 20x2
+ * change lcd4linux.ppm to 32 pixel high so KDE won't stretch the icon
+ *
  * Revision 1.13  2000/03/30 16:46:57  reinelt
  *
  * configure now handles '--with-x' and '--without-x' correct
@@ -166,11 +171,11 @@ int lcd_query (int *rows, int *cols, int *xres, int *yres, int *bars)
   if (Lcd==NULL)
     return -1;
   
-  *rows=Lcd->rows;
-  *cols=Lcd->cols;
-  *xres=Lcd->xres;
-  *yres=Lcd->yres;
-  *bars=Lcd->bars;
+  if (rows) *rows=Lcd->rows;
+  if(cols) *cols=Lcd->cols;
+  if (xres) *xres=Lcd->xres;
+  if (yres) *yres=Lcd->yres;
+  if (bars) *bars=Lcd->bars;
 
   return 0;
 }
index bd0fc7ff799a43170b13416e957fcee088b55f9e..974f8eb643c892244857df584c8e510ae5830e40 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: lcd4linux.c,v 1.16 2000/04/03 04:46:38 reinelt Exp $
+/* $Id: lcd4linux.c,v 1.17 2000/04/03 17:31:52 reinelt Exp $
  *
  * LCD4Linux
  *
  *
  *
  * $Log: lcd4linux.c,v $
+ * Revision 1.17  2000/04/03 17:31:52  reinelt
+ *
+ * suppress welcome message if display is smaller than 20x2
+ * change lcd4linux.ppm to 32 pixel high so KDE won't stretch the icon
+ *
  * Revision 1.16  2000/04/03 04:46:38  reinelt
  *
  * added '-c key=val' option
@@ -119,8 +124,8 @@ int main (int argc, char *argv[])
 {
   char *cfg="/etc/lcd4linux.conf";
   char *driver;
-  int c, smooth;
-
+  int c, x, y, smooth;
+  
   while ((c=getopt (argc, argv, "c:f:hlo:"))!=EOF) {
     switch (c) {
     case 'c':
@@ -175,14 +180,16 @@ int main (int argc, char *argv[])
   tack=atoi(cfg_get("tack")?:"500");
 
   process_init();
-
   lcd_clear();
-  lcd_put (1, 1, "* LCD4Linux V" VERSION " *");
-  lcd_put (2, 1, " (c) 2000 M.Reinelt");
-  lcd_flush();
 
-  sleep (3);
-  lcd_clear();
+  lcd_query (&y, &x, NULL, NULL, NULL);
+  if (x>=20 && y>=2) {
+    lcd_put (1, 1, "* LCD4Linux V" VERSION " *");
+    lcd_put (2, 1, " (c) 2000 M.Reinelt");
+    lcd_flush();
+    sleep (3);
+    lcd_clear();
+  }
 
   smooth=0;
   while (1) {
index 5ccfd04e4f3c32f8b404d7d0ee90bc4c4918321e..357cd3884d8091ab34d7c015f7f650a4acdc1615 100644 (file)
@@ -1,8 +1,8 @@
 # KDE Config File
 [KDE Desktop Entry]
 Comment[C]=LCD4Linux
-SwallowTitle=XLCD4Linux
 SwallowExec=lcd4linux -f /etc/lcd4kde.conf
+SwallowTitle=XLCD4Linux
 BinaryPattern=
 Name=LCD4Linux
 Name[C]=LCD4Linux
index f319ae7fc8d218fad4fc9b594b6d7133ea9cc336..acfa7724eac25a0ee7660e0fc0aa59e79d72e143 100644 (file)
@@ -1,9 +1,16 @@
 /* XPM */
 static char *lcd4linux[] = {
-"38 18 2 1",
+"38 32 3 1",
+"  c None",
 "# c #102000",
 ". c #a0d000",
-"......................................",
+"                                      ",
+"                                      ",
+"                                      ",
+"                                      ",
+"                                      ",
+"                                      ",
+"                                      ",
 "......................................",
 "..##............######....######......",
 "..##............######....######......",
@@ -21,4 +28,12 @@ static char *lcd4linux[] = {
 "..##########....######....######......",
 "......................................",
 "......................................",
+"                                      ",
+"                                      ",
+"                                      ",
+"                                      ",
+"                                      ",
+"                                      ",
+"                                      ",
+"                                      ",
 };