WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Change "Deselect All" to "Toggle All" in Excluded apps settings
@ 2020-02-09 17:30 sebcbi1
  2020-02-14 11:00 ` Jason A. Donenfeld
  0 siblings, 1 reply; 3+ messages in thread
From: sebcbi1 @ 2020-02-09 17:30 UTC (permalink / raw)
  To: wireguard

From: sebcbi1 <sebcbi1@gmail.com>

Android : Change functionality in excluded apps dialog for better user experience when user wants only one or few apps to use wireguard
Please review italian and russian translation

---
 .../com/wireguard/android/fragment/AppListDialogFragment.java | 4 ++--
 app/src/main/res/values-it/strings.xml                        | 2 +-
 app/src/main/res/values-ru/strings.xml                        | 2 +-
 app/src/main/res/values/strings.xml                           | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java b/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
index 67059c7..c513d47 100644
--- a/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
@@ -98,7 +98,7 @@ public class AppListDialogFragment extends DialogFragment {
 
         alertDialogBuilder.setPositiveButton(R.string.set_exclusions, (dialog, which) -> setExclusionsAndDismiss());
         alertDialogBuilder.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
-        alertDialogBuilder.setNeutralButton(R.string.deselect_all, (dialog, which) -> {
+        alertDialogBuilder.setNeutralButton(R.string.toggle_all, (dialog, which) -> {
         });
 
         binding.setFragment(this);
@@ -109,7 +109,7 @@ public class AppListDialogFragment extends DialogFragment {
         final AlertDialog dialog = alertDialogBuilder.create();
         dialog.setOnShowListener(d -> dialog.getButton(DialogInterface.BUTTON_NEUTRAL).setOnClickListener(view -> {
             for (final ApplicationData app : appData)
-                app.setExcludedFromTunnel(false);
+                app.setExcludedFromTunnel(!app.isExcludedFromTunnel());
         }));
         return dialog;
     }
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 2aba5f8..b37d792 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -66,7 +66,7 @@
     <string name="dark_theme_summary_on">Stai usando il tema scuro (notte)</string>
     <string name="dark_theme_title">Usa tema scuro</string>
     <string name="delete">Elimina</string>
-    <string name="deselect_all">Deseleziona tutto</string>
+    <string name="toggle_all">Inverti tutto</string>
     <string name="dns_servers">Server DNS</string>
     <string name="edit">Modifica</string>
     <string name="endpoint">Endpoint</string>
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 2f2c03b..00b96fb 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -66,7 +66,7 @@
     <string name="dark_theme_summary_on">В данный момент используется темная (ночная) тема</string>
     <string name="dark_theme_title">Использовать темную тему</string>
     <string name="delete">Удалить</string>
-    <string name="deselect_all">Снять выделенное</string>
+    <string name="toggle_all">Инвертировать все</string>
     <string name="dns_servers">DNS-серверы</string>
     <string name="edit">Редактировать</string>
     <string name="endpoint">Конечная точка</string>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 336cd4e..89a32c0 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -66,7 +66,7 @@
     <string name="dark_theme_summary_on">Currently using dark (night) theme</string>
     <string name="dark_theme_title">Use dark theme</string>
     <string name="delete">Delete</string>
-    <string name="deselect_all">Deselect All</string>
+    <string name="toggle_all">Toggle All</string>
     <string name="dns_servers">DNS servers</string>
     <string name="edit">Edit</string>
     <string name="endpoint">Endpoint</string>
-- 
2.25.0

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Change "Deselect All" to "Toggle All" in Excluded apps settings
  2020-02-09 17:30 [PATCH] Change "Deselect All" to "Toggle All" in Excluded apps settings sebcbi1
@ 2020-02-14 11:00 ` Jason A. Donenfeld
  2020-02-16 15:54   ` Sebastien LEBEAU
  0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2020-02-14 11:00 UTC (permalink / raw)
  To: sebcbi1; +Cc: WireGuard mailing list

Seems reasonable, but please resubmit with your Signed-off-by: line.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Change "Deselect All" to "Toggle All" in Excluded apps settings
  2020-02-14 11:00 ` Jason A. Donenfeld
@ 2020-02-16 15:54   ` Sebastien LEBEAU
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastien LEBEAU @ 2020-02-16 15:54 UTC (permalink / raw)
  To: Jason A. Donenfeld, wireguard

[-- Attachment #1.1: Type: text/plain, Size: 4044 bytes --]

Signed-off-by: Sébastien LEBEAU <sebcbi1@gmail.com>
---
 .../com/wireguard/android/fragment/AppListDialogFragment.java | 4 ++--
 app/src/main/res/values-it/strings.xml                        | 2 +-
 app/src/main/res/values-ru/strings.xml                        | 2 +-
 app/src/main/res/values/strings.xml                           | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git
a/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
b/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
index 67059c7..c513d47 100644
---
a/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
+++
b/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
@@ -98,7 +98,7 @@ public class AppListDialogFragment extends DialogFragment
{

         alertDialogBuilder.setPositiveButton(R.string.set_exclusions,
(dialog, which) -> setExclusionsAndDismiss());
         alertDialogBuilder.setNegativeButton(R.string.cancel, (dialog,
which) -> dialog.dismiss());
-        alertDialogBuilder.setNeutralButton(R.string.deselect_all,
(dialog, which) -> {
+        alertDialogBuilder.setNeutralButton(R.string.toggle_all, (dialog,
which) -> {
         });

         binding.setFragment(this);
@@ -109,7 +109,7 @@ public class AppListDialogFragment extends
DialogFragment {
         final AlertDialog dialog = alertDialogBuilder.create();
         dialog.setOnShowListener(d ->
dialog.getButton(DialogInterface.BUTTON_NEUTRAL).setOnClickListener(view ->
{
             for (final ApplicationData app : appData)
-                app.setExcludedFromTunnel(false);
+                app.setExcludedFromTunnel(!app.isExcludedFromTunnel());
         }));
         return dialog;
     }
diff --git a/app/src/main/res/values-it/strings.xml
b/app/src/main/res/values-it/strings.xml
index 2aba5f8..b37d792 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -66,7 +66,7 @@
     <string name="dark_theme_summary_on">Stai usando il tema scuro
(notte)</string>
     <string name="dark_theme_title">Usa tema scuro</string>
     <string name="delete">Elimina</string>
-    <string name="deselect_all">Deseleziona tutto</string>
+    <string name="toggle_all">Inverti tutto</string>
     <string name="dns_servers">Server DNS</string>
     <string name="edit">Modifica</string>
     <string name="endpoint">Endpoint</string>
diff --git a/app/src/main/res/values-ru/strings.xml
b/app/src/main/res/values-ru/strings.xml
index 2f2c03b..00b96fb 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -66,7 +66,7 @@
     <string name="dark_theme_summary_on">В данный момент используется
темная (ночная) тема</string>
     <string name="dark_theme_title">Использовать темную тему</string>
     <string name="delete">Удалить</string>
-    <string name="deselect_all">Снять выделенное</string>
+    <string name="toggle_all">Инвертировать все</string>
     <string name="dns_servers">DNS-серверы</string>
     <string name="edit">Редактировать</string>
     <string name="endpoint">Конечная точка</string>
diff --git a/app/src/main/res/values/strings.xml
b/app/src/main/res/values/strings.xml
index 336cd4e..89a32c0 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -66,7 +66,7 @@
     <string name="dark_theme_summary_on">Currently using dark (night)
theme</string>
     <string name="dark_theme_title">Use dark theme</string>
     <string name="delete">Delete</string>
-    <string name="deselect_all">Deselect All</string>
+    <string name="toggle_all">Toggle All</string>
     <string name="dns_servers">DNS servers</string>
     <string name="edit">Edit</string>
     <string name="endpoint">Endpoint</string>
-- 
2.25.0

[-- Attachment #1.2: Type: text/html, Size: 5005 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-09 17:30 [PATCH] Change "Deselect All" to "Toggle All" in Excluded apps settings sebcbi1
2020-02-14 11:00 ` Jason A. Donenfeld
2020-02-16 15:54   ` Sebastien LEBEAU

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git