MacOs: Fix MAC special menu items language independent

Remove donation request. Almost noone donates....
This commit is contained in:
Christian Hohnstaedt 2015-03-22 12:41:59 +01:00
parent e0c815a465
commit e1874e13bb
3 changed files with 20 additions and 32 deletions

View File

@ -118,33 +118,6 @@ void MainWindow::about()
delete about;
}
void MainWindow::donations()
{
Ui::About ui;
QDialog *d = new QDialog(this, 0);
ui.setupUi(d);
QString cont;
cont.sprintf("<p><h3><center><u>XCA</u></center></h3>"
"<p>This program is free software."
"<p>It doesn't bother you with Pop-Ups, Countdown-Timers, "
"commercials or any type of 'Register Now' buttons. "
"Nor are there any constraints or any limited functionality."
"<p>Everybody who wants to support my work at XCA may use "
"my PayPal account: <b>&lt;christian@hohnstaedt.de&gt;</b> "
"for a donation."
"<p>Every donator will in return be honored in the about dialog "
"of the next version."
);
d->setWindowTitle(tr(XCA_TITLE));
ui.image->setPixmap( *keyImg );
ui.image1->setPixmap( *certImg );
ui.textbox->setHtml(cont);
d->exec();
}
void MainWindow::help()
{
QDialog *h = new QDialog(this, 0);

View File

@ -38,6 +38,7 @@ void MainWindow::init_menu()
static QMenu *file = NULL, *help = NULL, *import = NULL,
*token = NULL, *languageMenu = NULL;
static QActionGroup * langGroup = NULL;
QAction *a;
QList<myLang> languages;
if (file) delete file;
@ -104,10 +105,18 @@ void MainWindow::init_menu()
acList += file->addAction(tr("&Undelete items"), this,
SLOT(undelete()));
file->addSeparator();
acList += file->addAction(tr("Options"), this, SLOT(setOptions()));
a = new QAction(tr("Options"), this);
connect(a, SIGNAL(triggered()), this, SLOT(setOptions()));
a->setMenuRole(QAction::PreferencesRole);
file->addAction(a);
acList += a;
file->addMenu(languageMenu);
file->addSeparator();
file->addAction(tr("Exit"), qApp, SLOT(quit()), Qt::ALT+Qt::Key_F4);
a = new QAction(tr("Exit"), this);
connect(a, SIGNAL(triggered()), qApp, SLOT(quit()));
a->setMenuRole(QAction::QuitRole);
file->addAction(a);
import = menuBar()->addMenu(tr("I&mport"));
import->addAction(tr("Keys"), this,
@ -144,10 +153,14 @@ void MainWindow::init_menu()
help = menuBar()->addMenu(tr("&Help") );
help->addAction(tr("&Content"), this, SLOT(help()),
QKeySequence::HelpContents);
help->addAction(tr("&About"), this, SLOT(about()) );
help->addAction(tr("Donations"), this, SLOT(donations()) );
a = new QAction(tr("About"), this);
connect(a, SIGNAL(triggered()), this, SLOT(about()));
a->setMenuRole(QAction::AboutRole);
help->addAction(a);
wdMenuList += import;
scardList += token;
setItemEnabled(!dbfile.isEmpty());
}
int MainWindow::changeDB(QString fname)
@ -241,6 +254,9 @@ void MainWindow::import_dbdump()
void MainWindow::setOptions()
{
if (dbfile.isEmpty())
return;
Options *opt = new Options(this);
opt->setExtDnString(mandatory_dn);

View File

@ -147,7 +147,6 @@ class MainWindow: public QMainWindow, public Ui::MainWindow
void default_database();
void connNewX509(NewX509 *nx);
void about();
void donations();
void help();
void import_dbdump();
void undelete();