mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
neutrino channellist: show matching rec- or stop button in dependency of selected item
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1720 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 05735e82cb
Author: Thilo Graf <dbt@novatux.de>
Date: 2011-10-01 (Sat, 01 Oct 2011)
Origin message was:
------------------
*neutrino channellist: show matching rec- or stop button in dependency of selected item
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1720 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1761,6 +1761,22 @@ void CChannelList::showChannelLogo()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define NUM_LIST_REC_BUTTON 1
|
||||||
|
struct button_label SRecButton[NUM_LIST_REC_BUTTON] =
|
||||||
|
{
|
||||||
|
{ NEUTRINO_ICON_BUTTON_RECORD_ACTIVE_16, LOCALE_MAINMENU_RECORDING}
|
||||||
|
};
|
||||||
|
#define NUM_LIST_REC_BUTTON_STOP 1
|
||||||
|
struct button_label SRecButtonStop[NUM_LIST_REC_BUTTON_STOP] =
|
||||||
|
{
|
||||||
|
{ NEUTRINO_ICON_BUTTON_STOP_16, LOCALE_MAINMENU_RECORDING_STOP}
|
||||||
|
};
|
||||||
|
#define NUM_LIST_REC_BUTTON_DISABLED 1
|
||||||
|
struct button_label SRecButtonDisabled[NUM_LIST_REC_BUTTON_DISABLED] =
|
||||||
|
{
|
||||||
|
{ NEUTRINO_ICON_BUTTON_RECORD_INACTIVE_16, NONEXISTANT_LOCALE}
|
||||||
|
};
|
||||||
|
|
||||||
void CChannelList::paintItem(int pos)
|
void CChannelList::paintItem(int pos)
|
||||||
{
|
{
|
||||||
int ypos = y+ theight+0 + pos*fheight;
|
int ypos = y+ theight+0 + pos*fheight;
|
||||||
@@ -1826,9 +1842,23 @@ void CChannelList::paintItem(int pos)
|
|||||||
r_icon_x = r_icon_x - s_icon_w;
|
r_icon_x = r_icon_x - s_icon_w;
|
||||||
|
|
||||||
//paint recording icon
|
//paint recording icon
|
||||||
if (CRecordManager::getInstance()->RecordingStatus(chanlist[curr]->channel_id))
|
bool do_rec = CRecordManager::getInstance()->RecordingStatus(chanlist[curr]->channel_id);
|
||||||
|
if (do_rec)
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_REC, r_icon_x - r_icon_w, ypos, fheight);//ypos + (fheight - 16)/2);
|
frameBuffer->paintIcon(NEUTRINO_ICON_REC, r_icon_x - r_icon_w, ypos, fheight);//ypos + (fheight - 16)/2);
|
||||||
|
|
||||||
|
//paint record and stop buttons
|
||||||
|
if (g_settings.recording_type != RECORDING_OFF)
|
||||||
|
{
|
||||||
|
int y_foot = y + (height - footerHeight);
|
||||||
|
int bb_w = width/2;
|
||||||
|
if (iscurrent && !do_rec)
|
||||||
|
::paintButtons(x+bb_w, y_foot, bb_w, NUM_LIST_REC_BUTTON, SRecButton, footerHeight);
|
||||||
|
else if (do_rec)
|
||||||
|
::paintButtons(x+bb_w, y_foot, bb_w, NUM_LIST_REC_BUTTON_STOP, SRecButtonStop, footerHeight);
|
||||||
|
else
|
||||||
|
::paintButtons(x+bb_w, y_foot, bb_w, NUM_LIST_REC_BUTTON_DISABLED, SRecButtonDisabled, footerHeight);
|
||||||
|
}
|
||||||
|
|
||||||
int icon_space = r_icon_w+s_icon_w;
|
int icon_space = r_icon_w+s_icon_w;
|
||||||
|
|
||||||
//number
|
//number
|
||||||
@@ -1977,15 +2007,15 @@ void CChannelList::paintHead()
|
|||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, width - timestr_len, name, COL_MENUHEAD, 0, true); // UTF-8
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+10,y+theight+0, width - timestr_len, name, COL_MENUHEAD, 0, true); // UTF-8
|
||||||
|
|
||||||
//foot/buttonbar
|
//foot/buttonbar
|
||||||
|
if (displayNext)
|
||||||
if (displayNext) {
|
|
||||||
CChannelListButtons[1].locale = LOCALE_INFOVIEWER_NOW;
|
CChannelListButtons[1].locale = LOCALE_INFOVIEWER_NOW;
|
||||||
} else {
|
else
|
||||||
CChannelListButtons[1].locale = LOCALE_INFOVIEWER_NEXT;
|
CChannelListButtons[1].locale = LOCALE_INFOVIEWER_NEXT;
|
||||||
}
|
|
||||||
|
|
||||||
|
//paint default buttons
|
||||||
int y_foot = y + (height - footerHeight);
|
int y_foot = y + (height - footerHeight);
|
||||||
::paintButtons(x, y_foot, width, NUM_LIST_BUTTONS, CChannelListButtons, footerHeight/*, (width - 20) / NUM_LIST_BUTTONS*/); //buttonwidth will set automaticly
|
::paintButtons(x, y_foot, width, NUM_LIST_BUTTONS, CChannelListButtons, footerHeight/*, (width - 20) / NUM_LIST_BUTTONS*/); //buttonwidth will set automaticly
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CChannelList::paint()
|
void CChannelList::paint()
|
||||||
|
Reference in New Issue
Block a user