Skip to content

Commit

Permalink
Update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
SEVA77 committed Jul 26, 2023
1 parent 4f99001 commit f6623d0
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 166 deletions.
266 changes: 118 additions & 148 deletions patches/CirSim.patch

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions patches/ExportAsUrlDialog.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
--- /dev/null
+++ src/main/java/com/lushprojects/circuitjs1/client//ExportAsUrlDialog.java
@@ -93,9 +93,11 @@

+++ src/main/java/com/lushprojects/circuitjs1/client/ExportAsUrlDialog.java
@@ -93,9 +93,9 @@
public ExportAsUrlDialog( String dump) {
super();
closeOnEnter = false;
- String start[] = Location.getHref().split("\\?");
+ //String start[] = Location.getHref().split("\\?");
+ String start = "https://www.falstad.com/circuit/circuitjs.html";
String query="?ctz=" + compress(dump);
- dump = start[0] + query;
+ //dump = start[0] + query;
+ dump = start + query;
requrl = URL.encodeQueryString(query);
Button okButton, copyButton;
Expand Down
5 changes: 3 additions & 2 deletions patches/HelpDialog.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- /dev/null
+++ src/main/java/com/lushprojects/circuitjs1/client/HelpDialog.java
@@ -0,0 +1,89 @@
@@ -0,0 +1,90 @@
+/*
+ Copyright (C) Usevalad Khatkevich
+*/
Expand All @@ -16,6 +16,7 @@
+import com.google.gwt.user.client.ui.HasHorizontalAlignment;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.TabPanel;
+import com.lushprojects.circuitjs1.client.util.Locale;
+
+public class HelpDialog extends DialogBox {
+
Expand All @@ -33,7 +34,7 @@
+ super();
+ vp = new VerticalPanel();
+ setWidget(vp);
+ setText(sim.LS("Help"));
+ setText(Locale.LS("Help"));
+
+ TabPanel tp = new TabPanel();
+ vp.add(tp);
Expand Down
11 changes: 11 additions & 0 deletions patches/LDRElm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- /dev/null
+++ src/main/java/com/lushprojects/circuitjs1/client/LDRElm.java
@@ -174,7 +174,7 @@
if (n == 0) {
sliderText = ei.textf.getText();
label.setText(sliderText);
- sim.setiFrameHeight();
+ sim.setSlidersPanelHeight();
}
lux = LuxFromSliderPos();
resistance = calcResistance(lux);
5 changes: 3 additions & 2 deletions patches/LicenseDialog.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- /dev/null
+++ src/main/java/com/lushprojects/circuitjs1/client/LicenseDialog.java
@@ -0,0 +1,40 @@
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) Usevalad Khatkevich
+*/
Expand All @@ -13,6 +13,7 @@
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Button;
+import com.lushprojects.circuitjs1.client.util.Locale;
+
+public class LicenseDialog extends DialogBox {
+
Expand All @@ -24,7 +25,7 @@
+ super();
+ vp = new VerticalPanel();
+ setWidget(vp);
+ setText(sim.LS("License"));
+ setText(Locale.LS("License"));
+ vp.setWidth("500px");
+ vp.add(new HTML("<iframe style=\"border:0;\" src=\"help/license.html\" width=\"500\" height=\"400\" scrolling=\"auto\" frameborder=\"1\"></iframe>"));
+ vp.add(okButton = new Button("OK"));
Expand Down
11 changes: 11 additions & 0 deletions patches/PotElm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- /dev/null
+++ src/main/java/com/lushprojects/circuitjs1/client/PotElm.java
@@ -320,7 +320,7 @@
if (n == 1) {
sliderText = ei.textf.getText();
label.setText(sliderText);
- sim.setiFrameHeight();
+ sim.setSlidersPanelHeight();
}
if (n == 2)
flags = ei.changeFlag(flags, FLAG_SHOW_VALUES);
11 changes: 11 additions & 0 deletions patches/ThermistorNTCElm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- /dev/null
+++ src/main/java/com/lushprojects/circuitjs1/client/ThermistorNTCElm.java
@@ -208,7 +208,7 @@
if (n == 4) {
sliderText = ei.textf.getText();
label.setText(sliderText);
- sim.setiFrameHeight();
+ sim.setSlidersPanelHeight();
}
rneg40 = calcResistance(minTempr);
b25100 = calcB25100(); //
11 changes: 11 additions & 0 deletions patches/VarRailElm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- /dev/null
+++ src/main/java/com/lushprojects/circuitjs1/client/VarRailElm.java
@@ -85,7 +85,7 @@
if (n == 2) {
sliderText = ei.textf.getText();
label.setText(Locale.LS(sliderText));
- sim.setiFrameHeight();
+ sim.setSlidersPanelHeight();
}
}
int getShortcut() { return 0; }
27 changes: 18 additions & 9 deletions patches/circuitjs1.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
--- /dev/null
+++ src/main/java/com/lushprojects/circuitjs1/client/circuitjs1.java
@@ -76,7 +76,7 @@
public static final String versionString="2.7.1js";

// Set to true if the server runs the shortrelay.php file in the same directory as the circuit simulator
- public static final boolean shortRelaySupported = true;
+ public static final boolean shortRelaySupported = false;

static CirSim mysim;
HashMap<String,String> localizationMap;
@@ -40,7 +40,7 @@

// Set to true if the server runs the shortrelay.php file in the same directory
// as the circuit simulator
- public static final boolean shortRelaySupported = true;
+ public static final boolean shortRelaySupported = false;

static CirSim mysim;

@@ -153,7 +153,7 @@
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
mysim.setCanvasSize();
- mysim.setiFrameHeight();
+ mysim.setSlidersPanelHeight();
}
});

0 comments on commit f6623d0

Please sign in to comment.