[playonlinux] 02/03: New upstream version 4.2.12
Bertrand Marc
bmarc at moszumanska.debian.org
Tue Jul 25 09:07:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
bmarc pushed a commit to branch master
in repository playonlinux.
commit 4ab0bdcb54006bf726e7d2919222e9711490d17c
Author: Bertrand Marc <bmarc at debian.org>
Date: Tue Jul 25 11:06:58 2017 +0200
New upstream version 4.2.12
---
CHANGELOG.md | 4 ++
Makefile | 82 ++++++++++++++++++++++
bash/check_gl | 24 ++++---
doc/playonlinux-daemon.1 | 28 --------
etc/PlayOnLinux.appdata.xml | 50 +++++++++++++
etc/PlayOnLinux.desktop | 11 ++-
...x-Programmes.menu => playonlinux-Programs.menu} | 0
etc/pol_bash | 2 +-
lib/scripts.lib | 21 ++++--
lib/setupwindow.lib | 5 +-
python/configure.py | 29 ++++++--
python/guiv3.py | 2 +-
python/lib/Variables.py | 2 +-
python/lib/playonlinux.py | 4 +-
python/mainwindow.py | 64 +++++++++--------
15 files changed, 234 insertions(+), 94 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ae9290..cbcbc1a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 4.2.11
+* Fix POL_SetupWindow_download clobbering $FILENAME
+* Fix small typo in first use "send report" message
+
# 4.2.10
* Silence POL_Notice_IsAck when ack_notices file doesn't exist
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fadd473
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,82 @@
+# 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, see <http://www.gnu.org/licenses/>.
+#
+# Authors: Jiri Konecny <dragonlichcz at gmail.com>
+
+
+# Arguments:
+#
+# PREFIX -- Set prefix for the installation (/usr is default)
+# DESTDIR -- Where you want to install
+#
+
+CFLAGS ?= -O2
+CC = gcc $(CFLAGS)
+PYTHON = python2 -m py_compile
+GZIP = gzip
+
+PREFIX ?= /usr
+DESTDIR ?= # root dir
+
+sharedir := $(DESTDIR)$(PREFIX)/share
+bindir := $(DESTDIR)$(PREFIX)/bin
+execdir := $(DESTDIR)$(PREFIX)/libexec
+
+
+all: build
+
+clean:
+ $(RM) ./python/*.pyc
+ $(RM) ./python/lib/*.pyc
+ $(RM) ./bin/check_dd
+ $(RM) ./bin/playonlinux
+ $(RM) ./bin/playonlinux-pkg
+ $(RM) ./ChangeLog
+
+build:
+ $(CC) ./src/check_direct_rendering.c -o ./bin/playonlinux-check_dd -lGL -lX11
+ $(PYTHON) ./python/*.py
+ $(PYTHON) ./python/lib/*.py
+ echo -e '#!/bin/bash\nGDK_BACKEND=x11 ${sharedir}/playonlinux/playonlinux "$$@"\nexit 0' > ./bin/playonlinux
+ echo -e '#!/bin/bash\n${sharedir}/playonlinux/playonlinux-pkg "$$@"\nexit 0' > ./bin/playonlinux-pkg
+ chmod +x ./bin/playonlinux
+ chmod +x ./bin/playonlinux-pkg
+ sed -i 's/\(\["DEBIAN_PACKAGE"\]\s*=\s*\)"FALSE"/\1"TRUE"/' \
+ ./python/lib/Variables.py
+
+install:
+ install -d $(bindir)
+ install -d $(execdir)
+ install -d $(sharedir)/pixmaps
+ install -d $(sharedir)/applications
+ install -d $(sharedir)/appdata
+ install -d $(sharedir)/playonlinux/bin
+ install -d $(sharedir)/man/man1
+ install -d $(sharedir)/locale
+ $(GZIP) -c ./doc/playonlinux-pkg.1 > $(sharedir)/man/man1/playonlinux-pkg.1.gz
+ $(GZIP) -c ./doc/playonlinux.1 > $(sharedir)/man/man1/playonlinux.1.gz
+ cp ./etc/PlayOnLinux.desktop $(sharedir)/applications/PlayOnLinux.desktop
+ cp ./etc/PlayOnLinux.appdata.xml $(sharedir)/appdata/PlayOnLinux.appdata.xml
+ cp ./etc/playonlinux.png $(sharedir)/pixmaps/playonlinux.png
+ cp ./etc/playonlinux16.png $(sharedir)/pixmaps/playonlinux16.png
+ cp ./etc/playonlinux32.png $(sharedir)/pixmaps/playonlinux32.png
+ cp ./bin/{playonlinux,playonlinux-pkg} $(bindir)/
+ cp ./bin/playonlinux-check_dd $(execdir)/
+ cp ./{playonlinux*,README.md,TRANSLATORS,CHANGELOG.md,LICENCE} $(sharedir)/playonlinux/
+ cp -R ./{bash,etc,lib,plugins,python,resources,tests} $(sharedir)/playonlinux/
+ cp -R ./lang/locale/* $(sharedir)/locale/
+
+changelog:
+ (GIT_DIR=.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+
+.PHONY: all clean build install changelog
diff --git a/bash/check_gl b/bash/check_gl
index 01b52e6..51a48e3 100755
--- a/bash/check_gl
+++ b/bash/check_gl
@@ -41,19 +41,25 @@ Check_OpenGL()
chmod +x "$POL_USER_ROOT/tmp/check_dd_$1"
message="$("$POL_USER_ROOT/tmp/check_dd_$1")"
out="$?"
-
- if [ "$out" = "0" ]
- then
- $cmd "$message"
- exit 0
- else
- $cmdW "$message"
- exit 2
- fi
+ # When bz2 version is not presented (was installed on specific platform)
+ # use on site compiled check_dd version
+ elif [ -e "/usr/libexec/playonlinux-check_dd" ]
+ then
+ message="$("/usr/libexec/playonlinux-check_dd")"
+ out="$?"
else
$cmdW "check_dd_$1 missing, test skipped"
exit 0
fi
+
+ if [ "$out" = "0" ]
+ then
+ $cmd "$message"
+ exit 0
+ else
+ $cmdW "$message"
+ exit 2
+ fi
}
cd /tmp
diff --git a/doc/playonlinux-daemon.1 b/doc/playonlinux-daemon.1
deleted file mode 100644
index f8e8a4e..0000000
--- a/doc/playonlinux-daemon.1
+++ /dev/null
@@ -1,28 +0,0 @@
-.TH PLAYONLINUX-DAEMON 1 "February 6, 2009"
-
-.SH NAME
-playonlinux-daemon \- daemon to handle disk insertion in PlayOnLinux
-
-.SH SYNOPSIS
-.B playonlinux-daemon
-.RI [ options ]
-
-.SH DESCRIPTION
-.B playonlinux-daemon
-is a daemon to handle disk insertion within PlayOnLinux. It still needs testing and may not work flawlessly.
-.br
-Users who want to handle autoruns with PlayOnLinux should launch this script at startup.
-
-.SH OPTIONS
-.TP
-.I "--version"
- Show version number and exit.
-.TP
-.I "--kill"
- Kill the daemon.
-
-.SH AUTHOR
-playonlinux was written by Quentin Pâris <qparis at playonlinux.com>.
-.PP
-This manual page was written by Bertrand Marc <beberking at gmail.com>,
-for the Debian project (but may be used by others).
diff --git a/etc/PlayOnLinux.appdata.xml b/etc/PlayOnLinux.appdata.xml
new file mode 100644
index 0000000..4d6d784
--- /dev/null
+++ b/etc/PlayOnLinux.appdata.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2016 Jiri Konecny <dragonlichcz at gmail.com> -->
+<component type="desktop">
+ <id>PlayOnLinux.desktop</id>
+ <project_license>GPL-3.0</project_license>
+ <metadata_license>CC0-1.0</metadata_license>
+ <name>PlayOnLinux</name>
+ <summary>Graphical front-end for Wine</summary>
+ <description>
+ <p>
+ PlayOnLinux will allow you to run your favorite Windows games and
+ applications on Linux through Wine easily.
+ </p>
+ <p>
+ New users can often find Wine to be intimidating and difficult to use.
+ PlayOnLinux simplifies much of this and makes installing and using
+ Windows programs easier.
+ </p>
+ <p>
+ PlayOnLinux has the database of Windows applications from which the user
+ can install desired application with a few clicks. It will automatically
+ setup your Wine prefix and download any required Windows libraries.
+ </p>
+ </description>
+ <screenshots>
+ <screenshot type="default">
+ <image>https://jkonecny.fedorapeople.org/images/playonlinux_screen_01.png</image>
+ </screenshot>
+ <screenshot>
+ <image>https://jkonecny.fedorapeople.org/images/playonlinux_screen_02.png</image>
+ </screenshot>
+ <screenshot>
+ <image>https://jkonecny.fedorapeople.org/images/playonlinux_screen_03.png</image>
+ </screenshot>
+ </screenshots>
+ <url type="homepage">https://www.playonlinux.com/</url>
+ <url type="bugtracker">https://www.playonlinux.com/en/bugs.html</url>
+ <url type="donation">https://www.playonlinux.com/en/donate.html</url>
+ <url type="help">http://wiki.playonlinux.com/index.php/Main_Page</url>
+ <url type="translate">http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_10:_Script_Translation</url>
+
+ <keywords>
+ <keyword>wine</keyword>
+ <keyword>games</keyword>
+ <keyword>software</keyword>
+ <keyword>windows</keyword>
+ </keywords>
+
+ <update_contact>dragonlichcz_at_gmail.com</update_contact>
+</component>
diff --git a/etc/PlayOnLinux.desktop b/etc/PlayOnLinux.desktop
index 08b1d23..490108c 100644
--- a/etc/PlayOnLinux.desktop
+++ b/etc/PlayOnLinux.desktop
@@ -1,9 +1,8 @@
[Desktop Entry]
Version=1.0
-Encoding=UTF-8
Name=PlayOnLinux
-Comment=PlayOnLinux
-Type=Application %F
-Exec=playonlinux
-Icon=/usr/share/playonlinux/etc/playonlinux.png
-Categories=Application;Game
+Comment=Front-end application for the wine
+Type=Application
+Exec=playonlinux %F
+Icon=playonlinux
+Categories=Utility;Emulator;
diff --git a/etc/playonlinux-Programmes.menu b/etc/playonlinux-Programs.menu
similarity index 100%
rename from etc/playonlinux-Programmes.menu
rename to etc/playonlinux-Programs.menu
diff --git a/etc/pol_bash b/etc/pol_bash
index 7911f05..7c99193 100644
--- a/etc/pol_bash
+++ b/etc/pol_bash
@@ -6,7 +6,7 @@ echo "-------------------"
echo ""
if [ "$PLAYONLINUX" = "" ]
then
-echo "Ce script doit être executé dans PlayOnLinux."
+echo "This script must be executed in PlayOnLinux."
read ok
exit 0
fi
diff --git a/lib/scripts.lib b/lib/scripts.lib
index 64df6f7..fbd3634 100755
--- a/lib/scripts.lib
+++ b/lib/scripts.lib
@@ -315,6 +315,7 @@ POL_Shortcut()
BINARY="$1"
SpecialArg="$4"
Categories="$5"
+ BIN_PATH="$6"
if [ "$2" = "" ]
then
ICON_FILENAME="$1"
@@ -328,14 +329,20 @@ POL_Shortcut()
ICON_WEB_NAME="$3"
ICON_OK=0
- local binary_path="$(POL_System_find_file "$BINARY")"
- local binary_dir="$(dirname "$binary_path")"
+ if [ -z "$BIN_PATH" ]; then
+ local binary_path="$(POL_System_find_file "$BINARY")"
+ local binary_dir="$WINEPREFIX/drive_c/$(dirname "$binary_path")"
+ else
+ local binary_path="$BIN_PATH/$BINARY"
+ local binary_dir="$(dirname "$binary_path")"
+ fi
+
local binary_name="$(basename "$binary_path")"
+ local target="$binary_dir/$binary_name"
- [ -z "$binary_dir" ] && POL_Debug_Fatal "Can't find $BINARY"
+ [ "$binary_dir" = "$WINEPREFIX/drive_c/" ] && POL_Debug_Fatal "Can't find $BINARY"
POL_Debug_Message "Looking for <${BINARY}>, found <${binary_path}>"
- local target="$WINEPREFIX/drive_c/$binary_dir/$binary_name"
[[ "$target" =~ \.lnk$ ]] && target="$(winepath -u "$(strings "$target"|tail -n 1)")"
if [ -n "$ICON_WEB_NAME" ]; then
@@ -364,10 +371,10 @@ POL_Shortcut()
[ -n "$LOGTITLE" ] && echo "#POL_Log=$LOGTITLE"
[ -n "$SCRIPTID" ] && echo "#ScriptID=$SCRIPTID"
if [[ "$binary_name" =~ \.(lnk|bat|cmd)$ ]]; then
- echo "cd \"$(dirname "$target")\""
- echo "POL_Wine start.exe /wait /unix \"\$WINEPREFIX/drive_c/$binary_dir/$binary_name\" $SpecialArg \"\$@\""
+ echo "cd \"$binary_dir\""
+ echo "POL_Wine start.exe /wait /unix \"\$target\" $SpecialArg \"\$@\""
else
- echo "cd \"$WINEPREFIX/drive_c/$binary_dir\""
+ echo "cd \"$binary_dir\""
echo "POL_Wine \"$binary_name\" $SpecialArg \"\$@\""
fi) > "$POL_USER_ROOT/shortcuts/$ICON_FILENAME"
chmod +x "$POL_USER_ROOT/shortcuts/$ICON_FILENAME"
diff --git a/lib/setupwindow.lib b/lib/setupwindow.lib
index b9ff7bf..5592a5a 100755
--- a/lib/setupwindow.lib
+++ b/lib/setupwindow.lib
@@ -177,6 +177,7 @@ POL_SetupWindow_download ()
# /!\ Scriptors should directly use POL_Download
# If provided, make sure the filename is absolute to avoid any misinterpretation from server
+ local FILENAME
[ -n "$4" ] && FILENAME="$4" || FILENAME="$PWD/"
Result="$(echo "$POL_COOKIE POL_SetupWindow_download $$ $(POL_Untab "$1") $(POL_Untab "$2") $3 $(POL_Untab "$FILENAME")" | ncns "$POL_HOST" "$POL_PORT")"
# FIXME: Result should send 'fail' if the download has failed. Maybe we could catch it
@@ -726,11 +727,13 @@ POL_SetupWindow_shortcut_creator()
[ "$APP_ANSWER" = "$LNG_FINISH" ] && break
local EXE_FILE
+ local EXE_PATH
if [ "$APP_ANSWER" = "$LNG_BROWSE" ]
then
cd $WINEPREFIX/drive_c
POL_SetupWindow_browse "$(eval_gettext "Please choose a file for $APPLICATION_TITLE to make a shortcut")" "$TITLE"
EXE_FILE="$(basename "$APP_ANSWER")"
+ EXE_PATH="$(dirname "$APP_ANSWER")"
else
EXE_FILE="$APP_ANSWER"
fi
@@ -766,7 +769,7 @@ POL_SetupWindow_shortcut_creator()
break
fi
done
- POL_Shortcut "$EXE_FILE" "$SUGGEST"
+ POL_Shortcut "$EXE_FILE" "$SUGGEST" "" "" "" "$EXE_PATH"
echo "POL_Shortcut \"$EXE_FILE\" \"$SUGGEST\"" >> "$POL_USER_ROOT/tmp/shortcuts"
fi
done
diff --git a/python/configure.py b/python/configure.py
index 468b2a4..6b80d96 100755
--- a/python/configure.py
+++ b/python/configure.py
@@ -395,6 +395,11 @@ class Onglets(wx.Notebook):
self.general_elements["arguments"].SetValue(playonlinux.getArgs(self.s_title))
self.display_elements["folder_button"].SetLabel(_("Open program's directory"))
+ if not playonlinux.GetSettings("OPEN_IN", self.s_prefix):
+ self.display_elements["open_in"].SetValue("xdg-open")
+ else:
+ self.display_elements["open_in"].SetValue(playonlinux.GetSettings("OPEN_IN", self.s_prefix))
+
if(os.path.exists(Variables.playonlinux_rep+"configurations/configurators/"+self.s_title)):
self.configurator_title.Show()
self.configurator_button.Show()
@@ -471,16 +476,16 @@ class Onglets(wx.Notebook):
param = event.GetId()
if(param == 402):
if(self.s_isPrefix == False):
- playonlinux.open_folder(self.s_title)
+ playonlinux.open_folder(self.s_title, self.display_elements["open_in"].GetValue().encode("utf-8","replace"))
else:
playonlinux.open_folder_prefix(self.s_prefix)
- if(param == 403):
+ if(param == 404):
if(self.s_isPrefix == False):
subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", self.s_title.encode('utf-8','replace'), "POL_OpenShell", self.s_title.encode('utf-8','replace')])
else:
subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--prefix", self.s_prefix.encode('utf-8','replace'), "POL_OpenShell"])
- if(param == 404):
+ if(param == 405):
self.FileDialog = wx.FileDialog(self)
self.FileDialog.SetDirectory("~")
self.supported_files = "All|*.exe;*.EXE;*.msi;*.MSI\
@@ -531,6 +536,15 @@ class Onglets(wx.Notebook):
wx.EVT_BUTTON(self, 400+num, self.misc_button)
+ def AddMiscChamp(self, title, shortname, value, num):
+ self.display_elements[shortname+"_text"] = wx.StaticText(self.panelMisc, -1, title,pos=(15,24+num*40))
+ self.display_elements[shortname] = wx.TextCtrl(self.panelMisc, 400+num, value, pos=(245,19+num*40), size=(270,25))
+ wx.EVT_TEXT(self, 400+num, self.set_open_in)
+
+ def set_open_in(self, event):
+ new_open_in = self.display_elements["open_in"].GetValue()
+ playonlinux.SetSettings('OPEN_IN', new_open_in, self.s_prefix)
+
def AddMiscLongText(self, title, shortname, num):
self.display_elements[shortname+"_text"] = wx.StaticText(self.panelMisc, -1, title,pos=(15,19+num*40))
self.display_elements[shortname+"_panel"] = wx.Panel(self.panelMisc, -1, size=wx.Size(450,70),pos=(20,44+num*40))
@@ -541,7 +555,7 @@ class Onglets(wx.Notebook):
content = ""
self.display_elements[shortname] = wx.TextCtrl(self.display_elements[shortname+"_panel"], 400+num, content, size=wx.Size(448,68), pos=(2,2), style=Variables.widget_borders|wx.TE_MULTILINE)
- wx.EVT_TEXT(self, 405, self.edit_shortcut)
+ wx.EVT_TEXT(self, 400+num, self.edit_shortcut)
def edit_shortcut(self, event):
content = self.display_elements["pre_run"].GetValue().encode("utf-8","replace")
@@ -579,9 +593,10 @@ class Onglets(wx.Notebook):
self.AddMiscElement(_("Mouse warp override"),"MouseWarpOverride",["Enabled","Disabled","Force"],["enable","disable","force"],1)
self.AddMiscButton("","folder",2)
- self.AddMiscButton(_("Open a shell"),"shell",3)
- self.AddMiscButton(_("Run a .exe file in this virtual drive"),"exerun",4)
- self.AddMiscLongText(_("Command to exec before running the program"),"pre_run",5)
+ self.AddMiscChamp(_("Open directory using command"),"open_in","",3)
+ self.AddMiscButton(_("Open a shell"),"shell",4)
+ self.AddMiscButton(_("Run a .exe file in this virtual drive"),"exerun",5)
+ self.AddMiscLongText(_("Command to exec before running the program"),"pre_run",6)
self.AddPage(self.panelMisc, nom)
diff --git a/python/guiv3.py b/python/guiv3.py
index 676ee51..95cbf63 100755
--- a/python/guiv3.py
+++ b/python/guiv3.py
@@ -54,7 +54,7 @@ class Download(threading.Thread):
class POL_SetupFrame(wx.Frame): #fenêtre principale
def __init__(self, parent, titre, POL_SetupWindowID, Arg1, Arg2, Arg3):
- wx.Frame.__init__(self, None, -1, title = titre, style = wx.CLOSE_BOX | wx.CAPTION | wx.MINIMIZE_BOX, size = (520, 398+Variables.windows_add_size))
+ wx.Frame.__init__(self, None, -1, title = titre, style = wx.CLOSE_BOX | wx.CAPTION | wx.MINIMIZE_BOX | wx.RESIZE_BORDER, size = (520, 398+Variables.windows_add_size))
self.parent = parent
self.bash_pid = int(POL_SetupWindowID)
self.SetIcon(wx.Icon(Variables.playonlinux_env+"/etc/playonlinux.png", wx.BITMAP_TYPE_ANY))
diff --git a/python/lib/Variables.py b/python/lib/Variables.py
index a9470b7..60d110c 100755
--- a/python/lib/Variables.py
+++ b/python/lib/Variables.py
@@ -16,7 +16,7 @@ except:
os.environ["POL_PORT"] = "0"
os.environ["PLAYONLINUX"] = os.path.realpath(os.path.realpath(__file__)+"/../../../")
os.environ["SITE"] = "http://repository.playonlinux.com"
-os.environ["VERSION"] = "4.2.10"
+os.environ["VERSION"] = "4.2.12"
os.environ["POL_ID"] = str(random.randint(1, 100000000))
os.environ["WINE_SITE"] = "http://wine.playonlinux.com/binaries"
os.environ["GECKO_SITE"] = "http://wine.playonlinux.com/gecko"
diff --git a/python/lib/playonlinux.py b/python/lib/playonlinux.py
index 8032846..f081af5 100755
--- a/python/lib/playonlinux.py
+++ b/python/lib/playonlinux.py
@@ -224,7 +224,7 @@ def keynat(string):
r.append(c.lower())
return r
-def open_folder(software):
+def open_folder(software, cmd="xdg-open"):
read = open(Variables.playonlinux_rep+"shortcuts/"+software,"r").readlines()
if not len(read):
@@ -244,7 +244,7 @@ def open_folder(software):
if(os.environ["POL_OS"] == "Mac"):
subprocess.call(["open", AppDir])
else:
- subprocess.call(["xdg-open", AppDir])
+ subprocess.call([cmd, AppDir])
def open_folder_prefix(software):
AppDir = os.environ["POL_USER_ROOT"]+"/wineprefix/"+software
diff --git a/python/mainwindow.py b/python/mainwindow.py
index 8007893..b8b5230 100755
--- a/python/mainwindow.py
+++ b/python/mainwindow.py
@@ -122,7 +122,7 @@ class PanelManager(wx.aui.AuiManager):
name = self.SavePerspective().split("=")
name = name[1].split(";")
name = name[0]
- return name
+ return name
def getPerspective(self):
return self.SavePerspective().replace(self._getPerspectiveName(),"PERSPECTIVE_NAME")
@@ -222,8 +222,8 @@ class MainWindow(wx.Frame):
## List game
self.list_game = wx.TreeCtrl(self, 105, style=wx.TR_HIDE_ROOT|wx.TR_FULL_ROW_HIGHLIGHT)
- self.list_game.SetSpacing(0);
- self.list_game.SetIndent(5);
+ self.list_game.SetSpacing(0)
+ self.list_game.SetIndent(5)
self.list_game.SetImageList(self.images)
self.menu_gauche = wx.Panel(self,-1)
@@ -343,15 +343,15 @@ class MainWindow(wx.Frame):
self.last_string = ""
- self.sb = wx.StatusBar(self, -1 )
+ self.sb = wx.StatusBar(self, -1)
self.sb.SetFieldsCount(2)
self.sb.SetStatusWidths([self.GetSize()[0], -1])
self.sb.SetStatusText("", 0)
if(os.environ["POL_OS"] == "Mac"):
- hauteur = 2;
+ hauteur = 2
else:
- hauteur = 6;
+ hauteur = 6
self.jauge_update = wx.Gauge(self.sb, -1, 100, (self.GetSize()[0]-100, hauteur), size=(100,16))
self.jauge_update.Pulse()
self.jauge_update.Hide()
@@ -393,13 +393,13 @@ class MainWindow(wx.Frame):
# wxpython 2.8 does not support AddStretchableSpace(). This is a dirty workaround for this.
self.dirtyHack = wx.StaticText(self.toolbar)
self.SpaceHack = True
- self.toolbar.AddControl( self.dirtyHack )
+ self.toolbar.AddControl(self.dirtyHack)
self.UpdateSearchHackSize()
try:
- self.toolbar.AddControl( self.searchbox , _("Search"))
+ self.toolbar.AddControl(self.searchbox , _("Search"))
except:
- self.toolbar.AddControl( self.searchbox )
+ self.toolbar.AddControl(self.searchbox)
self.searchbox.SetDescriptiveText(_("Search"))
@@ -447,11 +447,11 @@ class MainWindow(wx.Frame):
wx.EVT_TREE_SEL_CHANGED(self, 105, self.Select)
# Support
- wx.EVT_MENU(self, 400, self.runSupport)
- wx.EVT_MENU(self, 401, self.runSupport)
- wx.EVT_MENU(self, 402, self.runSupport)
- wx.EVT_MENU(self, 403, self.runSupport)
- wx.EVT_MENU(self, 404, self.runSupport)
+ wx.EVT_MENU(self, 400, self.runSupport)
+ wx.EVT_MENU(self, 401, self.runSupport)
+ wx.EVT_MENU(self, 402, self.runSupport)
+ wx.EVT_MENU(self, 403, self.runSupport)
+ wx.EVT_MENU(self, 404, self.runSupport)
# PlayOnLinux main timer
self.timer = wx.Timer(self, 1)
@@ -477,7 +477,7 @@ class MainWindow(wx.Frame):
wx.EVT_MENU(self, 235, self.RKill)
wx.EVT_MENU(self, 236, self.ReadMe)
self.Bind(wx.EVT_SIZE, self.ResizeWindow)
- self._mgr.restorePosition()
+ self._mgr.restorePosition()
def ResizeWindow(self, e):
self.UpdateGaugePos()
@@ -490,9 +490,9 @@ class MainWindow(wx.Frame):
def UpdateGaugePos(self):
if(os.environ["POL_OS"] == "Mac"):
- hauteur = 2;
+ hauteur = 2
else:
- hauteur = 6;
+ hauteur = 6
self.jauge_update.SetPosition((self.GetSize()[0]-100, hauteur))
def SetupWindowTimer_SendToGui(self, recvData):
@@ -513,10 +513,9 @@ class MainWindow(wx.Frame):
else:
self.SetupWindow_TimerRestart(10)
- if(self.SetupWindowTimer_action != None):
+ if(self.SetupWindowTimer_action != None):
return gui_server.readAction(self)
-
-
+
def TimerAction(self, event):
self.StatusRead()
@@ -635,7 +634,7 @@ class MainWindow(wx.Frame):
subprocess.Popen(["bash", Variables.playonlinux_rep+"/plugins/"+plugin+"/scripts/menu", game_exec])
except :
pass
-
+
def runSupport(self, event):
urlId = event.GetId()-400
urlPrefix = "http://www."+os.environ["POL_DNS"]+"/en"
@@ -704,7 +703,10 @@ class MainWindow(wx.Frame):
def GoToAppDir(self, event):
self.game_exec = self.GetSelectedProgram()
- playonlinux.open_folder(self.game_exec)
+ if not playonlinux.GetSettings("OPEN_IN", playonlinux.getPrefix(self.game_exec)):
+ playonlinux.open_folder(self.game_exec)
+ else:
+ playonlinux.open_folder(self.game_exec, playonlinux.GetSettings("OPEN_IN", playonlinux.getPrefix(self.game_exec)))
def ChangeIcon(self, event):
self.IconDir = Variables.homedir+"/.local/share/icons/"
@@ -727,11 +729,11 @@ class MainWindow(wx.Frame):
def Select(self, event):
game_exec = self.GetSelectedProgram()
self.read = open(Variables.playonlinux_rep+"shortcuts/"+game_exec,"r").readlines()
- self.i = 0;
- self.wine_present = False;
+ self.i = 0
+ self.wine_present = False
while(self.i < len(self.read)):
if("wine " in self.read[self.i]):
- self.wine_present = True;
+ self.wine_present = True
self.i += 1
self.generate_menu(game_exec)
@@ -753,7 +755,7 @@ class MainWindow(wx.Frame):
self.menuElem = {}
self.menuImage = {}
- i = 0;
+ i = 0
self.menuGaucheAddTitle("pol_title", os.environ["APPLICATION_TITLE"], i)
i+=1
self.menuGaucheAddLink("pol_prgm_install", _("Install a program"), i,Variables.playonlinux_env+"/resources/images/menu/add.png",self.InstallMenu)
@@ -883,9 +885,9 @@ class MainWindow(wx.Frame):
root = self.list_game.AddRoot("")
self.i = 0
if(self.iconSize <= 32):
- self.iconFolder = "32";
+ self.iconFolder = "32"
else:
- self.iconFolder = "full_size";
+ self.iconFolder = "full_size"
for game in self.games: #METTRE EN 32x32
if(self.searchbox.GetValue().encode("utf-8","replace").lower() in game.lower()):
if(not os.path.isdir(Variables.playonlinux_rep+"/shortcuts/"+game)):
@@ -1100,8 +1102,8 @@ class MainWindow(wx.Frame):
self.registeredPid = pids
if(playonlinux.GetSettings("DONT_ASK_BEFORE_CLOSING") == "TRUE" or self.registeredPid == [] or wx.YES == wx.MessageBox(_('Are you sure you want to close all {0} windows?').format(os.environ["APPLICATION_TITLE"]).decode("utf-8","replace"),os.environ["APPLICATION_TITLE"], style=wx.YES_NO | wx.ICON_QUESTION)):
- self.SizeToSave = self.GetSize();
- self.PositionToSave = self.GetPosition();
+ self.SizeToSave = self.GetSize()
+ self.PositionToSave = self.GetPosition()
# Save size and position
playonlinux.SetSettings("MAINWINDOW_WIDTH",str(self.SizeToSave[0]))
playonlinux.SetSettings("MAINWINDOW_HEIGHT",str(self.SizeToSave[1]-Variables.windows_add_playonmac*56))
@@ -1249,7 +1251,7 @@ class PlayOnLinuxApp(wx.App):
if(os.environ["DEBIAN_PACKAGE"] == "FALSE"):
if(playonlinux.GetSettings("SEND_REPORT") == ""):
- if(wx.YES == wx.MessageBox(_('Do you want to help {0} to make a compatibility database?\n\nIf you click yes, the following things will be sent to us anonymously the first time you run a Windows program:\n\n- You graphic card model\n- Your OS version\n- If graphic drivers are installed or not.\n\n\nThese information will be very precious for us to help people.').format(os.environ["APPLICATION_TITLE"]).decode("utf-8","replace"), os.environ["APPLICATION_TITLE"],style=wx.YES_ [...]
+ if(wx.YES == wx.MessageBox(_('Do you want to help {0} to make a compatibility database?\n\nIf you click yes, the following things will be sent to us anonymously the first time you run a Windows program:\n\n- Your graphic card model\n- Your OS version\n- If graphic drivers are installed or not.\n\n\nThese information will be very precious for us to help people.').format(os.environ["APPLICATION_TITLE"]).decode("utf-8","replace"), os.environ["APPLICATION_TITLE"],style=wx.YES [...]
playonlinux.SetSettings("SEND_REPORT","TRUE")
else:
playonlinux.SetSettings("SEND_REPORT","FALSE")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/playonlinux.git
More information about the Pkg-games-commits
mailing list