Update-Installer/src/UpdateDialogGtk.h

37 lines
795 B
C
Raw Normal View History

#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;
};