Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsuen2007-09-02 02:17:38 +0000
committerrsuen2007-09-02 02:17:38 +0000
commit4bcd3951221491980185776c174ad33c6874baca (patch)
tree5e6235b2c1dc2d6fcbfd8faa376b4c1af84ddaad /providers/bundles/org.eclipse.ecf.provider.irc.ui
parent29e883e7b87b66a8a8d5f6360b262efde9b06193 (diff)
downloadorg.eclipse.ecf-4bcd3951221491980185776c174ad33c6874baca.tar.gz
org.eclipse.ecf-4bcd3951221491980185776c174ad33c6874baca.tar.xz
org.eclipse.ecf-4bcd3951221491980185776c174ad33c6874baca.zip
Allow the messages in the chat room view to be customizable for bug 190851 (Allow to customize fonts and colors for all messages views).
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.irc.ui')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.irc.ui/plugin.properties26
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.irc.ui/plugin.xml23
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/IRCMessageRenderer.java14
3 files changed, 50 insertions, 13 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.irc.ui/plugin.properties b/providers/bundles/org.eclipse.ecf.provider.irc.ui/plugin.properties
index 782d6f462..16b5a7e63 100644
--- a/providers/bundles/org.eclipse.ecf.provider.irc.ui/plugin.properties
+++ b/providers/bundles/org.eclipse.ecf.provider.irc.ui/plugin.properties
@@ -1,11 +1,15 @@
-/****************************************************************************
-* Copyright (c) 2007 Composent Inc., IBM Corp. and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-*****************************************************************************/
+################################################################################
+# Copyright (c) 2007 Composent, Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Composent, Inc. - initial API and implementation
+# Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 190851
+################################################################################
+
plugin.name=ECF IRC UI
plugin.provider=Eclipse.org
@@ -18,4 +22,8 @@ OpAction_Label=Op
DeopAction_Label=Deop
VoiceAction_Label=Voice
DevoiceAction_Label=Devoice
-WhoisAction_Label=Whois \ No newline at end of file
+WhoisAction_Label=Whois
+colorDefinition.ircMeColor = IRC /me color
+colorDefinition.ircMeColor.description = Color of messages sent by local user using /me command.
+fontDefinition.ircMeFont = IRC /me font
+fontDefinition.ircMeFont.description = Font of messages sent by local user using /me command.
diff --git a/providers/bundles/org.eclipse.ecf.provider.irc.ui/plugin.xml b/providers/bundles/org.eclipse.ecf.provider.irc.ui/plugin.xml
index bc2a1d80e..31125e500 100644
--- a/providers/bundles/org.eclipse.ecf.provider.irc.ui/plugin.xml
+++ b/providers/bundles/org.eclipse.ecf.provider.irc.ui/plugin.xml
@@ -75,5 +75,28 @@
</visibility>
</viewerContribution>
</extension>
+ <extension
+ point="org.eclipse.ui.themes">
+ <colorDefinition
+ categoryId="org.eclipse.ecf.presence.ui.themeElementCategory"
+ defaultsTo="org.eclipse.ecf.presence.ui.sentColor"
+ id="org.eclipse.ecf.presence.irc.ui.meColor"
+ isEditable="true"
+ label="%colorDefinition.ircMeColor">
+ <description>
+ %colorDefinition.ircMeColor.description
+ </description>
+ </colorDefinition>
+ <fontDefinition
+ categoryId="org.eclipse.ecf.presence.ui.themeElementCategory"
+ id="org.eclipse.ecf.presence.irc.ui.meFont"
+ isEditable="true"
+ label="%fontDefinition.ircMeFont"
+ value="-italic-10">
+ <description>
+ %fontDefinition.ircMeFont.description
+ </description>
+ </fontDefinition>
+ </extension>
</plugin>
diff --git a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/IRCMessageRenderer.java b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/IRCMessageRenderer.java
index b4903d064..d7fafc9f9 100644
--- a/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/IRCMessageRenderer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.irc.ui/src/org/eclipse/ecf/internal/irc/ui/IRCMessageRenderer.java
@@ -6,15 +6,21 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 197329
+ * Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 197329, 190851
*****************************************************************************/
package org.eclipse.ecf.internal.irc.ui;
import org.eclipse.ecf.presence.ui.chatroom.MessageRenderer;
-import org.eclipse.swt.SWT;
public class IRCMessageRenderer extends MessageRenderer {
+ /**
+ * Messages sent by local user using /me command
+ */
+ protected static final String IRC_ME_COLOR = "org.eclipse.ecf.presence.irc.ui.meColor"; //$NON-NLS-1$
+ protected static final String IRC_ME_FONT = "org.eclipse.ecf.presence.irc.ui.meFont"; //$NON-NLS-1$
+
+
private final static String ME_PREFIX = "\01ACTION "; //$NON-NLS-1$
private final static String ME_SUFFIX = "\01"; //$NON-NLS-1$
@@ -34,7 +40,7 @@ public class IRCMessageRenderer extends MessageRenderer {
protected void appendNickname() {
if (isActionMessage) {
String message = originator + " "; //$NON-NLS-1$
- append(message, null, null, SWT.ITALIC);
+ append(message, IRC_ME_COLOR, null, IRC_ME_FONT);
} else {
super.appendNickname();
}
@@ -42,7 +48,7 @@ public class IRCMessageRenderer extends MessageRenderer {
protected void appendMessage() {
if (isActionMessage) {
- append(message, null, null, SWT.ITALIC);
+ append(message, IRC_ME_COLOR, null, IRC_ME_FONT);
} else {
super.appendMessage();
}

Back to the top