summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2022-01-20 15:15:08 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2022-01-20 15:15:08 +0200
commit0593bbdf2286e88222316bfd0b5f6b348c60ea73 (patch)
treedb6901ded37d440e15f6a82b4334345ec94b175a
parent6da3bdb612e0ead07ff93f4f6dc5aef46c7b9c9e (diff)
Android: External downloads; Back button handling; bumped version
-rw-r--r--CMakeLists.txt4
-rw-r--r--res/about/android-version.gmi5
-rw-r--r--src/app.c14
3 files changed, 20 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b1dfef1..0a654d7b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,8 +30,8 @@ if (IOS)
30endif () 30endif ()
31if (ANDROID) 31if (ANDROID)
32 set (PROJECT_VERSION 1.10) 32 set (PROJECT_VERSION 1.10)
33 set (ANDROID_BUILD_VERSION a3) # remember to update Gradle, AndroidManifest.xml 33 set (ANDROID_BUILD_VERSION a4) # remember to update Gradle, AndroidManifest.xml
34 set (ANDROID_BUILD_DATE "2022-01-03") 34 set (ANDROID_BUILD_DATE "2022-01-20")
35endif () 35endif ()
36 36
37# Defaults that depend on environment. 37# Defaults that depend on environment.
diff --git a/res/about/android-version.gmi b/res/about/android-version.gmi
index fc7b444b..c36d5be4 100644
--- a/res/about/android-version.gmi
+++ b/res/about/android-version.gmi
@@ -6,6 +6,11 @@
6``` 6```
7# Release notes 7# Release notes
8 8
9## 1.10 (Alpha 4)
10* Save downloads to the external storage so they're accessible from a file manager.
11* Handle Gemini, Gopher and Finger URIs opened from other apps.
12* Back button dismisses UI panels/dialogs when appropriate instead of navigating back.
13
9## 1.10 (Alpha 3) 14## 1.10 (Alpha 3)
10* Added Android-specific release notes. 15* Added Android-specific release notes.
11* Added Settings > UI > Toolbar Actions: customize the two leftmost phone toolbar buttons. 16* Added Settings > UI > Toolbar Actions: customize the two leftmost phone toolbar buttons.
diff --git a/src/app.c b/src/app.c
index 6392e7fa..a137dc23 100644
--- a/src/app.c
+++ b/src/app.c
@@ -333,7 +333,9 @@ static const char *dataDir_App_(void) {
333 333
334static const char *downloadDir_App_(void) { 334static const char *downloadDir_App_(void) {
335#if defined (iPlatformAndroidMobile) 335#if defined (iPlatformAndroidMobile)
336 return concatPath_CStr(SDL_AndroidGetInternalStoragePath(), "Downloads"); 336 const char *dir = concatPath_CStr(SDL_AndroidGetExternalStoragePath(), "Downloads");
337 makeDirs_Path(collectNewCStr_String(dir));
338 return dir;
337#endif 339#endif
338#if defined (iPlatformLinux) || defined (iPlatformOther) 340#if defined (iPlatformLinux) || defined (iPlatformOther)
339 /* Parse user-dirs.dirs using the `xdg-user-dir` tool. */ 341 /* Parse user-dirs.dirs using the `xdg-user-dir` tool. */
@@ -1391,6 +1393,16 @@ void processEvents_App(enum iAppEventMode eventMode) {
1391 ev.key.keysym.mod = mapMods_Keys(ev.key.keysym.mod & ~KMOD_CAPS); 1393 ev.key.keysym.mod = mapMods_Keys(ev.key.keysym.mod & ~KMOD_CAPS);
1392 } 1394 }
1393#if defined (iPlatformAndroidMobile) 1395#if defined (iPlatformAndroidMobile)
1396 /* Use the system Back button to close panels, if they're open. */
1397 if (ev.type == SDL_KEYDOWN && ev.key.keysym.sym == SDLK_AC_BACK) {
1398 SDL_UserEvent panelBackCmd = { .type = SDL_USEREVENT,
1399 .code = command_UserEventCode,
1400 .data1 = iDupStr("panel.close"),
1401 .data2 = d->window->base.keyRoot };
1402 if (dispatchEvent_Window(&d->window->base, (SDL_Event *) &panelBackCmd)) {
1403 continue; /* Was handled by someone. */
1404 }
1405 }
1394 /* Ignore all mouse events; just use touch. */ 1406 /* Ignore all mouse events; just use touch. */
1395 if (ev.type == SDL_MOUSEBUTTONDOWN || 1407 if (ev.type == SDL_MOUSEBUTTONDOWN ||
1396 ev.type == SDL_MOUSEBUTTONUP || 1408 ev.type == SDL_MOUSEBUTTONUP ||