ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/truck/DashInterface/DashInterface.cpp
(Generate patch)

Comparing DashInterface/DashInterface.cpp (file contents):
Revision 46 by douglas, 2008-03-06T19:47:57-08:00 vs.
Revision 47 by douglas, 2008-03-07T03:08:31-08:00

# Line 11 | Line 11
11  
12   #include <foreach.hpp>
13   #include <hash.hpp>
14 #include <iconv.hpp>
14   #include <regex.hpp>
15   #include <scopes.hpp>
16   #include <timing.hpp>
17  
19 #include <Audacious.hpp>
18   #include <GPS.hpp>
19  
20   #include <sys/types.h>
# Line 34 | Line 32 | class DashInterface
32          enum { Running, Audio };
33          enum { Stopped, Paused, Playing } audio;
34          Timing::Time now;
37        IConv::IConv ascii;
38        Display display;
39        Pthreads::ThreadMutex displayLock;
35          Audacious::Audacious audacious;
36          //GPS::GPS gps;
37 +        MusicLibrary::Library library;
38          MenuList *list;
39          bool append;
40 <
41 <        inline std::string Filter(const std::string input)
46 <        {
47 <                std::string output(ascii.Convert(input));
48 <
49 <                std::replace(output.begin(), output.end(), '~', '\xce');
50 <
51 <                return output;
52 <        }
40 >        Display display;
41 >        Pthreads::ThreadMutex displayLock;
42  
43          void Mode_(bool change = false)
44          {
# Line 116 | Line 105 | class DashInterface
105                                  display.SetCursorStyle(Display::InvertingBlinkingBlock);
106  
107                                  append = true;
108 <                                list = new TopList(display, audacious, append);
108 >                                list = new TopList(display, audacious, append, library);
109  
110                                  list->Render();
111                          }
# Line 279 | Line 268 | exit:                          mode = previous;
268          }
269  
270   public:
271 <        DashInterface(const std::string &device) : mode(Uname), audio(Stopped), ascii(_B("ASCII//TRANSLIT//IGNORE"), _B("UTF-8")), display(device, reinterpret_cast<Display::Callback>(::Buttons), this)
271 >        DashInterface(const std::string &device) : mode(Uname), audio(Stopped), display(device, reinterpret_cast<Display::Callback>(::Buttons), this)
272          {
273                  _synchronized (displayLock)
274                  {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines