QTfrontend/hwform.cpp
changeset 2261 57e99c908e7c
parent 2155 d897222d3339
child 2345 daf1785f2337
equal deleted inserted replaced
2260:31756e21c436 2261:57e99c908e7c
    53 #include "playrecordpage.h"
    53 #include "playrecordpage.h"
    54 #include "input_ip.h"
    54 #include "input_ip.h"
    55 #include "ammoSchemeModel.h"
    55 #include "ammoSchemeModel.h"
    56 #include "bgwidget.h"
    56 #include "bgwidget.h"
    57 
    57 
       
    58 #ifdef __APPLE__
       
    59 //autoupdate
       
    60 #include "CocoaInitializer.h"
       
    61 #include "SparkleAutoUpdater.h"
       
    62 #endif
       
    63 
    58 // I started handing this down to each place it touches, but it was getting ridiculous
    64 // I started handing this down to each place it touches, but it was getting ridiculous
    59 // and this one flag does not warrant a static class
    65 // and this one flag does not warrant a static class
    60 bool frontendEffects = true;
    66 bool frontendEffects = true;
    61 
    67 
    62 HWForm::HWForm(QWidget *parent)
    68 HWForm::HWForm(QWidget *parent)
    72 	ui.pageOptions->CBResolution->addItems(sdli.getResolutions());
    78 	ui.pageOptions->CBResolution->addItems(sdli.getResolutions());
    73 
    79 
    74 	config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
    80 	config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
    75 	
    81 	
    76 	namegen = new HWNamegen();
    82 	namegen = new HWNamegen();
    77 
    83     
       
    84 #ifdef __APPLE__
       
    85         //autoupdate
       
    86         AutoUpdater* updater;
       
    87         CocoaInitializer initializer;
       
    88         updater = new SparkleAutoUpdater("http://files.getdropbox.com/u/24468/appcast.xml"); //this has to change before release!!!
       
    89         if(updater && config->isAutoUpdateEnabled())
       
    90             updater->checkForUpdates();
       
    91 #endif
       
    92     
    78 	UpdateTeamsLists();
    93 	UpdateTeamsLists();
    79 	UpdateWeapons();
    94 	UpdateWeapons();
    80 
    95 
    81 	connect(config, SIGNAL(frontendFullscreen(bool)), this, SLOT(onFrontendFullscreen(bool)));
    96 	connect(config, SIGNAL(frontendFullscreen(bool)), this, SLOT(onFrontendFullscreen(bool)));
    82 	onFrontendFullscreen(config->isFrontendFullscreen());
    97 	onFrontendFullscreen(config->isFrontendFullscreen());