mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 20:04:24 -04:00
* added a about dialog
* quit RetroShare with rApp not more use qApp for quit, shutdown is now faster. * added first retranslateUi for MainWindow * changend Add Share string. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1944 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
82ebdc5bd7
commit
e919981e00
11 changed files with 1100 additions and 25 deletions
|
@ -38,6 +38,7 @@
|
|||
#include "MainWindow.h"
|
||||
#include "MessengerWindow.h"
|
||||
#include "HelpDialog.h"
|
||||
#include "AboutDialog.h"
|
||||
|
||||
#include "gui/TurtleRouterDialog.h"
|
||||
|
||||
|
@ -184,7 +185,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
|||
createPageAction(QIcon(IMAGE_FORUMS), tr("Forums"), grp));
|
||||
|
||||
ui.stackPages->add(linksDialog = new LinksDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_LINKS), tr("Links Cloud"), grp));
|
||||
createPageAction(QIcon(IMAGE_LINKS), tr("Links Cloud"), grp));
|
||||
|
||||
#else
|
||||
|
||||
|
@ -506,7 +507,7 @@ void MainWindow::doQuit()
|
|||
}
|
||||
else
|
||||
rsicontrol->rsGlobalShutDown();
|
||||
qApp->quit();
|
||||
rApp->quit();
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *e)
|
||||
|
@ -531,7 +532,7 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
|||
else
|
||||
{
|
||||
rsicontrol->rsGlobalShutDown();
|
||||
qApp->quit();
|
||||
rApp->quit();
|
||||
}
|
||||
|
||||
|
||||
|
@ -616,8 +617,8 @@ void MainWindow::playFiles(QStringList files)
|
|||
|
||||
void MainWindow::showabout()
|
||||
{
|
||||
static HelpDialog *helpdlg = new HelpDialog(this);
|
||||
helpdlg->show();
|
||||
static AboutDialog *adlg = new AboutDialog(this);
|
||||
adlg->exec();
|
||||
}
|
||||
|
||||
/** Displays the help browser and displays the most recently viewed help
|
||||
|
@ -637,6 +638,19 @@ void MainWindow::showHelpDialog(const QString &topic)
|
|||
helpBrowser->showWindow(topic);
|
||||
}
|
||||
|
||||
/** Called when the user changes the UI translation. */
|
||||
void
|
||||
MainWindow::retranslateUi()
|
||||
{
|
||||
ui.retranslateUi(this);
|
||||
foreach (MainPage *page, ui.stackPages->pages()) {
|
||||
page->retranslateUi();
|
||||
}
|
||||
foreach (QAction *action, ui.toolBar->actions()) {
|
||||
action->setText(tr(qPrintable(action->data().toString()), "MainWindow"));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::setStyle()
|
||||
{
|
||||
QString standardSheet = "{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 <color1>, stop:1 <color2>);}";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue