This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-zerotierone/ZeroTierUI/aboutwindow.cpp

32 lines
1.0 KiB
C++
Raw Normal View History

2013-11-15 17:04:32 -05:00
#include "aboutwindow.h"
#include "ui_aboutwindow.h"
#include <QMessageBox>
#include "../node/Defaults.hpp"
2013-11-15 17:04:32 -05:00
AboutWindow::AboutWindow(QWidget *parent) :
QDialog(parent),
ui(new Ui::AboutWindow)
{
ui->setupUi(this);
#ifndef __APPLE__
ui->uninstallButton->hide();
#endif
2013-11-15 17:04:32 -05:00
}
AboutWindow::~AboutWindow()
{
delete ui;
}
void AboutWindow::on_uninstallButton_clicked()
{
// Apple only... other OSes have more intrinsic mechanisms for uninstalling.
QMessageBox::information(
this,
"Uninstalling ZeroTier One",
QString("Uninstalling ZeroTier One is easy!\n\nJust remove ZeroTier One from your Applications folder and the service will automatically shut down within a few seconds. Then, on your next reboot, all other support files will be automatically deleted.\n\nIf you wish to uninstall the service and support files now, you can run the 'uninstall.sh' script found in ") + ZeroTier::ZT_DEFAULTS.defaultHomePath.c_str() + " using the 'sudo' command in a terminal.",
QMessageBox::Ok,
QMessageBox::NoButton);
2013-11-15 17:04:32 -05:00
}