mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Update Theme work.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@6111 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -1105,7 +1105,7 @@ public class ChatContainer extends SparkTabbedPane implements MessageListener, C
|
||||
SwingWorker worker = new SwingWorker() {
|
||||
public Object construct() {
|
||||
try {
|
||||
Thread.sleep(50);
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
catch (InterruptedException e1) {
|
||||
Log.error(e1);
|
||||
|
||||
@ -204,7 +204,7 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
verticalSplit.setTopComponent(chatPanel);
|
||||
verticalSplit.setBottomComponent(bottomPanel);
|
||||
verticalSplit.setResizeWeight(1.0);
|
||||
verticalSplit.setDividerSize(2);
|
||||
verticalSplit.setDividerSize(1);
|
||||
|
||||
// Add listener to send button
|
||||
chatAreaButton.getButton().addActionListener(this);
|
||||
|
||||
@ -146,10 +146,12 @@ public class ContactGroup extends CollapsiblePane implements MouseListener {
|
||||
addPopupWindow();
|
||||
|
||||
// Use background image
|
||||
/*
|
||||
URL url = getClass().getResource("/images/blue-steel-background.png");
|
||||
ImageIcon icon = new ImageIcon(url);
|
||||
getTitlePane().useImageAsBackground(icon.getImage());
|
||||
getTitlePane().setTitleColor(Color.white);
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -121,8 +121,9 @@ public class TranscriptWindow extends JPanel {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
add(new JScrollPane(browser), BorderLayout.CENTER);
|
||||
final JScrollPane pane = new JScrollPane(browser);
|
||||
pane.setBorder(null);
|
||||
add(pane, BorderLayout.CENTER);
|
||||
|
||||
extraPanel.setBackground(Color.white);
|
||||
extraPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false));
|
||||
@ -130,6 +131,10 @@ public class TranscriptWindow extends JPanel {
|
||||
add(extraPanel, BorderLayout.SOUTH);
|
||||
|
||||
startCommandListener();
|
||||
|
||||
browser.setFocusable(false);
|
||||
this.setFocusable(false);
|
||||
setBorder(null);
|
||||
}
|
||||
|
||||
|
||||
@ -469,9 +474,7 @@ public class TranscriptWindow extends JPanel {
|
||||
if (scriptList.size() > 0) {
|
||||
String script = (String)scriptList.get(0);
|
||||
scriptList.remove(0);
|
||||
System.out.println(script);
|
||||
String str = browser.executeScript(script);
|
||||
// System.out.println(str);
|
||||
browser.executeScript(script);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,6 @@ import org.jivesoftware.spark.SparkManager;
|
||||
import org.jivesoftware.spark.util.StringUtils;
|
||||
import org.jivesoftware.spark.util.URLFileSystem;
|
||||
import org.jivesoftware.spark.util.log.Log;
|
||||
import org.jivesoftware.sparkimpl.plugin.emoticons.Emoticon;
|
||||
import org.jivesoftware.sparkimpl.plugin.emoticons.EmoticonManager;
|
||||
import org.jivesoftware.sparkimpl.settings.local.LocalPreferences;
|
||||
import org.jivesoftware.sparkimpl.settings.local.SettingsManager;
|
||||
@ -34,7 +33,6 @@ import java.net.URL;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Enumeration;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.zip.ZipFile;
|
||||
@ -108,8 +106,10 @@ public class ThemeManager {
|
||||
|
||||
// Note that the install directory is my name for temporary files and
|
||||
// not about mozilla. Me love Mozilla.
|
||||
be.setEnginePath("C:\\mozilla\\mozilla.exe");
|
||||
//be.setEnginePath("C:\\mozilla\\mozilla.exe");
|
||||
|
||||
File mozilla = new File(Spark.getBinDirectory(), "mozilla");
|
||||
be.setEnginePath(mozilla.getAbsolutePath());
|
||||
THEMES_DIRECTORY = new File(Spark.getBinDirectory().getParent(), "xtra/themes").getAbsoluteFile();
|
||||
|
||||
// For Testing
|
||||
@ -328,6 +328,9 @@ public class ThemeManager {
|
||||
|
||||
public String getIncomingMessage(String sender, String time, String message, URL iconPath) {
|
||||
String incoming = incomingText;
|
||||
if (sender == null) {
|
||||
sender = "";
|
||||
}
|
||||
incoming = incoming.replaceAll("%sender%", sender);
|
||||
incoming = incoming.replaceAll("%time%", time);
|
||||
incoming = incoming.replaceAll("%message%", message);
|
||||
@ -342,6 +345,9 @@ public class ThemeManager {
|
||||
|
||||
public String getIncomingHistoryMessage(String sender, String time, String message, URL iconPath) {
|
||||
String incoming = incomingHistoryText;
|
||||
if (sender == null) {
|
||||
sender = "";
|
||||
}
|
||||
incoming = incoming.replaceAll("%sender%", sender);
|
||||
incoming = incoming.replaceAll("%time%", time);
|
||||
incoming = incoming.replaceAll("%message%", message);
|
||||
@ -356,6 +362,9 @@ public class ThemeManager {
|
||||
|
||||
public String getOutgoingMessage(String sender, String time, String message, URL iconPath) {
|
||||
String outgoing = outgoingText;
|
||||
if (sender == null) {
|
||||
sender = "";
|
||||
}
|
||||
outgoing = outgoing.replaceAll("%sender%", sender);
|
||||
outgoing = outgoing.replaceAll("%time%", time);
|
||||
outgoing = outgoing.replaceAll("%message%", message);
|
||||
@ -369,6 +378,9 @@ public class ThemeManager {
|
||||
|
||||
public String getOutgoingHistoryMessage(String sender, String time, String message, URL iconPath) {
|
||||
String outgoing = outgoingHistoryText;
|
||||
if (sender == null) {
|
||||
sender = "";
|
||||
}
|
||||
outgoing = outgoing.replaceAll("%sender%", sender);
|
||||
outgoing = outgoing.replaceAll("%time%", time);
|
||||
outgoing = outgoing.replaceAll("%message%", message);
|
||||
@ -476,7 +488,7 @@ public class ThemeManager {
|
||||
String time = formatter.format(new Date());
|
||||
|
||||
text = text.replaceAll("%timeOpened", time);
|
||||
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user