From 4118b8afdf2a5f6a2da774088a1ee20cd59e4ac4 Mon Sep 17 00:00:00 2001
From: Junyu Long <877730493@qq.com>
Date: Tue, 27 Aug 2024 21:23:16 +0800
Subject: [PATCH] ContainersFragment: Add function to reconfigure container on
next startup.
---
app/src/main/java/com/winlator/ContainersFragment.java | 6 ++++++
app/src/main/res/menu/container_popup_menu.xml | 1 +
app/src/main/res/values-zh-rCN/strings.xml | 2 ++
app/src/main/res/values/strings.xml | 2 ++
4 files changed, 11 insertions(+)
diff --git a/app/src/main/java/com/winlator/ContainersFragment.java b/app/src/main/java/com/winlator/ContainersFragment.java
index dc44b34b..a353ecf9 100644
--- a/app/src/main/java/com/winlator/ContainersFragment.java
+++ b/app/src/main/java/com/winlator/ContainersFragment.java
@@ -33,6 +33,7 @@
import com.winlator.core.PreloaderDialog;
import com.winlator.xenvironment.ImageFs;
+import java.io.File;
import java.util.ArrayList;
import java.util.List;
@@ -185,6 +186,11 @@ private void showListItemMenu(View anchorView, Container container) {
case R.id.container_info:
(new StorageInfoDialog(getActivity(), container)).show();
break;
+ case R.id.container_reconfigure:
+ ContentDialog.confirm(getContext(), R.string.do_you_want_to_reconfigure_wine, () -> {
+ new File(container.getRootDir(), ".wine/.update-timestamp").delete();
+ });
+ break;
}
return true;
});
diff --git a/app/src/main/res/menu/container_popup_menu.xml b/app/src/main/res/menu/container_popup_menu.xml
index 4316d435..f5c9da9a 100644
--- a/app/src/main/res/menu/container_popup_menu.xml
+++ b/app/src/main/res/menu/container_popup_menu.xml
@@ -5,4 +5,5 @@
+
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 0d6086ce..e70e0126 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -284,6 +284,8 @@
文件提供器允许通过安卓文件管理器访问Winlator的内部数据。
]]>
+ 重新配置
+ 您想要在下一次启动时重新配置容器吗? 这将删除时间戳以触发Wine配置。
切换方向
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 0342bbbf..71267ad2 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -337,6 +337,8 @@
File Provider allows access to Winlator\'s internal data through android file manager.
]]>
+ Reconfigure
+ Do you want to reconfigure this container on the next startup? This will remove the timestamp to trigger Wine Configuration.
XR