Browse Source

PoL/0003-add-addremoveprograms.patch: Add control panel menu

master
Pekka Helenius 5 years ago
committed by GitHub
parent
commit
579e49b44e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 14 deletions
  1. +33
    -14
      playonlinux/0003-add-addremoveprograms.patch

+ 33
- 14
playonlinux/0003-add-addremoveprograms.patch View File

@ -1,46 +1,55 @@
--- a/lib/wine.lib --- a/lib/wine.lib
+++ b/lib/wine.lib +++ b/lib/wine.lib
@@ -1101,6 +1101,7 @@
@@ -1224,6 +1224,8 @@
cname="$(POL_Wine_exename "$@")" cname="$(POL_Wine_exename "$@")"
[ "$cname" = "winecfg" ] && cname="Configure wine" [ "$cname" = "winecfg" ] && cname="Configure wine"
[ "$cname" = "regedit" ] && cname="Registry Editor" [ "$cname" = "regedit" ] && cname="Registry Editor"
+ [ "$cname" = "uninstaller" ] && cname="Add/Remove Programs Menu" + [ "$cname" = "uninstaller" ] && cname="Add/Remove Programs Menu"
+ [ "$cname" = "control" ] && cname="Control Panel"
[ "$cname" = "wineboot" ] && cname="Virtual drive creation" [ "$cname" = "wineboot" ] && cname="Virtual drive creation"
echo "$cname" echo "$cname"
} }
--- a/python/mainwindow.py --- a/python/mainwindow.py
+++ b/python/mainwindow.py +++ b/python/mainwindow.py
@@ -471,6 +471,7 @@
@@ -471,6 +471,8 @@
wx.EVT_TREE_ITEM_MENU(self, 105, self.RMBInGameList) wx.EVT_TREE_ITEM_MENU(self, 105, self.RMBInGameList)
wx.EVT_MENU(self, 230, self.RWineConfigurator) wx.EVT_MENU(self, 230, self.RWineConfigurator)
wx.EVT_MENU(self, 231, self.RRegistryEditor) wx.EVT_MENU(self, 231, self.RRegistryEditor)
+ wx.EVT_MENU(self, 237, self.RWineUninstaller) + wx.EVT_MENU(self, 237, self.RWineUninstaller)
+ wx.EVT_MENU(self, 238, self.RWineControlPanel)
wx.EVT_MENU(self, 232, self.GoToAppDir) wx.EVT_MENU(self, 232, self.GoToAppDir)
wx.EVT_MENU(self, 233, self.ChangeIcon) wx.EVT_MENU(self, 233, self.ChangeIcon)
wx.EVT_MENU(self, 234, self.UninstallGame) wx.EVT_MENU(self, 234, self.UninstallGame)
@@ -588,6 +589,10 @@
self.RegistryEditor = wx.MenuItem(self.GameListPopUpMenu, 231, _("Registry Editor"))
@@ -589,6 +591,14 @@
self.RegistryEditor.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/resources/images/menu/regedit.png")) self.RegistryEditor.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/resources/images/menu/regedit.png"))
self.GameListPopUpMenu.AppendItem(self.RegistryEditor) self.GameListPopUpMenu.AppendItem(self.RegistryEditor)
+
+ self.WineControlPanel = wx.MenuItem(self.GameListPopUpMenu, 238, _("Control Panel"))
+ self.WineControlPanel.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/resources/images/menu/manual.png"))
+ self.GameListPopUpMenu.AppendItem(self.WineControlPanel)
+
+ self.WineUninstaller = wx.MenuItem(self.GameListPopUpMenu, 237, _("Add/Remove Programs Menu")) + self.WineUninstaller = wx.MenuItem(self.GameListPopUpMenu, 237, _("Add/Remove Programs Menu"))
+ self.WineUninstaller.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/resources/images/menu/wine-uninstaller.png")) + self.WineUninstaller.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/resources/images/menu/wine-uninstaller.png"))
+ self.GameListPopUpMenu.AppendItem(self.WineUninstaller) + self.GameListPopUpMenu.AppendItem(self.WineUninstaller)
+
self.GotoAppDir = wx.MenuItem(self.GameListPopUpMenu, 232, _("Open the application's directory")) self.GotoAppDir = wx.MenuItem(self.GameListPopUpMenu, 232, _("Open the application's directory"))
self.GotoAppDir.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/resources/images/menu/folder-wine.png")) self.GotoAppDir.SetBitmap(wx.Bitmap(Variables.playonlinux_env+"/resources/images/menu/folder-wine.png"))
@@ -628,6 +633,9 @@
self.GameListPopUpMenu.AppendItem(self.GotoAppDir)
@@ -628,6 +638,12 @@
def RRegistryEditor(self, event): def RRegistryEditor(self, event):
self.RConfigure("regedit") self.RConfigure("regedit")
+ def RWineControlPanel(self, event):
+ self.RConfigure("control")
+
+ def RWineUninstaller(self, event): + def RWineUninstaller(self, event):
+ self.RConfigure("uninstaller") + self.RConfigure("uninstaller")
+ +
def run_plugin(self, event): def run_plugin(self, event):
game_exec = self.GetSelectedProgram() game_exec = self.GetSelectedProgram()
plugin=self.plugin_list[event.GetId()-300] plugin=self.plugin_list[event.GetId()-300]
@@ -796,7 +804,7 @@
@@ -796,7 +812,7 @@
self.menuGaucheAddLink("pol_prgm_readme", _("Read the manual"), i,Variables.playonlinux_env+"/resources/images/menu/manual.png",self.ReadMe) self.menuGaucheAddLink("pol_prgm_readme", _("Read the manual"), i,Variables.playonlinux_env+"/resources/images/menu/manual.png",self.ReadMe)
i+=1 i+=1
@ -52,42 +61,52 @@
--- a/bash/polconfigurator --- a/bash/polconfigurator
+++ b/bash/polconfigurator +++ b/bash/polconfigurator
@@ -51,6 +51,14 @@
@@ -51,6 +51,22 @@
wineserver -k wineserver -k
POL_Wine regedit POL_Wine regedit
} }
+polconfigurator_control()
+{
+ POL_Wine_AutoSetVersionEnv
+ wineserver -k
+ export POL_IgnoreWineErrors=True
+ POL_Wine control
+ export POL_IgnoreWineErrors=False
+}
+polconfigurator_uninstaller() +polconfigurator_uninstaller()
+{ +{
+ POL_Wine_AutoSetVersionEnv + POL_Wine_AutoSetVersionEnv
+ wineserver -k + wineserver -k
+ export POL_IgnoreWineErrors=True + export POL_IgnoreWineErrors=True
+ POL_Wine uninstaller
+ POL_Wine uninstaller
+ export POL_IgnoreWineErrors=False + export POL_IgnoreWineErrors=False
+} +}
polconfigurator_wineboot() polconfigurator_wineboot()
{ {
POL_Wine_AutoSetVersionEnv POL_Wine_AutoSetVersionEnv
@@ -104,6 +112,7 @@
@@ -104,6 +120,8 @@
{ {
local LNG_CONFIGURE=$(eval_gettext "Configure Wine") local LNG_CONFIGURE=$(eval_gettext "Configure Wine")
local LNG_REGISTRY=$(eval_gettext "Registry Editor") local LNG_REGISTRY=$(eval_gettext "Registry Editor")
+ local LNG_CONTROLPANEL=$(eval_gettext "Control Panel")
+ local LNG_UNINSTALLER=$(eval_gettext "Add/Remove Programs Menu") + local LNG_UNINSTALLER=$(eval_gettext "Add/Remove Programs Menu")
local LNG_KPROCESS=$(eval_gettext "Kill all prefix processes") local LNG_KPROCESS=$(eval_gettext "Kill all prefix processes")
local LNG_UPDATEPREFIX=$(eval_gettext "Update wineprefix") local LNG_UPDATEPREFIX=$(eval_gettext "Update wineprefix")
local LNG_WINDOWS_REBOOT=$(eval_gettext "Simulate Windows reboot") local LNG_WINDOWS_REBOOT=$(eval_gettext "Simulate Windows reboot")
@@ -114,7 +123,7 @@
@@ -114,7 +132,7 @@
local LNG_WINETRICKS=$(eval_gettext "Use WineTricks") local LNG_WINETRICKS=$(eval_gettext "Use WineTricks")
# ~$LNG_UPDATEPREFIX # ~$LNG_UPDATEPREFIX
- local ITEMS="$LNG_CONFIGURE~$LNG_REGISTRY~$LNG_KPROCESS~$LNG_WINDOWS_REBOOT~$LNG_CHANGEICON" - local ITEMS="$LNG_CONFIGURE~$LNG_REGISTRY~$LNG_KPROCESS~$LNG_WINDOWS_REBOOT~$LNG_CHANGEICON"
+ local ITEMS="$LNG_CONFIGURE~$LNG_REGISTRY~$LNG_UNINSTALLER~$LNG_KPROCESS~$LNG_WINDOWS_REBOOT~$LNG_CHANGEICON"
+ local ITEMS="$LNG_CONFIGURE~$LNG_REGISTRY~$LNG_CONTROLPANEL~$LNG_UNINSTALLER~$LNG_KPROCESS~$LNG_WINDOWS_REBOOT~$LNG_CHANGEICON"
if [ -e "$POL_USER_ROOT/plugins/Advanced Wine Configuration" ] if [ -e "$POL_USER_ROOT/plugins/Advanced Wine Configuration" ]
then then
ITEMS+="~$LNG_APLUGIN" ITEMS+="~$LNG_APLUGIN"
@@ -134,6 +143,7 @@
@@ -134,6 +152,8 @@
POL_SetupWindow_menu "$(eval_gettext "Please choose an action to perform")" "$TITLE" "$ITEMS" "~" POL_SetupWindow_menu "$(eval_gettext "Please choose an action to perform")" "$TITLE" "$ITEMS" "~"
[ "$APP_ANSWER" = "$LNG_CONFIGURE" ] && funct=winecfg [ "$APP_ANSWER" = "$LNG_CONFIGURE" ] && funct=winecfg
[ "$APP_ANSWER" = "$LNG_REGISTRY" ] && funct=regedit [ "$APP_ANSWER" = "$LNG_REGISTRY" ] && funct=regedit
+ [ "$APP_ANSWER" = "$LNG_CONTROLPANEL" ] && funct=control
+ [ "$APP_ANSWER" = "$LNG_UNINSTALLER" ] && funct=uninstaller + [ "$APP_ANSWER" = "$LNG_UNINSTALLER" ] && funct=uninstaller
[ "$APP_ANSWER" = "$LNG_KPROCESS" ] && funct=kprocess [ "$APP_ANSWER" = "$LNG_KPROCESS" ] && funct=kprocess
# [ "$APP_ANSWER" = "$LNG_UPDATEPREFIX" ] && funct="??" # [ "$APP_ANSWER" = "$LNG_UPDATEPREFIX" ] && funct="??"


Loading…
Cancel
Save