Browse Source

Merge pull request #129 from greboid/activewindowtests

Update addon browser for addons.dmdirc.com move.
pull/130/head
Chris Smith 9 years ago
parent
commit
b7f8176847

+ 6
- 16
ui_swing/src/com/dmdirc/addons/ui_swing/components/addonbrowser/AddonInfo.java View File

40
 
40
 
41
     /** Addon site ID. */
41
     /** Addon site ID. */
42
     private final int id;
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
     private final String stableDownload;
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
     private final String unstableDownload;
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
     private final String nightlyDownload;
48
     private final String nightlyDownload;
58
     /** Addon title. */
49
     /** Addon title. */
59
     private final String title;
50
     private final String title;
104
         verified = entry.get("verified").equals("yes");
95
         verified = entry.get("verified").equals("yes");
105
         date = Integer.parseInt(entry.get("date"));
96
         date = Integer.parseInt(entry.get("date"));
106
         if (entry.get("screenshot").equals("yes")) {
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
             screenshot.setImage(screenshot.getImage().
100
             screenshot.setImage(screenshot.getImage().
110
                     getScaledInstance(150, 150, Image.SCALE_SMOOTH));
101
                     getScaledInstance(150, 150, Image.SCALE_SMOOTH));
111
         } else {
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
         UpdateChannel tempChannel;
106
         UpdateChannel tempChannel;

+ 1
- 2
ui_swing/src/com/dmdirc/addons/ui_swing/components/addonbrowser/InstallWorker.java View File

77
     protected String doInBackground() {
77
     protected String doInBackground() {
78
         try {
78
         try {
79
             final Path file = Paths.get(tempDirectory, "." + info.getId());
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
             switch (info.getType()) {
82
             switch (info.getType()) {
84
                 case TYPE_ACTION_PACK:
83
                 case TYPE_ACTION_PACK:

+ 1
- 1
ui_swing/src/com/dmdirc/addons/ui_swing/components/addonpanel/AddonPanel.java View File

120
                 + getTypeName().substring(1) + " allow you to extend the "
120
                 + getTypeName().substring(1) + " allow you to extend the "
121
                 + "functionality of DMDirc.");
121
                 + "functionality of DMDirc.");
122
         getMoreLabel = new TextLabel(
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
         getMoreLabel.addHyperlinkListener(this);
124
         getMoreLabel.addHyperlinkListener(this);
125
         addonInfo = new AddonInfoPanel();
125
         addonInfo = new AddonInfoPanel();
126
         addonInfo.addListener(this);
126
         addonInfo.addListener(this);

Loading…
Cancel
Save