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
ac1d1a58
Commit
ac1d1a58
authored
Apr 12, 2019
by
Ahmed Ashour
Committed by
skylot
Apr 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): disable all components on saving the settings (PR #586)
parent
74a72a5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
12 deletions
+25
-12
JadxSettingsWindow.java
...i/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
+25
-12
No files found.
jadx-gui/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
View file @
ac1d1a58
...
...
@@ -83,18 +83,22 @@ public class JadxSettingsWindow extends JDialog {
JButton
saveBtn
=
new
JButton
(
NLS
.
str
(
"preferences.save"
));
saveBtn
.
addActionListener
(
event
->
{
settings
.
sync
();
if
(
needReload
)
{
mainWindow
.
reOpenFile
();
}
if
(!
settings
.
getLangLocale
().
equals
(
prevLang
))
{
JOptionPane
.
showMessageDialog
(
this
,
NLS
.
str
(
"msg.language_changed"
,
settings
.
getLangLocale
()),
NLS
.
str
(
"msg.language_changed_title"
,
settings
.
getLangLocale
()),
JOptionPane
.
INFORMATION_MESSAGE
);
}
dispose
();
enableComponents
(
this
,
false
);
SwingUtilities
.
invokeLater
(()
->
{
if
(
needReload
)
{
mainWindow
.
reOpenFile
();
}
if
(!
settings
.
getLangLocale
().
equals
(
prevLang
))
{
JOptionPane
.
showMessageDialog
(
this
,
NLS
.
str
(
"msg.language_changed"
,
settings
.
getLangLocale
()),
NLS
.
str
(
"msg.language_changed_title"
,
settings
.
getLangLocale
()),
JOptionPane
.
INFORMATION_MESSAGE
);
}
dispose
();
});
});
JButton
cancelButton
=
new
JButton
(
NLS
.
str
(
"preferences.cancel"
));
cancelButton
.
addActionListener
(
event
->
{
...
...
@@ -139,6 +143,15 @@ public class JadxSettingsWindow extends JDialog {
getRootPane
().
setDefaultButton
(
saveBtn
);
}
private
static
void
enableComponents
(
Container
container
,
boolean
enable
)
{
for
(
Component
component
:
container
.
getComponents
())
{
if
(
component
instanceof
Container
)
{
enableComponents
((
Container
)
component
,
enable
);
}
component
.
setEnabled
(
enable
);
}
}
private
SettingsGroup
makeDeobfuscationGroup
()
{
JCheckBox
deobfOn
=
new
JCheckBox
();
deobfOn
.
setSelected
(
settings
.
isDeobfuscationOn
());
...
...
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