[game-data-packager] 01/01: doom2-masterlevels: descriptive name for buttons, grey out 'Run' at first

Alexandre Detiste detiste-guest at moszumanska.debian.org
Wed Apr 1 17:49:51 UTC 2015


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 17f5d4e3478d420485889b32b0210dda19f97bef
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Wed Apr 1 19:49:18 2015 +0200

    doom2-masterlevels: descriptive name for buttons, grey out 'Run' at first
---
 runtime/doom2-masterlevels.py | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/runtime/doom2-masterlevels.py b/runtime/doom2-masterlevels.py
index 45149ed..70e4d6d 100755
--- a/runtime/doom2-masterlevels.py
+++ b/runtime/doom2-masterlevels.py
@@ -167,13 +167,15 @@ grid.attach(radiogrid, 1, 5, 2, 1)
 
 
 # Run !
-button1 = Gtk.Button(label="Run")
-grid.attach(button1, 1, 6, 1, 1)
-button2 = Gtk.Button(label="Exit")
-grid.attach(button2, 2, 6, 1, 1)
+button_exec = Gtk.Button(label="Run")
+button_exec.set_sensitive(False)
+grid.attach(button_exec, 1, 6, 1, 1)
+button_quit = Gtk.Button(label="Exit")
+grid.attach(button_quit, 2, 6, 1, 1)
 
 def select_game(event):
-    global game, warp
+    global game, warp, button_exec
+    button_exec.set_sensitive(True)
     (model, pathlist) = treeview.get_selection().get_selected_rows()
     for path in pathlist:
         tree_iter = model.get_iter(path)
@@ -202,8 +204,8 @@ def run_game(event):
             '-warp', '%d' % warp, '-skill', difficulty])
 
 treeview.connect("cursor-changed", select_game)
-button1.connect("clicked", run_game)
-button2.connect("clicked", Gtk.main_quit)
+button_exec.connect("clicked", run_game)
+button_quit.connect("clicked", Gtk.main_quit)
 
 window.show_all()
 

-- 
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