StelMainWindow.cpp   StelMainWindow.cpp 
skipping to change at line 28 skipping to change at line 28
*/ */
#include "StelMainWindow.hpp" #include "StelMainWindow.hpp"
#include <QSettings> #include <QSettings>
#include <QResizeEvent> #include <QResizeEvent>
#include <QIcon> #include <QIcon>
#include <QDebug> #include <QDebug>
#include <QFontDatabase> #include <QFontDatabase>
#include <QCoreApplication> #include <QCoreApplication>
#include <QApplication>
#include <stdexcept> #include <stdexcept>
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelMainGraphicsView.hpp" #include "StelMainGraphicsView.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelTranslator.hpp"
// Initialize static variables // Initialize static variables
StelMainWindow* StelMainWindow::singleton = NULL; StelMainWindow* StelMainWindow::singleton = NULL;
StelMainWindow::StelMainWindow(QWidget* parent) : QMainWindow(parent), init Complete(false) StelMainWindow::StelMainWindow(QWidget* parent) : QMainWindow(parent), init Complete(false)
{ {
// Can't create 2 StelMainWindow instances // Can't create 2 StelMainWindow instances
Q_ASSERT(!singleton); Q_ASSERT(!singleton);
singleton = this; singleton = this;
} }
// Update the translated title
void StelMainWindow::initTitleI18n()
{
QString appNameI18n = q_("Stellarium %1").arg(StelApp::getApplicatio
nVersion());
setWindowTitle(appNameI18n);
}
void StelMainWindow::init() void StelMainWindow::init()
{ {
setWindowIcon(QIcon(":/mainWindow/icon.bmp")); setWindowIcon(QIcon(":/mainWindow/icon.bmp"));
initTitleI18n();
QString fName; QString fName;
try try
{ {
fName = StelApp::getInstance().getFileMgr().findFile("data/D ejaVuSans.ttf"); fName = StelApp::getInstance().getFileMgr().findFile("data/D ejaVuSans.ttf");
} }
catch (std::runtime_error& e) catch (std::runtime_error& e)
{ {
// Removed this warning practically allowing to package the program without the font file. // Removed this warning practically allowing to package the program without the font file.
// This is useful for distribution having already a package for DejaVu font. // This is useful for distribution having already a package for DejaVu font.
skipping to change at line 116 skipping to change at line 127
{ {
if (b) if (b)
showFullScreen(); showFullScreen();
else else
showNormal(); showNormal();
} }
void StelMainWindow::closeEvent(QCloseEvent* event) void StelMainWindow::closeEvent(QCloseEvent* event)
{ {
event->ignore(); event->ignore();
((StelGui*)GETSTELMODULE("StelGui"))->quitStellarium(); GETSTELMODULE(StelGui)->quitStellarium();
} }
void StelMainWindow::resizeEvent(QResizeEvent* event) void StelMainWindow::resizeEvent(QResizeEvent* event)
{ {
QMainWindow::resizeEvent(event); QMainWindow::resizeEvent(event);
} }
 End of changes. 5 change blocks. 
1 lines changed or deleted 13 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/