1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
From: Markus Koschany <apo@debian.org>
Date: Thu, 10 Dec 2020 17:38:45 +0100
Subject: Don't use functions from jtouchbar
Forwarded: not-needed
JTouchBar is only usable on some Macbooks and uses functions from the
jtouchbar library which isn't packaged yet in Debian. We can ignore this
code for now.
---
app/src/processing/app/EditorToolbar.java | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/app/src/processing/app/EditorToolbar.java b/app/src/processing/app/EditorToolbar.java
index a2a9b80..c0d25bc 100644
--- a/app/src/processing/app/EditorToolbar.java
+++ b/app/src/processing/app/EditorToolbar.java
@@ -27,9 +27,9 @@ import javax.imageio.ImageIO;
import javax.swing.*;
import javax.swing.event.MouseInputListener;
-import com.thizzer.jtouchbar.JTouchBar;
-import com.thizzer.jtouchbar.item.TouchBarItem;
-import com.thizzer.jtouchbar.item.view.TouchBarButton;
+//import com.thizzer.jtouchbar.JTouchBar;
+//import com.thizzer.jtouchbar.item.TouchBarItem;
+//import com.thizzer.jtouchbar.item.view.TouchBarButton;
import cc.arduino.contributions.VersionComparator;
import processing.app.helpers.OSUtils;
@@ -106,13 +106,13 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
private final Color bgcolor;
private static Image[][] buttonImages;
- private static com.thizzer.jtouchbar.common.Image[][] touchBarImages;
+// private static com.thizzer.jtouchbar.common.Image[][] touchBarImages;
private int currentRollover;
private JPopupMenu popup;
private final JMenu menu;
- private JTouchBar touchBar;
- private TouchBarButton[] touchBarButtons;
+// private JTouchBar touchBar;
+// private TouchBarButton[] touchBarButtons;
private int buttonCount;
private int[] state = new int[BUTTON_COUNT];
@@ -153,11 +153,11 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
if (OSUtils.isMacOS() && VersionComparator.greaterThanOrEqual(OSUtils.version(), "10.12")) {
editor.addWindowListener(new WindowAdapter() {
public void windowActivated(WindowEvent e) {
- if (touchBar == null) {
+/* if (touchBar == null) {
buildTouchBar();
touchBar.show(editor);
- }
+ } */
}
});
}
@@ -167,7 +167,7 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
}
- private void buildTouchBar() {
+/* private void buildTouchBar() {
if (touchBarImages == null) {
loadTouchBarImages();
}
@@ -203,7 +203,7 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
touchBar.addItem(touchBarItem);
}
- }
+ } */
private void loadButtons() {
Image allButtons = Theme.getThemeImage("buttons", this,
@@ -229,7 +229,7 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
Image allButtonsRetina = Theme.getThemeImage("buttons", this,
BUTTON_IMAGE_SIZE * BUTTON_COUNT * 2,
BUTTON_IMAGE_SIZE * 3 * 2);
- touchBarImages = new com.thizzer.jtouchbar.common.Image[BUTTON_COUNT][3];
+// touchBarImages = new com.thizzer.jtouchbar.common.Image[BUTTON_COUNT][3];
for (int i = 0; i < BUTTON_COUNT; i++) {
for (int state = 0; state < 3; state++) {
@@ -247,7 +247,7 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
try {
ImageIO.write(image, "PNG", pngStream);
- touchBarImages[i][state] = new com.thizzer.jtouchbar.common.Image(pngStream.toByteArray());
+// touchBarImages[i][state] = new com.thizzer.jtouchbar.common.Image(pngStream.toByteArray());
} catch (IOException e) {
// ignore errors
}
@@ -403,14 +403,14 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
repaint();
}
- if (touchBarButtons != null) {
+/* if (touchBarButtons != null) {
if (newState == INACTIVE) {
// use ROLLOVER state when INACTIVE
newState = ROLLOVER;
}
touchBarButtons[slot].setImage(touchBarImages[slot][newState]);
- }
+ } */
}
|