mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
Merge branch 'cst-next' of git://coolstreamtech.de/cst-public-gui-neutrino into ni/cst-next
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1484a7fa94
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-13 (Sat, 13 Aug 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -2037,6 +2037,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
|
|||||||
|
|
||||||
TRACE("[mb]->new sorting %d,%s\n",m_settings.sorting.item,g_Locale->getText(m_localizedItemName[m_settings.sorting.item]));
|
TRACE("[mb]->new sorting %d,%s\n",m_settings.sorting.item,g_Locale->getText(m_localizedItemName[m_settings.sorting.item]));
|
||||||
refreshBrowserList();
|
refreshBrowserList();
|
||||||
|
refreshMovieInfo();
|
||||||
refreshFoot();
|
refreshFoot();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2325,19 +2326,20 @@ bool CMovieBrowser::onButtonPressMovieInfoList(neutrino_msg_t msg)
|
|||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CMovieBrowser::formatDeleteMsg(MI_MOVIE_INFO *movieinfo, Font *msgFont, const int boxWidth)
|
std::string CMovieBrowser::formatDeleteMsg(MI_MOVIE_INFO *movieinfo, int msgFont, const int boxWidth)
|
||||||
{
|
{
|
||||||
|
Font *msgFont_ = g_Font[msgFont];
|
||||||
int msgWidth = boxWidth - 20;
|
int msgWidth = boxWidth - 20;
|
||||||
std::string msg = g_Locale->getText(LOCALE_FILEBROWSER_DODELETE1);
|
std::string msg = g_Locale->getText(LOCALE_FILEBROWSER_DODELETE1);
|
||||||
msg += "\n";
|
msg += "\n";
|
||||||
|
|
||||||
if (!movieinfo->epgTitle.empty()) {
|
if (!movieinfo->epgTitle.empty()) {
|
||||||
int titleW = msgFont->getRenderWidth(movieinfo->epgTitle);
|
int titleW = msgFont_->getRenderWidth(movieinfo->epgTitle);
|
||||||
int infoW = 0;
|
int infoW = 0;
|
||||||
int zW = 0;
|
int zW = 0;
|
||||||
if (!movieinfo->epgInfo1.empty()) {
|
if (!movieinfo->epgInfo1.empty()) {
|
||||||
infoW = msgFont->getRenderWidth(movieinfo->epgInfo1);
|
infoW = msgFont_->getRenderWidth(movieinfo->epgInfo1);
|
||||||
zW = msgFont->getRenderWidth(" ()");
|
zW = msgFont_->getRenderWidth(" ()");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((titleW+infoW+zW) <= msgWidth) {
|
if ((titleW+infoW+zW) <= msgWidth) {
|
||||||
@@ -2374,7 +2376,7 @@ bool CMovieBrowser::onDeleteFile(MI_MOVIE_INFO *movieinfo, bool skipAsk)
|
|||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
/* default font for ShowMsg */
|
/* default font for ShowMsg */
|
||||||
Font *msgFont = g_Font[SNeutrinoSettings::FONT_TYPE_MENU];
|
int msgFont = SNeutrinoSettings::FONT_TYPE_MENU;
|
||||||
/* default width for ShowMsg */
|
/* default width for ShowMsg */
|
||||||
int msgBoxWidth = 450;
|
int msgBoxWidth = 450;
|
||||||
|
|
||||||
|
@@ -430,7 +430,7 @@ class CMovieBrowser : public CMenuTarget
|
|||||||
void onSetGUIWindowNext(void);
|
void onSetGUIWindowNext(void);
|
||||||
void onSetGUIWindowPrev(void);
|
void onSetGUIWindowPrev(void);
|
||||||
bool onDelete(bool cursor_only = false);
|
bool onDelete(bool cursor_only = false);
|
||||||
std::string formatDeleteMsg(MI_MOVIE_INFO *movieinfo, Font *msgFont, const int boxWidth = 450);
|
std::string formatDeleteMsg(MI_MOVIE_INFO *movieinfo, int msgFont, const int boxWidth = 450);
|
||||||
bool onDeleteFile(MI_MOVIE_INFO *movieinfo, bool skipAsk = false); // P4
|
bool onDeleteFile(MI_MOVIE_INFO *movieinfo, bool skipAsk = false); // P4
|
||||||
bool onSortMovieInfoHandleList(std::vector<MI_MOVIE_INFO*>& pv_handle_list, MB_INFO_ITEM sort_type, MB_DIRECTION direction);
|
bool onSortMovieInfoHandleList(std::vector<MI_MOVIE_INFO*>& pv_handle_list, MB_INFO_ITEM sort_type, MB_DIRECTION direction);
|
||||||
|
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
#include <linux/hdreg.h>
|
#include <linux/hdreg.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include <global.h>
|
||||||
#include <system/helpers.h>
|
#include <system/helpers.h>
|
||||||
#include <gui/update_ext.h>
|
#include <gui/update_ext.h>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@@ -567,21 +568,22 @@ std::string trim(std::string &str, const std::string &trimChars /*= " \n\r\t"*/)
|
|||||||
return result.erase(0, result.find_first_not_of(trimChars));
|
return result.erase(0, result.find_first_not_of(trimChars));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cutString(const std::string str, Font *msgFont, const int width)
|
std::string cutString(const std::string str, int msgFont, const int width)
|
||||||
{
|
{
|
||||||
|
Font *msgFont_ = g_Font[msgFont];
|
||||||
std::string ret = str;
|
std::string ret = str;
|
||||||
ret = trim(ret);
|
ret = trim(ret);
|
||||||
int sw = msgFont->getRenderWidth(ret);
|
int sw = msgFont_->getRenderWidth(ret);
|
||||||
if (sw <= width)
|
if (sw <= width)
|
||||||
return ret;
|
return ret;
|
||||||
else {
|
else {
|
||||||
std::string z = "...";
|
std::string z = "...";
|
||||||
int zw = msgFont->getRenderWidth(z);
|
int zw = msgFont_->getRenderWidth(z);
|
||||||
if (width <= 2*zw)
|
if (width <= 2*zw)
|
||||||
return ret;
|
return ret;
|
||||||
do {
|
do {
|
||||||
ret = ret.substr(0, ret.length()-1);
|
ret = ret.substr(0, ret.length()-1);
|
||||||
sw = msgFont->getRenderWidth(ret);
|
sw = msgFont_->getRenderWidth(ret);
|
||||||
} while (sw+zw > width);
|
} while (sw+zw > width);
|
||||||
ret = trim(ret) + z;
|
ret = trim(ret) + z;
|
||||||
}
|
}
|
||||||
|
@@ -37,8 +37,6 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <driver/fontrenderer.h>
|
|
||||||
|
|
||||||
int my_system(const char * cmd);
|
int my_system(const char * cmd);
|
||||||
int my_system(int argc, const char *arg, ...); /* argc is number of arguments including command */
|
int my_system(int argc, const char *arg, ...); /* argc is number of arguments including command */
|
||||||
|
|
||||||
@@ -71,7 +69,7 @@ std::string getFileName(std::string &file);
|
|||||||
std::string getFileExt(std::string &file);
|
std::string getFileExt(std::string &file);
|
||||||
std::string getNowTimeStr(const char* format);
|
std::string getNowTimeStr(const char* format);
|
||||||
std::string trim(std::string &str, const std::string &trimChars = " \n\r\t");
|
std::string trim(std::string &str, const std::string &trimChars = " \n\r\t");
|
||||||
std::string cutString(const std::string str, Font *msgFont, const int width);
|
std::string cutString(const std::string str, int msgFont, const int width);
|
||||||
std::string strftime(const char *format, const struct tm *tm);
|
std::string strftime(const char *format, const struct tm *tm);
|
||||||
std::string strftime(const char *format, time_t when, bool gm = false);
|
std::string strftime(const char *format, time_t when, bool gm = false);
|
||||||
time_t toEpoch(std::string &date);
|
time_t toEpoch(std::string &date);
|
||||||
|
Reference in New Issue
Block a user