Icon packs are read in TeamSpeak's own format — a zip (or unpacked folder) of SVG/PNG art plus a settings.ini mapping icon keys to files — so the packs of an installed client and the ones from its add-on site work unchanged. Legacy packs without that mapping (default.zip) are resolved by their file naming convention instead, picking the resolution closest to the drawn size. The pack draws the tree, toolbar, menus, context menus, file browser and the default group icons; a pack's FALLBACK option decides whether what it lacks comes from default.zip, and anything still missing falls back to the icons the client draws itself. Options → Design picks the pack and shows a viewer of everything in it. Vector art is rasterised with JSVG, and the pack search roots are shared with the sound packs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
29 lines
837 B
Java
29 lines
837 B
Java
package com.ts3client.ui;
|
|
|
|
import com.ts3client.net.ChannelNode;
|
|
|
|
import javax.swing.JMenuItem;
|
|
import javax.swing.JPopupMenu;
|
|
|
|
/**
|
|
* The context menu for a channel, shared by the server tree and channel links
|
|
* in the chat log.
|
|
*/
|
|
final class ChannelMenu {
|
|
|
|
private ChannelMenu() {
|
|
}
|
|
|
|
static JPopupMenu build(ChannelNode channel, ServerTreePanel.Actions actions) {
|
|
JPopupMenu menu = new JPopupMenu();
|
|
JMenuItem join = new JMenuItem("Join channel", Icons.of("CHANNEL_SWITCH"));
|
|
join.addActionListener(a -> actions.joinChannel(channel.id));
|
|
menu.add(join);
|
|
menu.addSeparator();
|
|
JMenuItem files = new JMenuItem("Browse files", Icons.of("FILETRANSFER"));
|
|
files.addActionListener(a -> actions.browseFiles(channel));
|
|
menu.add(files);
|
|
return menu;
|
|
}
|
|
}
|