From 10aec4e41b85adeb1c9db031a9076dd622bab057 Mon Sep 17 00:00:00 2001 From: zvon Date: Sun, 19 Jan 2020 12:03:38 +0100 Subject: [PATCH] Fixed terminal output when running GUI --- functions.cpp | 4 ++++ mainwindow.cpp | 1 - mainwindow.hpp | 1 - progresswindow.cpp | 2 -- progresswindow.hpp | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/functions.cpp b/functions.cpp index aeb3cdb..0866378 100644 --- a/functions.cpp +++ b/functions.cpp @@ -582,7 +582,9 @@ void refreshDB( bool linux, void *progress_ptr ) { for ( auto &show : shows ) { if ( FSLib::exists( show[TEXT( "PATH" )] ) ) { +#ifndef GUI cleanUpLine(); +#endif p.print( TEXT( "Refreshing " ) + show[TEXT( "SHOW" )] ); p.print( 0 ); std::map< int, std::map< int, string > > seasons; @@ -669,7 +671,9 @@ void updateDB( bool linux, void *progress_ptr ) { if ( !FSLib::exists( show[TEXT( "PATH" )] ) ) { continue; } +#ifndef GUI cleanUpLine(); +#endif p.print( TEXT( "Updating " ) + show[TEXT( "SHOW" )] ); std::unordered_set< string > episodes; diff --git a/mainwindow.cpp b/mainwindow.cpp index cfc4a5c..3bcca0e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include "databasewindow.hpp" diff --git a/mainwindow.hpp b/mainwindow.hpp index c17b14a..11b4175 100644 --- a/mainwindow.hpp +++ b/mainwindow.hpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include "network.hpp" diff --git a/progresswindow.cpp b/progresswindow.cpp index b5fd46f..17e00bc 100644 --- a/progresswindow.cpp +++ b/progresswindow.cpp @@ -1,5 +1,4 @@ #include -#include #include #include "functions.hpp" @@ -10,7 +9,6 @@ ProgressWindow::ProgressWindow() { set_default_size( 500, 55 ); - std::cout << "Layout" << std::endl; add( *layout ); set_size_request( 500, 55 ); set_resizable( false ); diff --git a/progresswindow.hpp b/progresswindow.hpp index edd52e7..0283275 100644 --- a/progresswindow.hpp +++ b/progresswindow.hpp @@ -5,7 +5,6 @@ #include #include #include -#include class ProgressWindow : public Gtk::Window { public: