mirror of
https://github.com/dgis/emu48android
synced 2025-01-17 18:11:37 +01:00
- Change the name from "Emu48 for Android" for "Emu48".
- Always prompt to save when closing. - Fix MostRecentUsed file issue.
This commit is contained in:
parent
f4384c5484
commit
91ee7150e9
4 changed files with 23 additions and 9 deletions
|
@ -47,10 +47,13 @@ Version 1.2alpha (2019-03-XX)
|
||||||
- Rewrite the StretchBlt() function to improve the pixel rendering.
|
- Rewrite the StretchBlt() function to improve the pixel rendering.
|
||||||
- Allow to build the project with "gradlew build".
|
- Allow to build the project with "gradlew build".
|
||||||
- Fix issues with back button in the Settings, Help and About.
|
- Fix issues with back button in the Settings, Help and About.
|
||||||
- Build with Android 4.4 support.
|
- Build with Android 4.4 support (Not sure the settings work).
|
||||||
- Prevent empty MRU.
|
- Prevent empty MRU.
|
||||||
- Allow to go back from the settings in Android 4.4 and may be more recent versions.
|
- Allow to go back from the settings in Android 4.4 and may be more recent versions.
|
||||||
- Save the Port 2 at the same time we save the state file.
|
- Save the Port 2 at the same time we save the state file.
|
||||||
|
- Change the name from "Emu48 for Android" for "Emu48".
|
||||||
|
- Always prompt to save when closing.
|
||||||
|
- Fix MostRecentUsed file issue.
|
||||||
|
|
||||||
|
|
||||||
Version 1.1 (2019-03-01)
|
Version 1.1 (2019-03-01)
|
||||||
|
|
|
@ -47,10 +47,13 @@ Version 1.2alpha (2019-03-XX)
|
||||||
- Rewrite the StretchBlt() function to improve the pixel rendering.
|
- Rewrite the StretchBlt() function to improve the pixel rendering.
|
||||||
- Allow to build the project with "gradlew build".
|
- Allow to build the project with "gradlew build".
|
||||||
- Fix issues with back button in the Settings, Help and About.
|
- Fix issues with back button in the Settings, Help and About.
|
||||||
- Build with Android 4.4 support.
|
- Build with Android 4.4 support (Not sure the settings work).
|
||||||
- Prevent empty MRU.
|
- Prevent empty MRU.
|
||||||
- Allow to go back from the settings in Android 4.4 and may be more recent versions.
|
- Allow to go back from the settings in Android 4.4 and may be more recent versions.
|
||||||
- Save the Port 2 at the same time we save the state file.
|
- Save the Port 2 at the same time we save the state file.
|
||||||
|
- Change the name from "Emu48 for Android" for "Emu48".
|
||||||
|
- Always prompt to save when closing.
|
||||||
|
- Fix MostRecentUsed file issue.
|
||||||
|
|
||||||
|
|
||||||
Version 1.1 (2019-03-01)
|
Version 1.1 (2019-03-01)
|
||||||
|
|
|
@ -522,8 +522,12 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Runnable fileSaveAsCallback = null;
|
|
||||||
private void ensureDocumentSaved(final Runnable continueCallback) {
|
private void ensureDocumentSaved(final Runnable continueCallback) {
|
||||||
|
ensureDocumentSaved(continueCallback, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Runnable fileSaveAsCallback = null;
|
||||||
|
private void ensureDocumentSaved(final Runnable continueCallback, boolean forceRequest) {
|
||||||
if(NativeLib.isDocumentAvailable()) {
|
if(NativeLib.isDocumentAvailable()) {
|
||||||
final String currentFilename = NativeLib.getCurrentFilename();
|
final String currentFilename = NativeLib.getCurrentFilename();
|
||||||
final boolean hasFilename = (currentFilename != null && currentFilename.length() > 0);
|
final boolean hasFilename = (currentFilename != null && currentFilename.length() > 0);
|
||||||
|
@ -548,7 +552,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if(hasFilename && sharedPreferences.getBoolean("settings_autosave", true)) {
|
if(!forceRequest && hasFilename && sharedPreferences.getBoolean("settings_autosave", true)) {
|
||||||
onClickListener.onClick(null, DialogInterface.BUTTON_POSITIVE);
|
onClickListener.onClick(null, DialogInterface.BUTTON_POSITIVE);
|
||||||
} else {
|
} else {
|
||||||
new AlertDialog.Builder(this)
|
new AlertDialog.Builder(this)
|
||||||
|
@ -637,7 +641,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}, true);
|
||||||
}
|
}
|
||||||
private void OnSettings() {
|
private void OnSettings() {
|
||||||
startActivityForResult(new Intent(this, SettingsActivity.class), INTENT_SETTINGS);
|
startActivityForResult(new Intent(this, SettingsActivity.class), INTENT_SETTINGS);
|
||||||
|
@ -912,10 +916,14 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
|
||||||
editor.putString("lastDocument", url);
|
editor.putString("lastDocument", url);
|
||||||
editor.apply();
|
editor.apply();
|
||||||
|
|
||||||
if(url != null & !url.isEmpty())
|
if(url != null && !url.isEmpty())
|
||||||
mruLinkedHashMap.put(url, null);
|
mruLinkedHashMap.put(url, null);
|
||||||
|
navigationView.post(new Runnable() {
|
||||||
|
public void run() {
|
||||||
updateMRU();
|
updateMRU();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void makeUriPersistable(Intent data, Uri uri) {
|
private void makeUriPersistable(Intent data, Uri uri) {
|
||||||
final int takeFlags = data.getFlags() & (Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
final int takeFlags = data.getFlags() & (Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
|
|
||||||
<!-- PaintByNumber Activity -->
|
<!-- PaintByNumber Activity -->
|
||||||
|
|
||||||
<string name="app_name">Emu48 for Android</string>
|
<string name="app_name">Emu48</string>
|
||||||
<string name="action_settings">Settings</string>
|
<string name="action_settings">Settings</string>
|
||||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||||
<!--<string name="nav_header_title">Emu48 for Android</string>-->
|
<!--<string name="nav_header_title">Emu48</string>-->
|
||||||
<!--<string name="nav_header_subtitle">android.studio@android.com</string>-->
|
<!--<string name="nav_header_subtitle">android.studio@android.com</string>-->
|
||||||
<!--<string name="nav_header_desc">Navigation header</string>-->
|
<!--<string name="nav_header_desc">Navigation header</string>-->
|
||||||
<string name="nav_new">New...</string>
|
<string name="nav_new">New...</string>
|
||||||
|
|
Loading…
Reference in a new issue