mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Updating for secret 3.0 pre-alpha release.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@6339 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -636,7 +636,7 @@ public class SparkTransferManager {
|
|||||||
});
|
});
|
||||||
|
|
||||||
sendingUI.sendFile(transfer, transferManager, presence.getFrom(), contactItem.getNickname());
|
sendingUI.sendFile(transfer, transferManager, presence.getFrom(), contactItem.getNickname());
|
||||||
transcriptWindow.add(sendingUI, BorderLayout.AFTER_LAST_LINE);
|
transcriptWindow.addComponent(sendingUI);
|
||||||
return chatRoom;
|
return chatRoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,6 @@ public class TranscriptWindow extends JPanel {
|
|||||||
|
|
||||||
private Timer timer = new Timer();
|
private Timer timer = new Timer();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a default instance of <code>TranscriptWindow</code>.
|
* Creates a default instance of <code>TranscriptWindow</code>.
|
||||||
*/
|
*/
|
||||||
@ -93,7 +92,7 @@ public class TranscriptWindow extends JPanel {
|
|||||||
|
|
||||||
extraPanel = new JPanel();
|
extraPanel = new JPanel();
|
||||||
|
|
||||||
//Core function to create browser
|
//Core function to create browser
|
||||||
browser = BrowserFactory.spawnMozilla();
|
browser = BrowserFactory.spawnMozilla();
|
||||||
browser.addNetworkListener(new NetworkListener() {
|
browser.addNetworkListener(new NetworkListener() {
|
||||||
public void onProgressChange(NetworkEvent networkEvent) {
|
public void onProgressChange(NetworkEvent networkEvent) {
|
||||||
@ -512,9 +511,9 @@ public class TranscriptWindow extends JPanel {
|
|||||||
public void addComponent(JComponent component) {
|
public void addComponent(JComponent component) {
|
||||||
extraPanel.add(component);
|
extraPanel.add(component);
|
||||||
extraPanel.setVisible(true);
|
extraPanel.setVisible(true);
|
||||||
extraPanel.invalidate();
|
invalidate();
|
||||||
extraPanel.validate();
|
validate();
|
||||||
extraPanel.repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeComponent(JComponent component) {
|
public void removeComponent(JComponent component) {
|
||||||
@ -523,9 +522,9 @@ public class TranscriptWindow extends JPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extraPanel.remove(component);
|
extraPanel.remove(component);
|
||||||
extraPanel.invalidate();
|
invalidate();
|
||||||
extraPanel.validate();
|
validate();
|
||||||
extraPanel.repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dimension getPreferredSize() {
|
public Dimension getPreferredSize() {
|
||||||
|
|||||||
@ -125,12 +125,25 @@ public class ThemeManager {
|
|||||||
String themeName = pref.getTheme();
|
String themeName = pref.getTheme();
|
||||||
|
|
||||||
File theme = new File(THEMES_DIRECTORY, themeName);
|
File theme = new File(THEMES_DIRECTORY, themeName);
|
||||||
|
if (!theme.exists()) {
|
||||||
|
File themeDir = ThemeManager.THEMES_DIRECTORY;
|
||||||
|
File[] dirs = themeDir.listFiles();
|
||||||
|
for (int i = 0; i < dirs.length; i++) {
|
||||||
|
File file = dirs[i];
|
||||||
|
if (file.isDirectory()) {
|
||||||
|
themeName = file.getName();
|
||||||
|
pref.setTheme(themeName);
|
||||||
|
theme = new File(THEMES_DIRECTORY, themeName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setTheme(theme);
|
setTheme(theme);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
System.err.println("Could not locate "+theme);
|
System.err.println("Could not locate " + theme);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import org.jivesoftware.smackx.filetransfer.FileTransfer;
|
|||||||
import org.jivesoftware.smackx.filetransfer.FileTransferRequest;
|
import org.jivesoftware.smackx.filetransfer.FileTransferRequest;
|
||||||
import org.jivesoftware.smackx.filetransfer.IncomingFileTransfer;
|
import org.jivesoftware.smackx.filetransfer.IncomingFileTransfer;
|
||||||
import org.jivesoftware.spark.SparkManager;
|
import org.jivesoftware.spark.SparkManager;
|
||||||
|
import org.jivesoftware.spark.component.RolloverButton;
|
||||||
import org.jivesoftware.spark.ui.ChatRoom;
|
import org.jivesoftware.spark.ui.ChatRoom;
|
||||||
import org.jivesoftware.spark.ui.ContactItem;
|
import org.jivesoftware.spark.ui.ContactItem;
|
||||||
import org.jivesoftware.spark.ui.ContactList;
|
import org.jivesoftware.spark.ui.ContactList;
|
||||||
@ -34,20 +35,6 @@ import org.jivesoftware.spark.util.URLFileSystem;
|
|||||||
import org.jivesoftware.spark.util.log.Log;
|
import org.jivesoftware.spark.util.log.Log;
|
||||||
import org.jivesoftware.sparkimpl.plugin.filetransfer.transfer.Downloads;
|
import org.jivesoftware.sparkimpl.plugin.filetransfer.transfer.Downloads;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.swing.AbstractAction;
|
|
||||||
import javax.swing.Action;
|
|
||||||
import javax.swing.BorderFactory;
|
|
||||||
import javax.swing.Icon;
|
|
||||||
import javax.swing.ImageIcon;
|
|
||||||
import javax.swing.JButton;
|
|
||||||
import javax.swing.JFileChooser;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JOptionPane;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.JPopupMenu;
|
|
||||||
import javax.swing.JProgressBar;
|
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
@ -66,6 +53,20 @@ import java.io.IOException;
|
|||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import javax.swing.AbstractAction;
|
||||||
|
import javax.swing.Action;
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.Icon;
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JFileChooser;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JPopupMenu;
|
||||||
|
import javax.swing.JProgressBar;
|
||||||
|
|
||||||
public class ReceiveMessage extends JPanel {
|
public class ReceiveMessage extends JPanel {
|
||||||
private JLabel imageLabel = new JLabel();
|
private JLabel imageLabel = new JLabel();
|
||||||
private JLabel titleLabel = new JLabel();
|
private JLabel titleLabel = new JLabel();
|
||||||
@ -91,6 +92,14 @@ public class ReceiveMessage extends JPanel {
|
|||||||
titleLabel.setForeground(new Color(211, 174, 102));
|
titleLabel.setForeground(new Color(211, 174, 102));
|
||||||
add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 2, 2), 0, 0));
|
add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 2, 2), 0, 0));
|
||||||
|
|
||||||
|
final RolloverButton hideButton = new RolloverButton("Hide", SparkRes.getImageIcon(SparkRes.SMALL_CLOSE_BUTTON));
|
||||||
|
add(hideButton, new GridBagConstraints(2, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
|
||||||
|
hideButton.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
setVisible(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
add(acceptLabel, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 2), 0, 0));
|
add(acceptLabel, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 2), 0, 0));
|
||||||
|
|
||||||
add(declineLabel, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 2), 0, 0));
|
add(declineLabel, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 0, 2), 0, 0));
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import org.jivesoftware.smackx.filetransfer.FileTransfer.Status;
|
|||||||
import org.jivesoftware.smackx.filetransfer.FileTransferManager;
|
import org.jivesoftware.smackx.filetransfer.FileTransferManager;
|
||||||
import org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer;
|
import org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer;
|
||||||
import org.jivesoftware.spark.SparkManager;
|
import org.jivesoftware.spark.SparkManager;
|
||||||
|
import org.jivesoftware.spark.component.RolloverButton;
|
||||||
import org.jivesoftware.spark.ui.ContactItem;
|
import org.jivesoftware.spark.ui.ContactItem;
|
||||||
import org.jivesoftware.spark.ui.ContactList;
|
import org.jivesoftware.spark.ui.ContactList;
|
||||||
import org.jivesoftware.spark.util.ByteFormat;
|
import org.jivesoftware.spark.util.ByteFormat;
|
||||||
@ -77,6 +78,15 @@ public class SendMessage extends JPanel {
|
|||||||
add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
|
add(titleLabel, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
|
||||||
titleLabel.setFont(new Font("Dialog", Font.BOLD, 11));
|
titleLabel.setFont(new Font("Dialog", Font.BOLD, 11));
|
||||||
titleLabel.setForeground(new Color(211, 174, 102));
|
titleLabel.setForeground(new Color(211, 174, 102));
|
||||||
|
|
||||||
|
final RolloverButton hideButton = new RolloverButton("Hide", SparkRes.getImageIcon(SparkRes.SMALL_CLOSE_BUTTON));
|
||||||
|
add(hideButton, new GridBagConstraints(2, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
|
||||||
|
hideButton.addActionListener(new ActionListener() {
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
setVisible(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 2, 2), 0, 0));
|
add(fileLabel, new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 2, 2, 2), 0, 0));
|
||||||
|
|
||||||
cancelButton.setText(Res.getString("cancel"));
|
cancelButton.setText(Res.getString("cancel"));
|
||||||
|
|||||||
Reference in New Issue
Block a user