[freeciv] 01/04: Add qt-client-HOME-folder.patch and

Markus Koschany apo-guest at moszumanska.debian.org
Sat Feb 6 23:10:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

apo-guest pushed a commit to branch master
in repository freeciv.

commit 55d36e75fba12215bcd1dd0dc9abdce3e635b595
Author: Markus Koschany <apo at debian.org>
Date:   Sat Feb 6 23:42:34 2016 +0100

    Add qt-client-HOME-folder.patch and
    
    qt-client-save-games-menu.patch
    
    Closes: #813107
    Closes: #813218
    
    Thanks: Günter Heine for the report and the Freeciv developers for providing
    the patches.
---
 debian/patches/qt-client-HOME-folder.patch     | 38 ++++++++++++++++++
 debian/patches/qt-client-save-games-menu.patch | 54 ++++++++++++++++++++++++++
 debian/patches/series                          |  2 +
 3 files changed, 94 insertions(+)

diff --git a/debian/patches/qt-client-HOME-folder.patch b/debian/patches/qt-client-HOME-folder.patch
new file mode 100644
index 0000000..fc02797
--- /dev/null
+++ b/debian/patches/qt-client-HOME-folder.patch
@@ -0,0 +1,38 @@
+From: Markus Koschany <apo at debian.org>
+Date: Sat, 6 Feb 2016 23:36:57 +0100
+Subject: qt client HOME folder
+
+Fix qt client bug that created a $HOME subdirectory in the user's home
+directory. Thanks to the FreeCiv developers for providing the patch.
+
+Forwarded: http://svn.gna.org/viewcvs/freeciv?view=revision&revision=31761
+Debian-Bug: https://bugs.debian.org/813107
+---
+ client/gui-qt/fc_client.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/client/gui-qt/fc_client.cpp b/client/gui-qt/fc_client.cpp
+index fb3b3ee..78148ff 100644
+--- a/client/gui-qt/fc_client.cpp
++++ b/client/gui-qt/fc_client.cpp
+@@ -116,6 +116,7 @@ fc_client::fc_client() : QMainWindow()
+ ****************************************************************************/
+ void fc_client::init()
+ {
++  QString path;
+   central_wdg = new QWidget;
+   central_layout = new QGridLayout;
+   chat_completer = new QCompleter;
+@@ -159,8 +160,10 @@ void fc_client::init()
+   pages[PAGE_NETWORK]->setVisible(false);
+ 
+   // PAGE_GAME
+-  QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope,
+-                     "$HOME/.config");
++  path = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
++  if (path.isEmpty() == false) {
++    QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, path);
++  }
+   read_settings();
+   pages[PAGE_GAME] = new QWidget(central_wdg);
+   init_mapcanvas_and_overview();
diff --git a/debian/patches/qt-client-save-games-menu.patch b/debian/patches/qt-client-save-games-menu.patch
new file mode 100644
index 0000000..adeb36c
--- /dev/null
+++ b/debian/patches/qt-client-save-games-menu.patch
@@ -0,0 +1,54 @@
+From: Markus Koschany <apo at debian.org>
+Date: Sat, 6 Feb 2016 23:38:57 +0100
+Subject: qt client save games menu
+
+Fix menu item "Save game" being disabled when there are no active units.
+Thanks to the Freeciv developers for providing the patch.
+
+Forwarded: http://svn.gna.org/viewcvs/freeciv?view=revision&revision=31767
+Debian-Bug: https://bugs.debian.org/813218
+---
+ client/gui-qt/menu.cpp | 23 ++++++++++++++++++-----
+ 1 file changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/client/gui-qt/menu.cpp b/client/gui-qt/menu.cpp
+index bffe1e6..4194f4b 100644
+--- a/client/gui-qt/menu.cpp
++++ b/client/gui-qt/menu.cpp
+@@ -967,6 +967,24 @@ void mr_menu::menus_sensitive()
+     a->setEnabled(false);
+   }
+ 
++  /* Non unit menus */
++  keys = menu_list.keys();
++  foreach (munit key, keys) {
++    i = menu_list.find(key);
++    while (i != menu_list.end() && i.key() == key) {
++      switch (key) {
++      case SAVE:
++        if (can_client_access_hack() && C_S_RUNNING <= client_state()) {
++          i.value()->setEnabled(true);
++        }
++        break;
++      default:
++        break;
++      }
++      i++;
++    }
++  }
++
+   if (can_client_issue_orders() == false || get_num_units_in_focus() == 0) {
+     return;
+   }
+@@ -1263,11 +1281,6 @@ void mr_menu::menus_sensitive()
+           i.value()->setEnabled(true);
+         }
+         break;
+-      case SAVE:
+-        if (can_client_access_hack() && C_S_RUNNING <= client_state()) {
+-          i.value()->setEnabled(true);
+-        }
+-        break;
+       default:
+         break;
+       }
diff --git a/debian/patches/series b/debian/patches/series
index 374dc67..3739916 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
 themes_sdl_use_system_fonts.patch
+qt-client-HOME-folder.patch
+qt-client-save-games-menu.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/freeciv.git



More information about the Pkg-games-commits mailing list