equal
deleted
inserted
replaced
37 #include "hwconsts.h" |
37 #include "hwconsts.h" |
38 #include "fpsedit.h" |
38 #include "fpsedit.h" |
39 #include "igbox.h" |
39 #include "igbox.h" |
40 #include "DataManager.h" |
40 #include "DataManager.h" |
41 #include "LibavInteraction.h" |
41 #include "LibavInteraction.h" |
|
42 #include "AutoUpdater.h" |
|
43 |
|
44 #ifdef __APPLE__ |
|
45 #ifdef SPARKLE_ENABLED |
|
46 #include "SparkleAutoUpdater.h" |
|
47 #endif |
|
48 #endif |
42 |
49 |
43 // TODO cleanup |
50 // TODO cleanup |
44 QLayout * PageOptions::bodyLayoutDefinition() |
51 QLayout * PageOptions::bodyLayoutDefinition() |
45 { |
52 { |
46 QVBoxLayout * pageLayout = new QVBoxLayout(); |
53 QVBoxLayout * pageLayout = new QVBoxLayout(); |
229 |
236 |
230 #ifdef __APPLE__ |
237 #ifdef __APPLE__ |
231 #ifdef SPARKLE_ENABLED |
238 #ifdef SPARKLE_ENABLED |
232 CBAutoUpdate = new QCheckBox(groupMisc); |
239 CBAutoUpdate = new QCheckBox(groupMisc); |
233 CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup")); |
240 CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup")); |
234 MiscLayout->addWidget(CBAutoUpdate, 7, 0, 1, 3); |
241 MiscLayout->addWidget(CBAutoUpdate, 7, 0, 1, 1); |
|
242 |
|
243 btnUpdateNow = new QPushButton(groupMisc); |
|
244 connect(btnUpdateNow, SIGNAL(clicked()), this, SLOT(checkForUpdates())); |
|
245 btnUpdateNow->setToolTip(tr("Check for updates")); |
|
246 btnUpdateNow->setText("Check now"); |
|
247 btnUpdateNow->setFixedSize(130, 30); |
|
248 MiscLayout->addWidget(btnUpdateNow, 7, 1, 1, 1); |
235 #endif |
249 #endif |
236 #endif |
250 #endif |
237 page1Layout->addWidget(groupMisc, 2, 0); |
251 page1Layout->addWidget(groupMisc, 2, 0); |
238 } |
252 } |
239 |
253 |
857 checkRecordAudio->setChecked(true); |
871 checkRecordAudio->setChecked(true); |
858 checkUseGameRes->setChecked(true); |
872 checkUseGameRes->setChecked(true); |
859 setDefaultCodecs(); |
873 setDefaultCodecs(); |
860 } |
874 } |
861 |
875 |
|
876 void PageOptions::checkForUpdates() |
|
877 { |
|
878 AutoUpdater *updater = NULL; |
|
879 |
|
880 #ifdef __APPLE__ |
|
881 #ifdef SPARKLE_ENABLED |
|
882 updater = new SparkleAutoUpdater(); |
|
883 #endif |
|
884 #endif |
|
885 |
|
886 if (updater) |
|
887 { |
|
888 updater->checkForUpdatesNow(); |
|
889 delete updater; |
|
890 } |
|
891 } |
|
892 |
862 bool PageOptions::tryCodecs(const QString & format, const QString & vcodec, const QString & acodec) |
893 bool PageOptions::tryCodecs(const QString & format, const QString & vcodec, const QString & acodec) |
863 { |
894 { |
864 // first we should change format |
895 // first we should change format |
865 int iFormat = comboAVFormats->findData(format); |
896 int iFormat = comboAVFormats->findData(format); |
866 if (iFormat == -1) |
897 if (iFormat == -1) |