Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
0abb51c8
Commit
0abb51c8
authored
Oct 29, 2018
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): on settings reset run upgrade method
parent
557667b1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
JadxSettings.java
jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
+4
-1
JadxSettingsAdapter.java
.../src/main/java/jadx/gui/settings/JadxSettingsAdapter.java
+6
-3
JadxSettingsWindow.java
...i/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
+2
-2
No files found.
jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
View file @
0abb51c8
...
@@ -47,7 +47,10 @@ public class JadxSettings extends JadxCLIArgs {
...
@@ -47,7 +47,10 @@ public class JadxSettings extends JadxCLIArgs {
private
Map
<
String
,
WindowLocation
>
windowPos
=
new
HashMap
<>();
private
Map
<
String
,
WindowLocation
>
windowPos
=
new
HashMap
<>();
public
JadxSettings
()
{
public
static
JadxSettings
makeDefault
()
{
JadxSettings
jadxSettings
=
new
JadxSettings
();
jadxSettings
.
fixOnLoad
();
return
jadxSettings
;
}
}
public
void
sync
()
{
public
void
sync
()
{
...
...
jadx-gui/src/main/java/jadx/gui/settings/JadxSettingsAdapter.java
View file @
0abb51c8
...
@@ -46,10 +46,13 @@ public class JadxSettingsAdapter {
...
@@ -46,10 +46,13 @@ public class JadxSettingsAdapter {
JadxSettings
settings
=
fromString
(
jsonSettings
);
JadxSettings
settings
=
fromString
(
jsonSettings
);
if
(
settings
==
null
)
{
if
(
settings
==
null
)
{
LOG
.
debug
(
"Created new settings."
);
LOG
.
debug
(
"Created new settings."
);
settings
=
new
JadxSettings
();
settings
=
JadxSettings
.
makeDefault
();
}
}
else
{
settings
.
fixOnLoad
();
settings
.
fixOnLoad
();
}
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"Loaded settings: {}"
,
makeString
(
settings
));
LOG
.
debug
(
"Loaded settings: {}"
,
makeString
(
settings
));
}
return
settings
;
return
settings
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOG
.
error
(
"Error load settings"
,
e
);
LOG
.
error
(
"Error load settings"
,
e
);
...
...
jadx-gui/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
View file @
0abb51c8
...
@@ -12,8 +12,8 @@ import org.slf4j.Logger;
...
@@ -12,8 +12,8 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
say.swing.JFontChooser
;
import
say.swing.JFontChooser
;
import
jadx.gui.ui.codearea.EditorTheme
;
import
jadx.gui.ui.MainWindow
;
import
jadx.gui.ui.MainWindow
;
import
jadx.gui.ui.codearea.EditorTheme
;
import
jadx.gui.utils.LangLocale
;
import
jadx.gui.utils.LangLocale
;
import
jadx.gui.utils.NLS
;
import
jadx.gui.utils.NLS
;
...
@@ -94,7 +94,7 @@ public class JadxSettingsWindow extends JDialog {
...
@@ -94,7 +94,7 @@ public class JadxSettingsWindow extends JDialog {
NLS
.
str
(
"preferences.reset_title"
),
NLS
.
str
(
"preferences.reset_title"
),
JOptionPane
.
YES_NO_OPTION
);
JOptionPane
.
YES_NO_OPTION
);
if
(
res
==
JOptionPane
.
YES_OPTION
)
{
if
(
res
==
JOptionPane
.
YES_OPTION
)
{
String
defaults
=
JadxSettingsAdapter
.
makeString
(
new
JadxSettings
());
String
defaults
=
JadxSettingsAdapter
.
makeString
(
JadxSettings
.
makeDefault
());
JadxSettingsAdapter
.
fill
(
settings
,
defaults
);
JadxSettingsAdapter
.
fill
(
settings
,
defaults
);
getContentPane
().
removeAll
();
getContentPane
().
removeAll
();
initUI
();
initUI
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment