From 994401432cae3c6063345ca374490146bfaf040e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 23 Nov 2016 09:06:11 +0100 Subject: [PATCH 1/3] CRecordManager: add methode to get internal rec map Useful for access to current record data. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/8ba357fcb21b874b41ded1085e355bb25a3084ac Author: Thilo Graf Date: 2016-11-23 (Wed, 23 Nov 2016) --- src/driver/record.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/driver/record.h b/src/driver/record.h index 476f92de8..1683346b3 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -203,6 +203,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/ bool StopAutoRecord(bool lock = true); void StopAutoTimer(); bool CheckRecordingId_if_Timeshift(int recid); + recmap_t GetRecordMap()const{return recmap;} MI_MOVIE_INFO * GetMovieInfo(const t_channel_id channel_id, bool timeshift = true); const std::string GetFileName(const t_channel_id channel_id, bool timeshift = true); From 5474e555a8ad3324950ab05bac181eaca6bce9c9 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 23 Nov 2016 10:04:50 +0100 Subject: [PATCH 2/3] CComponentsWindow: remove default values from internal init method Is not really required for this private member. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4e1a3a89dc9c122cc0584505dcf8e5783aeae06e Author: Thilo Graf Date: 2016-11-23 (Wed, 23 Nov 2016) --- src/gui/components/cc_frm_window.cpp | 2 +- src/gui/components/cc_frm_window.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 982219e1b..a7c84cba3 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -59,7 +59,7 @@ using namespace std; //sub class CComponentsWindow inherit from CComponentsForm CComponentsWindow::CComponentsWindow(CComponentsForm *parent) { - initVarWindow(0, 0, 800, 600, "", "", parent); + initVarWindow(0, 0, 800, 600, "", "", parent, CC_SHADOW_OFF, COL_FRAME_PLUS_0, COL_MENUCONTENT_PLUS_0, COL_SHADOW_PLUS_0); } CComponentsWindow::CComponentsWindow( const int& x_pos, const int& y_pos, const int& w, const int& h, diff --git a/src/gui/components/cc_frm_window.h b/src/gui/components/cc_frm_window.h index ca2fb296e..7b2f71796 100644 --- a/src/gui/components/cc_frm_window.h +++ b/src/gui/components/cc_frm_window.h @@ -107,14 +107,14 @@ class CComponentsWindow : public CComponentsForm ///initialze all window objects at once void initCCWItems(); ///initialize all attributes - void initVarWindow( const int& x_pos = CC_CENTERED, const int& y_pos = CC_CENTERED, const int& w = 0, const int& h = 0, - const std::string& caption = "", - const std::string& iconname = "", - CComponentsForm *parent = NULL, - int shadow_mode = CC_SHADOW_OFF, - fb_pixel_t color_frame = COL_FRAME_PLUS_0, - fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, - fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + void initVarWindow( const int& x_pos, const int& y_pos, const int& w, const int& h, + const std::string& caption, + const std::string& iconname, + CComponentsForm *parent, + int shadow_mode, + fb_pixel_t color_frame, + fb_pixel_t color_body, + fb_pixel_t color_shadow); ///initialize width and height void initWindowSize(); ///initialize position From e10e0583ae5af414924d50df0365720c375c9eb4 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 23 Nov 2016 10:33:58 +0100 Subject: [PATCH 3/3] CComponentsItem: fix possible negativ value for box radius If frame width > 0 and radius too small, we have an negative value. This should prevent this. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ee4a443c8a4c702b4a2da645fffb4ad3b772dd37 Author: Thilo Graf Date: 2016-11-23 (Wed, 23 Nov 2016) --- src/gui/components/cc_item.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 10147f6cf..d695cbdf1 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -86,7 +86,7 @@ void CComponentsItem::paintInit(bool do_save_bg) sw = max(0, sw); //set current needed corner main box radius - int box_rad = corner_rad; + int box_rad = corner_type ? corner_rad : 0; //and ensure max main box radius < dimensions if (2*box_rad > dy) @@ -186,7 +186,7 @@ void CComponentsItem::paintInit(bool do_save_bg) {sh_ctr, CC_FBDATA_TYPE_SHADOW_BOX, sh_ctr_x-sw, sh_ctr_y-sw+th, sh_cdx, sh_cdy-sh_cdy_size_offset+sw, col_shadow_clean, box_rad, corner_type & CORNER_TOP_RIGHT, 0, NULL, NULL, NULL, false}, //main box - {true, CC_FBDATA_TYPE_BOX, ix+th, iy+th, dx-2*th, dy-2*th, col_body, box_rad-th, corner_type, 0, NULL, NULL, NULL, false}, + {true, CC_FBDATA_TYPE_BOX, ix+th, iy+th, dx-2*th, dy-2*th, col_body, max(0,box_rad-th), corner_type, 0, NULL, NULL, NULL, false}, //frame {true, CC_FBDATA_TYPE_FRAME, ix, iy, dx, dy, col_frame_cur, box_rad, corner_type, th, NULL, NULL, NULL, false}