Parcourir la source

Move all formatter/icon settings into plugin.configs

Fixes issue 2309
tags/0.6.3m1rc1
Chris Smith il y a 15 ans
Parent
révision
7cffaea4eb

+ 0
- 21
src/com/dmdirc/addons/dcc/DCCPlugin.java Voir le fichier

456
 
456
 
457
         defaults.setOption(getDomain(), "receive.savelocation",
457
         defaults.setOption(getDomain(), "receive.savelocation",
458
                 Main.getConfigDir() + "downloads" + System.getProperty("file.separator"));
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 Voir le fichier

8
   requires
8
   requires
9
   updates
9
   updates
10
   defaults
10
   defaults
11
+  formatters
12
+  icons
11
 #  version
13
 #  version
12
 
14
 
13
 metadata:
15
 metadata:
47
   firewall.ip=
49
   firewall.ip=
48
   firewall.ports.usePortRange=false
50
   firewall.ports.usePortRange=false
49
   firewall.ports.startPort=11000
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 Voir le fichier

192
         // Do nothing
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
     /** {@inheritDoc} */
195
     /** {@inheritDoc} */
203
     @Override    
196
     @Override    
204
     public void onUnload() {
197
     public void onUnload() {

+ 5
- 1
src/com/dmdirc/addons/mediasource_vlc/plugin.config Voir le fichier

9
   updates
9
   updates
10
   version
10
   version
11
   defaults
11
   defaults
12
+  icons
12
 
13
 
13
 metadata:
14
 metadata:
14
   author=Chris <chris@dmdirc.com>
15
   author=Chris <chris@dmdirc.com>
33
   mediasource manager
34
   mediasource manager
34
 
35
 
35
 defaults:
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 Voir le fichier

95
         
95
         
96
         CommandManager.unregisterCommand(command);
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
     /** {@inheritDoc} */
99
     /** {@inheritDoc} */
107
     @Override
100
     @Override

+ 5
- 1
src/com/dmdirc/addons/nowplaying/plugin.config Voir le fichier

8
   requires
8
   requires
9
   updates
9
   updates
10
   defaults
10
   defaults
11
+  icons
11
 #  version
12
 #  version
12
 
13
 
13
 metadata:
14
 metadata:
36
   mediasource manager
37
   mediasource manager
37
 
38
 
38
 defaults:
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

Chargement…
Annuler
Enregistrer