Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ else if (BytecodeViewer.viewer.apkConversionGroup.isSelected(BytecodeViewer.view
save(Configuration.python3Extra);
save(BytecodeViewer.viewer.getMinSdkVersion());
save(BytecodeViewer.viewer.printLineNumbers.isSelected());
save(BytecodeViewer.viewer.disableReloadConfirmation.isSelected());
}
catch (Exception e)
{
Expand Down Expand Up @@ -415,6 +416,7 @@ public static void loadSettings()
Configuration.python3Extra = asBoolean(140);
BytecodeViewer.viewer.minSdkVersionSpinner.setValue(asInt(141));
BytecodeViewer.viewer.printLineNumbers.setSelected(asBoolean(142));
BytecodeViewer.viewer.disableReloadConfirmation.setSelected(asBoolean(143));
}
catch (IndexOutOfBoundsException e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public class MainViewerGUI extends JFrame
public final JCheckBoxMenuItem decodeAPKResources = new TranslatedJCheckBoxMenuItem("Decode APK Resources", TranslatedComponents.DECODE_APK_RESOURCES);
public final JCheckBoxMenuItem synchronizedViewing = new TranslatedJCheckBoxMenuItem("Synchronized Viewing", TranslatedComponents.SYNCHRONIZED_VIEWING);
public final JCheckBoxMenuItem showClassMethods = new TranslatedJCheckBoxMenuItem("Show Class Methods", TranslatedComponents.SHOW_CLASS_METHODS);
public final JCheckBoxMenuItem disableReloadConfirmation = new TranslatedJCheckBoxMenuItem("Disable Reload Confirmation", TranslatedComponents.DISABLE_RELOAD_CONFIRMATION);

//apk conversion settings
public final JMenu apkConversionSecondaryMenu = new TranslatedJMenu("APK Conversion/Decoding", TranslatedComponents.APK_CONVERSION_DECODING);
Expand Down Expand Up @@ -405,6 +406,7 @@ public void buildSettingsMenu()
settingsMainMenu.add(compileOnSave);
settingsMainMenu.add(autoCompileOnRefresh);
settingsMainMenu.add(refreshOnChange);
settingsMainMenu.add(disableReloadConfirmation);

settingsMainMenu.add(new JSeparator());
settingsMainMenu.add(updateCheck);
Expand Down Expand Up @@ -747,6 +749,7 @@ public void defaultSettings()
{
compileOnSave.setSelected(false);
autoCompileOnRefresh.setSelected(true);
disableReloadConfirmation.setSelected(false);
decodeAPKResources.setSelected(true);
updateCheck.setSelected(true);
forcePureAsciiAsText.setSelected(true);
Expand Down Expand Up @@ -908,9 +911,14 @@ public void runResources()

public void reloadResources()
{
MultipleChoiceDialog dialog = new MultipleChoiceDialog(TranslatedStrings.RELOAD_RESOURCES_TITLE.toString(), TranslatedStrings.RELOAD_RESOURCES_CONFIRM.toString(), new String[]{TranslatedStrings.YES.toString(), TranslatedStrings.NO.toString()});
boolean doRefresh = disableReloadConfirmation.isSelected();
if (!doRefresh)
{
MultipleChoiceDialog dialog = new MultipleChoiceDialog(TranslatedStrings.RELOAD_RESOURCES_TITLE.toString(), TranslatedStrings.RELOAD_RESOURCES_CONFIRM.toString(), new String[]{TranslatedStrings.YES.toString(), TranslatedStrings.NO.toString()});
doRefresh = dialog.promptChoice() == 0;
}

if (dialog.promptChoice() == 0)
if (doRefresh)
{
LazyNameUtil.reset();
List<File> reopen = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public enum TranslatedComponents
COMPILE_ON_SAVE,
COMPILE_ON_REFRESH,
REFRESH_ON_VIEW_CHANGE,
DISABLE_RELOAD_CONFIRMATION,
DECODE_APK_RESOURCES,
APK_CONVERSION,
APK_CONVERSION_DECODING,
Expand Down
Loading