From 30fb5e2f60027ce018d9850dc4e17d20134b1b67 Mon Sep 17 00:00:00 2001 From: Christian Schuett Date: Mon, 30 Dec 2013 23:25:26 +0100 Subject: [PATCH] Neutrino menu forwarder: add possibility to show value from jump target based on idea by martii in Neutrino-MP Git Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7d041133076280eba01e136065cedd8bc9d43868 Author: Christian Schuett Date: 2013-12-30 (Mon, 30 Dec 2013) ------------------ This commit was generated by Migit --- src/gui/widget/menue.cpp | 10 +++++----- src/gui/widget/menue.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 8c0300681..f3af34176 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1789,11 +1789,11 @@ const char * CMenuForwarder::getOption(void) { if (option) return option; - else - if (option_string) - return option_string->c_str(); - else - return NULL; + if (option_string) + return option_string->c_str(); + if (jumpTarget) + return jumpTarget->getTargetValue(); + return NULL; } const char * CMenuForwarder::getName(void) diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 886f501bd..28e5d0bb4 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -79,6 +79,7 @@ class CMenuTarget virtual void hide(){} virtual int exec(CMenuTarget* parent, const std::string & actionKey) = 0; virtual fb_pixel_t getColor(void) { return 0; } + virtual const char * getTargetValue() { return NULL; } }; class CMenuItem