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
8
.gitignore
vendored
8
.gitignore
vendored
@ -76,4 +76,10 @@ buildNumber.properties
|
|||||||
.attach_pid*
|
.attach_pid*
|
||||||
|
|
||||||
#netbeans project files
|
#netbeans project files
|
||||||
nbactions.xml
|
nbactions.xml
|
||||||
|
|
||||||
|
#vscode
|
||||||
|
.classpath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.vscode
|
@ -473,6 +473,12 @@ public final class Keys {
|
|||||||
public static final Key<Boolean> SETTINGS_MAC_MOUSE
|
public static final Key<Boolean> SETTINGS_MAC_MOUSE
|
||||||
= new Key<>("macMouse", Screen.isMac()).setRequiresRestart();
|
= 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
|
* output format for numbers
|
||||||
*/
|
*/
|
||||||
|
@ -18,7 +18,7 @@ import java.util.List;
|
|||||||
* <p>
|
* <p>
|
||||||
* Created by Helmut.Neemann on 11.05.2016.
|
* Created by Helmut.Neemann on 11.05.2016.
|
||||||
*/
|
*/
|
||||||
public final class Settings extends SettingsBase {
|
public final class Settings extends SettingsBase {
|
||||||
|
|
||||||
private static final class SettingsHolder {
|
private static final class SettingsHolder {
|
||||||
static final Settings INSTANCE = new Settings();
|
static final Settings INSTANCE = new Settings();
|
||||||
@ -57,6 +57,7 @@ public final class Settings extends SettingsBase {
|
|||||||
intList.add(Keys.SETTINGS_FONT_SCALING);
|
intList.add(Keys.SETTINGS_FONT_SCALING);
|
||||||
intList.add(Keys.SETTINGS_MAC_MOUSE);
|
intList.add(Keys.SETTINGS_MAC_MOUSE);
|
||||||
intList.add(Keys.SETTINGS_USE_EQUALS_KEY);
|
intList.add(Keys.SETTINGS_USE_EQUALS_KEY);
|
||||||
|
intList.add(Keys.SETTINGS_SHOW_TUNNEL_RENAME_DIALOG);
|
||||||
|
|
||||||
return Collections.unmodifiableList(intList);
|
return Collections.unmodifiableList(intList);
|
||||||
}
|
}
|
||||||
@ -76,4 +77,3 @@ public final class Settings extends SettingsBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1190,16 +1190,18 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
|
|||||||
|
|
||||||
if (others.size() > 0) {
|
if (others.size() > 0) {
|
||||||
String newName = modified.get(Keys.NETNAME);
|
String newName = modified.get(Keys.NETNAME);
|
||||||
int res = JOptionPane.showConfirmDialog(this,
|
if (Settings.getInstance().get(Keys.SETTINGS_SHOW_TUNNEL_RENAME_DIALOG)) {
|
||||||
new LineBreaker().toHTML().preserveContainedLineBreaks().breakLines(Lang.get("msg_renameNet_N_OLD_NEW", others.size(), oldName, newName)),
|
int res = JOptionPane.showConfirmDialog(this,
|
||||||
Lang.get("msg_renameNet"),
|
new LineBreaker().toHTML().preserveContainedLineBreaks().breakLines(Lang.get("msg_renameNet_N_OLD_NEW", others.size(), oldName, newName)),
|
||||||
JOptionPane.YES_NO_OPTION);
|
Lang.get("msg_renameNet"),
|
||||||
if (res == JOptionPane.YES_OPTION) {
|
JOptionPane.YES_NO_OPTION);
|
||||||
Modifications.Builder<Circuit> b =
|
if (res == JOptionPane.YES_OPTION) {
|
||||||
new Modifications.Builder<Circuit>(Lang.get("msg_renameNet")).add(mod);
|
Modifications.Builder<Circuit> b =
|
||||||
for (VisualElement o : others)
|
new Modifications.Builder<Circuit>(Lang.get("msg_renameNet")).add(mod);
|
||||||
b.add(new ModifyAttribute<>(o, Keys.NETNAME, newName));
|
for (VisualElement o : others)
|
||||||
return b.build();
|
b.add(new ModifyAttribute<>(o, Keys.NETNAME, newName));
|
||||||
|
return b.build();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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">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.
|
<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>
|
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">ATMISP</string>
|
||||||
<string name="key_ATMISP_tt">Pfad zur ausführbaren Datei ATMISP.exe. Wenn gesetzt, kann die Software ATMISP automatisch gestartet werden!</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">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.
|
<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>
|
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">ATMISP</string>
|
||||||
<string name="key_ATMISP_tt">Path to the executable file ATMISP.exe. If set, the ATMISP software can be started automatically!</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