diff options
| author | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-01-07 18:42:45 +0000 |
|---|---|---|
| committer | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-01-07 18:42:45 +0000 |
| commit | ab7a2112f96bb48ee2713ada4c9ce73322cf3cba (patch) | |
| tree | 44f229f1c011fc135571849c386f78bbb5a9af48 /pages/channels_widget.ecpp | |
| parent | 9508850d788d905b21cd2622b22cb76e80cf34ca (diff) | |
| download | vdr-plugin-live-ab7a2112f96bb48ee2713ada4c9ce73322cf3cba.tar.gz vdr-plugin-live-ab7a2112f96bb48ee2713ada4c9ce73322cf3cba.tar.bz2 | |
- simplified error handling
- moved error_widget to error.ecpp as subcomponent
- introduced error handling where necessary
- moved creation of timer settings string from page to code
- added redirect to edit_timer.ecpp after saving a timer
Diffstat (limited to 'pages/channels_widget.ecpp')
| -rw-r--r-- | pages/channels_widget.ecpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/pages/channels_widget.ecpp b/pages/channels_widget.ecpp index bdc526c..df9219f 100644 --- a/pages/channels_widget.ecpp +++ b/pages/channels_widget.ecpp @@ -8,25 +8,26 @@ using namespace vdrlive; </%pre> <%args> -name = "channel"; -int lastChannel = LiveSetup().GetLastChannel(); -selected; -onchange; -bool channelId = false; + name = "channel"; + selected; + onchange; + bool channelid = false; </%args> <%cpp> -ReadLock channelsLock( Channels ); -if ( !channelsLock ) - throw HtmlError( tr("Channels"), tr("Couldn't aquire access to channels, please try again later.") ); + ReadLock channelsLock( Channels ); + if ( !channelsLock ) + throw HtmlError( tr("Couldn't aquire access to channels, please try again later.") ); + + int lastChannel = LiveSetup().GetLastChannel(); </%cpp> - <select name="<$ name $>" <{ reply.out() << ( !onchange.empty() ? "onchange=\""+onchange+"\"" : "" ); }>> -% for ( cChannel *listChannel = Channels.First(); listChannel && listChannel->Number() <= lastChannel; -% listChannel = Channels.Next( listChannel ) ) { -% if ( listChannel->GroupSep() || *listChannel->Name() == '\0' ) -% continue; +<select name="<$ name $>" <{ reply.out() << ( !onchange.empty() ? "onchange=\""+onchange+"\"" : "" ); }>> +% for ( cChannel *listChannel = Channels.First(); listChannel && listChannel->Number() <= lastChannel; +% listChannel = Channels.Next( listChannel ) ) { +% if ( listChannel->GroupSep() || *listChannel->Name() == '\0' ) +% continue; % -% std::string listChannelId = *listChannel->GetChannelID().ToString(); - <option value="<? channelId ? *listChannel->GetChannelID().ToString() ?><? !channelId ? listChannel->Number() ?>" - <{ reply.out() << ( listChannelId == selected ? "selected=\"selected\"" : "" ); }>><$ listChannel->Name() $></option> -% } - </select> +% std::string listChannelId = *listChannel->GetChannelID().ToString(); + <option value="<? channelid ? *listChannel->GetChannelID().ToString() ?><? !channelid ? listChannel->Number() ?>" + <{ reply.out() << ( listChannelId == selected ? "selected=\"selected\"" : "" ); }>><$ listChannel->Name() $></option> +% } +</select> |
