Update-Installer/src/UpdateDialogGtk.h
Robert Knight 557dc1273e Update the GTK UI for install errors to match the Mac and Windows UIs
* Display the error details in a message box
 * Set the progress label text appropriately in the event of an error
2011-08-24 12:15:02 +01:00

36 lines
795 B
C++

#pragma once
#include "UpdateMessage.h"
#include "UpdateObserver.h"
#include <gtk/gtk.h>
class UpdateDialogGtk : public UpdateObserver
{
public:
UpdateDialogGtk();
bool restartApp() const;
void init(int argc, char** argv);
void exec();
// observer callbacks - these may be called
// from a background thread
virtual void updateError(const std::string& errorMessage);
virtual bool updateRetryCancel(const std::string& message);
virtual void updateProgress(int percentage);
virtual void updateFinished();
private:
static void finish(GtkWidget* widget, gpointer dialog);
static gboolean notify(void* message);
GtkWidget* m_window;
GtkWidget* m_progressLabel;
GtkWidget* m_finishButton;
GtkWidget* m_progressBar;
bool m_restartApp;
bool m_hadError;
};