Introduce new features in currently updated OrangeExtension and fix bouncing dock icon under Snow Leopard. Update code manipulating dock icons.

cusax-fix
Damian Minkov 16 years ago
parent ece4ff1fed
commit 8a61d7bab3

@ -1789,7 +1789,6 @@ javax.swing.event, javax.swing.border"/>
prefix="net/java/sip/communicator/service/desktop"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/osdependent"
prefix="net/java/sip/communicator/impl/osdependent"/>
<zipfileset src="${lib.mac.noinst}/dock.jar" prefix=""/>
</jar>
</target>

Binary file not shown.

@ -6,15 +6,18 @@
*/
package net.java.sip.communicator.impl.osdependent.jdic;
import com.apple.eawt.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
import javax.swing.event.*;
import net.java.sip.communicator.impl.osdependent.*;
import net.java.sip.communicator.impl.systray.mac.*;
import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
@ -106,6 +109,8 @@ public class SystrayServiceJdicImpl
private URL dockIconFFC;
private Image originalDockImage = null;
private boolean initialized = false;
/**
@ -507,12 +512,24 @@ else if (imageType == SystrayService.ENVELOPE_IMG_TYPE)
try
{
if(OSUtils.IS_MAC32)
if(OSUtils.IS_MAC)
{
if(originalDockImage == null)
originalDockImage =
Application.getApplication().getDockIconImage();
if (toChangeDockIcon != null)
Dock.setDockTileImage(toChangeDockIcon);
{
Application.getApplication().setDockIconImage(
Toolkit.getDefaultToolkit()
.getImage(toChangeDockIcon));
}
else
Dock.restoreDockTileImage();
{
if(originalDockImage != null)
Application.getApplication().setDockIconImage(
originalDockImage);
}
}
}
catch (Exception e)
@ -624,7 +641,10 @@ public void popupMessageClicked(SystrayPopupMessageEvent evt)
private class ServiceListenerImpl implements ServiceListener
{
/** implements <tt>ServiceListener.serviceChanged</tt> */
/**
* implements <tt>ServiceListener.serviceChanged</tt>
* @param serviceEvent
*/
public void serviceChanged(ServiceEvent serviceEvent)
{
try

@ -5,13 +5,14 @@ Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
System-Bundle: yes
Export-Package: net.java.sip.communicator.service.systray,
net.java.sip.communicator.service.systray.event,
net.java.sip.communicator.service.systray.event,
net.java.sip.communicator.service.desktop
Import-Package: org.osgi.framework,
org.jdesktop.jdic.desktop,
org.jdesktop.jdic.tray,
com.apple.cocoa.application,
com.apple.cocoa.foundation,
com.apple.eawt,
net.java.sip.communicator.service.configuration,
net.java.sip.communicator.service.gui,
net.java.sip.communicator.service.gui.event,

@ -52,13 +52,16 @@ public class ChatAlerterActivator
/**
* Starts this bundle.
* @param bc bundle context.
* @throws Exception
*/
public void start(BundleContext bc) throws Exception
{
try
{
// try to load native libs, if it fails don't do anything
Alerter.newInstance();
if(!OSUtils.IS_MAC)
Alerter.newInstance();
}
catch (Exception exception)
{
@ -111,6 +114,11 @@ public void start(BundleContext bc) throws Exception
}
/**
* Stops bundle.
* @param bc context.
* @throws Exception
*/
public void stop(BundleContext bc) throws Exception
{
// start listening for newly register or removed protocol providers
@ -297,11 +305,15 @@ private void alertChatWindow()
JFrame fr = (JFrame) winSource;
Alerter.newInstance().alert(fr);
if(OSUtils.IS_MAC)
com.apple.eawt.Application.getApplication()
.requestUserAttention(true);
else
Alerter.newInstance().alert(fr);
}
catch (Throwable ex)
{
logger.error("Cannot alert chat window!");
logger.error("Cannot alert chat window!", ex);
}
}

@ -9,5 +9,5 @@ Import-Package: org.osgi.framework,
net.java.sip.communicator.service.gui,
net.java.sip.communicator.service.protocol,
net.java.sip.communicator.service.protocol.event,
com.apple.cocoa.application,
com.apple.eawt,
javax.swing

Loading…
Cancel
Save