[vdr-plugin-extrecmenu] 01/03: Imported Upstream version 1.2.4

Tobias Grimm tiber-guest at moszumanska.debian.org
Mon Feb 9 18:38:34 UTC 2015


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to branch master
in repository vdr-plugin-extrecmenu.

commit 4023c6090bd7f8a8533c1f6a820a820a64265329
Author: etobi <git at e-tobi.net>
Date:   Mon Feb 9 19:36:33 2015 +0100

    Imported Upstream version 1.2.4
---
 HISTORY               |  14 +++-
 extrecmenu.c          |  15 +++--
 mymenueditrecording.c |  20 ++++++
 mymenurecordings.c    | 183 +++++++++++++++++++++++++++++++++++---------------
 mymenurecordings.h    |  12 +++-
 mymenusetup.c         |  45 ++++++++++++-
 mymenusetup.h         |   8 +++
 myreplaycontrol.c     |   3 +
 po/ca_ES.po           |   5 +-
 po/cs_CZ.po           |   5 +-
 po/da_DK.po           |   5 +-
 po/de_DE.po           |   9 ++-
 po/el_GR.po           |   5 +-
 po/es_ES.po           |  60 +++++++++--------
 po/et_EE.po           |   5 +-
 po/fi_FI.po           |   5 +-
 po/fr_FR.po           | 130 ++++++++++++++++++-----------------
 po/hr_HR.po           |   5 +-
 po/hu_HU.po           |   5 +-
 po/it_IT.po           |   5 +-
 po/nl_NL.po           |   5 +-
 po/nn_NO.po           |   5 +-
 po/pl_PL.po           |   5 +-
 po/pt_PT.po           |   5 +-
 po/ro_RO.po           |   5 +-
 po/ru_RU.po           |   5 +-
 po/sk_SK.po           |   5 +-
 po/sl_SI.po           |   5 +-
 po/sv_SE.po           |   5 +-
 po/tr_TR.po           |   5 +-
 tools.c               |  67 +++++++++++-------
 tools.h               |   3 +
 32 files changed, 466 insertions(+), 198 deletions(-)

diff --git a/HISTORY b/HISTORY
index 494f7f7..72c1dd4 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,7 +1,19 @@
 VDR Plugin 'extrecmenu' Revision History
 ----------------------------------------
 
-2012-xx-xx: Version 1.2.3
+2014-08-20: Version 1.2.4
+- [amair] Reduced delay when opening the recordings menu if "menu category" feature is used.
+
+2014-08-05: Version 1.2.3
+- [amair] Fixed crashes that happened if a skin used the "menu category" feature. (Submitted by The Chief @vdr-portal.de).
+- [amair] GoLastReplayed and ReturnToPlugin now work as expected.
+- [amair] Add support for VDR v2.1.2+ (Submitted by TheChief @vdrportal.de).
+- [amair] Fixed "level" for menu items (Patch by TomJoad @vdrportal.de).
+- [amair] Display folders on top of recordings list when using descending sorting.
+- [amair] Display the root video folder again when opening ExtRecMenu (closes #1447).
+- [karim.afifi] Updated French translation.
+- [amair] Fix recording list problems with some recording names.
+- [amair] Set menu category in VDR >= 1.7.28 (Closes #1110).
 - [amair] Close replay OSD before starting cutter so that marks are saved to disk (submitted by mini73 @vdr-portal.de).
 - [amair] Always use VDR's cutting feature in VDR >=1.7.32.
 - [amair] Reduced calls to get the free disk space.
diff --git a/extrecmenu.c b/extrecmenu.c
index 75d3362..f72f550 100644
--- a/extrecmenu.c
+++ b/extrecmenu.c
@@ -20,7 +20,7 @@
 
 using namespace std;
 
-static const char *VERSION        = "1.2.2";
+static const char *VERSION        = "1.2.4";
 static const char *DESCRIPTION    = tr("Extended recordings menu");
 static const char *MAINMENUENTRY  = "ExtRecMenu";
 
@@ -240,6 +240,10 @@ bool cPluginExtrecmenu::SetupParse(const char *_Name,const char *Value)
     mysetup.PatchFont=atoi(Value);
   else if(!strcasecmp(_Name,"FileSystemFreeMB"))
     mysetup.FileSystemFreeMB=atoi(Value);
+#if VDRVERSNUM >= 10728
+  else if(!strcasecmp(_Name,"SetRecordingCat"))
+    mysetup.SetRecordingCat=atoi(Value);
+#endif
   else if(!strcasecmp(_Name,"UseCutterQueue"))
     mysetup.UseCutterQueue=atoi(Value);
   else
@@ -250,12 +254,15 @@ bool cPluginExtrecmenu::SetupParse(const char *_Name,const char *Value)
 
 bool cPluginExtrecmenu::Service(const char *Id,void *Data)
 {
-  if(!Data)
-    return true;
+  if(!Id)
+    return false;
 
-  cOsdMenu **menu=(cOsdMenu**)Data;
   if(mysetup.ReplaceOrgRecMenu && strcmp(Id,"MainMenuHooksPatch-v1.0::osRecordings")==0)
   {
+    if(!Data)
+      return true;
+
+    cOsdMenu **menu=(cOsdMenu**)Data;
     if(menu)
       *menu=(cOsdMenu*)MainMenuAction();
 
diff --git a/mymenueditrecording.c b/mymenueditrecording.c
index 7776717..d166d0f 100644
--- a/mymenueditrecording.c
+++ b/mymenueditrecording.c
@@ -76,7 +76,11 @@ eOSState myMenuRenameRecording::ProcessKey(eKeys Key)
 
       if(isdir)
       {
+#if APIVERSNUM > 20101
+        if(-1==asprintf(&oldname,"%s%s%s/%s",cVideoDirectory::Name(),tmppath?"/":"",dirbase?dirbase:"",dirname))
+#else
         if(-1==asprintf(&oldname,"%s%s%s/%s",VideoDirectory,tmppath?"/":"",dirbase?dirbase:"",dirname))
+#endif
           oldname=NULL;
       }
       else
@@ -84,7 +88,11 @@ eOSState myMenuRenameRecording::ProcessKey(eKeys Key)
 
       if(oldname)
       {
+#if APIVERSNUM > 20101
+        if(-1==asprintf(&newname,"%s%s%s/%s%s",cVideoDirectory::Name(),tmppath?"/":"",tmppath?tmppath:"",tmpname,isdir?"":strrchr(recording->FileName(),'/')))
+#else
         if(-1==asprintf(&newname,"%s%s%s/%s%s",VideoDirectory,tmppath?"/":"",tmppath?tmppath:"",tmpname,isdir?"":strrchr(recording->FileName(),'/')))
+#endif
           newname=NULL;
 
         if(newname)
@@ -305,7 +313,11 @@ eOSState myMenuMoveRecording::MoveRec()
 
   if(dirname)
   {
+#if APIVERSNUM > 20101
+    if(-1==asprintf(&oldname,"%s%s%s/%s",cVideoDirectory::Name(),dirbase?"/":"",tmpdirbase?tmpdirbase:"",tmpdirname))
+#else
     if(-1==asprintf(&oldname,"%s%s%s/%s",VideoDirectory,dirbase?"/":"",tmpdirbase?tmpdirbase:"",tmpdirname))
+#endif
       oldname=NULL;
   }
   else
@@ -357,7 +369,11 @@ eOSState myMenuMoveRecording::MoveRec()
     if(dir)
       dir=ExchangeChars(dir,true);
 
+#if APIVERSNUM > 20101
+    if(-1==asprintf(&_newname,"%s%s%s%s",cVideoDirectory::Name(),dir?"/":"",dir?dir:"",strrchr(dirname?oldname:recording->FileName(),'/')))
+#else
     if(-1==asprintf(&_newname,"%s%s%s%s",VideoDirectory,dir?"/":"",dir?dir:"",strrchr(dirname?oldname:recording->FileName(),'/')))
+#endif
       _newname=NULL;
 
     if(_newname)
@@ -424,7 +440,11 @@ eOSState myMenuMoveRecording::MoveRec()
                 {
                   if(!strncmp(oldname,rec->FileName(),strlen(oldname)))
                   {
+#if APIVERSNUM > 20101
+                    char *_buf=ExchangeChars(strdup(oldname+strlen(cVideoDirectory::Name())+1),false);
+#else
                     char *_buf=ExchangeChars(strdup(oldname+strlen(VideoDirectory)+1),false);
+#endif
 
                     if(strcmp(rec->Name(),_buf))
                     {
diff --git a/mymenurecordings.c b/mymenurecordings.c
index 52b1750..165baf9 100644
--- a/mymenurecordings.c
+++ b/mymenurecordings.c
@@ -38,6 +38,7 @@ class myMenuRecordingInfo:public cOsdMenu
     myMenuRecordingInfo(const cRecording *Recording,bool WithButtons = false);
     virtual void Display(void);
     virtual eOSState ProcessKey(eKeys Key);
+    virtual  ~myMenuRecordingInfo(void);
 #ifdef USE_GRAPHTFT
     virtual const char* MenuKind(){return "MenuExtRecording";}
 #endif
@@ -45,6 +46,11 @@ class myMenuRecordingInfo:public cOsdMenu
 
 myMenuRecordingInfo::myMenuRecordingInfo(const cRecording *Recording, bool WithButtons):cOsdMenu(trVDR("Recording info"))
 {
+#if VDRVERSNUM >= 10734
+    if (mysetup.SetRecordingCat){
+      SetMenuCategory(mcRecordingInfo);
+    }
+#endif
   recording=Recording;
   withButtons=WithButtons;
   if(withButtons)
@@ -152,9 +158,16 @@ eOSState myMenuRecordingInfo::ProcessKey(eKeys Key)
   return state;
 }
 
+myMenuRecordingInfo::~myMenuRecordingInfo(void) {
+}
+
 // --- myMenuRecordingsItem ---------------------------------------------------
 myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
 {
+#if VDRVERSNUM >= 10733
+  recording=Recording;
+  recording_copy=NULL;
+#endif
   totalentries=newentries=0;
   isdvd=false;
   ishdd=false;
@@ -166,6 +179,7 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
 #else
   isPesRecording=true;
 #endif
+	int savedlevel=Level;
   // get the level of this recording
   level=0;
   const char *s=Recording->Name();
@@ -193,8 +207,6 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
     title=MALLOC(char,s-p+1);
     strn0cpy(title,p,s-p+1);
     name=strdup(title);
-
-    uniqid=name;
   }
   else
   {
@@ -213,13 +225,6 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
 #endif
       struct tm *t=localtime_r(&start,&tm_r);
 
-      const char *c = strrchr(filename, '/');
-      if (c)
-        idbuffer << (c + 1);
-      else
-        idbuffer << filename;
-
-
       // display symbol
       buffer=filename;
       if (isPesRecording)
@@ -433,16 +438,13 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
       if(i!=string::npos)
       {
         titlebuffer << _s.substr(i+1,_s.length()-i);
-        idbuffer << _s.substr(i+1,_s.length()-i);
       }
       else
       {
         titlebuffer << _s;
-        idbuffer << _s;
       }
 
       title=strdup(titlebuffer.str().c_str());
-      uniqid=idbuffer.str();
     }
     else
     {
@@ -450,15 +452,29 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
         title=strdup("");
     }
   }
+	level=savedlevel;
   SetText(title);
 }
 
 myMenuRecordingsItem::~myMenuRecordingsItem()
 {
+#if VDRVERSNUM >= 10733
+  delete recording_copy;
+#endif
   free(title);
   free(name);
 }
 
+#if VDRVERSNUM >= 10733
+void myMenuRecordingsItem::rec_copy(void)
+{
+  if(mysetup.SetRecordingCat)
+    recording_copy=new cRecording(recording->FileName());
+  else
+    recording_copy=NULL;
+}
+#endif
+
 void myMenuRecordingsItem::IncrementCounter(bool IsNew)
 {
   totalentries++;
@@ -493,10 +509,19 @@ void myMenuRecordingsItem::IncrementCounter(bool IsNew)
     SetText(buffer,false);
 }
 
+#if VDRVERSNUM >= 10733
+void myMenuRecordingsItem::SetMenuItem(cSkinDisplayMenu *displaymenu,int index,bool current,bool selectable)
+{
+#if VDRVERSNUM >= 10733
+  if (!(recording_copy && displaymenu->SetItemRecording(recording_copy,index,current,selectable,level,totalentries,newentries)))
+#endif
+    displaymenu->SetItem(Text(),index,current,selectable);
+}
+#endif
+
 // --- myMenuRecordings -------------------------------------------------------
 #define MB_PER_MINUTE 25.75 // this is just an estimate! (taken over from VDR)
 
-bool myMenuRecordings::golastreplayed=false;
 bool myMenuRecordings::wasdvd;
 bool myMenuRecordings::washdd;
 dev_t myMenuRecordings::fsid=0;
@@ -505,6 +530,11 @@ int myMenuRecordings::lastFreeMB=-1;
 
 myMenuRecordings::myMenuRecordings(const char *Base,int Level):cOsdMenu("")
 {
+#if VDRVERSNUM >= 10728
+  if(mysetup.SetRecordingCat){
+    SetMenuCategory(mcRecording);
+  }
+#endif
   int c[MAX_RECLIST_COLUMNS],i=0;
 
   for (i=0; i<MAX_RECLIST_COLUMNS; i++) {
@@ -534,7 +564,7 @@ myMenuRecordings::myMenuRecordings(const char *Base,int Level):cOsdMenu("")
 
   Recordings.StateChanged(recordingsstate);
 
-  Display();
+  //Display();
 
   if(wasdvd&&!cControl::Control())
   {
@@ -577,8 +607,9 @@ myMenuRecordings::myMenuRecordings(const char *Base,int Level):cOsdMenu("")
 
   Set();
 
-  if(myReplayControl::LastReplayed())
+  if((mysetup.GoLastReplayed || mysetup.ReturnToRec) && myReplayControl::LastReplayed())
     Open();
+  mysetup.ReturnToRec = false;
 
   Display();
   SetHelpKeys();
@@ -596,7 +627,11 @@ int myMenuRecordings::FreeMB()
     int freediskspace=0;
     if(mysetup.FileSystemFreeMB)
     {
+#if APIVERSNUM > 20101
+      string path=cVideoDirectory::Name();
+#else
       string path=VideoDirectory;
+#endif
       path+="/";
       char *tmpbase=base?ExchangeChars(strdup(base),true):NULL;
       if(tmpbase)
@@ -612,7 +647,7 @@ int myMenuRecordings::FreeMB()
           struct statvfs fsstat;
           if(!statvfs(path.c_str(),&fsstat))
           {
-            freediskspace=int((double)fsstat.f_bavail/(1024.0*1024.0/fsstat.f_bsize));
+            freediskspace=int((double)fsstat.f_bavail/(double)(1024.0*1024.0/fsstat.f_bsize));
 
             for(cRecording *rec=DeletedRecordings.First();rec;rec=DeletedRecordings.Next(rec))
             {
@@ -622,7 +657,7 @@ int myMenuRecordings::FreeMB()
                 {
                   int ds=DirSizeMB(rec->FileName());
                   if(ds>0)
-                    freediskspace+=DirSizeMB(rec->FileName());
+                    freediskspace+=ds;
                   else
                     esyslog("[extrecmenu] DirSizeMB(%s) failed!", rec->FileName());
                 }
@@ -649,7 +684,11 @@ int myMenuRecordings::FreeMB()
     }
     else
     {
+#if APIVERSNUM > 20101
+      cVideoDirectory::VideoDiskSpace(&freediskspace);
+#else
       VideoDiskSpace(&freediskspace);
+#endif
     }
     lastFreeMB=freediskspace;
     lastDiskSpaceCheck=time(NULL);
@@ -660,14 +699,6 @@ int myMenuRecordings::FreeMB()
 
 void myMenuRecordings::Title()
 {
-  int freemb=FreeMB();
-#if VDRVERSNUM >= 10727
-  double MBperMinute = Recordings.MBperMinute();
-  int minutes=int(double(freemb)/(MBperMinute>0?MBperMinute:MB_PER_MINUTE));
-#else
-  int minutes=int(double(freemb)/MB_PER_MINUTE);
-#endif
-
   stringstream buffer;
   if(MoveCutterThread->IsMoveListEmpty())
     buffer << Icons::MovingRecording();
@@ -683,11 +714,25 @@ void myMenuRecordings::Title()
   else
     buffer << trVDR("Recordings");
 
-  buffer << " ("
-         << minutes/60 << ":"
-         << setw(2) << setfill('0') << minutes%60 << " "
-         << trVDR("free")
-         << ")";
+#if VDRVERSNUM >= 10728
+  if(mysetup.SetRecordingCat == 0){
+#endif
+    int freemb=FreeMB();
+#if VDRVERSNUM >= 10727
+    double MBperMinute = Recordings.MBperMinute();
+    int minutes=int(double(freemb)/(MBperMinute>0?MBperMinute:MB_PER_MINUTE));
+#else
+    int minutes=int(double(freemb)/MB_PER_MINUTE);
+#endif
+
+    buffer << " ("
+           << minutes/60 << ":"
+           << setw(2) << setfill('0') << minutes%60 << " "
+           << trVDR("free")
+           << ")";
+#if VDRVERSNUM >= 10728
+  }
+#endif
 
   SetTitle(buffer.str().c_str());
 }
@@ -745,12 +790,12 @@ void myMenuRecordings::SetHelpKeys()
 }
 
 // create the menu list
-void myMenuRecordings::Set(bool Refresh,char *_current)
+void myMenuRecordings::Set(bool Refresh)
 {
-  const char *lastreplayed=_current?_current:myReplayControl::LastReplayed();
+  const char *lastreplayed=myReplayControl::LastReplayed();
 
   cThreadLock RecordingsLock(&Recordings);
-  if(Refresh && !_current)
+  if(Refresh)
   {
     fsid=0;
     myMenuRecordingsItem *item=(myMenuRecordingsItem*)Get(Current());
@@ -769,7 +814,11 @@ void myMenuRecordings::Set(bool Refresh,char *_current)
   for(cRecording *recording=Recordings.First();recording;recording=Recordings.Next(recording))
     list->Add(new myRecListItem(recording));
   // sort my recordings list
+#if APIVERSNUM > 20101
+  string path=cVideoDirectory::Name();
+#else
   string path=VideoDirectory;
+#endif
   path+="/";
   if(base)
     path+=base;
@@ -782,7 +831,6 @@ void myMenuRecordings::Set(bool Refresh,char *_current)
      hidepinprotectedrecs=pinplugin->SetupParse("hideProtectedRecordings","1");
 #endif
 
-  char *lastitemtext=NULL;
   myMenuRecordingsItem *lastitem=NULL;
   for(myRecListItem *listitem=list->First();listitem;listitem=list->Next(listitem))
   {
@@ -790,47 +838,65 @@ void myMenuRecordings::Set(bool Refresh,char *_current)
     if(!base||(strstr(recording->Name(),base)==recording->Name()&&recording->Name()[strlen(base)]=='~'))
     {
       myMenuRecordingsItem *recitem=new myMenuRecordingsItem(recording,level);
-      if(*recitem->UniqID() && (!lastitem || strcmp(recitem->UniqID(),lastitemtext)))
+      myMenuRecordingsItem *lastdir=NULL;
+      if(recitem->IsDirectory())
+      {
+        // Sorting may ignore non-alphanumeric characters, so we need to explicitly handle directories in case they only differ in such characters:
+        for(myMenuRecordingsItem *p=lastitem;p;p=dynamic_cast<myMenuRecordingsItem *>(p->Prev()))
+        {
+          if(p->Name()&&strcmp(p->Name(),recitem->Name())==0)
+          {
+            lastdir=p;
+            break;
+          }
+        }
+      }
+      if(*recitem->Text()&&!lastdir)
       {
 #ifdef USE_PINPLUGIN
         if(!(hidepinprotectedrecs && cStatus::MsgReplayProtected(recording,recitem->Name(),base,recitem->IsDirectory(),true)))
-				{
+        {
+#endif
+#if VDRVERSNUM >= 10733
+          recitem->rec_copy();
 #endif
           Add(recitem);
           lastitem=recitem;
-          free(lastitemtext);
-          lastitemtext=strdup(lastitem->UniqID());
+          if(recitem->IsDirectory())
+            lastdir=recitem;
 #ifdef USE_PINPLUGIN
-				}
-				else
-					lastitem=NULL;
+        }
+        else
+          lastitem=NULL;
 #endif
       }
       else
+      {
         delete recitem;
+        recitem=NULL;
+      }
 
-      if(lastitem)
+      if(lastitem||lastdir)
       {
-        if(!MoveCutterThread->IsMoving(recording->FileName()))
-          lastitem->SetDirIsMoving(false);
+        if(lastitem)
+        {
+          if(!MoveCutterThread->IsMoving(recording->FileName()))
+            lastitem->SetDirIsMoving(false);
+        }
 
-        if(lastitem->IsDirectory())
-          lastitem->IncrementCounter(recording->IsNew());
-        if(lastreplayed && !strcmp(lastreplayed,recording->FileName()))
+        if(lastreplayed&&strcmp(lastreplayed,recording->FileName())==0)
         {
-          if(golastreplayed||Refresh)
-          {
-            SetCurrent(lastitem);
-            if(recitem && !recitem->IsDirectory() && !cControl::Control() && !mysetup.GoLastReplayed)
-              golastreplayed=false;
-          }
+          SetCurrent(lastdir?lastdir:lastitem);
           if(recitem&&!recitem->IsDirectory()&&(recitem->IsDVD()||recitem->IsHDD())&&!cControl::Control())
             cReplayControl::ClearLastReplayed(cReplayControl::LastReplayed());
         }
+
+        if(lastdir){
+          lastdir->IncrementCounter(recording->IsNew());
+        }
       }
     }
   }
-  free(lastitemtext);
   delete list;
 
   ForceFreeMbUpdate();
@@ -1053,7 +1119,6 @@ eOSState myMenuRecordings::Play()
           }
           buffer=NULL;
         }
-        golastreplayed=true;
 #if VDRVERSNUM >= 10728
         myReplayControl::SetRecording(recording->FileName());
 #else
@@ -1239,7 +1304,11 @@ eOSState myMenuRecordings::Commands(eKeys Key)
       {
         char *strBase=base?ExchangeChars(strdup(base), true):NULL;
         char *strName=ExchangeChars(strdup(item->Name()), true);
+#if APIVERSNUM > 20101
+        if(-1==asprintf(&parameter,"\"%s/%s/%s\"",cVideoDirectory::Name(),strBase?strBase:"", strName))
+#else
         if(-1==asprintf(&parameter,"\"%s/%s/%s\"",VideoDirectory,strBase?strBase:"", strName))
+#endif
           parameter=NULL;
         free(strBase);
         free(strName);
@@ -1263,7 +1332,11 @@ eOSState myMenuRecordings::Commands(eKeys Key)
 // change sorting
 eOSState myMenuRecordings::ChangeSorting()
 {
+#if APIVERSNUM > 20101
+  string path=cVideoDirectory::Name();
+#else
   string path=VideoDirectory;
+#endif
   path+="/";
   if(base)
     path+=base;
diff --git a/mymenurecordings.h b/mymenurecordings.h
index 9058abd..a882309 100644
--- a/mymenurecordings.h
+++ b/mymenurecordings.h
@@ -2,6 +2,10 @@
 class myMenuRecordingsItem:public cOsdItem
 {
   private:
+#if VDRVERSNUM >= 10733
+    cRecording *recording_copy;
+    cRecording *recording;
+#endif
     bool dirismoving;
     bool isdvd;
     bool ishdd;
@@ -17,6 +21,9 @@ class myMenuRecordingsItem:public cOsdItem
     ~myMenuRecordingsItem();
     const char *FileName(){return filename;}
     const char *Name(){return name;}
+#if VDRVERSNUM >= 10733
+    inline void rec_copy(void);
+#endif
     bool IsDirectory(){return name!=NULL;}
     bool IsPesRecording(void) const { return isPesRecording; }
     void IncrementCounter(bool IsNew);
@@ -25,6 +32,9 @@ class myMenuRecordingsItem:public cOsdItem
     void SetDirIsMoving(bool moving){dirismoving=moving;}
     bool GetDirIsMoving(){return dirismoving;}
     const char *UniqID(){return uniqid.length()?uniqid.c_str():"";}
+#if VDRVERSNUM >= 10733
+    virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable);
+#endif
 };
 
 // --- myMenuRecordings -------------------------------------------------------
@@ -58,7 +68,7 @@ class myMenuRecordings:public cOsdMenu
  public:
   myMenuRecordings(const char *Base=NULL,int Level=0);
   ~myMenuRecordings();
-  void Set(bool Refresh=false,char *current=NULL);
+  void Set(bool Refresh=false);
   virtual eOSState ProcessKey(eKeys Key);
 #ifdef USE_GRAPHTFT
   virtual const char* MenuKind(){return"MenuExtRecordings";}
diff --git a/mymenusetup.c b/mymenusetup.c
index a2fa719..f8de69e 100644
--- a/mymenusetup.c
+++ b/mymenusetup.c
@@ -58,10 +58,14 @@ mySetup::mySetup()
   mysetup.DescendSorting=0;
   mysetup.GoLastReplayed=0;
   mysetup.ReturnToPlugin=1;
+  mysetup.ReturnToRec=0;
   mysetup.LimitBandwidth=0;
   mysetup.UseVDRsRecInfoMenu=0;
   mysetup.PatchFont=1;
   mysetup.FileSystemFreeMB=1;
+#if VDRVERSNUM >= 10728
+  mysetup.SetRecordingCat=1;
+#endif
   mysetup.UseCutterQueue=1;
 }
 
@@ -93,16 +97,31 @@ myMenuSetup::myMenuSetup()
   usevdrsrecinfomenu=mysetup.UseVDRsRecInfoMenu;
   patchfont=mysetup.PatchFont;
   filesystemfreemb=mysetup.FileSystemFreeMB;
+#if VDRVERSNUM >= 10728
+  setrecordingcat=mysetup.SetRecordingCat;
+#endif
   usecutterqueue=mysetup.UseCutterQueue;
 
   sortingtypetexts[0]=tr("ascending");
   sortingtypetexts[1]=tr("descending");
 
+  Set();
+}
+
+void myMenuSetup::Set()
+{
+  int currentItem = Current();
+  Clear();
+
   Add(new cMenuEditBoolItem(tr("Show nr. of new recordings of a directory"),&shownewrecs));
   Add(new cMenuEditStraItem(tr("Maximum number of recordings per directory"), &recsperdir, 5, RecsPerDir_texts));
   Add(SubMenuItem(tr("Items to show in recording list"), osUser1)); 
   Add(new cMenuEditBoolItem(tr("Show alternative to new marker"),&patchnew));
-  Add(new cMenuEditBoolItem(tr("Show free disk space for each file system"),&filesystemfreemb));
+#if VDRVERSNUM >= 10728
+  Add(new cMenuEditBoolItem(tr("Set menu category"),&setrecordingcat));
+  if (setrecordingcat == 0)
+#endif
+    Add(new cMenuEditBoolItem(tr("Show free disk space for each file system"),&filesystemfreemb));
   Add(new cMenuEditStraItem(tr("Sorting"),&descendsorting,2,sortingtypetexts));
   Add(new cMenuEditBoolItem(tr("Hide main menu entry"),&hidemainmenuentry));
 #ifdef MAINMENUHOOKSVERSNUM
@@ -113,6 +132,10 @@ myMenuSetup::myMenuSetup()
   Add(new cMenuEditBoolItem(tr("Limit bandwidth for move recordings"),&limitbandwidth));
   Add(new cMenuEditBoolItem(tr("Use VDR's recording info menu"),&usevdrsrecinfomenu));
   Add(new cMenuEditBoolItem(tr("Use cutter queue"),&usecutterqueue));
+
+  SetCurrent(Get(currentItem));
+  Display();
+  SetHelp(NULL, NULL, NULL, NULL);
 }
 
 void myMenuSetup::Store()
@@ -152,12 +175,27 @@ void myMenuSetup::Store()
   SetupStore("UseVDRsRecInfoMenu",mysetup.UseVDRsRecInfoMenu=usevdrsrecinfomenu);
   SetupStore("PatchFont",mysetup.PatchFont=patchfont);
   SetupStore("FileSystemFreeMB",mysetup.FileSystemFreeMB=filesystemfreemb);
+#if VDRVERSNUM >= 10728
+  SetupStore("SetRecordingCat",mysetup.SetRecordingCat=setrecordingcat);
+#endif
   SetupStore("UseCutterQueue",mysetup.UseCutterQueue=usecutterqueue);
 }
 
 eOSState myMenuSetup::ProcessKey(eKeys Key) {
+#if VDRVERSNUM >= 10728
+  int oldSetRecordingCat = setrecordingcat;
+#endif
+
   eOSState state = cMenuSetupPage::ProcessKey(Key);
 
+#if VDRVERSNUM >= 10728
+  if (Key != kNone &&
+      (oldSetRecordingCat != setrecordingcat)
+     ) {
+    Set();
+  }
+#endif
+
   switch (state) {
     case osUser1:
       return AddSubMenu(new myMenuSetupColumns(&reclistcolumn[0]));
@@ -171,6 +209,11 @@ eOSState myMenuSetup::ProcessKey(eKeys Key) {
 myMenuSetupColumns::myMenuSetupColumns(RecListColumnType *prlcs) : cOsdMenu(tr("Items to show in recording list"), 4) {
   preclistcolumns = prlcs;
 
+#if VDRVERSNUM >= 10728
+  if(mysetup.SetRecordingCat){
+    SetMenuCategory(mcPluginSetup);
+  }
+#endif
   ColumnType_descriptions[0] = tr("--none--");
   ColumnType_descriptions[1] = tr("Blank");
   ColumnType_descriptions[2] = tr("Date of Recording");
diff --git a/mymenusetup.h b/mymenusetup.h
index ec8e7a4..fe1319c 100644
--- a/mymenusetup.h
+++ b/mymenusetup.h
@@ -67,10 +67,14 @@ class mySetup
   int DescendSorting;
   int GoLastReplayed;
   int ReturnToPlugin;
+  int ReturnToRec;
   int LimitBandwidth;
   int UseVDRsRecInfoMenu;
   int PatchFont;
   int FileSystemFreeMB;
+#if VDRVERSNUM >= 10728
+  int SetRecordingCat;
+#endif
   int UseCutterQueue;
 };
 
@@ -93,12 +97,16 @@ class myMenuSetup:public cMenuSetupPage
   int usevdrsrecinfomenu;
   int patchfont;
   int filesystemfreemb;
+#if VDRVERSNUM >= 10728
+  int setrecordingcat;
+#endif
   int usecutterqueue;
  protected:
   virtual void Store();
  public:
   myMenuSetup();
 //  virtual ~myMenuSetup();
+  virtual void Set();
   virtual eOSState ProcessKey(eKeys Key);
 };
 
diff --git a/myreplaycontrol.c b/myreplaycontrol.c
index f43e9b6..a7a76b4 100644
--- a/myreplaycontrol.c
+++ b/myreplaycontrol.c
@@ -22,7 +22,10 @@ myReplayControl::myReplayControl()
 myReplayControl::~myReplayControl()
 {
   if(fCallPlugin)
+  {
+    mysetup.ReturnToRec = true;
     cRemote::CallPlugin("extrecmenu");
+  }
 }
 
 eOSState myReplayControl::ProcessKey(eKeys Key)
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 438fea0..9b2fed3 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Jordi Vil� <jvila at tinet.org>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -182,6 +182,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index e82dd60..8d09a82 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Vladim�r B�rta <vladimir.barta at k2atmitec.cz>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -180,6 +180,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr "Zobrazit alternativu k nov�m zna�k�m"
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr "Zobrazit voln� m�sto pro ka�d� souborov� syst�m"
 
diff --git a/po/da_DK.po b/po/da_DK.po
index b53f86d..7940eec 100644
--- a/po/da_DK.po
+++ b/po/da_DK.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Mogens Elneff <mogens at elneff.dk>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -180,6 +180,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/de_DE.po b/po/de_DE.po
index d9b0d34..26ca4f1 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,9 +7,9 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
-"PO-Revision-Date: 2011-01-21 14:17+0100\n"
-"Last-Translator: Carsten Siebholz <sibbi <AT> helmutauer <DOT> de>\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
+"PO-Revision-Date: 2013-04-08 15:17+0100\n"
+"Last-Translator: Andreas Mair <amair.sob <AT> gmail <DOT> com>\n"
 "Language-Team:  <vdr at linuxtv.org>\n"
 "Language: de\n"
 "MIME-Version: 1.0\n"
@@ -180,6 +180,9 @@ msgstr "Anzuzeigende Elemente im Aufzeichnungs-Men
 msgid "Show alternative to new marker"
 msgstr "Alternative zu Neu-Marker anzeigen"
 
+msgid "Set menu category"
+msgstr "Men�-Kategorie setzen"
+
 msgid "Show free disk space for each file system"
 msgstr "Freien Speicherplatz f�r jede Partition anzeigen"
 
diff --git a/po/el_GR.po b/po/el_GR.po
index 1b84aa0..7e5d215 100644
--- a/po/el_GR.po
+++ b/po/el_GR.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Dimitrios Dimitrakos <mail at dimitrios.de>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -180,6 +180,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/es_ES.po b/po/es_ES.po
index 72f170a..82f0bbd 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -7,10 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2010-06-17 20:39+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Javier Bradineras <jbradi at hotmail.com>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-15\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -54,6 +55,27 @@ msgstr "No se puede acceder a la informaci
 msgid "Details"
 msgstr "Detalles"
 
+msgid "Rename/Move failed!"
+msgstr "�Renombrar/Mover ha fallado!"
+
+msgid "Cutter queue not empty"
+msgstr "La cola de recortado no est� vac�a"
+
+msgid "Move recordings in progress"
+msgstr "Se est� moviendo la grabaci�n"
+
+msgid "Can't start editing process!"
+msgstr "�No se puede iniciar el proceso de edici�n!"
+
+msgid "Recording already in cutter queue!"
+msgstr "�La grabaci�n est� en la cola de recortado!"
+
+msgid "No editing marks defined!"
+msgstr "No definidas marcas de edici�n"
+
+msgid "Added recording to cutter queue"
+msgstr "Grabaci�n a�adida a la cola de recortado"
+
 msgid "Button$Play"
 msgstr "Reproducir"
 
@@ -146,12 +168,6 @@ msgstr "Ascendente"
 msgid "descending"
 msgstr "Descendente"
 
-msgid "Show recording date"
-msgstr "Mostrar la fecha de la grabaci�n"
-
-msgid "Show recording rating"
-msgstr "Mostrar clasificaci�n de la grabaci�n"
-
 msgid "Show nr. of new recordings of a directory"
 msgstr "Mostrar el n�mero de nuevas grabaciones"
 
@@ -164,6 +180,9 @@ msgstr "Elementos a mostrar en la lista de grabaciones"
 msgid "Show alternative to new marker"
 msgstr "Mostrar alternativas al nuevo marcador"
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr "Mostrar espacio libre de particiones"
 
@@ -191,27 +210,6 @@ msgstr "Usar el men
 msgid "Use cutter queue"
 msgstr "Usar cola para recortar"
 
-msgid "Recording already in cutter queue!"
-msgstr "�La grabaci�n est� en la cola de recortado!"
-
-msgid "No editing marks defined!"
-msgstr "No definidas marcas de edici�n"
-
-msgid "Added recording to cutter queue"
-msgstr "Grabaci�n a�adida a la cola de recortado"
-
-msgid "Rename/Move failed!"
-msgstr "�Renombrar/Mover ha fallado!"
-
-msgid "Cutter queue not empty"
-msgstr "La cola de recortado no est� vac�a"
-
-msgid "Move recordings in progress"
-msgstr "Se est� moviendo la grabaci�n"
-
-msgid "Can't start editing process!"
-msgstr "�No se puede iniciar el proceso de edici�n!"
-
 msgid "--none--"
 msgstr "--nada--"
 
@@ -274,3 +272,9 @@ msgstr "Nombre de la grabaci
 
 msgid "(fixed to the last position)"
 msgstr "(fijado en la �ltima posici�n)"
+
+#~ msgid "Show recording date"
+#~ msgstr "Mostrar la fecha de la grabaci�n"
+
+#~ msgid "Show recording rating"
+#~ msgstr "Mostrar clasificaci�n de la grabaci�n"
diff --git a/po/et_EE.po b/po/et_EE.po
index 1e0873d..e1917a2 100644
--- a/po/et_EE.po
+++ b/po/et_EE.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Arthur Konovalov <kasjas at hot.ee>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -180,6 +180,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/fi_FI.po b/po/fi_FI.po
index e814407..7bcdf4f 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Rolf Ahrenberg <rahrenbe at cc.hut.fi>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -183,6 +183,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr "Merkitse uudet tallenteet symbolilla"
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr "N�yt� vapaa levytila jokaisella tiedostoj�rjestelm�ll�"
 
diff --git a/po/fr_FR.po b/po/fr_FR.po
index a77f670..6eaadc0 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -5,14 +5,15 @@
 # Olivier Jacques <jacquesolivier at hotmail.com>, 2003
 # Gregoire Favre <greg at magma.unil.ch>, 2003
 # Nicolas Huillard <nhuillard at e-dition.fr>, 2005
+# Karim Afifi <hc912b32 at yahoo.fr>, 2013
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
-"Last-Translator: Nicolas Huillard <nhuillard at e-dition.fr>\n"
+"Last-Translator: Karim Afifi <hc912b32 at yahoo.fr>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
 "Language: \n"
 "MIME-Version: 1.0\n"
@@ -20,16 +21,16 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 
 msgid "Extended recordings menu"
-msgstr "Menu enregistrement �tandu"
+msgstr "Menu enregistrement �tendu"
 
 msgid "Rename"
 msgstr "Renommer"
 
 msgid "Invalid filename!"
-msgstr "Nom de fichiers n'est pas valide'"
+msgstr "Nom de fichier non valide!"
 
 msgid "Creating directories failed!"
-msgstr ""
+msgstr "R�pertoire non cr��!"
 
 msgid "New folder"
 msgstr "Nouveau dossier"
@@ -47,10 +48,10 @@ msgid "[base dir]"
 msgstr "[Dossier racine]"
 
 msgid "Target filesystem filled - try anyway?"
-msgstr "La partition de d�stination est pleine - essayer tout de m�me?"
+msgstr "Partition de destination pleine - Essayer quand m�me?"
 
 msgid "Moving into own sub-directory not allowed!"
-msgstr "D�placer dans le sous-dossier propre, n'est pas possible!"
+msgstr "D�placement non autoris� dans son propre sous-dossier!"
 
 msgid "Can't get filesystem information"
 msgstr "Impossible de d�terminer les informations du syst�me de fichiers"
@@ -59,25 +60,25 @@ msgid "Details"
 msgstr "D�tails"
 
 msgid "Rename/Move failed!"
-msgstr "Renommer/d�placer � �chou�!"
+msgstr "Renommer/d�placer a �chou�!"
 
 msgid "Cutter queue not empty"
-msgstr "Queue d'attente d�coupe n'est pas vide"
+msgstr "Queue d'attente d�coupe non vide"
 
 msgid "Move recordings in progress"
-msgstr "Des enregistrements sont en d�placement"
+msgstr "D�placement d'enregistrements en cours"
 
 msgid "Can't start editing process!"
-msgstr ""
+msgstr "Impossible de d�marrer l'�dition!"
 
 msgid "Recording already in cutter queue!"
-msgstr "L'enregistrement est d�j� dans la queue d'attente d�coupe!"
+msgstr "Enregistrement d�j� dans la file de d�coupe!"
 
 msgid "No editing marks defined!"
-msgstr ""
+msgstr "Pas de marque d'�dition d�finie!"
 
 msgid "Added recording to cutter queue"
-msgstr "Enregistrement ajout� � la file d'attente de d�coupe"
+msgstr "Enregistrement ajout� � la file de d�coupe"
 
 msgid "Button$Play"
 msgstr "Montrer"
@@ -89,13 +90,13 @@ msgid "Button$Back"
 msgstr "Retour"
 
 msgid "Name"
-msgstr ""
+msgstr "Nom"
 
 msgid "Path"
 msgstr "Chemin"
 
 msgid "Channel"
-msgstr ""
+msgstr "Canal"
 
 msgid "Size"
 msgstr "Taille"
@@ -104,7 +105,7 @@ msgid "Error while mounting DVD!"
 msgstr "Erreur lors du montage du DVD!"
 
 msgid "Error while mounting Archive-HDD!"
-msgstr ""
+msgstr "Erreur lors du montage de l'archive HDD!"
 
 msgid "Button$Commands"
 msgstr "Commande"
@@ -120,10 +121,10 @@ msgstr "Info"
 
 #, c-format
 msgid "Please attach Archive-HDD %s"
-msgstr ""
+msgstr "Veuillez attacher Archive-HDD %s"
 
 msgid "Recording not found on Archive-HDD!"
-msgstr ""
+msgstr "Enregistrement non trouv� dans Archive-HDD!"
 
 msgid "Error while linking [0-9]*.vdr!"
 msgstr "Erreur lors de la cr�ation des racourcis [0-9]*.vdr!"
@@ -132,32 +133,32 @@ msgid "sudo or mount --bind / umount error (vfat system)"
 msgstr "Erreur sudo ou mount --bind / umount (Systeme VFAT)"
 
 msgid "Script 'hddarchive.sh' not found!"
-msgstr ""
+msgstr "Script 'hddarchive.sh' non trouv�!"
 
 #, c-format
 msgid "Please insert DVD %s"
-msgstr "Mettez le DVD %s dans le lecteur"
+msgstr "Veuiller ins�rer le DVD %s"
 
 msgid "DVD plugin is not installed!"
-msgstr "Le plugin DVD n'est pas install�!"
+msgstr "Plugin DVD non install�!"
 
 msgid "No DVD in drive!"
 msgstr "Pas de DVD dans le lecteur!"
 
 msgid "Recording not found on DVD!"
-msgstr "Il n'y a pas d'enregistrement sur le DVD!"
+msgstr "Pas d'enregistrement sur le DVD!"
 
 msgid "Script 'dvdarchive.sh' not found!"
-msgstr "Impossible de trouver le script 'dvdarchive.sh'!"
+msgstr "Script 'dvdarchive.sh' non trouv�!"
 
 msgid "Sort by date"
-msgstr "Triage selon date"
+msgstr "Tri par date"
 
 msgid "Sort by name"
-msgstr "Triage selon le nom"
+msgstr "Tri par nom"
 
 msgid "Cancel moving?"
-msgstr "Interrompre le d�placement?"
+msgstr "Annuler le d�placement?"
 
 msgid "Button$Rename"
 msgstr "Renommer"
@@ -166,40 +167,43 @@ msgid "Button$Delete"
 msgstr "Effacer"
 
 msgid "ascending"
-msgstr "montant"
+msgstr "Montant"
 
 msgid "descending"
-msgstr "descendant"
+msgstr "Descendant"
 
 msgid "Show nr. of new recordings of a directory"
 msgstr "Afficher le nombre de nouveaux enregistrements dans les dossiers"
 
 msgid "Maximum number of recordings per directory"
-msgstr ""
+msgstr "Maximum d'enregistrements par r�pertoire"
 
 msgid "Items to show in recording list"
-msgstr ""
+msgstr "Elements � afficher dans la liste des enregistrements"
 
 msgid "Show alternative to new marker"
-msgstr "Afficher les nouveaux symbols alternatifs"
+msgstr "Afficher les symbols alternatifs"
+
+msgid "Set menu category"
+msgstr "Param�trer la cat�gorie menu"
 
 msgid "Show free disk space for each file system"
-msgstr "Afficher la place libre de chaque partition"
+msgstr "Afficher l'espace disponible de chaque partition"
 
 msgid "Sorting"
-msgstr "Triage"
+msgstr "Tri"
 
 msgid "Hide main menu entry"
-msgstr "Menu Enregistrement �tandu invisible"
+msgstr "Masquer du menu principal"
 
 msgid "Replace original recordings menu"
-msgstr "Remplacer le nenu original Enregistrement"
+msgstr "Remplacer le menu original Enregistrement"
 
 msgid "Jump to last replayed recording"
-msgstr "Retour au dernier enregistrement lu"
+msgstr "Retourner au dernier enregistrement lu"
 
 msgid "Call plugin after playback"
-msgstr "Apr�s la lecture d�marer le plugin"
+msgstr "D�marrer le plugin apr�s la lecture"
 
 msgid "Limit bandwidth for move recordings"
 msgstr "Limiter la bande passante lors du d�placement"
@@ -208,79 +212,79 @@ msgid "Use VDR's recording info menu"
 msgstr "Utiliser le menu info enregistrement de VDR"
 
 msgid "Use cutter queue"
-msgstr ""
+msgstr "Utiliser la file d'attente de d�coupe"
 
 msgid "--none--"
-msgstr ""
+msgstr "--aucun--"
 
 msgid "Blank"
-msgstr ""
+msgstr "Vide"
 
 msgid "Date of Recording"
-msgstr ""
+msgstr "Date de l'enregistrement"
 
 msgid "Time of Recording"
-msgstr ""
+msgstr "Heure de l'enregistrement"
 
 msgid "Date and Time of Recording"
-msgstr ""
+msgstr "Date et heure de l'enregistrement"
 
 msgid "Length of Recording"
-msgstr ""
+msgstr "Dur�e de l'enregistrement"
 
 msgid "Rating of Recording"
-msgstr ""
+msgstr "Note de l'enregistrement"
 
 msgid "Content of File"
-msgstr ""
+msgstr "Contenu du fichier"
 
 msgid "Content of File, then Result of a Command"
-msgstr ""
+msgstr "Contenu du fichier, puis r�sultat d'une commande"
 
 msgid "left"
-msgstr ""
+msgstr "Gauche"
 
 msgid "center"
-msgstr ""
+msgstr "Centre"
 
 msgid "right"
-msgstr ""
+msgstr "Droite"
 
 msgid "Icon"
-msgstr ""
+msgstr "Icone"
 
 msgid "(fixed to the first position)"
-msgstr ""
+msgstr "(Fix� sur la premi�re position)"
 
 msgid "Item"
-msgstr ""
+msgstr "El�ment"
 
 msgid "Width"
-msgstr ""
+msgstr "Largeur"
 
 msgid "Alignment"
-msgstr ""
+msgstr "Alignement"
 
 msgid "Filename"
-msgstr ""
+msgstr "Nom de fichier"
 
 msgid "Command"
-msgstr ""
+msgstr "Commande"
 
 msgid "Name of the recording"
-msgstr ""
+msgstr "Nom de l'enregistrement"
 
 msgid "(fixed to the last position)"
-msgstr ""
+msgstr "(Fix� sur la derni�re position)"
 
 #~ msgid "Show recording date"
-#~ msgstr "Afiicher la date d'enregistrement"
+#~ msgstr "Afficher la date de l'enregistrement"
 
 #~ msgid "Show recording time"
-#~ msgstr "Afficher l'heure d'enregistrement"
+#~ msgstr "Afficher l'heure de l'enregistrement"
 
 #~ msgid "Show recording length"
-#~ msgstr "Afficher la longeur de l'enregistrement"
+#~ msgstr "Afficher la dur�e de l'enregistrement"
 
 #~ msgid "Patch font"
 #~ msgstr "Patch des police"
diff --git a/po/hr_HR.po b/po/hr_HR.po
index 9422e95..3cd0852 100644
--- a/po/hr_HR.po
+++ b/po/hr_HR.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Drazen Dupor <drazen.dupor at dupor.com>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -181,6 +181,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/hu_HU.po b/po/hu_HU.po
index 5bcfcd3..b90d882 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Istvan Koenigsberger <istvnko at hotmail.com>, Guido Josten <guido.josten at t-online.de>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -181,6 +181,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/it_IT.po b/po/it_IT.po
index 6e8a89c..78d7dc3 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2012-04-24 12:27+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2011-07-09 23:47+0100\n"
 "Last-Translator: Diego Pierotto <vdr-italian at tiscali.it>\n"
 "Language-Team:  <vdr at linuxtv.org>\n"
@@ -185,6 +185,9 @@ msgstr "Voci da mostrare nell'elenco reg."
 msgid "Show alternative to new marker"
 msgstr "Mostra opzioni nuovo marcatore"
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr "Mostra spazio disponibile partizioni"
 
diff --git a/po/nl_NL.po b/po/nl_NL.po
index ef19711..aa119cd 100644
--- a/po/nl_NL.po
+++ b/po/nl_NL.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Maarten Wisse <Maarten.Wisse at urz.uni-hd.de>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -182,6 +182,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/nn_NO.po b/po/nn_NO.po
index 478ce97..19d2868 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Truls Slevigen <truls at slevigen.no>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -181,6 +181,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/pl_PL.po b/po/pl_PL.po
index c4ffe01..1306d24 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Michael Rakowski <mrak at gmx.de>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -180,6 +180,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 8716c12..fd81b2a 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Paulo Lopes <pmml at netvita.pt>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -180,6 +180,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/ro_RO.po b/po/ro_RO.po
index 2a749db..c76130f 100644
--- a/po/ro_RO.po
+++ b/po/ro_RO.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Lucian Muresan <lucianm at users.sourceforge.net>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -181,6 +181,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 6831096..235a262 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Vyacheslav Dikonov <sdiconov at mail.ru>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -180,6 +180,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/sk_SK.po b/po/sk_SK.po
index 0a934af..b390340 100755
--- a/po/sk_SK.po
+++ b/po/sk_SK.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2011-02-15 21:20+0100\n"
 "Last-Translator: Milan Hrala <hrala.milan at gmail.com>\n"
 "Language-Team:  <vdr at linuxtv.org>\n"
@@ -180,6 +180,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr "Zobrazi� alternat�vu k nov�m zna�k�m"
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr "Zobrazi� voln� miesto pre ka�d� s�borov� syst�m"
 
diff --git a/po/sl_SI.po b/po/sl_SI.po
index bd83246..c2cef68 100644
--- a/po/sl_SI.po
+++ b/po/sl_SI.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Matjaz Thaler <matjaz.thaler at guest.arnes.si>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -181,6 +181,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/sv_SE.po b/po/sv_SE.po
index cb33ae1..515aa82 100644
--- a/po/sv_SE.po
+++ b/po/sv_SE.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Tomas Prybil <tomas at prybil.se>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -181,6 +181,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/po/tr_TR.po b/po/tr_TR.po
index de84721..c2835a2 100644
--- a/po/tr_TR.po
+++ b/po/tr_TR.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ExtRecMenu 1.2\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2011-06-24 08:43+0200\n"
+"POT-Creation-Date: 2013-04-08 15:06+0200\n"
 "PO-Revision-Date: 2008-03-15 16:21+0100\n"
 "Last-Translator: Oktay Yolge�en <oktay_73 at yahoo.de>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -180,6 +180,9 @@ msgstr ""
 msgid "Show alternative to new marker"
 msgstr ""
 
+msgid "Set menu category"
+msgstr ""
+
 msgid "Show free disk space for each file system"
 msgstr ""
 
diff --git a/tools.c b/tools.c
index 461f8e6..ea6e8e2 100644
--- a/tools.c
+++ b/tools.c
@@ -152,7 +152,11 @@ bool MoveRename(const char *OldName,const char *NewName,cRecording *Recording,bo
     {
       if(!strncmp(OldName,item->recording->FileName(),strlen(OldName)))
       {
+#if APIVERSNUM > 20101
+        buf=strdup(OldName+strlen(cVideoDirectory::Name())+1);
+#else
         buf=strdup(OldName+strlen(VideoDirectory)+1);
+#endif
         if(buf)
         {
           buf=ExchangeChars(buf,false);
@@ -195,10 +199,13 @@ myRecListItem::myRecListItem(cRecording *Recording)
 {
   recording=Recording;
   filename=strdup(recording->FileName());
+  sortBufferName = sortBufferTime = NULL;
 }
 
 myRecListItem::~myRecListItem()
 {
+  free(sortBufferName);
+  free(sortBufferTime);
   free(filename);
 }
 
@@ -220,39 +227,49 @@ char *myRecListItem::StripEpisodeName(char *s)
     }
     t++;
   }
-  if(mysetup.DescendSorting)
+  if(s1&&s2)
   {
-    if(SortByName)
-      *s1=1;
-    else
-      *(s2+1)=(char)255;
+    // To have folders sorted before plain recordings, the '/' s1 points to
+    // is replaced by the character '1'. All other slashes will be replaced
+    // by '0' in SortName() (see below), which will result in the desired
+    // sequence:
+    *s1=mysetup.DescendSorting ? '0' : '1';
+    if(!SortByName)
+    {
+      s1++;
+      memmove(s1,s2,t-s2+1);
+    }
   }
-  else
-    *s1=(char)255;
-
-  if(s1 && s2 && !SortByName)
-    memmove(s1+1,s2,t-s2+1);
-
   return s;
 }
 
-int myRecListItem::Compare(const cListObject &ListObject)const
+char *myRecListItem::SortName(void) const
 {
-  myRecListItem *item=(myRecListItem*)&ListObject;
+  char **sb=SortByName?&sortBufferName:&sortBufferTime;
+  if(!*sb)
+  {
+#if APIVERSNUM > 20101
+    char *s=StripEpisodeName(strdup(recording->FileName()+strlen(cVideoDirectory::Name())));
+#else
+    char *s=StripEpisodeName(strdup(recording->FileName()+strlen(VideoDirectory)));
+#endif
+    strreplace(s,'/',mysetup.DescendSorting ? '1' : '0'); // some locales ignore '/' when sorting
+    int l=strxfrm(NULL,s,0)+1;
+    *sb=MALLOC(char,l);
+    strxfrm(*sb,s,l);
+    free(s);
+  }
+  return *sb;
+}
 
-  char *s1=StripEpisodeName(strdup(filename+strlen(VideoDirectory)));
-  char *s2=StripEpisodeName(strdup(item->filename+strlen(VideoDirectory)));
+int myRecListItem::Compare(const cListObject &ListObject)const
+{
+  myRecListItem *r=(myRecListItem*)&ListObject;
 
-  int compare;
   if(mysetup.DescendSorting)
-    compare=strcasecmp(s2,s1);
+    return strcasecmp(r->SortName(),SortName());
   else
-    compare=strcasecmp(s1,s2);
-
-  free(s1);
-  free(s2);
-
-  return compare;
+    return strcasecmp(SortName(),r->SortName());
 }
 
 // --- myRecList --------------------------------------------------------------
@@ -699,7 +716,11 @@ bool WorkerThread::Move(string From,string To)
 
                   isyslog("[extrecmenu] moving canceled");
 
+#if APIVERSNUM > 20101
+                  cVideoDirectory::RemoveVideoFile(To.c_str());
+#else
                   RemoveVideoFile(To.c_str());
+#endif
 
                   return true;
                 }
diff --git a/tools.h b/tools.h
index 189d312..b075b64 100644
--- a/tools.h
+++ b/tools.h
@@ -33,7 +33,10 @@ class myRecListItem:public cListObject
   private:
     static bool SortByName;
     char *filename;
+    mutable char *sortBufferName;
+    mutable char *sortBufferTime;
     static char *StripEpisodeName(char *s);
+    char *SortName(void) const;
   public:
     myRecListItem(cRecording *Recording);
     ~myRecListItem();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-extrecmenu.git



More information about the pkg-vdr-dvb-changes mailing list