mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
Add channel list settings to channel list menu
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1872 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -52,6 +52,7 @@
|
|||||||
#include <gui/widget/menue.h>
|
#include <gui/widget/menue.h>
|
||||||
#include <gui/widget/messagebox.h>
|
#include <gui/widget/messagebox.h>
|
||||||
#include <gui/widget/progressbar.h>
|
#include <gui/widget/progressbar.h>
|
||||||
|
#include <gui/osd_setup.h>
|
||||||
|
|
||||||
#include <system/settings.h>
|
#include <system/settings.h>
|
||||||
#include <system/lastchannel.h>
|
#include <system/lastchannel.h>
|
||||||
@@ -345,6 +346,8 @@ int CChannelList::doChannelMenu(void)
|
|||||||
menu->addItem(new CMenuForwarder(LOCALE_EXTRA_ADD_TO_BOUQUET, true, NULL, selector, cnt, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW), old_selected == i++);
|
menu->addItem(new CMenuForwarder(LOCALE_EXTRA_ADD_TO_BOUQUET, true, NULL, selector, cnt, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW), old_selected == i++);
|
||||||
snprintf(cnt, sizeof(cnt), "%d", i);
|
snprintf(cnt, sizeof(cnt), "%d", i);
|
||||||
menu->addItem(new CMenuForwarder(LOCALE_FAVORITES_MENUEADD, true, NULL, selector, cnt, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE), old_selected == i++);
|
menu->addItem(new CMenuForwarder(LOCALE_FAVORITES_MENUEADD, true, NULL, selector, cnt, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE), old_selected == i++);
|
||||||
|
snprintf(cnt, sizeof(cnt), "%d", i);
|
||||||
|
menu->addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, selector, cnt, CRCInput::convertDigitToKey(0)), old_selected == i++);
|
||||||
menu->exec(NULL, "");
|
menu->exec(NULL, "");
|
||||||
delete menu;
|
delete menu;
|
||||||
delete selector;
|
delete selector;
|
||||||
@@ -428,6 +431,12 @@ int CChannelList::doChannelMenu(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 4: // settings
|
||||||
|
{
|
||||||
|
COsdSetup osd_setup;
|
||||||
|
osd_setup.showContextChanlistMenu();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@@ -642,3 +642,41 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int COsdSetup::showContextChanlistMenu()
|
||||||
|
{
|
||||||
|
static int cselected = -1;
|
||||||
|
|
||||||
|
CMenuWidget * menu_chanlist = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width);
|
||||||
|
menu_chanlist->setSelected(cselected);
|
||||||
|
|
||||||
|
menu_chanlist->addIntroItems(LOCALE_MISCSETTINGS_CHANNELLIST);
|
||||||
|
|
||||||
|
menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_EPGTEXT_ALIGN, &g_settings.channellist_epgtext_align_right, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS, CHANNELLIST_EPGTEXT_ALIGN_RIGHT_OPTIONS_COUNT, true));
|
||||||
|
menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_EXTENDED, &g_settings.channellist_extended, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||||
|
menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_CHANNELLIST_FOOT, &g_settings.channellist_foot, CHANNELLIST_FOOT_OPTIONS, CHANNELLIST_FOOT_OPTIONS_COUNT, true));
|
||||||
|
menu_chanlist->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_CHANNELLIST_COLORED_EVENTS, &g_settings.colored_events_channellist, OPTIONS_COLORED_EVENTS_OPTIONS, OPTIONS_COLORED_EVENTS_OPTION_COUNT, true));
|
||||||
|
|
||||||
|
/* TODO ? problems:
|
||||||
|
* 1. channel list not re-calc sizes after menu;
|
||||||
|
* 2. font menu smaller and make hole in channel list */
|
||||||
|
#if 0
|
||||||
|
CMenuWidget *fontSettingsSubMenu = new CMenuWidget(LOCALE_FONTMENU_HEAD, NEUTRINO_ICON_KEYBINDING);
|
||||||
|
|
||||||
|
int i = 1;
|
||||||
|
fontSettingsSubMenu->addIntroItems(font_sizes_groups[i].groupname);
|
||||||
|
|
||||||
|
for (unsigned int j = 0; j < font_sizes_groups[i].count; j++)
|
||||||
|
{
|
||||||
|
AddFontSettingItem(*fontSettingsSubMenu, font_sizes_groups[i].content[j]);
|
||||||
|
}
|
||||||
|
fontSettingsSubMenu->addItem(GenericMenuSeparatorLine);
|
||||||
|
fontSettingsSubMenu->addItem(new CMenuForwarder(LOCALE_OPTIONS_DEFAULT, true, NULL, this, font_sizes_groups[i].actionkey));
|
||||||
|
menu_chanlist->addItem(new CMenuForwarder(LOCALE_FONTMENU_HEAD, true, NULL, fontSettingsSubMenu, "", CRCInput::convertDigitToKey(0)));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int res = menu_chanlist->exec(NULL, "");
|
||||||
|
menu_chanlist->hide();
|
||||||
|
cselected = menu_chanlist->getSelected();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
@@ -87,6 +87,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver
|
|||||||
~COsdSetup();
|
~COsdSetup();
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/);
|
bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/);
|
||||||
|
int showContextChanlistMenu();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user