summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Prochnow <nordlicht@martins-kabuff.de>2006-12-04 11:35:54 +0100
committerAndreas Mair <andreas@vdr-developer.org>2006-12-04 11:35:54 +0100
commit01be0f47d4fcfce954f77a037f8ab4d5368c8fe7 (patch)
treec9ef3945e2f0303987e0770b6425efd5ebb4e5a4
parent978605b653893d76a6e34f923d74bb64dfb957ca (diff)
downloadvdr-plugin-extrecmenu-01be0f47d4fcfce954f77a037f8ab4d5368c8fe7.tar.gz
vdr-plugin-extrecmenu-01be0f47d4fcfce954f77a037f8ab4d5368c8fe7.tar.bz2
Version 0.12bv0.12b
- type of sorting (ascending/descending) selectable at the setup menu of the plugin - 'Blue' also closes the info menu for a recording
-rw-r--r--HISTORY5
-rw-r--r--extrecmenu.c45
-rw-r--r--i18n.c88
-rw-r--r--mymenurecordings.c8
-rw-r--r--mymenusetup.c7
-rw-r--r--mymenusetup.h4
-rw-r--r--tools.c19
7 files changed, 146 insertions, 30 deletions
diff --git a/HISTORY b/HISTORY
index 6b0409b..4934058 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,11 @@
VDR Plugin 'extrecmenu' Revision History
----------------------------------------
+2006-04-12: Version 0.12b
+- type of sorting (ascending/descending) selectable at the setup menu of the
+ plugin
+- 'Blue' also closes the info menu for a recording
+
2006-19-06: Version 0.12a
- fixed a bug if you compiled the plugin with support for the PIN-plugin;
thanks to Thiemo Gehrke for reporting
diff --git a/extrecmenu.c b/extrecmenu.c
index 585b103..eff656b 100644
--- a/extrecmenu.c
+++ b/extrecmenu.c
@@ -8,7 +8,7 @@
#include "i18n.h"
#include "tools.h"
-static const char *VERSION = "0.12a";
+static const char *VERSION = "0.12b";
static const char *DESCRIPTION = "Extended recordings menu";
static const char *MAINMENUENTRY = "ExtRecMenu";
@@ -93,33 +93,28 @@ cMenuSetupPage *cPluginExtrecmenu::SetupMenu(void)
bool cPluginExtrecmenu::SetupParse(const char *Name,const char *Value)
{
if(!strcasecmp(Name,"IsOrgRecMenu"))
- return (mysetup.ReplaceOrgRecMenu==false); // vdr-replace patch
+ return (mysetup.ReplaceOrgRecMenu==false); // vdr-replace patch
if(!strcasecmp(Name,"ShowRecDate"))
- mysetup.ShowRecDate=atoi(Value);
- else
- if(!strcasecmp(Name,"ShowRecTime"))
+ mysetup.ShowRecDate=atoi(Value);
+ else if(!strcasecmp(Name,"ShowRecTime"))
mysetup.ShowRecTime=atoi(Value);
- else
- if(!strcasecmp(Name,"ShowRecLength"))
- mysetup.ShowRecLength=atoi(Value);
- else
- if(!strcasecmp(Name,"HideMainMenuEntry"))
- mysetup.HideMainMenuEntry=atoi(Value);
- else
- if(!strcasecmp(Name,"ReplaceOrgRecMenu"))
- mysetup.ReplaceOrgRecMenu=atoi(Value);
- else
- if(!strcasecmp(Name,"PatchNew"))
- mysetup.PatchNew=atoi(Value);
- else
- if(!strcasecmp(Name,"ShowDvdNr"))
- mysetup.ShowDvdNr=atoi(Value);
- else
- if(!strcasecmp(Name,"ShowNewRecs"))
- mysetup.ShowNewRecs=atoi(Value);
- else
- return false;
+ else if(!strcasecmp(Name,"ShowRecLength"))
+ mysetup.ShowRecLength=atoi(Value);
+ else if(!strcasecmp(Name,"HideMainMenuEntry"))
+ mysetup.HideMainMenuEntry=atoi(Value);
+ else if(!strcasecmp(Name,"ReplaceOrgRecMenu"))
+ mysetup.ReplaceOrgRecMenu=atoi(Value);
+ else if(!strcasecmp(Name,"PatchNew"))
+ mysetup.PatchNew=atoi(Value);
+ else if(!strcasecmp(Name,"ShowDvdNr"))
+ mysetup.ShowDvdNr=atoi(Value);
+ else if(!strcasecmp(Name,"ShowNewRecs"))
+ mysetup.ShowNewRecs=atoi(Value);
+ else if(!strcasecmp(Name,"DescendSorting"))
+ mysetup.DescendSorting=atoi(Value);
+ else
+ return false;
return true;
}
diff --git a/i18n.c b/i18n.c
index f19504c..78e52f3 100644
--- a/i18n.c
+++ b/i18n.c
@@ -49,6 +49,28 @@ const tI18nPhrase Phrases[] = {
"",
"Otevřít",
},
+ { "Button$Back",
+ "Zurück",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ },
{ "Button$Cancel",
"Abbrechen",
"",
@@ -863,5 +885,71 @@ const tI18nPhrase Phrases[] = {
"",
"",
},
+ { "Sorting",
+ "Sortierung",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ },
+ { "ascending",
+ "aufsteigend",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ },
+ { "descending",
+ "absteigend",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ },
{ NULL }
};
diff --git a/mymenurecordings.c b/mymenurecordings.c
index 2733409..f59eb4b 100644
--- a/mymenurecordings.c
+++ b/mymenurecordings.c
@@ -35,7 +35,7 @@ myMenuRecordingInfo::myMenuRecordingInfo(const cRecording *Recording, bool WithB
recording=Recording;
withButtons=WithButtons;
if(withButtons)
- SetHelp(tr("Button$Play"),tr("Button$Rewind"));
+ SetHelp(tr("Button$Play"),tr("Button$Rewind"),NULL,tr("Button$Back"));
}
void myMenuRecordingInfo::Display(void)
@@ -72,6 +72,7 @@ eOSState myMenuRecordingInfo::ProcessKey(eKeys Key)
case kGreen: if(!withButtons)
break;
cRemote::Put(Key,true);
+ case kBlue:
case kOk: return osBack;
default: break;
}
@@ -364,6 +365,8 @@ myMenuRecordings::myMenuRecordings(const char *Base,int Level):cOsdMenu(Base?Bas
}
Set();
+
+
if(myReplayControl::LastReplayed())
Open();
@@ -530,6 +533,9 @@ bool myMenuRecordings::Open()
free(buffer);
return true;
}
+ printf("Open false\n");
+ if(item)
+ printf("%s\n",item->FileName());
return false;
}
diff --git a/mymenusetup.c b/mymenusetup.c
index 329631b..f35217d 100644
--- a/mymenusetup.c
+++ b/mymenusetup.c
@@ -15,6 +15,7 @@ mySetup::mySetup()
mysetup.ShowRecTime=1;
mysetup.ShowRecLength=0;
mysetup.ShowNewRecs=1;
+ mysetup.DescendSorting=0;
}
mySetup mysetup;
@@ -29,9 +30,14 @@ myMenuSetup::myMenuSetup()
showreclength=mysetup.ShowRecLength;
showdvdnr=mysetup.ShowDvdNr;
shownewrecs=mysetup.ShowNewRecs;
+ descendsorting=mysetup.DescendSorting;
+
+ sortingtypetexts[0]=tr("ascending");
+ sortingtypetexts[1]=tr("descending");
Add(new cMenuEditBoolItem(tr("Hide main menu entry"),&hidemainmenuentry));
Add(new cMenuEditBoolItem(tr("Replace original recordings menu"),&replaceorgrecmenu));
+ Add(new cMenuEditStraItem(tr("Sorting"),&descendsorting,2,sortingtypetexts));
Add(new cMenuEditBoolItem(tr("Show recording date"),&showrecdate));
Add(new cMenuEditBoolItem(tr("Show recording time"),&showrectime));
Add(new cMenuEditBoolItem(tr("Show recording length"),&showreclength));
@@ -50,4 +56,5 @@ void myMenuSetup::Store()
SetupStore("ShowRecTime",mysetup.ShowRecTime=showrectime);
SetupStore("ShowRecLength",mysetup.ShowRecLength=showreclength);
SetupStore("ShowNewRecs",mysetup.ShowNewRecs=shownewrecs);
+ SetupStore("DescendSorting",mysetup.DescendSorting=descendsorting);
}
diff --git a/mymenusetup.h b/mymenusetup.h
index 6763aee..e029b94 100644
--- a/mymenusetup.h
+++ b/mymenusetup.h
@@ -12,6 +12,7 @@ class mySetup
int PatchNew;
int ShowDvdNr;
int ShowNewRecs;
+ int DescendSorting;
};
extern mySetup mysetup;
@@ -19,7 +20,7 @@ extern mySetup mysetup;
class myMenuSetup:public cMenuSetupPage
{
private:
- const char *sortrecordstext[4];
+ const char *sortingtypetexts[2];
int showrecdate;
int showrectime;
int showreclength;
@@ -28,6 +29,7 @@ class myMenuSetup:public cMenuSetupPage
int patchnew;
int showdvdnr;
int shownewrecs;
+ int descendsorting;
protected:
virtual void Store();
public:
diff --git a/tools.c b/tools.c
index a21f6b6..d57bcb7 100644
--- a/tools.c
+++ b/tools.c
@@ -162,9 +162,18 @@ char *myRecListItem::StripEpisodeName(char *s)
}
t++;
}
- *s1=255;
+ if(mysetup.DescendSorting)
+ {
+ if(SortByName)
+ *s1=1;
+ else
+ *(s2+1)=255;
+ }
+ else
+ *s1=255;
+
if(s1&&s2&&!SortByName)
- memmove(s1+1,s2,t-s2+1);
+ memmove(s1+1,s2,t-s2+1);
return s;
}
@@ -176,7 +185,11 @@ int myRecListItem::Compare(const cListObject &ListObject)const
char *s1=StripEpisodeName(strdup(filename+strlen(VideoDirectory)));
char *s2=StripEpisodeName(strdup(item->filename+strlen(VideoDirectory)));
- int compare=strcasecmp(s1,s2);
+ int compare;
+ if(mysetup.DescendSorting)
+ compare=strcasecmp(s2,s1);
+ else
+ compare=strcasecmp(s1,s2);
free(s1);
free(s2);