Commit 986973b0 authored by Alexandre Detiste's avatar Alexandre Detiste

doom2-masterlevels: add button to start chocolate-doom-setup

parent 89a9dd42
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@debian.org> Thu, 24 Nov 2016 08:15:30 +0100
game-data-packager (47) unstable; urgency=medium
* New game support:
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment