Sfoglia il codice sorgente

Move all formatter/icon settings into plugin.configs

Fixes issue 2309
tags/0.6.3m1rc1
Chris Smith 15 anni fa
parent
commit
7cffaea4eb

+ 0
- 21
src/com/dmdirc/addons/dcc/DCCPlugin.java Vedi File

@@ -456,27 +456,6 @@ public final class DCCPlugin extends Plugin implements ActionListener {
456 456
 
457 457
         defaults.setOption(getDomain(), "receive.savelocation",
458 458
                 Main.getConfigDir() + "downloads" + System.getProperty("file.separator"));
459
-		final String url = "plugin://dcc:com/dmdirc/addons/dcc/res/";
460
-        
461
-        defaults.setOption("icon", "category-dcc", url + "transfers.png");
462
-		defaults.setOption("icon", "dcc", url + "transfers.png");
463
-		defaults.setOption("icon", "dcc-chat-active", url + "chat.png");
464
-		defaults.setOption("icon", "dcc-chat-inactive", url + "chat-inactive.png");
465
-		defaults.setOption("icon", "dcc-send-active", url + "send.png");
466
-		defaults.setOption("icon", "dcc-send-inactive", url + "send-inactive.png");
467
-		defaults.setOption("icon", "dcc-send-done", url + "send-done.png");
468
-		defaults.setOption("icon", "dcc-send-failed", url + "send-failed.png");
469
-		defaults.setOption("icon", "dcc-receive-active", url + "receive.png");
470
-		defaults.setOption("icon", "dcc-receive-inactive", url + "receive-inactive.png");
471
-		defaults.setOption("icon", "dcc-receive-done", url + "receive-done.png");
472
-		defaults.setOption("icon", "dcc-receive-failed", url + "receive-failed.png");
473
-
474
-		defaults.setOption("formatter", "DCCChatStarting", "Starting DCC Chat with: %1$s on %2$s:%3$s");
475
-		defaults.setOption("formatter", "DCCChatInfo", "%1$s");
476
-		defaults.setOption("formatter", "DCCChatError", "\u00034 Error: %1$s");
477
-		defaults.setOption("formatter", "DCCSendError", "\u00034 Error: %1$s");
478
-		defaults.setOption("formatter", "DCCChatSelfMessage", "<%1$s> %2$s");
479
-		defaults.setOption("formatter", "DCCChatMessage", "<%1$s> %2$s");
480 459
     }
481 460
 
482 461
 	/**

+ 25
- 1
src/com/dmdirc/addons/dcc/plugin.config Vedi File

@@ -8,6 +8,8 @@ keysections:
8 8
   requires
9 9
   updates
10 10
   defaults
11
+  formatters
12
+  icons
11 13
 #  version
12 14
 
13 15
 metadata:
@@ -47,4 +49,26 @@ defaults:
47 49
   firewall.ip=
48 50
   firewall.ports.usePortRange=false
49 51
   firewall.ports.startPort=11000
50
-  firewall.ports.endPort=11019
52
+  firewall.ports.endPort=11019
53
+
54
+formatters:
55
+  DCCChatStarting=Starting DCC Chat with: %1$s on %2$s:%3$s
56
+  DCCChatInfo=%1$s
57
+  DCCChatError=\u00034 Error: %1$s
58
+  DCCSendError=\u00034 Error: %1$s
59
+  DCCChatSelfMessage=<%1$s> %2$s
60
+  DCCChatMessage=<%1$s> %2$s
61
+
62
+icons:
63
+  category-dcc=plugin://dcc:com/dmdirc/addons/dcc/res/transfers.png
64
+  dcc=plugin://dcc:com/dmdirc/addons/dcc/res/transfers.png
65
+  dcc-chat-active=plugin://dcc:com/dmdirc/addons/dcc/res/chat.png
66
+  dcc-chat-inactive=plugin://dcc:com/dmdirc/addons/dcc/res/chat-inactive.png
67
+  dcc-send-active=plugin://dcc:com/dmdirc/addons/dcc/res/send.png
68
+  dcc-send-inactive=plugin://dcc:com/dmdirc/addons/dcc/res/send-inactive.png
69
+  dcc-send-done=plugin://dcc:com/dmdirc/addons/dcc/res/send-done.png
70
+  dcc-send-failed=plugin://dcc:com/dmdirc/addons/dcc/res/send-failed.png
71
+  dcc-receive-active=plugin://dcc:com/dmdirc/addons/dcc/res/receive.png
72
+  dcc-receive-inactive=plugin://dcc:com/dmdirc/addons/dcc/res/receive-inactive.png
73
+  dcc-receive-done=plugin://dcc:com/dmdirc/addons/dcc/res/receive-done.png
74
+  dcc-receive-failed=plugin://dcc:com/dmdirc/addons/dcc/res/receive-failed.png

+ 0
- 7
src/com/dmdirc/addons/mediasource_vlc/VlcMediaSourcePlugin.java Vedi File

@@ -192,13 +192,6 @@ public class VlcMediaSourcePlugin extends Plugin implements MediaSource {
192 192
         // Do nothing
193 193
     }
194 194
 
195
-    /** {@inheritDoc} */
196
-    @Override
197
-    public void domainUpdated() {
198
-        IdentityManager.getAddonIdentity().setOption("icon", "category-vlc",
199
-                "plugin://vlcmediasource:com/dmdirc/addons/mediasource_vlc/vlc.png");
200
-    }
201
-
202 195
     /** {@inheritDoc} */
203 196
     @Override    
204 197
     public void onUnload() {

+ 5
- 1
src/com/dmdirc/addons/mediasource_vlc/plugin.config Vedi File

@@ -9,6 +9,7 @@ keysections:
9 9
   updates
10 10
   version
11 11
   defaults
12
+  icons
12 13
 
13 14
 metadata:
14 15
   author=Chris <chris@dmdirc.com>
@@ -33,4 +34,7 @@ required-services:
33 34
   mediasource manager
34 35
 
35 36
 defaults:
36
-  host=localhost:8082
37
+  host=localhost:8082
38
+
39
+icons:
40
+  category-vlc=plugin://vlcmediasource:com/dmdirc/addons/mediasource_vlc/vlc.png

+ 0
- 7
src/com/dmdirc/addons/nowplaying/NowPlayingPlugin.java Vedi File

@@ -95,13 +95,6 @@ public class NowPlayingPlugin extends Plugin implements ActionListener  {
95 95
         
96 96
         CommandManager.unregisterCommand(command);
97 97
     }
98
-
99
-    /** {@inheritDoc} */
100
-    @Override
101
-    public void domainUpdated() {
102
-        IdentityManager.getAddonIdentity().setOption("icon", "category-nowplaying",
103
-                "plugin://nowplaying:com/dmdirc/addons/nowplaying/nowplaying.png");
104
-    }
105 98
     
106 99
     /** {@inheritDoc} */
107 100
     @Override

+ 5
- 1
src/com/dmdirc/addons/nowplaying/plugin.config Vedi File

@@ -8,6 +8,7 @@ keysections:
8 8
   requires
9 9
   updates
10 10
   defaults
11
+  icons
11 12
 #  version
12 13
 
13 14
 metadata:
@@ -36,4 +37,7 @@ provides:
36 37
   mediasource manager
37 38
 
38 39
 defaults:
39
-  format=/me is playing $artist - $title
40
+  format=/me is playing $artist - $title
41
+
42
+icons:
43
+  category-nowplaying=plugin://nowplaying:com/dmdirc/addons/nowplaying/nowplaying.png

Loading…
Annulla
Salva