From 41047e866873c51f2a87ac2c26b425fc86c17f9a Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sat, 5 Jan 2013 22:27:00 +0000 Subject: [PATCH] add grid EPG hours option git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1314 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 4 ++-- var/mongoose/cgi-bin/settings.jim | 30 ++++++++++++++++++++++++++++++ var/mongoose/cgi-bin/xepg.jim | 4 +++- var/mongoose/lib/settings.class | 5 +++++ 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 63eed12..1f935a5 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,9 +1,9 @@ Package: webif Priority: optional Section: web -Version: 0.10.1-7 +Version: 0.10.1-8 Architecture: mipsel Maintainer: af123@hummypkg.org.uk -Depends: webif-channelicons(>=1.0.3),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.5),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.9),hmt(>=1.1.7),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.04) +Depends: webif-channelicons(>=1.0.3),mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.5),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.9-1),hmt(>=1.1.7),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.1.2),smartmontools,tmenu(>=1.04) Suggests: ffmpeg Description: An evolving web interface for the Humax. diff --git a/var/mongoose/cgi-bin/settings.jim b/var/mongoose/cgi-bin/settings.jim index ba22aa2..961f70a 100755 --- a/var/mongoose/cgi-bin/settings.jim +++ b/var/mongoose/cgi-bin/settings.jim @@ -41,6 +41,8 @@ set epg_style [$settings epg_style] set pkgdev [$settings pkgdev] set notoolbar [$settings notoolbar] set nomobile [$settings nomobile] +set xepghours [$settings xepghours] +if {$xepghours == 0} { set xepghours 4 } # Handle updates @@ -75,6 +77,7 @@ proc handle_str_update {var old {text "Value"}} { handle_str_update hostname $hostname Hostname _handle_update ascii smtp_server $smtp_server "SMTP Server" handle_int_update channel_group $channel_group "Channel Group" +handle_int_update xepghours $xepghours "Grid EPG Hours" handle_str_update epg_style $epg_style "EPG Type" handle_int_update pkgdev $pkgdev "Development Package Display" handle_int_update notoolbar $notoolbar "Disable toolbar" @@ -230,6 +233,33 @@ puts " " +puts " + +
+ Grid-style EPG Hours + + + + +
+ +
+ +" + puts " diff --git a/var/mongoose/cgi-bin/xepg.jim b/var/mongoose/cgi-bin/xepg.jim index b93c9f5..53c0bd0 100755 --- a/var/mongoose/cgi-bin/xepg.jim +++ b/var/mongoose/cgi-bin/xepg.jim @@ -35,7 +35,8 @@ if {$stt <= $now} { set favgroup [[settings] channel_group] -set hours 4.0 +set hours [expr 1.0 * [[settings] xepghours]] +if {$hours == 0} { set hours 4.0 } set seconds $($hours * 3600) set ostt $stt @@ -78,6 +79,7 @@ proc but {label time {active 1}} { puts " active=$active>$label" } +puts "" puts "
" but "<< -1 Week" $($stt - 3600 * 24 * 7) \ diff --git a/var/mongoose/lib/settings.class b/var/mongoose/lib/settings.class index ee13603..2ef80ff 100644 --- a/var/mongoose/lib/settings.class +++ b/var/mongoose/lib/settings.class @@ -24,6 +24,7 @@ class settings { pkgdev 0 notoolbar 0 nomobile 0 + xepghours 4 } settings method hostname {{name ""}} { @@ -102,6 +103,10 @@ settings method channel_group {{group -1}} { return [$self _nval_setting channel_group $group] } +settings method xepghours {{hours -1}} { + return [$self _nval_setting xepghours $hours] +} + settings method epg_style {{style -1}} { if {$style != -1} { if {$style eq "grid"} { set style 1 } else { set style 0}