aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/plugin/whiteboard
diff options
context:
space:
mode:
authorEmil Ivov <emcho@jitsi.org>2008-09-07 03:19:06 +0000
committerEmil Ivov <emcho@jitsi.org>2008-09-07 03:19:06 +0000
commit80dbccb9c8a9606f14ba94b14aeb7906b4738faf (patch)
tree930d5825788a48bf981b81b4735624e8a3685996 /src/net/java/sip/communicator/plugin/whiteboard
parentff9d19df088287f39597507feabfd38c888e4e6a (diff)
downloadjitsi-80dbccb9c8a9606f14ba94b14aeb7906b4738faf.zip
jitsi-80dbccb9c8a9606f14ba94b14aeb7906b4738faf.tar.gz
jitsi-80dbccb9c8a9606f14ba94b14aeb7906b4738faf.tar.bz2
Adds the possibility to register for RSS feeds passed as invokation parameters
Implements support for RSS feeds on sites with expired RSS certificates Implements support for the --debug parameter. Unless this parameter is set our new StdOut class would take control of all System.out traffic. Adds methods to PopupDIalog that now allow speficying an icon for generic dialog messages Fixes the whiteboard menu item never return null as it causes the UIService to slightly freak out.
Diffstat (limited to 'src/net/java/sip/communicator/plugin/whiteboard')
-rw-r--r--src/net/java/sip/communicator/plugin/whiteboard/WhiteboardActivator.java6
-rw-r--r--src/net/java/sip/communicator/plugin/whiteboard/WhiteboardMenuItem.java35
2 files changed, 23 insertions, 18 deletions
diff --git a/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardActivator.java b/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardActivator.java
index 1bd01ad..1a25ded 100644
--- a/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardActivator.java
+++ b/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardActivator.java
@@ -31,7 +31,7 @@ public class WhiteboardActivator implements BundleActivator
/**
* Starts this bundle.
- *
+ *
* @param bc bundle context
* @throws java.lang.Exception
*/
@@ -58,7 +58,7 @@ public class WhiteboardActivator implements BundleActivator
/**
* Stops this bundle.
- *
+ *
* @param bc bundle context
* @throws java.lang.Exception
*/
@@ -68,7 +68,7 @@ public class WhiteboardActivator implements BundleActivator
/**
* Returns the <tt>UIService</tt>, giving access to the main GUI.
- *
+ *
* @return the <tt>UIService</tt>, giving access to the main GUI.
*/
public static UIService getUiService()
diff --git a/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardMenuItem.java b/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardMenuItem.java
index 67c7275..fd051bc 100644
--- a/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardMenuItem.java
+++ b/src/net/java/sip/communicator/plugin/whiteboard/WhiteboardMenuItem.java
@@ -17,7 +17,7 @@ import net.java.sip.communicator.service.protocol.*;
/**
* WhiteboardMenuItem
- *
+ *
* @author Julien Waechter
*/
public class WhiteboardMenuItem
@@ -56,20 +56,20 @@ public class WhiteboardMenuItem
public void setCurrentContact (MetaContact metaContact)
{
this.metaContact = metaContact;
-
+
this.whiteboardMenu.removeAll();
-
+
Iterator iter = metaContact.getContacts();
while (iter.hasNext())
{
Contact contact = (Contact)iter.next();
ProtocolProviderService pps = contact.getProtocolProvider();
-
+
OperationSetWhiteboarding opSetWb = (OperationSetWhiteboarding)
pps.getOperationSet(OperationSetWhiteboarding.class);
String contactDisplayName = contact.getDisplayName();
-
+
JMenuItem contactItem = new JMenuItem(contactDisplayName);
contactItem.setName(contact.getDisplayName() + pps.getProtocolName());
@@ -83,7 +83,7 @@ public class WhiteboardMenuItem
contactItem.setToolTipText(
Resources.getString("whiteboardMenuItemNotSupportedTooltip"));
}
-
+
this.whiteboardMenu.add(contactItem);
}
}
@@ -99,7 +99,7 @@ public class WhiteboardMenuItem
/**
* Invoked when an action occurs: user start a whiteboard session.
- *
+ *
* @param e event
*/
public void actionPerformed (ActionEvent e)
@@ -107,14 +107,14 @@ public class WhiteboardMenuItem
String itemID = ((JMenuItem)e.getSource()).getName();
Iterator i = this.metaContact.getContacts();
- while(i.hasNext())
+ while(i.hasNext())
{
Contact contact = (Contact)i.next();
String id = contact.getAddress()
+ contact.getProtocolProvider().getProtocolName();
- if(itemID.equals(id))
+ if(itemID.equals(id))
session.initWhiteboard (contact);
}
}
@@ -132,24 +132,29 @@ public class WhiteboardMenuItem
public Object getComponent()
{
if(metaContact == null)
- return null;
+ {
+ whiteboardMenu.setEnabled(false);
+ return whiteboardMenu;
+ }
Iterator iter = metaContact.getContacts();
while (iter.hasNext())
{
Contact contact = (Contact)iter.next();
ProtocolProviderService pps = contact.getProtocolProvider();
-
+
OperationSetWhiteboarding opSetWb = (OperationSetWhiteboarding)
pps.getOperationSet(OperationSetWhiteboarding.class);
-
+
if (opSetWb != null)
{
- return whiteboardMenu;
+ whiteboardMenu.setEnabled(true);
+ return whiteboardMenu;
}
}
-
- return null;
+
+ whiteboardMenu.setEnabled(false);
+ return whiteboardMenu;
}
public String getName()