Package: mediathekview / 13.2.1-3

no-windows-support.patch Patch series | download
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
115
116
117
118
119
From: Markus Koschany <apo@debian.org>
Date: Sun, 18 Nov 2018 19:18:37 +0100
Subject: no-windows-support

Windows is not supported.

Forwarded: not-needed
---
 src/main/java/mediathek/Main.java                  |  6 +--
 .../mediathek/windows/MediathekGuiWindows.java     | 16 -------
 .../java/mediathek/windows/WinIndicatorThread.java | 51 ----------------------
 3 files changed, 2 insertions(+), 71 deletions(-)
 delete mode 100644 src/main/java/mediathek/windows/MediathekGuiWindows.java
 delete mode 100644 src/main/java/mediathek/windows/WinIndicatorThread.java

diff --git a/src/main/java/mediathek/Main.java b/src/main/java/mediathek/Main.java
index 3937b21..1a5a388 100644
--- a/src/main/java/mediathek/Main.java
+++ b/src/main/java/mediathek/Main.java
@@ -29,8 +29,6 @@ import mSearch.tool.Log;
 import mSearch.tool.SingleInstance;
 import mediathek.config.Daten;
 import mediathek.config.Konstanten;
-import mediathek.mac.MediathekGuiMac;
-import mediathek.windows.MediathekGuiWindows;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
@@ -287,9 +285,9 @@ public class Main {
         MediathekGui window;
 
         if (SystemInfo.isMacOSX()) {
-            window = new MediathekGuiMac();
+            window = null;
         } else if (SystemInfo.isWindows()) {
-            window = new MediathekGuiWindows();
+            window = null;
         } else {
             if (SystemInfo.isUnix()) {
                 setupX11WindowManagerClassName();
diff --git a/src/main/java/mediathek/windows/MediathekGuiWindows.java b/src/main/java/mediathek/windows/MediathekGuiWindows.java
deleted file mode 100644
index 34c1822..0000000
--- a/src/main/java/mediathek/windows/MediathekGuiWindows.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package mediathek.windows;
-
-import mediathek.MediathekGui;
-import mediathek.tool.threads.IndicatorThread;
-
-@SuppressWarnings("serial")
-public class MediathekGuiWindows extends MediathekGui {
-    public MediathekGuiWindows() {
-        super();
-    }
-
-    @Override
-    protected IndicatorThread createProgressIndicatorThread() {
-        return new WinIndicatorThread(this);
-    }
-}
diff --git a/src/main/java/mediathek/windows/WinIndicatorThread.java b/src/main/java/mediathek/windows/WinIndicatorThread.java
deleted file mode 100644
index 888f141..0000000
--- a/src/main/java/mediathek/windows/WinIndicatorThread.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package mediathek.windows;
-
-import mediathek.tool.threads.IndicatorThread;
-import org.bridj.Pointer;
-import org.bridj.cpp.com.COMRuntime;
-import org.bridj.cpp.com.shell.ITaskbarList3;
-import org.bridj.jawt.JAWTUtils;
-
-import java.util.concurrent.TimeUnit;
-
-/**
- * Updates the {@link ITaskbarList3} taskbar progress.
- */
-public class WinIndicatorThread extends IndicatorThread {
-    private ITaskbarList3 list = null;
-    private Pointer<Integer> hwnd;
-
-    @SuppressWarnings("unchecked")
-    public WinIndicatorThread(MediathekGuiWindows parent) {
-        super();
-        setName("WinIndicatorThread");
-
-        try {
-            if (list == null)
-                list = COMRuntime.newInstance(ITaskbarList3.class);
-
-            hwnd = (Pointer) Pointer.pointerToAddress(JAWTUtils.getNativePeerHandle(parent));
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-
-    }
-
-    @Override
-    public void run() {
-        try {
-            while (!isInterrupted()) {
-                final long percentage = (long) calculateOverallPercentage();
-                list.SetProgressValue(hwnd, percentage, 100);
-                list.SetProgressState(hwnd, ITaskbarList3.TbpFlag.TBPF_NORMAL);
-
-                TimeUnit.MILLISECONDS.sleep(500);
-            }
-        } catch (InterruptedException ignored) {
-        } finally {
-            //when we are finished, stop progress
-            list.SetProgressState(hwnd, ITaskbarList3.TbpFlag.TBPF_NOPROGRESS);
-            list.Release();
-        }
-    }
-}