diff --git a/src/net/java/sip/communicator/plugin/desktoputil/AuthenticationWindow.java b/src/net/java/sip/communicator/plugin/desktoputil/AuthenticationWindow.java
index a989eec44..80ec0068e 100644
--- a/src/net/java/sip/communicator/plugin/desktoputil/AuthenticationWindow.java
+++ b/src/net/java/sip/communicator/plugin/desktoputil/AuthenticationWindow.java
@@ -188,7 +188,12 @@ public AuthenticationWindow(String server,
String errorMessage,
String signupLink)
{
- super(false);
+ super(
+ (Window)(DesktopUtilActivator.getUIService() == null ?
+ null :
+ DesktopUtilActivator.getUIService()
+ .getExportedWindow(ExportedWindow.MAIN_WINDOW)),
+ false);
this.windowTitle = windowTitle;
this.windowText = windowText;
diff --git a/src/net/java/sip/communicator/plugin/desktoputil/SIPCommDialog.java b/src/net/java/sip/communicator/plugin/desktoputil/SIPCommDialog.java
index a3ebd7da2..d787ee4d3 100644
--- a/src/net/java/sip/communicator/plugin/desktoputil/SIPCommDialog.java
+++ b/src/net/java/sip/communicator/plugin/desktoputil/SIPCommDialog.java
@@ -84,6 +84,23 @@ public SIPCommDialog(Frame owner)
this.init();
}
+ /**
+ * Creates an instance of SIPCommDialog by specifying the
+ * Frame owner.
+ * @param owner the owner of this dialog
+ */
+ public SIPCommDialog(Window owner)
+ {
+ super(owner);
+
+ this.init();
+
+ if(owner == null)
+ {
+ SIPCommFrame.updateIconImages(this);
+ }
+ }
+
/**
* Creates an instance of SIPCommDialog by specifying explicitly
* if the size and location properties are saved. By default size and
@@ -128,6 +145,21 @@ public SIPCommDialog(Frame owner, boolean isSaveSizeAndLocation)
this.isSaveSizeAndLocation = isSaveSizeAndLocation;
}
+ /**
+ * Creates an instance of SIPCommDialog by specifying the owner
+ * of this dialog and indicating whether to save the size and location
+ * properties.
+ * @param owner the owner of this dialog
+ * @param isSaveSizeAndLocation indicates whether to save the size and
+ * location of this dialog
+ */
+ public SIPCommDialog(Window owner, boolean isSaveSizeAndLocation)
+ {
+ this(owner);
+
+ this.isSaveSizeAndLocation = isSaveSizeAndLocation;
+ }
+
/**
* Initializes this dialog.
*/
diff --git a/src/net/java/sip/communicator/plugin/desktoputil/SIPCommFrame.java b/src/net/java/sip/communicator/plugin/desktoputil/SIPCommFrame.java
index a0fe1b390..96ba08639 100644
--- a/src/net/java/sip/communicator/plugin/desktoputil/SIPCommFrame.java
+++ b/src/net/java/sip/communicator/plugin/desktoputil/SIPCommFrame.java
@@ -118,38 +118,46 @@ public SIPCommFrame()
* Initialize default values.
*/
private void init()
+ {
+ updateIconImages(this);
+ }
+
+ /**
+ * Sets the list of icons to the window.
+ * @param window the window, which icons will be updated.
+ */
+ public static void updateIconImages(Window window)
{
try
{
- Method m = Window.class.getMethod("setIconImages", List.class);
List logos = new ArrayList(6)
{
private static final long serialVersionUID = 0L;
{
add(DesktopUtilActivator.getImage(
- "service.gui.SIP_COMMUNICATOR_LOGO"));
+ "service.gui.SIP_COMMUNICATOR_LOGO"));
add(DesktopUtilActivator.getImage(
- "service.gui.SIP_COMMUNICATOR_LOGO_20x20"));
+ "service.gui.SIP_COMMUNICATOR_LOGO_20x20"));
add(DesktopUtilActivator.getImage(
- "service.gui.SIP_COMMUNICATOR_LOGO_32x32"));
+ "service.gui.SIP_COMMUNICATOR_LOGO_32x32"));
add(DesktopUtilActivator.getImage(
- "service.gui.SIP_COMMUNICATOR_LOGO_45x45"));
+ "service.gui.SIP_COMMUNICATOR_LOGO_45x45"));
add(DesktopUtilActivator.getImage(
- "service.gui.SIP_COMMUNICATOR_LOGO_64x64"));
+ "service.gui.SIP_COMMUNICATOR_LOGO_64x64"));
add(DesktopUtilActivator.getImage(
- "service.gui.SIP_COMMUNICATOR_LOGO_128x128"));
+ "service.gui.SIP_COMMUNICATOR_LOGO_128x128"));
}
};
- m.invoke(this, logos);
+ window.setIconImages(logos);
// In order to have the same icon when using option panes
- m.invoke(JOptionPane.getRootFrame(), logos);
+ JOptionPane.getRootFrame().setIconImages(logos);
}
catch (Exception e)
{
- Image scLogo
- = DesktopUtilActivator.getImage("service.gui.SIP_COMMUNICATOR_LOGO");
+ Image scLogo = DesktopUtilActivator.getImage(
+ "service.gui.SIP_COMMUNICATOR_LOGO");
- setIconImage(scLogo);
+ window.setIconImage(scLogo);
// In order to have the same icon when using option panes
JOptionPane.getRootFrame().setIconImage(scLogo);
}