mirror of
https://github.com/lutris/lutris
synced 2024-11-05 18:10:49 +00:00
Redisigned runner dialog
This commit is contained in:
parent
f5e451de34
commit
d23d81b8b3
5 changed files with 34 additions and 43 deletions
8
debian/changelog
vendored
8
debian/changelog
vendored
|
@ -1,4 +1,10 @@
|
|||
lutris (0.2.5ubuntu1) natty; urgency=low
|
||||
lutris (0.2.5r2) natty; urgency=low
|
||||
|
||||
* xdg is a build dependency
|
||||
|
||||
-- Mathieu Comandon <strycore@gmail.com> Mon, 09 May 2011 13:36:55 +0200
|
||||
|
||||
lutris (0.2.5r1) natty; urgency=low
|
||||
|
||||
* Oops, forgot to bump the python version
|
||||
|
||||
|
|
9
debian/control
vendored
9
debian/control
vendored
|
@ -1,19 +1,18 @@
|
|||
Source: lutris
|
||||
Section: games
|
||||
Priority: optional
|
||||
Build-Depends: cdbs (>= 0.4.43)
|
||||
Build-Depends: cdbs (>= 0.4.43),
|
||||
debhelper (>= 6),
|
||||
python,
|
||||
python-support (>= 0.6.4),
|
||||
python-distutils-extra (>= 2.10)
|
||||
python-distutils-extra (>= 2.10),
|
||||
python-xdg
|
||||
Maintainer: Mathieu Comandon <strycore@gmail.com>
|
||||
Standards-Version: 3.9.1
|
||||
XS-Python-Version: current
|
||||
|
||||
Package: lutris
|
||||
Architecture: all
|
||||
XB-Python-Version: ${python:Versions}
|
||||
Depends: ${misc:Depends},
|
||||
Depends: ${misc:Depends},
|
||||
${python:Depends},
|
||||
python-xdg,
|
||||
python-gconf,
|
||||
|
|
1
debian/pyversions
vendored
Normal file
1
debian/pyversions
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
2.6,2.7
|
|
@ -1,23 +0,0 @@
|
|||
# -*- coding:Utf-8 -*-
|
||||
###############################################################################
|
||||
## Lutris
|
||||
##
|
||||
## Copyright (C) 2009 Mathieu Comandon strycore@gmail.com
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
###############################################################################
|
||||
|
||||
import gtk
|
||||
|
|
@ -21,6 +21,12 @@
|
|||
|
||||
import gtk
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
import sys, os
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.abspath(__file__), '..', '..', '..')))
|
||||
print sys.path
|
||||
|
||||
import lutris.runners
|
||||
from lutris.runners import import_runner
|
||||
from lutris.config import LutrisConfig
|
||||
|
@ -89,31 +95,34 @@ class RunnersDialog(gtk.Dialog):
|
|||
runner_vbox = gtk.VBox()
|
||||
|
||||
for runner in runner_list:
|
||||
hbox = gtk.HBox()
|
||||
#Label
|
||||
# Get runner details
|
||||
runner_class = import_runner(runner)
|
||||
runner_instance = runner_class()
|
||||
machine = runner_instance.machine
|
||||
description = runner_instance.description
|
||||
|
||||
hbox = gtk.HBox()
|
||||
#Label
|
||||
runner_label = gtk.Label()
|
||||
runner_label.set_markup("<b>"+runner + "</b> ( " + machine + " ) ")
|
||||
runner_label.set_markup("<b>"+runner + "</b>\n" + description + "\n <i>Supported platforms : " + machine + "</i>")
|
||||
runner_label.set_width_chars(33)
|
||||
runner_label.set_line_wrap(True)
|
||||
hbox.pack_start(runner_label, True, True, 5)
|
||||
runner_label.set_alignment(0.0,0.0)
|
||||
runner_label.set_padding(25,5)
|
||||
hbox.pack_start(runner_label,True, True)
|
||||
#Button
|
||||
button_alignement = gtk.Alignment(
|
||||
xalign=0.0, yalign=0.0,
|
||||
xscale=0.5, yscale=0.0
|
||||
)
|
||||
button = gtk.Button("Configure")
|
||||
button.set_size_request(100,30)
|
||||
button_align = gtk.Alignment(0.0,1.0,0.0,0.0)
|
||||
if runner_instance.is_installed():
|
||||
button = gtk.Button("Configure")
|
||||
button.set_label('Configure')
|
||||
button.set_size_request(100,30)
|
||||
button.connect("clicked",self.on_configure_clicked,runner)
|
||||
else:
|
||||
button = gtk.Button("Install")
|
||||
button.set_size_request(100,30)
|
||||
button.set_label('Install')
|
||||
button.connect("clicked",self.on_install_clicked,runner)
|
||||
button_alignement.add(button)
|
||||
hbox.pack_start(button_alignement,True,True)
|
||||
button_align.add(button)
|
||||
hbox.pack_start(button_align,True,False)
|
||||
|
||||
runner_vbox.pack_start(hbox,True,True,5)
|
||||
scrolled_window.add_with_viewport(runner_vbox)
|
||||
|
@ -124,7 +133,6 @@ class RunnersDialog(gtk.Dialog):
|
|||
|
||||
def on_install_clicked(self,widget,runner_classname):
|
||||
"""Install a runner"""
|
||||
#FIXME : this is ugly !
|
||||
runner_class = import_runner(runner_classname)
|
||||
runner = runner_class()
|
||||
runner.install()
|
||||
|
|
Loading…
Reference in a new issue