/*
- Bacula® - The Network Backup Solution
+ Bacula(R) - The Network Backup Solution
- Copyright (C) 2011-2011 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2016 Kern Sibbald
- The main author of Bacula is Kern Sibbald, with contributions from
- many others, a complete list can be found in the file AUTHORS.
- This program is Free Software; you can redistribute it and/or
- modify it under the terms of version three of the GNU Affero General Public
- License as published by the Free Software Foundation, which is
- listed in the file LICENSE.
+ The original author of Bacula is Kern Sibbald, with contributions
+ from many others, a complete list can be found in the file AUTHORS.
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ You may use this file and others of this release according to the
+ license defined in the LICENSE file, which includes the Affero General
+ Public License, v3.0 ("AGPLv3") and some additional permissions and
+ terms pursuant to its AGPLv3 Section 7.
- You should have received a copy of the GNU Affero General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
+ This notice must be preserved when any source code is
+ conveyed and/or propagated.
- Bacula® is a registered trademark of Kern Sibbald.
-
- The licensor of Bacula is the Free Software Foundation Europe
- (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
- Switzerland, email:ftf@fsfeurope.org.
+ Bacula(R) is a registered trademark of Kern Sibbald.
*/
#ifndef TRAYUI_H
#define TRAYUI_H
+#ifdef HAVE_WIN32
+# ifndef _STAT_DEFINED
+# define _STAT_DEFINED 1 /* don't pull in MinGW struct stat from wchar.h */
+# endif
+#endif
+
+//#include "winhdrs.h"
#include <QAction>
#include <QApplication>
#include <QButtonGroup>
#include <QDebug>
#include <QMessageBox>
#include <QFont>
+
#include "version.h"
-#include "ui/ui_run.h"
+#include "ui_run.h"
#include "tray-monitor.h"
-
class RunDlg: public QDialog, public Ui::runForm
{
Q_OBJECT
qDebug() << cmd;
item->D_sock->fsend("%s", cmd.toUtf8().data());
QString output;
- while(bnet_recv(item->D_sock) >= 0) {output += item->D_sock->msg;}
+ while(item->D_sock->recv() >= 0) {output += item->D_sock->msg;}
QMessageBox msgBox;
msgBox.setText(output);
msgBox.exec();
QAction* actAbout = new QAction(QApplication::translate("TrayMonitor",
"About",
0, QApplication::UnicodeUTF8),TrayMonitor);
- QAction* actRun = new QAction(QApplication::translate("TrayMonitor",
+ QAction* actRun = new QAction(QApplication::translate("TrayMonitor",
"Run...",
0, QApplication::UnicodeUTF8),TrayMonitor);
- stmenu->addAction(actShow);
+ stmenu->addAction(actShow);
stmenu->addAction(actRun);
stmenu->addAction(actAbout);
stmenu->addSeparator();
- stmenu->addAction(actQuit);
+ stmenu->addAction(actQuit);
connect(actRun, SIGNAL(triggered()), this, SLOT(cb_run()));
connect(actShow, SIGNAL(triggered()), this, SLOT(cb_show()));
connect(tray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(cb_trayIconActivated(QSystemTrayIcon::ActivationReason)));
- tray->setContextMenu(stmenu);
- QIcon icon(":/images/cartridge1.png");
- tray->setIcon(icon);
+ tray->setContextMenu(stmenu);
+ QIcon icon(":/images/cartridge1.png");
+ tray->setIcon(icon);
tray->setToolTip(QString("Bacula Tray Monitor"));
- tray->show();
+ tray->show();
retranslateUi(TrayMonitor);
QMetaObject::connectSlotsByName(TrayMonitor);
void cb_about() {
QMessageBox::about(this, "Bacula Tray Monitor", "Bacula Tray Monitor\n"
"For more information, see: www.baculasystems.com\n"
- "Copyright (C) 1999-2010, Bacula Systems(R) SA\n"
- "Licensed under GNU AGPLv3.");
+ "Copyright (C) 1999-2015, Kern Sibbald.\n"
+ "License AGPLv3 see LICENSE.");
}
void cb_run() {