]> git.webhop.me Git - luaweather.git/commitdiff
remove obsolete parameter for hide(); small fixes master
authorMarkham <markham001@gmx.de>
Sun, 22 May 2016 09:47:22 +0000 (11:47 +0200)
committerMarkham <markham001@gmx.de>
Sun, 22 May 2016 09:47:22 +0000 (11:47 +0200)
luawetterapp.cfg
luawetterapp.lua [changed mode: 0755->0644]
luawetterapp_hint.png [new file with mode: 0644]
luawettericon.png [deleted file]

index 43777fddc51d405213118a8501b87ffec5e8e9e7..ab225b4526de4fbe84b20ec497a0bf1a2e886181 100644 (file)
@@ -1,4 +1,4 @@
 name=Lua Wetter App
 desc=Aktuelles Wetter + 3 Tage Vorschau
 type=4
-hinticon=luawettericon
\ No newline at end of file
+
old mode 100755 (executable)
new mode 100644 (file)
index 054916f..e6d8cd7
@@ -1,16 +1,21 @@
 -- Lua Wetter App
 -- version 1.0 - 1.3 (c) by tischi
 -- version 1.4 by db2w-user
--- version 1.5 Markham
+-- version 1.6 Markham
 -- Lizenz: GPL 2
--- Stand: 2.11.2015
+-- Stand: 22.05.2016
 
+-- V1.6 -- remove obsolete parameter for hide()
 -- V1.5 -- improve luaweatherapp
 -- V1.4 -- add. apikey thx. GetAway
 -- apikey shamelessly stolen from the source code of the page http://openweathermap.org/current
 
+local posix    = require "posix"
+local json = require "json"
+local n = neutrino()
+
 -- Inputmethode hier angeben -- 0 fuer SMS; 1 fuer Keyboard
-KEYB=0;
+KEYB=1;
 
 if KEYB == 1 then
        inputmeth="keyboardinput"
@@ -25,8 +30,8 @@ function script_path()
 end
 
 --Variablen
-caption = "Wetter - Suche"
-pfad=script_path() .. "LuaWetterApp/"
+headdesc = "Wetterapp Einstellungen"
+pfad = script_path() .. "LuaWetterApp/"
 txtpfad = "/tmp/Lua_Wetter/"
 daten = txtpfad .. "luawetter.txt"
 datentxt = txtpfad .. "wetterdaten.txt"
@@ -51,9 +56,7 @@ conf["txtfarbe"]="COL.MENUCONTENT_TEXT"
 
 hintfarbe=COL.MENUCONTENT
 textfarbe=COL.MENUCONTENT_TEXT
-local posix    = require "posix"
-local json = require "json"
-local n = neutrino()
+
 tagname={}
 tagname["0"]="Sonntag"
 tagname["1"]="Montag"
@@ -84,7 +87,7 @@ function printinfo(t)
                msg1, data1 = n:GetInput(500)
        until msg1 == RC['home'] or msg1 == RC['setup'] or msg1 == RC['ok'] or i == 12; -- 6 seconds
 
-       wh:hide{no_restore=true}
+       wh:hide()
 end
 
 --zuordnung Wochentage
@@ -149,7 +152,7 @@ function loadConfig()
        config_error = false
        config:loadConfig(confFile)
  
-       conf["apikey"]= config:getString("apikey", "YOUR API KEY")
+       conf["apikey"]= config:getString("apikey", "1337beed73a13f60adbf71a486385104")
        conf["farbe"] = config:getString("farbe", "COL.MENUCONTENT")
        conf["land"] = config:getString("land", "de")
        conf["name"] = config:getString("name", "Stadt")
@@ -193,7 +196,7 @@ function saveConfig()
  
                configChanged = 0
                posix.sleep(1)
-               h:hide();
+               h:hide()
        end
 end
 
@@ -247,7 +250,7 @@ end
 --Wetterdaten verbergen
 function anzeigehide()
        for i=16,1,-1 do
-               anz[i]:hide{no_restore=true}
+               anz[i]:hide()
        end
 end
 
@@ -293,7 +296,7 @@ anz[11]=ctext.new{parent=w, x=dx+362, y=yy-248, dx=250, dy=128, text=lines[16] .
 anz[14]=ctext.new{parent=w, x=dx+234, y=yy-120, dx=378, dy=50, text=lines[19], color_body=hintfarbe, color_text=textfarbe, font_text=FONT['MENU'], mode="ALIGN_CENTER" }
 
 anz[15]=ctext.new{parent=w, x=x+100, y=yy-50, dx=400, dy=20, text="www.openweathermap.org", color_body=0xFF, color_text=COL['WHITE'], font_text=FONT['MENU'], mode="ALIGN_CENTER" }
-anz[16]=cpicture.new{parent=w, x=xx-310, y=yy-45 , dx=20, dy=10, image="menu", transparency=2, color_background=0xFF, mode="ALIGN_RIGHT"}
+anz[16]=cpicture.new{parent=w, x=xx-310, y=yy-50 , dx=20, dy=10, image="menu", transparency=2, color_background=0xFF, mode="ALIGN_RIGHT"}
 
 anzeigepaint()
 
@@ -354,7 +357,7 @@ end
 
 --Menüanzeigen
 function addMenue()
-       local m = menu.new{name=caption, icon=wettericon, has_shadow=true, mwidth=50}
+       local m = menu.new{name=headdesc, icon=wettericon, has_shadow=true, mwidth=50}
        m:addKey{directkey = RC["home"], id = "home", action = "handle_key"}
        m:addItem{type = "back"}
        m:addItem{type="separatorline"}
diff --git a/luawetterapp_hint.png b/luawetterapp_hint.png
new file mode 100644 (file)
index 0000000..f752219
Binary files /dev/null and b/luawetterapp_hint.png differ
diff --git a/luawettericon.png b/luawettericon.png
deleted file mode 100644 (file)
index f752219..0000000
Binary files a/luawettericon.png and /dev/null differ