Skip to content

Commit

Permalink
feat(gui): added confirm dialog when removing script (PR #2375)
Browse files Browse the repository at this point in the history
feat(gui): added confirm dialog when removing script (#2353)
  • Loading branch information
MrIkso authored Dec 19, 2024
1 parent fe41d6e commit ff0fbba
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,15 @@ public void addNewScript() {
}

public void removeInput(Path file) {
int dialogResult = JOptionPane.showConfirmDialog(
this,
NLS.str("message.confirm_remove_script"),
NLS.str("msg.warning_title"),
JOptionPane.YES_NO_OPTION);
if (dialogResult == JOptionPane.NO_OPTION) {
return;
}

List<Path> inputs = project.getFilePaths();
inputs.remove(file);
refreshTree(inputs);
Expand Down
1 change: 1 addition & 0 deletions jadx-gui/src/main/resources/i18n/Messages_de_DE.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ message.indexIncomplete=<html>Index einiger Klassen übersprungen.<br> %s<br> %d
message.indexingClassesSkipped=<html>Jadx hat nur noch wenig Speicherplatz. Daher wurden %d Klassen nicht indiziert.<br>Wenn Sie möchten, dass alle Klassen indiziert werden, Jadx mit erhöhter maximaler Heap-Größe neustarten.</html>
#message.enter_new_name=Enter new name
#message.could_not_rename=Can't rename the file
#message.confirm_remove_script=Do you really want to remove script?

heapUsage.text=JADX-Speicherauslastung: %.2f GB von %.2f GB

Expand Down
1 change: 1 addition & 0 deletions jadx-gui/src/main/resources/i18n/Messages_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ message.indexIncomplete=<html>Index of some classes skipped.<br> %s<br> %d class
message.indexingClassesSkipped=<html>Jadx is running low on memory. Therefore %d classes were not indexed.<br>If you want all classes to be indexed restart Jadx with increased maximum heap size.</html>
message.enter_new_name=Enter new name
message.could_not_rename=Can't rename the file
message.confirm_remove_script=Do you really want to remove script?
heapUsage.text=JADX memory usage: %.2f GB of %.2f GB
Expand Down
1 change: 1 addition & 0 deletions jadx-gui/src/main/resources/i18n/Messages_es_ES.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ nav.forward=Adelante
#message.indexingClassesSkipped=<html>Jadx is running low on memory. Therefore %d classes were not indexed.<br>If you want all classes to be indexed restart Jadx with increased maximum heap size.</html>
#message.enter_new_name=Enter new name
#message.could_not_rename=Can't rename the file
#message.confirm_remove_script=Do you really want to remove script?

#heapUsage.text=JADX memory usage: %.2f GB of %.2f GB

Expand Down
1 change: 1 addition & 0 deletions jadx-gui/src/main/resources/i18n/Messages_id_ID.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ message.indexIncomplete=<html>Indeks beberapa kelas dilewati.<br> %s<br> %d kela
message.indexingClassesSkipped=<html>JADX kekurangan memori. Oleh karena itu %d kelas tidak diindeks.<br>Jika Anda ingin semua kelas diindeks, restart JADX dengan ukuran heap maksimum yang lebih besar.</html>
#message.enter_new_name=Enter new name
#message.could_not_rename=Can't rename the file
#message.confirm_remove_script=Do you really want to remove script?

heapUsage.text=Penggunaan memori JADX: %.2f GB dari %.2f GB

Expand Down
1 change: 1 addition & 0 deletions jadx-gui/src/main/resources/i18n/Messages_ko_KR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ message.indexIncomplete=<html>일부 클래스의 색인을 건너뛰었습니
message.indexingClassesSkipped=<html>Jadx의 메모리가 부족합니다. 따라서 %d 개의 클래스가 인덱싱되지 않았습니다. <br> 모든 클래스를 인덱싱하려면 최대 힙 크기를 늘린 상태로 Jadx를 다시 시작하십시오.</html>
#message.enter_new_name=Enter new name
#message.could_not_rename=Can't rename the file
#message.confirm_remove_script=Do you really want to remove script?

heapUsage.text=JADX 메모리 사용량 : %.2f GB / %.2f GB

Expand Down
1 change: 1 addition & 0 deletions jadx-gui/src/main/resources/i18n/Messages_pt_BR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ message.indexIncomplete=<html>Indexação de algumas classes foram ignoradas.<br
message.indexingClassesSkipped=<html>Jadx está rodando com pouca memória. Por conta disso, %d classes não foram indexadas.<br>Se você deseja que todas classes sejam indexadas, reinicie com um limite de memória heap maior.</html>
#message.enter_new_name=Enter new name
#message.could_not_rename=Can't rename the file
#message.confirm_remove_script=Do you really want to remove script?

heapUsage.text=Uso de memória do JADX: %.2f GB of %.2f GB

Expand Down
1 change: 1 addition & 0 deletions jadx-gui/src/main/resources/i18n/Messages_ru_RU.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ message.indexIncomplete=<html>Индексирование некоторых к
message.indexingClassesSkipped=<html>JaDX запущен с малым количеством ОЗУ. %d классов не индексировано.<br>Если вы хотите их индексировать, перезапустите JaDX с большим Heap Size.</html>
#message.enter_new_name=Enter new name
#message.could_not_rename=Can't rename the file
#message.confirm_remove_script=Do you really want to remove script?

heapUsage.text=JADX использует: %.2f ГБ из %.2f ГБ

Expand Down
1 change: 1 addition & 0 deletions jadx-gui/src/main/resources/i18n/Messages_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ message.indexIncomplete=<html>已跳过某些类索引。<br> %s<br> %d 类未
message.indexingClassesSkipped=<html>Jadx 的内存不足。因此,%d 个类没有编入索引。<br>如果要将所有类编入索引,请增加的最大堆空间后重新启动 Jadx。</html>
#message.enter_new_name=Enter new name
#message.could_not_rename=Can't rename the file
#message.confirm_remove_script=Do you really want to remove script?

heapUsage.text=JADX 内存使用率:%.2f GB / %.2f GB

Expand Down
1 change: 1 addition & 0 deletions jadx-gui/src/main/resources/i18n/Messages_zh_TW.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ message.indexIncomplete=<html>某些類別的索引被略過。<br> %s<br> %d
message.indexingClassesSkipped=<html>Jadx 的記憶體不足。故 %d 個類別未被索引。<br>如果您想要索引所有類別,請增加最大堆疊大小並重新啟動。</html>
#message.enter_new_name=Enter new name
#message.could_not_rename=Can't rename the file
#message.confirm_remove_script=Do you really want to remove script?

heapUsage.text=JADX 記憶體使用率:%.2f GB / %.2f GB

Expand Down

0 comments on commit ff0fbba

Please sign in to comment.