mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-07 11:55:44 -04:00
added settings option to show the tunnel rename dialog (#386)
* added settings option to show the tunnel rename dialog * added missing _tt keys
This commit is contained in:
parent
a624fb4adb
commit
657142b0aa
6
.gitignore
vendored
6
.gitignore
vendored
@ -77,3 +77,9 @@ buildNumber.properties
|
||||
|
||||
#netbeans project files
|
||||
nbactions.xml
|
||||
|
||||
#vscode
|
||||
.classpath
|
||||
.project
|
||||
.settings
|
||||
.vscode
|
@ -473,6 +473,12 @@ public final class Keys {
|
||||
public static final Key<Boolean> SETTINGS_MAC_MOUSE
|
||||
= new Key<>("macMouse", Screen.isMac()).setRequiresRestart();
|
||||
|
||||
/**
|
||||
* enables tunnel rename dialog
|
||||
*/
|
||||
public static final Key<Boolean> SETTINGS_SHOW_TUNNEL_RENAME_DIALOG
|
||||
= new Key<>("tunnelRenameDialog", true);
|
||||
|
||||
/**
|
||||
* output format for numbers
|
||||
*/
|
||||
|
@ -57,6 +57,7 @@ public final class Settings extends SettingsBase {
|
||||
intList.add(Keys.SETTINGS_FONT_SCALING);
|
||||
intList.add(Keys.SETTINGS_MAC_MOUSE);
|
||||
intList.add(Keys.SETTINGS_USE_EQUALS_KEY);
|
||||
intList.add(Keys.SETTINGS_SHOW_TUNNEL_RENAME_DIALOG);
|
||||
|
||||
return Collections.unmodifiableList(intList);
|
||||
}
|
||||
@ -76,4 +77,3 @@ public final class Settings extends SettingsBase {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1190,6 +1190,7 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
|
||||
|
||||
if (others.size() > 0) {
|
||||
String newName = modified.get(Keys.NETNAME);
|
||||
if (Settings.getInstance().get(Keys.SETTINGS_SHOW_TUNNEL_RENAME_DIALOG)) {
|
||||
int res = JOptionPane.showConfirmDialog(this,
|
||||
new LineBreaker().toHTML().preserveContainedLineBreaks().breakLines(Lang.get("msg_renameNet_N_OLD_NEW", others.size(), oldName, newName)),
|
||||
Lang.get("msg_renameNet"),
|
||||
@ -1203,6 +1204,7 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return mod;
|
||||
}
|
||||
|
||||
|
@ -1301,6 +1301,9 @@ Sind evtl. die Namen der Variablen nicht eindeutig?</string>
|
||||
<string name="key_noComponentToolTips">Keine ToolTips für Bauteile auf der Arbeitsfläche.</string>
|
||||
<string name="key_noComponentToolTips_tt">Wenn gesetzt, werden keine ToolTips für die Bauteile auf der Arbeitsfläche angezeigt.
|
||||
Vor allem in einer Präsentation können diese ToolTips sehr störend sein.</string>
|
||||
<string name="key_tunnelRenameDialog">Dialog zum automatischen umbenennen von Tunneln anzeigen</string>
|
||||
<string name="key_tunnelRenameDialog_tt">Wenn gesetzt, wird nach dem Umbenennen eines Tunnels ein Dialog für automatisches Umbenennen
|
||||
aller gleichnamigen Tunnel angezeigt.</string>
|
||||
|
||||
<string name="key_ATMISP">ATMISP</string>
|
||||
<string name="key_ATMISP_tt">Pfad zur ausführbaren Datei ATMISP.exe. Wenn gesetzt, kann die Software ATMISP automatisch gestartet werden!</string>
|
||||
|
@ -1287,6 +1287,9 @@
|
||||
<string name="key_noComponentToolTips">No tool tips for components on the main panel.</string>
|
||||
<string name="key_noComponentToolTips_tt">If set, no tool tips for the components on the main panel are displayed.
|
||||
Especially in a presentation, these tool tips can be very annoying.</string>
|
||||
<string name="key_tunnelRenameDialog">Show dialog for automatic renaming of tunnels.</string>
|
||||
<string name="key_tunnelRenameDialog_tt">If set, a dialog for automatically renaming all tunnels of the same name is displayed after a
|
||||
tunnel has been renamed.</string>
|
||||
|
||||
<string name="key_ATMISP">ATMISP</string>
|
||||
<string name="key_ATMISP_tt">Path to the executable file ATMISP.exe. If set, the ATMISP software can be started automatically!</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user