aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2012-11-09 13:50:35 +0000
committerYana Stamcheva <yana@jitsi.org>2012-11-09 13:50:35 +0000
commite4f138d46bfd6c41f69feec7b47c5f8fb198ebc3 (patch)
treee516ec9607ab5826ed64c707f086b4681b634a29 /src/net/java/sip/communicator
parent45a1a8c8517f6348d9aad1d1e7dd4a470c629576 (diff)
downloadjitsi-e4f138d46bfd6c41f69feec7b47c5f8fb198ebc3.zip
jitsi-e4f138d46bfd6c41f69feec7b47c5f8fb198ebc3.tar.gz
jitsi-e4f138d46bfd6c41f69feec7b47c5f8fb198ebc3.tar.bz2
Small fix on Windows, part of previous commit on Video Bridge Menu behavior.
Diffstat (limited to 'src/net/java/sip/communicator')
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java
index bd7badf..7c17f68 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java
@@ -26,7 +26,6 @@ import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.Container;
import net.java.sip.communicator.service.notification.*;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
@@ -525,26 +524,27 @@ public class ToolsMenu
= (videoBridgeProviders == null)
? 0 : videoBridgeProviders.size();
+ JMenuItem newMenuItem = null;
if (videoBridgeProviderCount <= 0)
{
- videoBridgeMenuItem
+ newMenuItem
= new VideoBridgeProviderMenuItem(
r.getI18NString("service.gui.CREATE_VIDEO_BRIDGE"),
null);
- videoBridgeMenuItem.setEnabled(false);
+ newMenuItem.setEnabled(false);
}
else if (videoBridgeProviderCount == 1)
{
- videoBridgeMenuItem
+ newMenuItem
= new VideoBridgeProviderMenuItem(
r.getI18NString("service.gui.CREATE_VIDEO_BRIDGE"),
videoBridgeProviders.get(0));
- videoBridgeMenuItem.setName("videoBridge");
- videoBridgeMenuItem.addActionListener(ToolsMenu.this);
+ newMenuItem.setName("videoBridge");
+ newMenuItem.addActionListener(ToolsMenu.this);
}
else if (videoBridgeProviderCount > 1)
{
- videoBridgeMenuItem
+ newMenuItem
= new SIPCommMenu(
r.getI18NString(
"service.gui.CREATE_VIDEO_BRIDGE_MENU"));
@@ -555,20 +555,24 @@ public class ToolsMenu
VideoBridgeProviderMenuItem videoBridgeItem
= new VideoBridgeProviderMenuItem(videoBridgeProvider);
- ((JMenu) videoBridgeMenuItem).add(videoBridgeItem);
+ ((JMenu) newMenuItem).add(videoBridgeItem);
videoBridgeItem.setIcon(
ImageLoader.getAccountStatusImage(videoBridgeProvider));
}
}
- return null;
+ return newMenuItem;
}
protected void finished()
{
- // If the menu item is already created we're going to remove it in
- // order to reinitialize it.
- remove(videoBridgeMenuItem);
- videoBridgeMenuItem = null;
+ if (videoBridgeMenuItem != null)
+ {
+ // If the menu item is already created we're going to remove it
+ // in order to reinitialize it.
+ remove(videoBridgeMenuItem);
+ }
+
+ videoBridgeMenuItem = (JMenuItem) get();
videoBridgeMenuItem.setIcon(
r.getImage("service.gui.icons.VIDEO_BRIDGE"));