From 6d7bff2476459049f4f554291a680e0f6003ea66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 7 Jun 2015 21:10:18 +0200 Subject: GH-1060 remove updater code --- mmc_updater/src/UpdateDialogAscii.cpp | 70 ----------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 mmc_updater/src/UpdateDialogAscii.cpp (limited to 'mmc_updater/src/UpdateDialogAscii.cpp') diff --git a/mmc_updater/src/UpdateDialogAscii.cpp b/mmc_updater/src/UpdateDialogAscii.cpp deleted file mode 100644 index 78eb7433..00000000 --- a/mmc_updater/src/UpdateDialogAscii.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include "UpdateDialogAscii.h" - -#include "AppInfo.h" -#include "ProcessUtils.h" -#include "StringUtils.h" - -const char* introMessage = - "%s (ASCII-art edition)\n" - "====================================\n" - "\n" - "We have a nice graphical interface for the %s, but unfortunately\n" - "we can't show it to you :(\n" - "\n" - "You can fix this by installing the GTK 2 libraries.\n\n" - "Installing Updates...\n"; - -void UpdateDialogAscii::init(int /* argc */, char** /* argv */) -{ - const char* path = "/tmp/update-progress"; - m_output.open(path); - - char message[4096]; - sprintf(message,introMessage,AppInfo::name().c_str()); - m_output << message; - - std::string command = "xterm"; - std::list args; - args.push_back("-hold"); - args.push_back("-T"); - args.push_back(AppInfo::name()); - args.push_back("-e"); - args.push_back("tail"); - args.push_back("-n+1"); - args.push_back("-f"); - args.push_back(path); - - ProcessUtils::runAsync(command,args); -} - -void UpdateDialogAscii::updateError(const std::string& errorMessage) -{ - m_mutex.lock(); - m_output << "\nThere was a problem installing the update: " << errorMessage << std::endl; - m_mutex.unlock(); -} - -void UpdateDialogAscii::updateProgress(int percentage) -{ - m_mutex.lock(); - m_output << "Update Progress: " << intToStr(percentage) << '%' << std::endl; - m_mutex.unlock(); -} - -void UpdateDialogAscii::updateFinished() -{ - m_mutex.lock(); - m_output << "\nUpdate Finished. You can now restart " << AppInfo::appName() << "." << std::endl; - m_mutex.unlock(); - - UpdateDialog::updateFinished(); -} - -void UpdateDialogAscii::quit() -{ -} - -void UpdateDialogAscii::exec() -{ -} - -- cgit v1.2.3