Pārlūkot izejas kodu

Merge pull request #129 from greboid/activewindowtests

Update addon browser for addons.dmdirc.com move.
pull/130/head
Chris Smith 9 gadus atpakaļ
vecāks
revīzija
b7f8176847

+ 6
- 16
ui_swing/src/com/dmdirc/addons/ui_swing/components/addonbrowser/AddonInfo.java Parādīt failu

@@ -40,20 +40,11 @@ public class AddonInfo {
40 40
 
41 41
     /** Addon site ID. */
42 42
     private final int id;
43
-    /**
44
-     * Stable download name. This should be prepended with http://addons.dmdirc.com/addondownload/
45
-     * to get a full URL.
46
-     */
43
+    /** Stable download name. */
47 44
     private final String stableDownload;
48
-    /**
49
-     * Stable download name. This should be prepended with http://addons.dmdirc.com/addondownload/
50
-     * to get a full URL.
51
-     */
45
+    /** Unstable download name. */
52 46
     private final String unstableDownload;
53
-    /**
54
-     * Stable download name. This should be prepended with http://addons.dmdirc.com/addondownload/
55
-     * to get a full URL.
56
-     */
47
+    /** Nightly download name. */
57 48
     private final String nightlyDownload;
58 49
     /** Addon title. */
59 50
     private final String title;
@@ -104,13 +95,12 @@ public class AddonInfo {
104 95
         verified = entry.get("verified").equals("yes");
105 96
         date = Integer.parseInt(entry.get("date"));
106 97
         if (entry.get("screenshot").equals("yes")) {
107
-            screenshot = new ImageIcon(urlBuilder.getUrl(
108
-                    "http://addons.dmdirc.com/addonimg/" + id));
98
+            screenshot = new ImageIcon(
99
+                    urlBuilder.getUrl("https://addons.dmdirc.com/addonimg/" + id));
109 100
             screenshot.setImage(screenshot.getImage().
110 101
                     getScaledInstance(150, 150, Image.SCALE_SMOOTH));
111 102
         } else {
112
-            screenshot = new ImageIcon(urlBuilder.getUrl(
113
-                    "dmdirc://com/dmdirc/res/logo.png"));
103
+            screenshot = new ImageIcon(urlBuilder.getUrl("dmdirc://com/dmdirc/res/logo.png"));
114 104
         }
115 105
 
116 106
         UpdateChannel tempChannel;

+ 1
- 2
ui_swing/src/com/dmdirc/addons/ui_swing/components/addonbrowser/InstallWorker.java Parādīt failu

@@ -77,8 +77,7 @@ public class InstallWorker extends LoggingSwingWorker<String, Void> {
77 77
     protected String doInBackground() {
78 78
         try {
79 79
             final Path file = Paths.get(tempDirectory, "." + info.getId());
80
-            downloader.downloadPage("http://addons.dmdirc.com/addondownload/"
81
-                    + info.getDownload(), file);
80
+            downloader.downloadPage(info.getDownload(), file);
82 81
 
83 82
             switch (info.getType()) {
84 83
                 case TYPE_ACTION_PACK:

+ 1
- 1
ui_swing/src/com/dmdirc/addons/ui_swing/components/addonpanel/AddonPanel.java Parādīt failu

@@ -120,7 +120,7 @@ public abstract class AddonPanel extends JPanel implements AddonToggleListener,
120 120
                 + getTypeName().substring(1) + " allow you to extend the "
121 121
                 + "functionality of DMDirc.");
122 122
         getMoreLabel = new TextLabel(
123
-                "<a href=\"http://addons.dmdirc.com\">Get more addons</a>");
123
+                "<a href=\"https://addons.dmdirc.com\">Get more addons</a>");
124 124
         getMoreLabel.addHyperlinkListener(this);
125 125
         addonInfo = new AddonInfoPanel();
126 126
         addonInfo.addListener(this);

Notiek ielāde…
Atcelt
Saglabāt