Project "Tuxbox-GIT: apps":

The branch, master has been updated
       via  d5d8a55075111ff8eb52162980ce66f1cdeaaf2d (commit)
       via  a7f1eea4f36bd51b2a8e2c1eef9c4bb02c82f03f (commit)
      from  e2d920c55095f45c80d882089f1a178ca7582cc1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d5d8a55075111ff8eb52162980ce66f1cdeaaf2d
Author: Stefan Seyfried <se...@tuxbox-git.slipkontur.de>
Date:   Tue Feb 10 19:51:23 2015 +0100

    Neutrino filebrowser, moviebrowser, pictureviewer: clarify error message
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: GetAway <get-a...@t-online.de>

diff --git a/tuxbox/neutrino/src/gui/filebrowser.cpp 
b/tuxbox/neutrino/src/gui/filebrowser.cpp
index 55e7dd4..e7fff11 100644
--- a/tuxbox/neutrino/src/gui/filebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/filebrowser.cpp
@@ -723,7 +723,7 @@ bool CFileBrowser::readDir_std(const std::string & dirname, 
CFileList* flist)
 
 //                     printf("file.Name: '%s', getFileName: '%s' getPath: 
'%s'\n",file.Name.c_str(),file.getFileName().c_str(),file.getPath().c_str());
                        if(my_stat((file.Name).c_str(),&statbuf) != 0)
-                               perror("stat error");
+                               fprintf(stderr, "stat '%s' error: %m\n", 
file.Name.c_str());
                        else
                        {
                                file.Mode = statbuf.st_mode;
diff --git a/tuxbox/neutrino/src/gui/moviebrowser.cpp 
b/tuxbox/neutrino/src/gui/moviebrowser.cpp
index ef64780..1eb1cf1 100644
--- a/tuxbox/neutrino/src/gui/moviebrowser.cpp
+++ b/tuxbox/neutrino/src/gui/moviebrowser.cpp
@@ -2677,7 +2677,7 @@ bool CMovieBrowser::readDir_std(const std::string & 
dirname, CFileList* flist)
 
 //                     printf("file.Name: '%s', getFileName: '%s' getPath: 
'%s'\n",file.Name.c_str(),file.getFileName().c_str(),file.getPath().c_str());
                        if(my_stat((file.Name).c_str(),&statbuf) != 0)
-                               perror("stat error");
+                               fprintf(stderr, "stat '%s' error: %m\n", 
file.Name.c_str());
                        else
                        {
                                file.Mode = statbuf.st_mode;
diff --git a/tuxbox/neutrino/src/gui/pictureviewer.cpp 
b/tuxbox/neutrino/src/gui/pictureviewer.cpp
index a58c66c..a95024e 100644
--- a/tuxbox/neutrino/src/gui/pictureviewer.cpp
+++ b/tuxbox/neutrino/src/gui/pictureviewer.cpp
@@ -363,7 +363,7 @@ int CPictureViewerGui::show()
                                                        pic.Type     = 
tmp.substr(tmp.rfind('.')+1);
                                                        struct stat statbuf;
                                                        
if(stat(pic.Filename.c_str(),&statbuf) != 0)
-                                                               printf("stat 
error");
+                                                               fprintf(stderr, 
"stat '%s' error: %m\n", pic.Filename.c_str());
                                                        pic.Date     = 
statbuf.st_mtime;
                                                        playlist.push_back(pic);
                                                }

commit a7f1eea4f36bd51b2a8e2c1eef9c4bb02c82f03f
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Tue Feb 10 19:44:12 2015 +0100

    Neutrino picture viewer: respect UTF-8 filesystems
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: GetAway <get-a...@t-online.de>

diff --git a/tuxbox/neutrino/src/gui/pictureviewer.cpp 
b/tuxbox/neutrino/src/gui/pictureviewer.cpp
index 25aede2..a58c66c 100644
--- a/tuxbox/neutrino/src/gui/pictureviewer.cpp
+++ b/tuxbox/neutrino/src/gui/pictureviewer.cpp
@@ -44,6 +44,7 @@
 
 #include <daemonc/remotecontrol.h>
 
+#include <driver/encoding.h>
 #include <driver/fontrenderer.h>
 #include <driver/rcinput.h>
 #include <driver/screen_max.h>
@@ -357,6 +358,7 @@ int CPictureViewerGui::show()
                                                        CPicture pic;
                                                        pic.Filename = 
files->Name;
                                                        std::string tmp   = 
files->Name.substr(files->Name.rfind('/')+1);
+                                                       tmp          = 
FILESYSTEM_ENCODING_TO_UTF8_STRING(tmp);
                                                        pic.Name     = 
tmp.substr(0,tmp.rfind('.'));
                                                        pic.Type     = 
tmp.substr(tmp.rfind('.')+1);
                                                        struct stat statbuf;
@@ -554,11 +556,11 @@ void CPictureViewerGui::paintItem(int pos)
                char timestring[18];
                strftime(timestring, 18, "%d-%m-%Y %H:%M", 
gmtime(&playlist[liststart+pos].Date));
                int w = 
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(timestring);
-               
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,ypos+fheight, 
width-30 - w, tmp, color, fheight);
+               
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,ypos+fheight, 
width-30 - w, tmp, color, fheight, true); // UTF-8
                
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+width-20-w,ypos+fheight,
 w, timestring, color, fheight);
                if (liststart+pos == selected)
                {
-                       CLCD::getInstance()->showMenuText(0, tmp.c_str());
+                       CLCD::getInstance()->showMenuText(0, tmp.c_str(), -1, 
true); // UTF-8
                        CLCD::getInstance()->showMenuText(1, timestring);
                }
        }
@@ -663,7 +665,7 @@ void CPictureViewerGui::view(unsigned int index, bool 
unscaled)
 {
        selected=index;
        
-       CLCD::getInstance()->showMenuText(0, playlist[index].Name.c_str());
+       CLCD::getInstance()->showMenuText(0, playlist[index].Name.c_str(), -1, 
true); // UTF-8
        char timestring[19];
        strftime(timestring, 18, "%d-%m-%Y %H:%M", 
gmtime(&playlist[index].Date));
        CLCD::getInstance()->showMenuText(1, timestring);

-----------------------------------------------------------------------

Summary of changes:
 tuxbox/neutrino/src/gui/filebrowser.cpp   |    2 +-
 tuxbox/neutrino/src/gui/moviebrowser.cpp  |    2 +-
 tuxbox/neutrino/src/gui/pictureviewer.cpp |   10 ++++++----
 3 files changed, 8 insertions(+), 6 deletions(-)


-- 
Tuxbox-GIT: apps

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Tuxbox-cvs-commits mailing list
Tuxbox-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits

Reply via email to