main.cpp   main.cpp 
skipping to change at line 25 skipping to change at line 25
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#include <QtGui/QApplication> #include <QtGui/QApplication>
#include <QtGui/QMessageBox> #include <QtGui/QMessageBox>
#include <QTranslator> #include <QTranslator>
#include "StelMainGraphicsView.hpp" #include "StelMainGraphicsView.hpp"
#include "StelMainWindow.hpp" #include "StelMainWindow.hpp"
#include "Translator.hpp" #include "StelTranslator.hpp"
#include <QDebug> #include <QDebug>
#include <QGLFormat> #include <QGLFormat>
#include <QPlastiqueStyle> #include <QPlastiqueStyle>
#ifdef MACOSX
#include "StelMacosxDirs.hpp"
#endif
//! @class GettextTranslator //! @class GettextStelTranslator
//! Provides i18n support through gettext. //! Provides i18n support through gettext.
class GettextTranslator : public QTranslator class GettextStelTranslator : public QTranslator
{ {
public: public:
virtual bool isEmpty() const { return false; } virtual bool isEmpty() const { return false; }
virtual QString translate(const char* context, const char* sourceTex t, const char* comment=0) const virtual QString translate(const char* context, const char* sourceTex t, const char* comment=0) const
{ {
return q_(sourceText); return q_(sourceText);
} }
}; };
// Main stellarium procedure // Main stellarium procedure
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
QCoreApplication::setApplicationName("stellarium");
QApplication::setDesktopSettingsAware(false); QApplication::setDesktopSettingsAware(false);
QApplication::setStyle(new QPlastiqueStyle()); QApplication::setStyle(new QPlastiqueStyle());
QApplication app(argc, argv); QApplication app(argc, argv);
//app.setQuitOnLastWindowClosed(false); //app.setQuitOnLastWindowClosed(false);
GettextTranslator trans; #ifdef MACOSX
StelMacosxDirs::addApplicationPluginDirectory();
#endif
GettextStelTranslator trans;
app.installTranslator(&trans); app.installTranslator(&trans);
if (!QGLFormat::hasOpenGL()) if (!QGLFormat::hasOpenGL())
{ {
QMessageBox::information(0, "Stellarium", q_("This system do es not support OpenGL.")); QMessageBox::warning(0, "Stellarium", q_("This system does n ot support OpenGL."));
} }
StelMainGraphicsView* view = new StelMainGraphicsView(NULL, argc, ar gv);
StelMainWindow* mainWin = new StelMainWindow(NULL); StelMainWindow* mainWin = new StelMainWindow(NULL);
StelMainGraphicsView* view = new StelMainGraphicsView(NULL, argc, ar gv);
mainWin->setCentralWidget(view); mainWin->setCentralWidget(view);
mainWin->init(); mainWin->init();
app.exec(); app.exec();
view->deinitGL(); view->deinitGL();
delete view; delete view;
delete mainWin; delete mainWin;
return 0; return 0;
} }
 End of changes. 9 change blocks. 
6 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/