mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Applied patches from winsrev for:
[SPARK-944] Language change now restarts Spark. Adds the ability to make groupchat highlighting an option, off by default. And from Michael Will for: [SPARK-637] When buzzed, tabs are now highlighted. Debian build added. git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@10343 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
dhenninger
parent
d7f9d4c741
commit
a82d33ed0a
@ -69,7 +69,6 @@
|
||||
<property name="xtra.dir" location="${basedir}/src/xtra"/>
|
||||
<property name="target.xtra" location="${target.build}/xtra"/>
|
||||
|
||||
|
||||
<!-- Installer Ant Script -->
|
||||
|
||||
<property name="installer.install4j.home" value="c:\\Program Files\\install4j"/>
|
||||
@ -607,6 +606,55 @@
|
||||
<!-- <symlink action="delete" failonerror="true" link="${mac.build.dir}/Applications"/> -->
|
||||
</target>
|
||||
|
||||
<!--
|
||||
Debian package =========================================================================
|
||||
-->
|
||||
<property name="work.dir" value="${basedir}/work"/>
|
||||
<property name="debian.dir" value="${basedir}/build/debian"/>
|
||||
<property name="debian.version" value="${version.major}.${version.minor}.${version.revision}"/>
|
||||
<property name="debian.work.dir" value="${work.dir}/debian/spark-${debian.version}"/>
|
||||
<property name="debian.release.dir" value="${basedir}/installer"/>
|
||||
<tstamp>
|
||||
<format property="debian.builddate" pattern="EEE, dd MMM yyyy HH:mm:ss Z" locale="en"/>
|
||||
</tstamp>
|
||||
<target name="installer.debian" depends="" description="build release deb file for the Debian,Ubuntu">
|
||||
|
||||
<copy todir="${debian.work.dir}/debian">
|
||||
<fileset dir="${debian.dir}/" includes="**/*"/>
|
||||
<filterset>
|
||||
<filter token="builddate" value="${debian.builddate}"/>
|
||||
<filter token="version" value="${debian.version}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${debian.work.dir}/documentation/">
|
||||
<fileset dir="${basedir}/documentation/" includes="**/*"/>
|
||||
</copy>
|
||||
|
||||
<copy todir="${debian.work.dir}/src/">
|
||||
<fileset dir="${basedir}/src/" includes="**/*"/>
|
||||
</copy>
|
||||
|
||||
<copy todir="${debian.work.dir}/build/">
|
||||
<fileset dir="${basedir}/build/" includes="**/*"/>
|
||||
</copy>
|
||||
|
||||
<chmod file="${debian.work.dir}/debian/rules" perm="755"/>
|
||||
<exec executable="dpkg-buildpackage" dir="${debian.work.dir}" failonerror="false">
|
||||
<arg line="-d"/>
|
||||
</exec>
|
||||
|
||||
<mkdir dir="${debian.release.dir}"/>
|
||||
|
||||
<copy todir="${debian.release.dir}">
|
||||
<fileset dir="${debian.work.dir}/.." followsymlinks="false">
|
||||
<include name="**/*.deb"/>
|
||||
<include name="**/*.changes"/>
|
||||
<include name="**/*.dsc"/>
|
||||
<include name="**/*.gz"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
|
||||
|
||||
5
build/debian/changelog
Normal file
5
build/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
spark (2.5.8) unstable; urgency=medium
|
||||
|
||||
* For full changelog, see http://www.igniterealtime.org/builds/spar/docs/latest/changelog.html
|
||||
|
||||
-- Jive Software <webmaster@jivesoftware.com> Mon, 28 Apr 2008 11:21:51 +0200
|
||||
1
build/debian/compat
Normal file
1
build/debian/compat
Normal file
@ -0,0 +1 @@
|
||||
5
|
||||
0
build/debian/conffiles
Normal file
0
build/debian/conffiles
Normal file
13
build/debian/control
Normal file
13
build/debian/control
Normal file
@ -0,0 +1,13 @@
|
||||
Source: spark
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Jive Software <webmaster@jivesoftware.com>
|
||||
Build-Depends: dephelper, cdbs, patchutils, sun-java6-jdk, ant
|
||||
Standards-Version: 3.7.2
|
||||
|
||||
Package: spark
|
||||
Section: net
|
||||
Priority: optional
|
||||
Pre-Depends: libstdc++5, sun-java6-jre, libgtk2.0-0
|
||||
Architecture: all
|
||||
Description: Cross-platform real-time collaboration client optimized for business and organizations.
|
||||
13
build/debian/copyright
Normal file
13
build/debian/copyright
Normal file
@ -0,0 +1,13 @@
|
||||
This package was debianized by Jive Software
|
||||
<webmaster@jivesoftware.com> on Apri 28, 2008.
|
||||
The source was downloaded from http://www.igniterealtime.org.
|
||||
|
||||
Upstream author: Jive Software <webmaster@jivesoftware.com>
|
||||
|
||||
This software is copyright (c) 2007 by Jive Software
|
||||
|
||||
You are free to distribute this software under the terms of
|
||||
the GNU General Public License. On Debian systems, the complete
|
||||
text of the GNU General Public License can be found in the file
|
||||
'/usr/share/common-licenses/GPL'.
|
||||
|
||||
1
build/debian/files
Normal file
1
build/debian/files
Normal file
@ -0,0 +1 @@
|
||||
spark_2.5.8_all.deb net optional
|
||||
10
build/debian/patches/01_spark_home_dir.patch
Normal file
10
build/debian/patches/01_spark_home_dir.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- debian/src/resources/startup.sh.orgi 2008-04-28 13:10:59.000000000 +0200
|
||||
+++ debian/src/resources/startup.sh 2008-04-28 13:11:03.000000000 +0200
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
-java -Dappdir=.. -cp ../lib/linux/jmf.jar:../lib/startup.jar:../lib/linux/jdic.jar:../resources org.jivesoftware.launcher.Startup
|
||||
-
|
||||
-java -Ddebugger=true -Ddebug.mode=true -XX:+HeapDumpOnOutOfMemoryError -Xdebug -Xint -server -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -Dappdir=.. -cp ../lib/linux/jmf.jar:../lib/startup.jar:../lib/linux/jdic.jar:../resources org.jivesoftware.launcher.Startup
|
||||
+SPARKDIR=/usr/share/spark/
|
||||
|
||||
+/usr/lib/jvm/java-6-sun/jre/bin/java -Dappdir=$SPARKDIR -cp $SPARKDIR/lib/linux/jmf.jar:$SPARKDIR/lib/startup.jar:$SPARKDIR/lib/linux/jdic.jar:$SPARKDIR/resources org.jivesoftware.launcher.Startup
|
||||
22
build/debian/postinst
Normal file
22
build/debian/postinst
Normal file
@ -0,0 +1,22 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
|
||||
chmod -R 755 /usr/share/spark/bin/spark
|
||||
|
||||
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
25
build/debian/postrm
Executable file
25
build/debian/postrm
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
purge)
|
||||
;;
|
||||
|
||||
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
4
build/debian/prerm
Normal file
4
build/debian/prerm
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
26
build/debian/rules
Executable file
26
build/debian/rules
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
include /usr/share/cdbs/1/rules/simple-patchsys.mk
|
||||
include /usr/share/cdbs/1/rules/debhelper.mk
|
||||
include /usr/share/cdbs/1/class/ant.mk
|
||||
|
||||
DEST := $(CURDIR)/debian/spark
|
||||
TARGET := $(CURDIR)/target/build
|
||||
SPARK := $(DEST)/usr/share/spark
|
||||
|
||||
JAVA_HOME := /usr/lib/jvm/java-6-sun
|
||||
DEB_ANT_BUILDFILE := build/build.xml
|
||||
DEB_ANT_BUILD_TARGET := jar
|
||||
DEB_ANT_CLEAN_TARGET := clean
|
||||
|
||||
install/spark::
|
||||
cp $(TARGET)/bin/startup.sh $(SPARK)/bin/spark
|
||||
cp $(TARGET)/lib/*.jar $(SPARK)/lib/
|
||||
cp $(TARGET)/lib/linux/*.jar $(SPARK)/lib/linux/
|
||||
cp $(TARGET)/lib/linux/libjdic.so $(SPARK)/lib/linux/
|
||||
cp $(TARGET)/lib/linux/libtray.so $(SPARK)/lib/linux/
|
||||
cp $(TARGET)/lib/linux/libmozembed-linux-gtk2.so $(SPARK)/lib/linux/
|
||||
cp -r $(TARGET)/resources $(SPARK)/
|
||||
cp -r $(TARGET)/plugins $(SPARK)/
|
||||
cp -r $(TARGET)/xtra $(SPARK)/
|
||||
|
||||
7
build/debian/spark.dirs
Normal file
7
build/debian/spark.dirs
Normal file
@ -0,0 +1,7 @@
|
||||
/usr/share/spark/bin
|
||||
/usr/share/spark/lib
|
||||
/usr/share/spark/lib/linux
|
||||
/usr/share/spark/resources
|
||||
/usr/share/spark/plugins
|
||||
/usr/share/spark/xtra
|
||||
|
||||
1
build/debian/spark.links
Normal file
1
build/debian/spark.links
Normal file
@ -0,0 +1 @@
|
||||
/usr/share/spark/bin/spark /usr/bin/spark
|
||||
1
build/debian/spark.substvars
Normal file
1
build/debian/spark.substvars
Normal file
@ -0,0 +1 @@
|
||||
shlibs:Depends=libatk1.0-0 (>= 1.20.0), zlib1g (>= 1:1.2.3.3.dfsg-1), libgtk2.0-0 (>= 2.12.0), libpango1.0-0 (>= 1.20.1), libc6 (>= 2.3), libgcc1 (>= 1:4.1.1-21), libxt6, libgnome2-0 (>= 2.17.3), libstdc++5 (>= 1:3.3.4-1), libx11-6, libglib2.0-0 (>= 2.12.0)
|
||||
@ -21,6 +21,13 @@
|
||||
<option name="PER_PROJECT_SETTINGS" />
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="false" />
|
||||
</component>
|
||||
<component name="ColorBrowser">
|
||||
<indexHtml>0</indexHtml>
|
||||
<indexColor>0</indexColor>
|
||||
<indexColorUIResource>0</indexColorUIResource>
|
||||
<hexUppercase>N</hexUppercase>
|
||||
<lastColor>-12610845</lastColor>
|
||||
</component>
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="DEFAULT_COMPILER" value="Javac" />
|
||||
<option name="DEPLOY_AFTER_MAKE" value="0" />
|
||||
|
||||
@ -304,7 +304,7 @@ public final class MainWindow extends ChatFrame implements ActionListener {
|
||||
*
|
||||
* @param reason the reason for logging out. This can be if user gave no reason.
|
||||
*/
|
||||
private void closeConnectionAndInvoke(String reason) {
|
||||
public void closeConnectionAndInvoke(String reason) {
|
||||
final XMPPConnection con = SparkManager.getConnection();
|
||||
if (con.isConnected()) {
|
||||
if (reason != null) {
|
||||
|
||||
@ -45,6 +45,8 @@ import org.jivesoftware.spark.ui.conferences.DataFormDialog;
|
||||
import org.jivesoftware.spark.ui.conferences.GroupChatParticipantList;
|
||||
import org.jivesoftware.spark.util.ModelUtil;
|
||||
import org.jivesoftware.spark.util.log.Log;
|
||||
import org.jivesoftware.sparkimpl.settings.local.LocalPreferences;
|
||||
import org.jivesoftware.sparkimpl.settings.local.SettingsManager;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.GridBagConstraints;
|
||||
@ -97,6 +99,9 @@ public final class GroupChatRoom extends ChatRoom {
|
||||
|
||||
private long lastActivity;
|
||||
|
||||
LocalPreferences pref = SettingsManager.getLocalPreferences();
|
||||
private boolean isMucHighlightingEnabled = pref.isMucHighEnabled();
|
||||
|
||||
/**
|
||||
* Creates a GroupChatRoom from a <code>MultiUserChat</code>.
|
||||
*
|
||||
@ -285,15 +290,20 @@ public final class GroupChatRoom extends ChatRoom {
|
||||
Pattern usernameMatch = Pattern.compile(myUserName, Pattern.CASE_INSENSITIVE);
|
||||
Pattern nicknameMatch = Pattern.compile(myNickName, Pattern.CASE_INSENSITIVE);
|
||||
|
||||
// could be inefficent, haven't looked yet
|
||||
if (myNickName.equalsIgnoreCase(nickname)) {
|
||||
// my username, my message
|
||||
return new Color(244, 248, 255);
|
||||
} else if (usernameMatch.matcher(body).find() || nicknameMatch.matcher(body).find()) {
|
||||
// match to username or nickname found
|
||||
return new Color(255, 255, 153);
|
||||
// Should we even highlight this packet?
|
||||
if (isMucHighlightingEnabled) {
|
||||
// could be inefficent, haven't looked yet
|
||||
if (myNickName.equalsIgnoreCase(nickname)) {
|
||||
// my username, my message
|
||||
return new Color(244, 248, 255);
|
||||
} else if (usernameMatch.matcher(body).find() || nicknameMatch.matcher(body).find()) {
|
||||
// match to username or nickname found
|
||||
return new Color(255, 255, 153);
|
||||
} else {
|
||||
// didn't match to username or nickname
|
||||
return Color.white;
|
||||
}
|
||||
} else {
|
||||
// didn't match to username or nickname
|
||||
return Color.white;
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,6 +119,7 @@ public class BuzzPlugin implements Plugin {
|
||||
ChatFrame chatFrame = SparkManager.getChatManager().getChatContainer().getChatFrame();
|
||||
if (chatFrame != null && chatFrame.isVisible()) {
|
||||
chatFrame.buzz();
|
||||
SparkManager.getChatManager().getChatContainer().activateChatRoom(room);
|
||||
}
|
||||
|
||||
// Insert offline message
|
||||
|
||||
@ -95,7 +95,7 @@ public class LanguagePlugin implements Plugin {
|
||||
|
||||
int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), Res.getString("message.restart.required"), Res. getString("title.confirmation"), JOptionPane.YES_NO_OPTION);
|
||||
if (ok == JOptionPane.YES_OPTION) {
|
||||
SparkManager.getMainWindow().shutdown();
|
||||
SparkManager.getMainWindow().closeConnectionAndInvoke("Language Change");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -65,12 +65,14 @@ public class NotificationsPreference implements Preference {
|
||||
boolean offlineNotification = localPreferences.isOfflineNotificationsOn();
|
||||
boolean onlineNotification = localPreferences.isOnlineNotificationsOn();
|
||||
boolean betaChecking = localPreferences.isBetaCheckingEnabled();
|
||||
boolean mucHighlighting = localPreferences.isMucHighEnabled();
|
||||
|
||||
panel.setShowToaster(toaster);
|
||||
panel.setShowWindowPopup(windowFocus);
|
||||
panel.setOfflineNotification(offlineNotification);
|
||||
panel.setOnlineNotification(onlineNotification);
|
||||
panel.setCheckForBeta(betaChecking);
|
||||
panel.setMucHighEnabled(mucHighlighting);
|
||||
}
|
||||
};
|
||||
|
||||
@ -86,6 +88,7 @@ public class NotificationsPreference implements Preference {
|
||||
pref.setOfflineNotifications(panel.isOfflineNotificationOn());
|
||||
pref.setOnlineNotifications(panel.isOnlineNotificationOn());
|
||||
pref.setCheckForBeta(panel.isBetaCheckingEnabled());
|
||||
pref.setMucHighEnabled(panel.isMucHighEnabled());
|
||||
SettingsManager.saveSettings();
|
||||
}
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ public class NotificationsUI extends JPanel {
|
||||
private JCheckBox offlineNotificationBox;
|
||||
private JCheckBox onlineNotificationBox;
|
||||
private JCheckBox betaCheckBox;
|
||||
private JCheckBox mucHighlightingBox;
|
||||
|
||||
public NotificationsUI() {
|
||||
setLayout(new VerticalFlowLayout());
|
||||
@ -52,6 +53,9 @@ public class NotificationsUI extends JPanel {
|
||||
|
||||
betaCheckBox = new JCheckBox( Res.getString("menuitem.check.for.updates"));
|
||||
add(betaCheckBox);
|
||||
|
||||
mucHighlightingBox = new JCheckBox( Res.getString("menuitem.add.group.highlighting"));
|
||||
add(mucHighlightingBox);
|
||||
}
|
||||
|
||||
public void setShowToaster(boolean show) {
|
||||
@ -93,4 +97,12 @@ public class NotificationsUI extends JPanel {
|
||||
public boolean isBetaCheckingEnabled() {
|
||||
return betaCheckBox.isSelected();
|
||||
}
|
||||
|
||||
public void setMucHighEnabled(boolean mucHigh) {
|
||||
mucHighlightingBox.setSelected(mucHigh);
|
||||
}
|
||||
|
||||
public boolean isMucHighEnabled() {
|
||||
return mucHighlightingBox.isSelected();
|
||||
}
|
||||
}
|
||||
|
||||
@ -554,6 +554,14 @@ public class LocalPreferences {
|
||||
return getBoolean("checkForBeta", false);
|
||||
}
|
||||
|
||||
public boolean isMucHighEnabled() {
|
||||
return getBoolean("isMucHighOn", false);
|
||||
}
|
||||
|
||||
public void setMucHighEnabled(boolean setMucHigh) {
|
||||
setBoolean("isMucHighOn", setMucHigh);
|
||||
}
|
||||
|
||||
public void setSSOEnabled(boolean enabled) {
|
||||
setBoolean("ssoEnabled", enabled);
|
||||
}
|
||||
|
||||
@ -429,6 +429,7 @@ menuitem.add = Add
|
||||
menuitem.add.as.contact = Add as a contact
|
||||
menuitem.add.contact = Add Contact
|
||||
menuitem.add.contact.group = Add Contact Group
|
||||
menuitem.add.group.highlighting = Highlight my name in group chats
|
||||
menuitem.alert.when.online = Alert when user is available
|
||||
menuitem.ban = Ban
|
||||
menuitem.ban.user = Ban User
|
||||
|
||||
Reference in New Issue
Block a user