Renamed cStatus::Osd*2() to cStatus::Osd*()

This commit is contained in:
Klaus Schmidinger
2025-03-02 21:02:12 +01:00
parent 885f7414c1
commit 8d0e33a211
5 changed files with 25 additions and 21 deletions

View File

@@ -10096,3 +10096,5 @@ Video Disk Recorder Revision History
Plugins may want to do the same, but don't have to. Plugins may want to do the same, but don't have to.
- Removed -Werror=overloaded-virtual from Makefile and Make.config(.template). - Removed -Werror=overloaded-virtual from Makefile and Make.config(.template).
Plugins may want to do the same, but don't have to. Plugins may want to do the same, but don't have to.
- Renamed cStatus::Osd*2() to cStatus::Osd*().
Plugins that use these recently introduced functions need to remove the '2' from the name.

View File

@@ -83,3 +83,7 @@ VDR Plugin 'status' Revision History
- Activated logging of OsdItem2(). - Activated logging of OsdItem2().
- Added cStatus::OsdCurrentItem2(). - Added cStatus::OsdCurrentItem2().
- Added cStatus::OsdStatusMessage2(). - Added cStatus::OsdStatusMessage2().
2025-03-02: Version 2.6.2
- Renamed cStatus::Osd*2() to cStatus::Osd*().

View File

@@ -3,13 +3,13 @@
* *
* See the README file for copyright information and how to reach the author. * See the README file for copyright information and how to reach the author.
* *
* $Id: status.c 5.5 2025/03/02 11:03:35 kls Exp $ * $Id: status.c 5.6 2025/03/02 21:02:12 kls Exp $
*/ */
#include <vdr/plugin.h> #include <vdr/plugin.h>
#include <vdr/status.h> #include <vdr/status.h>
static const char *VERSION = "2.6.1"; static const char *VERSION = "2.6.2";
static const char *DESCRIPTION = "Status monitor test"; static const char *DESCRIPTION = "Status monitor test";
static const char *MAINMENUENTRY = NULL; static const char *MAINMENUENTRY = NULL;
@@ -27,10 +27,10 @@ protected:
virtual void SetSubtitleTrack(int Index, const char * const *Tracks) override; virtual void SetSubtitleTrack(int Index, const char * const *Tracks) override;
virtual void OsdClear(void) override; virtual void OsdClear(void) override;
virtual void OsdTitle(const char *Title) override; virtual void OsdTitle(const char *Title) override;
virtual void OsdStatusMessage2(eMessageType Type, const char *Message) override; virtual void OsdStatusMessage(eMessageType Type, const char *Message) override;
virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) override; virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) override;
virtual void OsdItem2(const char *Text, int Index, bool Selectable) override; virtual void OsdItem(const char *Text, int Index, bool Selectable) override;
virtual void OsdCurrentItem2(const char *Text, int Index) override; virtual void OsdCurrentItem(const char *Text, int Index) override;
virtual void OsdTextItem(const char *Text, bool Scroll) override; virtual void OsdTextItem(const char *Text, bool Scroll) override;
virtual void OsdChannel(const char *Text) override; virtual void OsdChannel(const char *Text) override;
virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle) override; virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle) override;
@@ -86,9 +86,9 @@ void cStatusTest::OsdTitle(const char *Title)
dsyslog("status: cStatusTest::OsdTitle '%s'", Title); dsyslog("status: cStatusTest::OsdTitle '%s'", Title);
} }
void cStatusTest::OsdStatusMessage2(eMessageType Type, const char *Message) void cStatusTest::OsdStatusMessage(eMessageType Type, const char *Message)
{ {
dsyslog("status: cStatusTest::OsdStatusMessage2 %d '%s'", Type, Message); dsyslog("status: cStatusTest::OsdStatusMessage %d '%s'", Type, Message);
} }
void cStatusTest::OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) void cStatusTest::OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue)
@@ -96,12 +96,12 @@ void cStatusTest::OsdHelpKeys(const char *Red, const char *Green, const char *Ye
dsyslog("status: cStatusTest::OsdHelpKeys %s - %s - %s - %s", Red, Green, Yellow, Blue); dsyslog("status: cStatusTest::OsdHelpKeys %s - %s - %s - %s", Red, Green, Yellow, Blue);
} }
void cStatusTest::OsdItem2(const char *Text, int Index, bool Selected) void cStatusTest::OsdItem(const char *Text, int Index, bool Selected)
{ {
dsyslog("status: cStatusTest::OsdItem2 %s %d %d", Text, Index, Selected); dsyslog("status: cStatusTest::OsdItem %s %d %d", Text, Index, Selected);
} }
void cStatusTest::OsdCurrentItem2(const char *Text, int Index) void cStatusTest::OsdCurrentItem(const char *Text, int Index)
{ {
dsyslog("status: cStatusTest::OsdCurrentItem %s %d", Text, Index); dsyslog("status: cStatusTest::OsdCurrentItem %s %d", Text, Index);
} }

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: status.c 5.3 2025/02/12 21:18:53 kls Exp $ * $Id: status.c 5.4 2025/03/02 21:02:12 kls Exp $
*/ */
#include "status.h" #include "status.h"
@@ -98,7 +98,7 @@ void cStatus::MsgOsdTitle(const char *Title)
void cStatus::MsgOsdStatusMessage(eMessageType Type, const char *Message) void cStatus::MsgOsdStatusMessage(eMessageType Type, const char *Message)
{ {
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdStatusMessage2(Type, Message); sm->OsdStatusMessage(Type, Message);
} }
void cStatus::MsgOsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) void cStatus::MsgOsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue)
@@ -110,13 +110,13 @@ void cStatus::MsgOsdHelpKeys(const char *Red, const char *Green, const char *Yel
void cStatus::MsgOsdItem(const char *Text, int Index, bool Selectable) void cStatus::MsgOsdItem(const char *Text, int Index, bool Selectable)
{ {
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdItem2(Text, Index, Selectable); sm->OsdItem(Text, Index, Selectable);
} }
void cStatus::MsgOsdCurrentItem(const char *Text, int Index) void cStatus::MsgOsdCurrentItem(const char *Text, int Index)
{ {
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->OsdCurrentItem2(Text, Index); sm->OsdCurrentItem(Text, Index);
} }
void cStatus::MsgOsdTextItem(const char *Text, bool Scroll) void cStatus::MsgOsdTextItem(const char *Text, bool Scroll)

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: status.h 5.4 2025/03/02 11:03:35 kls Exp $ * $Id: status.h 5.5 2025/03/02 21:02:12 kls Exp $
*/ */
#ifndef __STATUS_H #ifndef __STATUS_H
@@ -82,21 +82,19 @@ protected:
virtual void OsdTitle(const char *Title) {} virtual void OsdTitle(const char *Title) {}
// Title has been displayed in the title line of the menu. // Title has been displayed in the title line of the menu.
virtual void OsdStatusMessage(const char *Message) {} virtual void OsdStatusMessage(const char *Message) {}
virtual void OsdStatusMessage2(eMessageType Type, const char *Message) { OsdStatusMessage(Message); } virtual void OsdStatusMessage(eMessageType Type, const char *Message) { OsdStatusMessage(Message); }
// Message has been displayed in the status line of the menu. // Message has been displayed in the status line of the menu.
// If Message is NULL, the status line has been cleared. // If Message is NULL, the status line has been cleared.
virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) {} virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue) {}
// The help keys have been set to the given values (may be NULL). // The help keys have been set to the given values (may be NULL).
virtual void OsdItem(const char *Text, int Index) {} virtual void OsdItem(const char *Text, int Index) {}
// The OSD displays the given single line Text as menu item at Index. virtual void OsdItem(const char *Text, int Index, bool Selectable) { OsdItem(Text, Index); }
virtual void OsdItem2(const char *Text, int Index, bool Selectable) { OsdItem(Text, Index); }
// The OSD displays the given single line Text as menu item at Index. // The OSD displays the given single line Text as menu item at Index.
// Selectable is true if this item can be selected. // Selectable is true if this item can be selected.
virtual void OsdCurrentItem(const char *Text) {} virtual void OsdCurrentItem(const char *Text) {}
virtual void OsdCurrentItem(const char *Text, int Index) { OsdCurrentItem(Text); }
// The OSD displays the given single line Text as the current menu item. // The OSD displays the given single line Text as the current menu item.
virtual void OsdCurrentItem2(const char *Text, int Index) { OsdCurrentItem(Text); } // Index is the one that was given in OsdItem() for this item.
// The OSD displays the given single line Text as the current menu item.
// Index is the one that was given in OsdItem[2]() for this item.
virtual void OsdTextItem(const char *Text, bool Scroll) {} virtual void OsdTextItem(const char *Text, bool Scroll) {}
// The OSD displays the given multi line text. If Text points to an // The OSD displays the given multi line text. If Text points to an
// actual string, that text shall be displayed and Scroll has no // actual string, that text shall be displayed and Scroll has no