Debian Codegraph @

debian/patches/debian-hacks/Don-t-use-functions-from-jtouchbar.patch

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