diff options
-rw-r--r-- | resources/images/images.properties | 2 | ||||
-rw-r--r-- | resources/images/impl/gui/buttons/showHidePeers.png | bin | 0 -> 1667 bytes | |||
-rw-r--r-- | resources/images/impl/gui/buttons/showHidePeersPressed.png | bin | 0 -> 1922 bytes | |||
-rw-r--r-- | resources/languages/resources.properties | 1 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java | 57 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/call/conference/ShowHidePeersButton.java | 58 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java | 15 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java | 14 |
8 files changed, 146 insertions, 1 deletions
diff --git a/resources/images/images.properties b/resources/images/images.properties index 7b9e6a3..5a902db 100644 --- a/resources/images/images.properties +++ b/resources/images/images.properties @@ -225,6 +225,8 @@ service.gui.buttons.LOCAL_VIDEO_BUTTON=resources/images/impl/gui/buttons/localVi service.gui.buttons.LOCAL_VIDEO_BUTTON_PRESSED=resources/images/impl/gui/buttons/localVideoButtonPressed.png service.gui.buttons.SHOW_LOCAL_VIDEO_BUTTON=resources/images/impl/gui/buttons/showHideLocalVideo.png service.gui.buttons.SHOW_LOCAL_VIDEO_BUTTON_PRESSED=resources/images/impl/gui/buttons/showHideLocalVideoPressed.png +service.gui.buttons.SHOW_HIDE_PEERS_BUTTON=resources/images/impl/gui/buttons/showHidePeers.png +service.gui.buttons.SHOW_HIDE_PEERS_BUTTON_PRESSED=resources/images/impl/gui/buttons/showHidePeersPressed.png service.gui.buttons.TRANSFER_CALL_BUTTON=resources/images/impl/gui/buttons/transferCallButton.png service.gui.buttons.SECURE_BUTTON_ON=resources/images/impl/gui/buttons/secureOn.png service.gui.buttons.SECURE_BUTTON_OFF=resources/images/impl/gui/buttons/secureOff.png diff --git a/resources/images/impl/gui/buttons/showHidePeers.png b/resources/images/impl/gui/buttons/showHidePeers.png Binary files differnew file mode 100644 index 0000000..c036d7f --- /dev/null +++ b/resources/images/impl/gui/buttons/showHidePeers.png diff --git a/resources/images/impl/gui/buttons/showHidePeersPressed.png b/resources/images/impl/gui/buttons/showHidePeersPressed.png Binary files differnew file mode 100644 index 0000000..c221ba1 --- /dev/null +++ b/resources/images/impl/gui/buttons/showHidePeersPressed.png diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties index 72a9e5a..9a4252d 100644 --- a/resources/languages/resources.properties +++ b/resources/languages/resources.properties @@ -581,6 +581,7 @@ service.gui.MUTE_BUTTON_TOOL_TIP=Toggle Mute or hold button to adjust microphone service.gui.RECORD_BUTTON_TOOL_TIP=Toggle Record service.gui.LOCAL_VIDEO_BUTTON_TOOL_TIP=Toggle Video service.gui.SHOW_LOCAL_VIDEO_BUTTON_TOOL_TIP=Show/hide local video +service.gui.SHOW_HIDE_PEERS_TOOL_TIP=Show/hide call participants list service.gui.TRANSFER_BUTTON_TOOL_TIP=Transfer Call service.gui.TRANSFER_TO=Transfer to... service.gui.SECURITY_INFO=Security information diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java index ec743cd..b4549ad 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java @@ -37,6 +37,8 @@ import org.jitsi.util.*; import org.jitsi.util.event.*;
import org.osgi.framework.*;
+import sun.security.provider.*;
+
/**
* The dialog created for a given call.
*
@@ -155,6 +157,20 @@ public class CallPanel = "net.java.sip.communicator.impl.gui.main.call.HIDE_VIDEO_BUTTON";
/**
+ * Property to disable the button, which shows/hides participants in video
+ * conferences.
+ */
+ private static final String HIDE_PEERS_LIST_BUTON_PROP
+ = "net.java.sip.communicator.impl.gui.main.call.HIDE_PEERS_LIST_BUTTON";
+
+ /**
+ * Indicates if the participants list in a video conference is visible by
+ * default.
+ */
+ private static final String PEERS_LIST_HIDDEN_PROP
+ = "net.java.sip.communicator.impl.gui.main.call.PEERS_LIST_HIDDEN";
+
+ /**
* Property to disable the desktop sharing button.
*/
private static final String HIDE_DESKTOP_SHARING_BUTON_PROP
@@ -331,6 +347,12 @@ public class CallPanel private ShowHideVideoButton showHideVideoButton;
/**
+ * The button, which shows / hides the participants list in a video
+ * conference.
+ */
+ private ShowHidePeersButton showHidePeersButton;
+
+ /**
* The title of this call container.
*/
private String title;
@@ -960,6 +982,12 @@ public class CallPanel }
}
+ if (showHidePeersButton != null)
+ {
+ showHidePeersButton.setVisible(isConference
+ && CallManager.isVideoStreaming(callConference));
+ }
+
// The desktop sharing button depends on the operation set desktop
// sharing server.
if(desktopSharingButton != null)
@@ -1350,6 +1378,9 @@ public class CallPanel videoButton.setIndex(11);
if (showHideVideoButton != null)
showHideVideoButton.setIndex(12);
+ if (showHidePeersButton != null)
+ showHidePeersButton.setIndex(13);
+
chatButton.setIndex(19);
if (infoButton != null)
@@ -1523,6 +1554,14 @@ public class CallPanel videoButton = new LocalVideoButton(aCall);
}
+ if (isButtonEnabled(HIDE_PEERS_LIST_BUTON_PROP))
+ {
+ // If the PEERS_LIST_HIDDEN_PROP isn't specified we show the list
+ // by default.
+ showHidePeersButton = new ShowHidePeersButton(this,
+ isButtonEnabled(PEERS_LIST_HIDDEN_PROP));
+ }
+
localLevel
= new InputVolumeControlButton(
aCall,
@@ -1580,6 +1619,8 @@ public class CallPanel settingsPanel.add(transferCallButton);
if (videoButton != null)
settingsPanel.add(videoButton);
+ if (showHidePeersButton != null)
+ settingsPanel.add(showHidePeersButton);
// The bottom bar will contain the settingsPanel.
add(createBottomBar(), BorderLayout.SOUTH);
@@ -2016,6 +2057,22 @@ public class CallPanel }
/**
+ * Shows/hides the thumbnails list in the case of video conference.
+ *
+ * @param show <tt>true</tt> to show the thumbnails list, <tt>false</tt>
+ * to hide it
+ */
+ public void showThumbnailsList(boolean show)
+ {
+ // This shouldn't happen, but if we aren't in a video conference we
+ // have nothing to do here.
+ if (!(callPanel instanceof VideoConferenceCallPanel))
+ return;
+
+ ((VideoConferenceCallPanel) callPanel).showThumbnailsList(show);
+ }
+
+ /**
* Selects or unselects the video button in this call dialog.
*
* @param isSelected indicates if the video button should be selected or not
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/ShowHidePeersButton.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/ShowHidePeersButton.java new file mode 100644 index 0000000..e146e6a --- /dev/null +++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/ShowHidePeersButton.java @@ -0,0 +1,58 @@ +/* + * Jitsi, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package net.java.sip.communicator.impl.gui.main.call.conference; + +import net.java.sip.communicator.impl.gui.main.call.*; +import net.java.sip.communicator.impl.gui.utils.*; + +/** + * Implements an AWT/Swing button which toggles the display of the participants + * list in a conference call. + * + * @author Yana Stamcheva + */ +public class ShowHidePeersButton + extends AbstractCallToggleButton +{ + private static final long serialVersionUID = 0L; + + /** + * The parent call container. + */ + private final CallPanel callPanel; + + /** + * Initializes a new <tt>ShowHideVideoButton</tt> instance which is to + * toggle the display of the visual <tt>Component</tt> which depicts the + * video streaming from the local peer/user to the remote peer(s). + * + * @param callPanel the parent call container + * @param selected <tt>true</tt> if the new toggle button is to be initially + * selected; otherwise, <tt>false</tt> + */ + public ShowHidePeersButton(CallPanel callPanel, boolean selected) + { + super( null, + true, + selected, + ImageLoader.SHOW_HIDE_PEERS_BUTTON, + ImageLoader.SHOW_HIDE_PEERS_BUTTON_PRESSED, + "service.gui.SHOW_HIDE_PEERS_TOOL_TIP"); + + this.callPanel = callPanel; + } + + /** + * Toggles the display of the visual <tt>Component</tt> which depicts the + * video streaming from the local peer/user to the remote peer(s). + */ + @Override + public void buttonPressed() + { + callPanel.showThumbnailsList(isSelected()); + } +} diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java index b56bada..543769e 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/VideoConferenceCallPanel.java @@ -85,6 +85,8 @@ public class VideoConferenceCallPanel */
private final ThumbnailConferenceCallPanel thumbnailContainer;
+ private final JPanel thumbnailPanel;
+
/**
* Initializes a new <tt>VideoConferenceCallPanel</tt> instance which is to
* be used by a specific <tt>CallPanel</tt> to depict a specific
@@ -107,6 +109,7 @@ public class VideoConferenceCallPanel this.uiVideoHandler = uiVideoHandler;
+ thumbnailPanel = new JPanel(new BorderLayout());
thumbnailContainer
= new ThumbnailConferenceCallPanel( callPanel,
callConference,
@@ -260,7 +263,6 @@ public class VideoConferenceCallPanel {
VideoContainer videoContainer = new VideoContainer(null, true);
- JPanel thumbnailPanel = new JPanel(new BorderLayout());
thumbnailPanel.setBackground(Color.DARK_GRAY);
thumbnailPanel.add(thumbnailContainer, BorderLayout.NORTH);
@@ -271,6 +273,17 @@ public class VideoConferenceCallPanel }
/**
+ * Shows/hides the participants thumbnails list.
+ *
+ * @param show <tt>true</tt> to show the participants list, <tt>false</tt>
+ * to hide it
+ */
+ public void showThumbnailsList(boolean show)
+ {
+ thumbnailPanel.setVisible(show);
+ }
+
+ /**
* {@inheritDoc}
*/
@Override
diff --git a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java index 664d9ae..77edeed 100644 --- a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java +++ b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java @@ -778,6 +778,20 @@ public class ImageLoader = new ImageID("service.gui.buttons.SHOW_LOCAL_VIDEO_BUTTON_PRESSED"); /** + * A show/hide local video button icon. The icon shown in the CallPeer + * panel. + */ + public static final ImageID SHOW_HIDE_PEERS_BUTTON + = new ImageID("service.gui.buttons.SHOW_HIDE_PEERS_BUTTON"); + + /** + * A show/hide local video button pressed icon. The icon shown in the + * CallPeer panel. + */ + public static final ImageID SHOW_HIDE_PEERS_BUTTON_PRESSED + = new ImageID("service.gui.buttons.SHOW_HIDE_PEERS_BUTTON_PRESSED"); + + /** * The resize video button. */ public static final ImageID HD_VIDEO_BUTTON |