mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
Merge branch 'ni/tuxbox' into ni/mp/tuxbox
Origin commit data
------------------
Commit: d39dc75c6d
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-29 (Thu, 29 Dec 2016)
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include "cc_frm_scrollbar.h"
|
||||
#include "system/debug.h"
|
||||
|
@@ -24,6 +24,8 @@
|
||||
#ifndef __CC_FORM_SCROLLBAR_H__
|
||||
#define __CC_FORM_SCROLLBAR_H__
|
||||
|
||||
#include <global.h>
|
||||
|
||||
#include "cc_frm_chain.h"
|
||||
#include "cc_item_picture.h"
|
||||
|
||||
@@ -77,7 +79,7 @@ class CComponentsScrollBar : public CComponentsFrmChain
|
||||
*/
|
||||
CComponentsScrollBar( const int &x_pos,
|
||||
const int &y_pos,
|
||||
const int &w = 15,
|
||||
const int &w = SCROLLBAR_WIDTH,
|
||||
const int &h = 0,
|
||||
const int& count = 1,
|
||||
CComponentsForm *parent = NULL,
|
||||
|
@@ -78,8 +78,8 @@ CProgressBar::CProgressBar( const int x_pos,
|
||||
pb_active_col = active_col;
|
||||
pb_passive_col = passive_col;
|
||||
|
||||
pb_design = &g_settings.progressbar_design;
|
||||
pb_gradient = &g_settings.progressbar_gradient;
|
||||
pb_design = &g_settings.theme.progressbar_design;
|
||||
pb_gradient = &g_settings.theme.progressbar_gradient;
|
||||
pb_type = PB_REDLEFT;
|
||||
|
||||
pb_last_width = -1;
|
||||
@@ -449,7 +449,7 @@ void CProgressBar::paintProgress(bool do_save_bg)
|
||||
return;
|
||||
}
|
||||
if (pb_type == PB_TIMESCALE)
|
||||
setRgb(g_settings.progressbar_timescale_red, g_settings.progressbar_timescale_green, g_settings.progressbar_timescale_yellow);
|
||||
setRgb(g_settings.theme.progressbar_timescale_red, g_settings.theme.progressbar_timescale_green, g_settings.theme.progressbar_timescale_yellow);
|
||||
|
||||
if (!pb_red && !pb_yellow && !pb_green)
|
||||
pb_green = 1;
|
||||
@@ -471,7 +471,7 @@ void CProgressBar::paintProgress(bool do_save_bg)
|
||||
paintInit(do_save_bg);
|
||||
|
||||
//progress
|
||||
bool pb_invert = (pb_type == PB_REDRIGHT) || ((pb_type == PB_TIMESCALE) && g_settings.progressbar_timescale_invert);
|
||||
bool pb_invert = (pb_type == PB_REDRIGHT) || ((pb_type == PB_TIMESCALE) && g_settings.theme.progressbar_timescale_invert);
|
||||
|
||||
if (cc_allow_paint){
|
||||
if (!is_painted || (pb_active_width != pb_last_width)) {
|
||||
|
@@ -161,10 +161,10 @@ class CProgressBar : public CComponentsItem
|
||||
|
||||
void setType(pb_type_t type);
|
||||
|
||||
//set design (overides g_settings.progressbar_design)
|
||||
//set design (overides g_settings.theme.progressbar_design)
|
||||
void setDesign(int &design) { pb_design = &design; }
|
||||
|
||||
//set gradient (overides g_settings.progressbar_gradient)
|
||||
//set gradient (overides g_settings.theme.progressbar_gradient)
|
||||
void setGradient(int &gradient) { pb_gradient = &gradient; }
|
||||
};
|
||||
|
||||
|
@@ -92,10 +92,7 @@ void CComponentsText::initVarText( const int x_pos, const int y_pos, const int w
|
||||
width = width_old = w;
|
||||
height = height_old = h;
|
||||
|
||||
/* we need a minimal borderwith of 1px because the edge-smoothing
|
||||
(or fontrenderer?) otherwise will paint single pixels outside the
|
||||
defined area. e.g. 'j' is leaving such residues */
|
||||
ct_text_Hborder = 1;
|
||||
ct_text_Hborder = 0;
|
||||
ct_text_Vborder = 0;
|
||||
|
||||
shadow = shadow_mode;
|
||||
|
@@ -107,22 +107,22 @@ void CComponentsTimer::initThread()
|
||||
|
||||
void CComponentsTimer::stopThread()
|
||||
{
|
||||
//ensure disconnecting possible slots
|
||||
while (!sl_stop_timer.empty())
|
||||
sl_stop_timer.disconnect();
|
||||
|
||||
if(tm_thread) {
|
||||
int thres = pthread_cancel(tm_thread);
|
||||
if (thres != 0)
|
||||
dprintf(DEBUG_NORMAL,"\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_cancel\033[0m\n", __func__, __LINE__);
|
||||
dprintf(DEBUG_NORMAL,"\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_cancel, [%d]\033[0m\n", __func__, __LINE__, thres);
|
||||
|
||||
thres = pthread_join(tm_thread, NULL);
|
||||
|
||||
if (thres != 0)
|
||||
dprintf(DEBUG_NORMAL, "\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_join\033[0m\n", __func__, __LINE__);
|
||||
dprintf(DEBUG_NORMAL, "\033[33m[CComponentsTimer] [%s - %d] ERROR! pthread_join, [%d]\033[0m\n", __func__, __LINE__, thres);
|
||||
|
||||
if (thres == 0){
|
||||
if (thres == 0)
|
||||
tm_thread = 0;
|
||||
//ensure disconnect of unused slot
|
||||
while (!sl_stop_timer.empty())
|
||||
sl_stop_timer.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user