No-op: remove all trailing whitespace.
[dcpomatic.git] / src / tools / dcpomatic_server.cc
index a82478dfdbd47fc3a9e27985bff669eddd8c678f..37eeb1e8e20d8966b68788d979e7f7d33c20c905 100644 (file)
@@ -47,13 +47,21 @@ public:
                return _log;
        }
 
+       string head_and_tail (int amount = 1024) const {
+               if (int (_log.size ()) < (2 * amount)) {
+                       return _log;
+               }
+
+               return _log.substr (0, amount) + _log.substr (_log.size() - amount - 1, amount);
+       }
+
 private:
        void do_log (string m)
        {
                _log = m;
        }
 
-       string _log;    
+       string _log;
 };
 
 static shared_ptr<MemoryLog> memory_log (new MemoryLog);
@@ -95,24 +103,24 @@ class TaskBarIcon : public wxTaskBarIcon
 public:
        TaskBarIcon ()
        {
-#ifdef __WXMSW__               
+#ifdef __WXMSW__
                wxIcon icon (std_to_wx ("taskbar_icon"));
 #endif
 #ifdef __WXGTK__
                wxInitAllImageHandlers();
-               wxBitmap bitmap (wxString::Format (wxT ("%s/taskbar_icon.png"), POSIX_ICON_PREFIX), wxBITMAP_TYPE_PNG);
+               wxBitmap bitmap (wxString::Format (wxT ("%s/taskbar_icon.png"), LINUX_SHARE_PREFIX), wxBITMAP_TYPE_PNG);
                wxIcon icon;
                icon.CopyFromBitmap (bitmap);
 #endif
 #ifndef __WXOSX__
                /* XXX: fix this for OS X */
                SetIcon (icon, std_to_wx ("DCP-o-matic encode server"));
-#endif         
+#endif
 
                Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&TaskBarIcon::status, this), ID_status);
                Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&TaskBarIcon::quit, this), ID_quit);
        }
-       
+
        wxMenu* CreatePopupMenu ()
        {
                wxMenu* menu = new wxMenu;
@@ -143,14 +151,14 @@ public:
                , _icon (0)
        {}
 
-private:       
-       
+private:
+
        bool OnInit ()
        {
                if (!wxApp::OnInit ()) {
                        return false;
                }
-               
+
                dcpomatic_setup ();
 
                _icon = new TaskBarIcon;
@@ -159,7 +167,7 @@ private:
                Bind (wxEVT_TIMER, boost::bind (&App::check, this));
                _timer.reset (new wxTimer (this));
                _timer->Start (1000);
-               
+
                return true;
        }