summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2015-02-08 11:53:32 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2015-02-08 11:53:32 +0100
commit74f976317cb8c289e4efae8e227b738eacfea5b4 (patch)
tree837f430baa83b043fd7e77e4aca756990d5ebc2e
parentce51da5033e8bda4e19654483d5878b01b4381ef (diff)
downloadskin-flatplus-74f976317cb8c289e4efae8e227b738eacfea5b4.tar.gz
skin-flatplus-74f976317cb8c289e4efae8e227b738eacfea5b4.tar.bz2
[add] provide support for new SetMenuSortMode function, to show sort in menus
-rw-r--r--HISTORY1
-rw-r--r--baserender.c7
-rw-r--r--baserender.h1
-rw-r--r--displaymenu.c34
-rw-r--r--displaymenu.h2
-rw-r--r--icons/default/SortDate.pngbin0 -> 3010 bytes
-rw-r--r--icons/default/SortName.pngbin0 -> 2664 bytes
-rw-r--r--icons/default/SortNumber.pngbin0 -> 2767 bytes
-rw-r--r--icons/default/SortProvider.pngbin0 -> 3812 bytes
-rw-r--r--icons/default/SortUnknown.pngbin0 -> 3043 bytes
10 files changed, 43 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 7101962a..f5540771 100644
--- a/HISTORY
+++ b/HISTORY
@@ -16,6 +16,7 @@ VDR Plugin 'skinflatplus' Revision History
- [update] widgets: system_information.g2v, temperatures.g2v, temperatures.default
- [update] widgets: weather text size of temperature in long view
- [add] support for message text with parse tilde and extra text color
+- [add] provide support for new SetMenuSortMode function, to show sort in menus
2014-12-04: Version 0.5.0
- [fix] femon receiver - do not get data from previous channel
diff --git a/baserender.c b/baserender.c
index a60bcbc7..667f8371 100644
--- a/baserender.c
+++ b/baserender.c
@@ -147,8 +147,6 @@ void cFlatBaseRender::TopBarSetTitle(cString title) {
tobBarTitleExtra2 = "";
topBarExtraIcon = "";
topBarMenuIcon = "";
- topBarMenuIconRight = "";
- topBarMenuIconRightSet = false;
topBarUpdateTitle = true;
topBarExtraIconSet = false;
topBarMenuIconSet = false;
@@ -195,6 +193,11 @@ void cFlatBaseRender::TopBarSetMenuIconRight(cString icon) {
topBarUpdateTitle = true;
}
+void cFlatBaseRender::TopBarClearMenuIconRight(void) {
+ topBarMenuIconRight = "";
+ topBarMenuIconRightSet = false;
+}
+
void cFlatBaseRender::TopBarSetMenuLogo(cString icon) {
if( !strcmp(*icon, "") )
return;
diff --git a/baserender.h b/baserender.h
index 9a63f731..aef2b2f8 100644
--- a/baserender.h
+++ b/baserender.h
@@ -150,6 +150,7 @@ class cFlatBaseRender
void TopBarSetTitleExtra(cString extra1, cString extra2);
void TopBarSetMenuIcon(cString icon);
void TopBarSetMenuIconRight(cString icon);
+ void TopBarClearMenuIconRight(void);
void TopBarSetMenuLogo(cString icon);
void TopBarSetExtraIcon(cString icon);
void TopBarUpdate(void);
diff --git a/displaymenu.c b/displaymenu.c
index 6e6ff386..957b0f1b 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -224,6 +224,8 @@ void cFlatDisplayMenu::Clear(void) {
contentWidget.Clear();
+ TopBarClearMenuIconRight();
+
ShowRecording = ShowEvent = ShowText = false;
}
@@ -301,10 +303,12 @@ void cFlatDisplayMenu::SetTitle(const char *Title) {
}
TopBarSetTitle(*newTitle);
}
+ /*
if( RecordingsSortMode == rsmName )
TopBarSetMenuIconRight("menuIcons/RecsSortName");
else if( RecordingsSortMode == rsmTime )
TopBarSetMenuIconRight("menuIcons/RecsSortDate");
+ */
icon = "menuIcons/Recordings";
break;
case mcSetup:
@@ -3612,6 +3616,36 @@ const cFont *cFlatDisplayMenu::GetTextAreaFont(bool FixedFont) const {
return rfont;
}
+void cFlatDisplayMenu::SetMenuSortMode(eMenuSortMode MenuSortMode) {
+
+ cString sortIcon;
+ switch( MenuSortMode ) {
+ case msmUnknown:
+ sortIcon = "SortUnknown";
+ // do not set search icon if it is unknown
+ return;
+ break;
+ case msmNumber:
+ sortIcon = "SortNumber";
+ break;
+ case msmName:
+ sortIcon = "SortName";
+ break;
+ case msmTime:
+ sortIcon = "SortDate";
+ break;
+ case msmProvider:
+ sortIcon = "SortProvider";
+ break;
+ default:
+ sortIcon = "SortUnknown";
+ // do not set search icon if it is unknown
+ return;
+ }
+
+ TopBarSetMenuIconRight(sortIcon);
+}
+
void cFlatDisplayMenu::Flush(void) {
TopBarUpdate();
diff --git a/displaymenu.h b/displaymenu.h
index ef0257c5..721617c0 100644
--- a/displaymenu.h
+++ b/displaymenu.h
@@ -122,6 +122,8 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu {
virtual bool SetItemChannel(const cChannel *Channel, int Index, bool Current, bool Selectable, bool WithProvider);
virtual bool SetItemRecording(const cRecording *Recording, int Index, bool Current, bool Selectable, int Level, int Total, int New);
+ virtual void SetMenuSortMode(eMenuSortMode MenuSortMode);
+
virtual void SetScrollbar(int Total, int Offset);
virtual void SetEvent(const cEvent *Event);
virtual void SetRecording(const cRecording *Recording);
diff --git a/icons/default/SortDate.png b/icons/default/SortDate.png
new file mode 100644
index 00000000..d563cd9d
--- /dev/null
+++ b/icons/default/SortDate.png
Binary files differ
diff --git a/icons/default/SortName.png b/icons/default/SortName.png
new file mode 100644
index 00000000..daaf4258
--- /dev/null
+++ b/icons/default/SortName.png
Binary files differ
diff --git a/icons/default/SortNumber.png b/icons/default/SortNumber.png
new file mode 100644
index 00000000..4c1b354d
--- /dev/null
+++ b/icons/default/SortNumber.png
Binary files differ
diff --git a/icons/default/SortProvider.png b/icons/default/SortProvider.png
new file mode 100644
index 00000000..d9c5be27
--- /dev/null
+++ b/icons/default/SortProvider.png
Binary files differ
diff --git a/icons/default/SortUnknown.png b/icons/default/SortUnknown.png
new file mode 100644
index 00000000..18546cec
--- /dev/null
+++ b/icons/default/SortUnknown.png
Binary files differ