2018-08-15 Fred Gleason <fredg@paravelsystems.com>

* Fixed style inconsistencies in dialogs within rdgpimon(1).
	* Fixed style inconsistencies in dialogs within rdpopup(1).
This commit is contained in:
Fred Gleason
2018-08-16 14:55:56 +00:00
parent 075d07d9bb
commit bd45c2ef77
7 changed files with 41 additions and 38 deletions

View File

@@ -2,7 +2,7 @@
//
// A utility for displaying messages on the desktop
//
// (C) Copyright 2009,2016-2018 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2009-2018 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -32,6 +32,11 @@
#include <rdpopup.h>
//
// Icons
//
#include "../icons/rivendell-22x22.xpm"
QString WordWrap(const QString &str)
{
QString ret;
@@ -85,34 +90,36 @@ int main(int argc,char *argv[])
QDateTime dt=QDateTime(QDate::currentDate(),QTime::currentTime());
QString msg=WordWrap(argv[argc-1]);
QMessageBox *mb;
switch(prio) {
case 1:
mb=new QMessageBox(dt.toString("MM/dd @ hh:mm"),msg,
QMessageBox::Information,
QMessageBox::Ok,QMessageBox::
NoButton,QMessageBox::NoButton);
break;
case 1:
mb=new QMessageBox(dt.toString("MM/dd @ hh:mm"),msg,
QMessageBox::Information,
QMessageBox::Ok,QMessageBox::
NoButton,QMessageBox::NoButton);
break;
case 2:
mb=new QMessageBox(dt.toString("MM/dd @ hh:mm"),msg,
QMessageBox::Warning,QMessageBox::Ok,
QMessageBox::NoButton,QMessageBox::NoButton);
break;
case 2:
mb=new QMessageBox(dt.toString("MM/dd @ hh:mm"),msg,
QMessageBox::Warning,QMessageBox::Ok,
QMessageBox::NoButton,QMessageBox::NoButton);
break;
case 3:
mb=new QMessageBox(dt.toString("MM/dd @ hh:mm"),msg,
QMessageBox::Critical,QMessageBox::Ok,
QMessageBox::NoButton,QMessageBox::NoButton);
break;
case 3:
mb=new QMessageBox(dt.toString("MM/dd @ hh:mm"),msg,
QMessageBox::Critical,QMessageBox::Ok,
QMessageBox::NoButton,QMessageBox::NoButton);
break;
default:
mb=new QMessageBox(dt.toString("MM/dd @ hh:mm"),msg,
QMessageBox::Information,
QMessageBox::Ok,QMessageBox::NoButton,
QMessageBox::NoButton);
break;
default:
mb=new QMessageBox(dt.toString("MM/dd @ hh:mm"),msg,
QMessageBox::Information,
QMessageBox::Ok,QMessageBox::NoButton,
QMessageBox::NoButton);
break;
}
QFont font("hevetica",16,QFont::Bold);
mb->setWindowIcon(QPixmap(rivendell_22x22_xpm));
QFont font("helvetica",16,QFont::Bold);
font.setPixelSize(16);
mb->setFont(font);
mb->exec();