[game-data-packager] 02/04: doom2-masterlevels: add button to start chocolate-doom-setup

Alexandre Detiste detiste-guest at moszumanska.debian.org
Thu Nov 24 08:20:57 UTC 2016


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

detiste-guest pushed a commit to branch master
in repository game-data-packager.

commit 986973b01bc1db4ea04a0fde74bcaacaac79e3e0
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Thu Nov 24 08:18:38 2016 +0100

    doom2-masterlevels: add button to start chocolate-doom-setup
---
 debian/changelog              |  8 ++++++++
 runtime/doom2-masterlevels.py | 12 ++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e55f5c2..4f8714c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+game-data-packager (48) unstable; urgency=medium
+
+  * Enhancements and bug fixes:
+    - Add a button to "Doom II Masterlevels" launcher to start
+      chocolate-doom-setup from there. [adetiste]
+
+ -- Simon McVittie <smcv at debian.org>  Thu, 24 Nov 2016 08:15:30 +0100
+
 game-data-packager (47) unstable; urgency=medium
 
   * New game support:
diff --git a/runtime/doom2-masterlevels.py b/runtime/doom2-masterlevels.py
index 1899ea6..a206008 100755
--- a/runtime/doom2-masterlevels.py
+++ b/runtime/doom2-masterlevels.py
@@ -234,12 +234,21 @@ class Launcher:
         if default:
             radiobuttonDefault.set_label("%s (default)" % default)
             self.select_engine(radiobuttonDefault)
+            if default.split('/')[-1] == 'chocolate-doom' and which('chocolate-doom-setup'):
+                self.button_conf = Gtk.Button(label="Configure")
+                radiogrid.attach(self.button_conf,1, 0, 1, 1)
+                self.button_conf.connect("clicked", self.chocolate_setup)
+
             i = 1
             for alternative in alternatives:
                 radiobutton = Gtk.RadioButton(group=radiobuttonDefault, label=alternative)
                 radiobutton.connect('toggled', self.select_engine)
                 i += 1
                 radiogrid.attach(radiobutton, 0, i, 1, 1)
+                if alternative.split('/')[-1] == 'chocolate-doom' and which('chocolate-doom-setup'):
+                    self.button_conf = Gtk.Button(label="Configure")
+                    radiogrid.attach(self.button_conf,1, i, 1, 1)
+                    self.button_conf.connect("clicked", self.chocolate_setup)
                 if os.path.isfile('/etc/debian_version'):
                     radiogrid.set_tooltip_text('Default can be changed with update-alternatives(8)')
 
@@ -301,6 +310,9 @@ class Launcher:
             '-warp', '%d' % self.warp,
             '-skill', '%d' % self.difficulty])
 
+    def chocolate_setup(self, event):
+        subprocess.call('chocolate-doom-setup')
+
     def main(self):
         if not self.engine:
             message = 'No DOOM engine found!\n' + requirements

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



More information about the Pkg-games-commits mailing list