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
557667b1
Commit
557667b1
authored
Oct 29, 2018
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): allow partial settings sync to not save command line options
parent
1d7bb43d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
ISettingsUpdater.java
...gui/src/main/java/jadx/gui/settings/ISettingsUpdater.java
+5
-0
JadxSettings.java
jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
+11
-5
No files found.
jadx-gui/src/main/java/jadx/gui/settings/ISettingsUpdater.java
0 → 100644
View file @
557667b1
package
jadx
.
gui
.
settings
;
public
interface
ISettingsUpdater
{
void
update
(
JadxSettings
settings
);
}
jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
View file @
557667b1
...
...
@@ -54,6 +54,12 @@ public class JadxSettings extends JadxCLIArgs {
JadxSettingsAdapter
.
store
(
this
);
}
public
void
partialSync
(
ISettingsUpdater
updater
)
{
JadxSettings
settings
=
JadxSettingsAdapter
.
load
();
updater
.
update
(
settings
);
JadxSettingsAdapter
.
store
(
settings
);
}
public
void
fixOnLoad
()
{
if
(
threadsCount
<=
0
)
{
threadsCount
=
JadxArgs
.
DEFAULT_THREADS_COUNT
;
...
...
@@ -75,7 +81,7 @@ public class JadxSettings extends JadxCLIArgs {
public
void
setLastOpenFilePath
(
String
lastOpenFilePath
)
{
this
.
lastOpenFilePath
=
lastOpenFilePath
;
sync
(
);
partialSync
(
settings
->
settings
.
lastOpenFilePath
=
JadxSettings
.
this
.
lastOpenFilePath
);
}
public
String
getLastSaveFilePath
()
{
...
...
@@ -84,7 +90,7 @@ public class JadxSettings extends JadxCLIArgs {
public
void
setLastSaveFilePath
(
String
lastSaveFilePath
)
{
this
.
lastSaveFilePath
=
lastSaveFilePath
;
sync
(
);
partialSync
(
settings
->
settings
.
lastSaveFilePath
=
JadxSettings
.
this
.
lastSaveFilePath
);
}
public
boolean
isFlattenPackage
()
{
...
...
@@ -93,7 +99,7 @@ public class JadxSettings extends JadxCLIArgs {
public
void
setFlattenPackage
(
boolean
flattenPackage
)
{
this
.
flattenPackage
=
flattenPackage
;
sync
(
);
partialSync
(
settings
->
settings
.
flattenPackage
=
JadxSettings
.
this
.
flattenPackage
);
}
public
boolean
isCheckForUpdates
()
{
...
...
@@ -116,7 +122,7 @@ public class JadxSettings extends JadxCLIArgs {
if
(
count
>
RECENT_FILES_COUNT
)
{
recentFiles
.
subList
(
RECENT_FILES_COUNT
,
count
).
clear
();
}
sync
(
);
partialSync
(
settings
->
settings
.
recentFiles
=
recentFiles
);
}
public
void
saveWindowPos
(
Window
window
)
{
...
...
@@ -125,7 +131,7 @@ public class JadxSettings extends JadxCLIArgs {
window
.
getWidth
(),
window
.
getHeight
()
);
windowPos
.
put
(
pos
.
getWindowId
(),
pos
);
sync
(
);
partialSync
(
settings
->
settings
.
windowPos
=
windowPos
);
}
public
boolean
loadWindowPos
(
Window
window
)
{
...
...
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