mirror of
https://github.com/chris2511/xca.git
synced 2026-09-14 11:06:19 +05:00
MacOs: Fix MAC special menu items language independent
Remove donation request. Almost noone donates....
This commit is contained in:
parent
e0c815a465
commit
e1874e13bb
@ -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><christian@hohnstaedt.de></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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user