Sfoglia il codice sorgente

Added base button for manual check for updates

Ivan Arkhipov 5 anni fa
parent
commit
2159f4359f

+ 8 - 0
src/Legacy/widgets/statuswidget.cpp

@@ -1,3 +1,4 @@
+#include "ui_statuswidget.h"
 #include "statuswidget.h"
 
 #include "models/patchlist.h"
@@ -184,12 +185,14 @@ void StatusWidget::onPatchTotalOperationsStarted()
 {
     all_patch_operations_finished_ = false;
     ui->game_button->setEnabled(false);
+    ui->check_for_updates_button->setEnabled(false);
 }
 
 void StatusWidget::onPatchTotalOperationsFinished()
 {
     all_patch_operations_finished_ = true;
     ui->game_button->setEnabled(true);
+    ui->check_for_updates_button->setEnabled(true);
 
     for (Patch* patch : legacy_patches_->getPatchList()) {
         QString label_name = patch->getPatchName().toLower() + "_status";
@@ -329,3 +332,8 @@ void StatusWidget::updateStatusBar(Patch::OperationProgress progress)
 }
 
 
+
+void StatusWidget::on_check_for_updates_button_clicked()
+{
+    QMetaObject::invokeMethod(legacy_patches_, &PatchList::update, Qt::QueuedConnection);
+}

+ 2 - 2
src/Legacy/widgets/statuswidget.h

@@ -8,8 +8,6 @@
 #include <QPropertyAnimation>
 #include <QGraphicsOpacityEffect>
 
-#include "ui_statuswidget.h"
-
 #include "models/patchlist.h"
 
 namespace Ui {
@@ -50,6 +48,8 @@ private slots:
 
     void on_game_button_clicked();
 
+    void on_check_for_updates_button_clicked();
+
 private:
     void updateStatusBar(Patch::OperationProgress progress);
 

+ 18 - 6
src/Legacy/widgets/statuswidget.ui

@@ -501,12 +501,29 @@ border-image: url(:/characters/galadriel_with_text.png);
      <bool>false</bool>
     </property>
    </widget>
+   <widget class="QToolButton" name="check_for_updates_button">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>470</y>
+      <width>32</width>
+      <height>32</height>
+     </rect>
+    </property>
+    <property name="styleSheet">
+     <string notr="true">border-image: url(:/buttons/restart.png);</string>
+    </property>
+    <property name="text">
+     <string/>
+    </property>
+   </widget>
    <zorder>weekly_code_tooltip_1</zorder>
    <zorder>news_tooltip</zorder>
    <zorder>weekly_code_tooltip_2</zorder>
    <zorder>server_status_tooltip</zorder>
    <zorder>patches_status</zorder>
    <zorder>progress_label</zorder>
+   <zorder>check_for_updates_button</zorder>
   </widget>
   <widget class="QPushButton" name="game_button">
    <property name="geometry">
@@ -600,11 +617,6 @@ QPushButton#game_button:disabled {
    <container>1</container>
   </customwidget>
  </customwidgets>
- <resources>
-  <include location="../../../resources/backgrounds.qrc"/>
-  <include location="../../../resources/backgrounds_advanced.qrc"/>
-  <include location="../../../resources/common.qrc"/>
-  <include location="../../../resources/res.qrc"/>
- </resources>
+ <resources/>
  <connections/>
 </ui>

PANIC: session(release): write data/sessions/b/f/bfe0f3e6f72ef890: no space left on device

PANIC

session(release): write data/sessions/b/f/bfe0f3e6f72ef890: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)