Version 1.3.40

- Fixed a second place where a message should be given when an instant recording
  is started (reported by Jesus Bravo Alvarez).
- Modified logging so that even on NPTL systems each line in the log file shows
  the individual thread's pid (based on a suggestion from Francois-Xavier Kowalski).
- Fixed a problem with @plugin in keymacros.conf in case the named plugin is not
  loaded (reported by Franz Gangkofer).
- Fixed a crash after executing the SVDRP command CLRE, caused by dangling 'schedule'
  pointers from cChannel objects (reported by Malte Schröder).
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Improved NULL checking in strreplace().
- Fixed a crash in the Schedule menu with events that have no title (reported by
  Rolf Ahrenberg). cEvent::FixEpgBugs() now assigns a "No title" string to events
  that have no title.
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
- Recordings are now only started if there is at least 300MB free disk space
  (suggested by Markus Hahn).
- When entering text via the numeric keys, the cursor now automatically advances
  (based on a patch from Rolf Ahrenberg).
- Updated the Polish OSD texts and the fontosd-iso8859-2.c file (thanks to Jaroslaw
  Swierczynski).
- Disabled the "buffer reserve" in Transfer Mode. Last chance to complain if you
  really need it - it will be completely removed in the next version. If you are
  experiencing problems with a/v running out of sync, try the latest driver and
  firmware (if you are using a full featured DVB card).
- Switching channels with the Up/Down or Channel+/Channel- keys now works a lot
  faster when the repeat function kicks in, by not actually switching the
  channel every time, but rather only displaying the channel info and doing
  the final switch when the key is released.
- The channel display is now updated _before_ the channel is switched.
- Added a missing initialization of 'timeout' in the cDisplayChannel constructor.
- Fixed detecting if there can be any useful further input when entering channel
  numbers (thanks to Thomas Bergwinkl).
- Updated the Spanish OSD texts (thanks to Jesus Bravo Alvarez).
- Fixed handling the '0' key for switching between the last two channels (thanks
  to Thomas Bergwinkl).
This commit is contained in:
Klaus Schmidinger
2006-01-22 18:00:00 +01:00
parent 78e3da813c
commit 446b0e8e0b
18 changed files with 1140 additions and 927 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menuitems.c 1.29 2006/01/07 15:37:03 kls Exp $
* $Id: menuitems.c 1.30 2006/01/21 12:27:14 kls Exp $
*/
#include "menuitems.h"
@@ -15,6 +15,8 @@
#include "skins.h"
#include "status.h"
#define AUTO_ADVANCE_TIMEOUT 1500 // ms before auto advance when entering characters via numeric keys
const char *FileNameChars = " abcdefghijklmnopqrstuvwxyz0123456789-.#~,/_@";
// --- cMenuEditItem ---------------------------------------------------------
@@ -262,6 +264,23 @@ void cMenuEditStrItem::SetHelpKeys(void)
cSkinDisplay::Current()->SetButtons(NULL);
}
void cMenuEditStrItem::AdvancePos(void)
{
if (pos < length - 2 && pos < int(strlen(value)) ) {
if (++pos >= int(strlen(value))) {
if (pos >= 2 && value[pos - 1] == ' ' && value[pos - 2] == ' ')
pos--; // allow only two blanks at the end
else {
value[pos] = ' ';
value[pos + 1] = 0;
}
}
}
newchar = true;
if (!insert && isalpha(value[pos]))
uppercase = isupper(value[pos]);
}
void cMenuEditStrItem::Set(void)
{
char buf[1000];
@@ -326,6 +345,13 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
bool SameKey = Key == lastKey;
if (Key != kNone)
lastKey = Key;
else if (!newchar && autoAdvanceTimeout.TimedOut()) {
AdvancePos();
newchar = true;
currentChar = NULL;
Set();
return osContinue;
}
switch (Key) {
case kRed: // Switch between upper- and lowercase characters
if (InEditMode()) {
@@ -382,19 +408,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
uppercase = isupper(value[pos]);
break;
case kRight|k_Repeat:
case kRight: if (pos < length - 2 && pos < int(strlen(value)) ) {
if (++pos >= int(strlen(value))) {
if (pos >= 2 && value[pos - 1] == ' ' && value[pos - 2] == ' ')
pos--; // allow only two blanks at the end
else {
value[pos] = ' ';
value[pos + 1] = 0;
}
}
}
newchar = true;
if (!insert && isalpha(value[pos]))
uppercase = isupper(value[pos]);
case kRight: AdvancePos();
if (pos == 0)
SetHelpKeys();
break;
@@ -413,15 +427,19 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
value[pos] = toupper(Inc(tolower(value[pos]), NORMALKEY(Key) == kUp));
else
value[pos] = Inc( value[pos], NORMALKEY(Key) == kUp);
newchar = false;
newchar = true;
}
else
return cMenuEditItem::ProcessKey(Key);
break;
case k0|k_Repeat ... k9|k_Repeat:
case k0 ... k9: {
if (!SameKey)
currentChar = NULL;
if (InEditMode()) {
if (!SameKey) {
if (!newchar)
AdvancePos();
currentChar = NULL;
}
if (insert && newchar) {
// create a new character in insert mode
if (int(strlen(value)) < length - 1) {
@@ -445,6 +463,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
currentChar++;
}
newchar = false;
autoAdvanceTimeout.Set(AUTO_ADVANCE_TIMEOUT);
}
else
return cMenuEditItem::ProcessKey(Key);