Skip to content

Commit

Permalink
whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
atefganm authored Dec 7, 2023
1 parent 19653b4 commit 21dc17f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
32 changes: 16 additions & 16 deletions lib/service/listboxservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,21 +262,21 @@ int eListboxServiceContent::getPrevMarkerPos()
if (i->flags == eServiceReference::isMarker)
break;
}

//eDebug("[eListboxServiceContent] prevMarkerIndex= %i; curSelIndex= %i; index= %i", cursorResolve(prevMarkerIndex), cursorResolve(m_cursor_number), index);

// if currently selected service is not the first after the marker found - return the found marker index
if (cursorResolve(index) + 1 != cursorResolve(m_cursor_number)) return cursorResolve(index);


while (index)
{
--i;
--index;
if (i->flags == eServiceReference::isMarker)
break;
}

return cursorResolve(index);
}

Expand Down Expand Up @@ -690,7 +690,7 @@ bool eListboxServiceContent::checkServiceIsRecorded(eServiceReference ref)
else {
if (compareServices(ref, it->second, m_alternative_record_match))
return true;
}
}
}
return false;
}
Expand Down Expand Up @@ -788,7 +788,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
eServiceReference ref = *m_cursor;
std::string orig_ref_str = ref.toString();
std::string service_res_str = toLower(split(orig_ref_str, ":")[2]);

bool isBackupAvailable = false;
int catchUpDays = 0;
if (orig_ref_str.find("@") != std::string::npos) {
Expand All @@ -798,7 +798,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
if (orig_ref_str.find("|<|") != std::string::npos) {
catchUpDays = std::stoi(split(split(orig_ref_str, "|<|")[1], "@")[0]);
}

/* get service information */
ePtr<iStaticServiceInformation> service_info;
m_service_center->info(ref, service_info);
Expand Down Expand Up @@ -866,9 +866,9 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
yoffs = 5;
}
if (!isMarker && !isDirectory) {
ePtr<gPixmap> &pixmap = service_res_str == "1f" ? m_pixmaps[pic4K] : (service_res_str == "19" || service_res_str == "11") ?
ePtr<gPixmap> &pixmap = service_res_str == "1f" ? m_pixmaps[pic4K] : (service_res_str == "19" || service_res_str == "11") ?
m_pixmaps[picHD] : m_pixmaps[picSD];

if (pixmap)
{
eSize pixmap_size = pixmap->size();
Expand Down Expand Up @@ -963,7 +963,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
}
}
xoffs = xoffset + 16;

if (hasPicon)
{
eRect piconArea = eRect(xoffs, offset.y(), 125, m_itemheight);
Expand Down Expand Up @@ -1026,7 +1026,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
eSize pixmap_size = pixmap_mDir->size();
if (pixmap_size.width() < 125 || pixmap_size.height() < m_itemheight)
xoffsMarker = xoffs + pixmap_size.width() + 16;
}
}
}

ePtr<eTextPara> para = new eTextPara(eRect(0, 0, xlpos - xoffsMarker, m_itemheight/2));
Expand All @@ -1035,7 +1035,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
eRect bbox = para->getBoundBox();
painter.renderPara(para, ePoint(xoffsMarker - correction, offset.y() + yoffs + ((ctrlHeight - bbox.height())/2)));


if (isDirectory || (isMarker && !m_marker_as_line)) {
if (pixmap_mDir) {
eSize pixmap_size = pixmap_mDir->size();
Expand All @@ -1059,7 +1059,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
eRect secondLineRect = eRect(secondLineOffset, offset.y() + (m_itemheight - m_marker_as_line) / 2, m_itemsize.width() - secondLineOffset - 16 - 8, m_marker_as_line);
painter.fill(secondLineRect);
}


// event name
if (is_event)
Expand All @@ -1069,7 +1069,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
event_duration = evt->getDuration();
int timeLeft = event_begin + event_duration - now;
eRect progressBarRect = m_element_position[celServiceEventProgressbar];

if (!event_name.empty())
{
//--------------------------------------------------- Event Progressbar -----------------------------------------------------------------
Expand Down Expand Up @@ -1174,7 +1174,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
}
}
} else {

// Single line mode goes here
if (service_info)
service_info->getName(ref, text);
Expand Down Expand Up @@ -1393,7 +1393,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const

if (m_crypto_icon_mode == 2 && m_pixmaps[picCrypto] && service_info && service_info->isCrypted()) {
pixmap_crypto_size = m_pixmaps[picCrypto]->size();
iconRecordPosX += pixmap_crypto_size.width() + m_items_distances;
iconRecordPosX += pixmap_crypto_size.width() + m_items_distances;
iconOffsX += pixmap_crypto_size.width() + m_items_distances;
xoffs = iconOffsX;
}
Expand Down Expand Up @@ -1537,7 +1537,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
}
}
}
}
}
}
painter.clippop();
}
2 changes: 1 addition & 1 deletion lib/service/listboxservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class eListboxServiceContent: public virtual iListboxContent

void setTextSeparator(const std::string &string) { m_separator = string; }
void setMarkerTextAlignment(const std::string &string) { m_marker_alignment = string; } // currently supports left and center
void setMarkerLineColor(const gRGB &col) {
void setMarkerLineColor(const gRGB &col) {
m_markerline_color = col;
m_markerline_color_set = 1;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/service/servicedvb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2487,7 +2487,7 @@ bool eDVBServiceBase::tryFallbackTuner(eServiceReferenceDVB &service, bool &is_s
service = eServiceReferenceDVB(remote_service_ref.str());

is_stream = true;

// m_is_streamx = true; // used by decoder.cpp to stop tuxtxt logging on text pid for streams

return true;
Expand Down Expand Up @@ -3097,7 +3097,7 @@ void eDVBServicePlay::updateDecoder(bool sendSeekableStateChanged)
{
selectAudioStream();
}

if (!(m_is_pvr || m_is_stream || m_timeshift_active))
m_decoder->setSyncPCR(pcrpid);
else
Expand Down Expand Up @@ -3644,7 +3644,7 @@ void eDVBServicePlay::newDVBSubtitlePage(const eDVBSubtitlePage &p)

// Where subtitles are delivered out of sync with video, only treat subtitles in the past as having bad timing.
// Those that are delivered too early are cached for displaying at the appropriate later time
// Note that this can be due to buggy drivers, as well as problems with the broadcast
// Note that this can be due to buggy drivers, as well as problems with the broadcast
if (pos-p.m_show_time > 1800000 && (m_is_pvr || m_timeshift_enabled))
{
// Subtitles delivered over 20 seconds too late
Expand Down
2 changes: 1 addition & 1 deletion lib/service/servicedvd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ void eServiceDVD::saveCuesheet()
if (stat("/home/root", &st) == 0 && stat(filename.c_str(), &st) != 0)
if (mkdir(filename.c_str(), 0755))
return; // cannot create directory so no point in trying to save cue data

filename += "/";
if (m_ddvd_titlestring[0] != '\0')
filename += m_ddvd_titlestring;
Expand Down
2 changes: 1 addition & 1 deletion lib/service/servicets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ RESULT eServiceTS::start()
m_streamthread = new eStreamThread();
CONNECT(m_streamthread->m_event, eServiceTS::recv_event);
m_decoder->pause();
if (unpause() != 0)
if (unpause() != 0)
return -1;
m_event(this, evStart);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/service/servicewebts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void eServiceWebTS::recv_event(int evt)
m_decoder->pause();
m_event(this, evStart);
m_decoder->play();

}
bool wasnull = !m_audioInfo;
m_streamthread->getAudioInfo(m_audioInfo);
Expand Down

0 comments on commit 21dc17f

Please sign in to comment.