[sip-comm-dev] Re: svn commit: r6631 - trunk/build.xml


#1

Hey Seb,

That's swell! I've been meaning take care of our
net.java.super.long.string.SIPCommunicator title for a while no and am
very glad you beat me to it :). Thanks!

However, the icon fix is only working for me for a few seconds and then
the icon goes back to the green exec one as soon as the application
actually shows. Better than nothing I guess :slight_smile: ... Still, curious to
know whether it's working for you all the time.

Cheers,
Emil

s_vincent@dev.java.net –Ĺ–į–Ņ–ł—Ā–į:

···

Author: s_vincent
Date: 2010-01-16 14:22:47+0000
New Revision: 6631

Modified:
   trunk/build.xml

Log:
Add SIP Communicator icon in Mac OS X dock, when running from ant command line.

Modified: trunk/build.xml
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/build.xml?view=diff&rev=6631&p1=trunk/build.xml&p2=trunk/build.xml&r1=6630&r2=6631

--- trunk/build.xml (original)
+++ trunk/build.xml 2010-01-16 14:22:47+0000
@@ -658,7 +658,7 @@
         <!-- SIP Communicator on Mac OS X uses a JVMTI agent to handle kAEGetURL
              AppleScript events. -->
         <condition property="jvmarg.line"
- value="-agentlib:AEGetURLEventHandlerAgent -Xdock:name='SIP Communicator'" else="">
+ value="-agentlib:AEGetURLEventHandlerAgent -Xdock:name='SIP Communicator' -Xdock:icon='resources/images/logo/sc_logo_128x128.icns'" else="">
             <isset property="is.running.macos"/>
         </condition>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: commits-help@sip-communicator.dev.java.net

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
SIP Communicator
emcho@sip-communicator.org PHONE: +33.1.77.62.43.30
http://sip-communicator.org FAX: +33.1.77.62.47.31

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi Emil,

Yes it also happen for me (Mac OS X Leopard 32-bit) and I finally found why it disapears. In fact it is due to src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java:

        if (isMac)
        {
            URL toChangeDockIcon = null;
            switch (imageType)
            {
                case SystrayService.SC_IMG_TYPE:
                    // online will restore the original image
                    break;
                case SystrayService.SC_IMG_OFFLINE_TYPE:
                    toChangeDockIcon = dockIconOffline;
                    break;
                case SystrayService.SC_IMG_AWAY_TYPE:
                    toChangeDockIcon = dockIconAway;
                    break;
                case SystrayService.SC_IMG_FFC_TYPE:
                    toChangeDockIcon = dockIconFFC;
                    break;
            }

[...]

if(OSUtils.IS_MAC32)
{
    if (toChangeDockIcon != null)
        Dock.setDockTileImage(toChangeDockIcon);
     else
        Dock.restoreDockTileImage();
}

When I launch SC, toChangeDockIcon equals null and Dock class restore image and strangely it is not the one we add in Xdock:icon (but it works when we launch SC from the DMG installer). FYI it should work correctly on a 64-bit Snow Leopard (if someone can test it), because the RestoreApplicationDockTileImage function is not available on 64-bit and BTW libDock.jnilib is not compiled for x86_64.

So a quick fix is to add
dockIconOnline = Resources.getImageURL("service.systray.DOCK_ICON_ONLINE") and assign toChangeDockIcon with it in "case SystrayService.SC_IMG_TYPE".
And the resourcce "service.systray.DOCK_ICON_ONLINE"=resources/images/impl/systray/dock-online.png (convert resources/images/logo/sc_logo_128x128.icns to png).

If you're OK with it, I will prepare patch/dock-online.png icon.

Regards,

···

--
Seb

Emil Ivov a écrit :

Hey Seb,

That's swell! I've been meaning take care of our
net.java.super.long.string.SIPCommunicator title for a while no and am
very glad you beat me to it :). Thanks!

However, the icon fix is only working for me for a few seconds and then
the icon goes back to the green exec one as soon as the application
actually shows. Better than nothing I guess :slight_smile: ... Still, curious to
know whether it's working for you all the time.

Cheers,
Emil

s_vincent@dev.java.net –Ĺ–į–Ņ–ł—Ā–į:
  

Author: s_vincent
Date: 2010-01-16 14:22:47+0000
New Revision: 6631

Modified:
   trunk/build.xml

Log:
Add SIP Communicator icon in Mac OS X dock, when running from ant command line.

Modified: trunk/build.xml
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/build.xml?view=diff&rev=6631&p1=trunk/build.xml&p2=trunk/build.xml&r1=6630&r2=6631

--- trunk/build.xml (original)
+++ trunk/build.xml 2010-01-16 14:22:47+0000
@@ -658,7 +658,7 @@
         <!-- SIP Communicator on Mac OS X uses a JVMTI agent to handle kAEGetURL
              AppleScript events. -->
         <condition property="jvmarg.line"
- value="-agentlib:AEGetURLEventHandlerAgent -Xdock:name='SIP Communicator'" else="">
+ value="-agentlib:AEGetURLEventHandlerAgent -Xdock:name='SIP Communicator' -Xdock:icon='resources/images/logo/sc_logo_128x128.icns'" else="">
             <isset property="is.running.macos"/>
         </condition>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: commits-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hey Seb, all,

We've just discussed this with Seb offline and we agreed that he would
commit the change he suggests here (he actually just did and you can try
them out with r6637). We were both wondering whether this could cause
any problems with the DMG but since neither of us thinks it would, we
decided to go ahead and give it a try nonetheless. We'll revert and look
for another solution if this turns out to be the case.

Cheers,
Emil

Sebastien Vincent –Ĺ–į–Ņ–ł—Ā–į:

···

Hi Emil,

Yes it also happen for me (Mac OS X Leopard 32-bit) and I finally found
why it disapears. In fact it is due to
src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java:

        if (isMac)
        {
            URL toChangeDockIcon = null;
            switch (imageType)
            {
                case SystrayService.SC_IMG_TYPE:
                    // online will restore the original image
                    break;
                case SystrayService.SC_IMG_OFFLINE_TYPE:
                    toChangeDockIcon = dockIconOffline;
                    break;
                case SystrayService.SC_IMG_AWAY_TYPE:
                    toChangeDockIcon = dockIconAway;
                    break;
                case SystrayService.SC_IMG_FFC_TYPE:
                    toChangeDockIcon = dockIconFFC;
                    break;
            }

[...]

if(OSUtils.IS_MAC32)
{
    if (toChangeDockIcon != null)
        Dock.setDockTileImage(toChangeDockIcon);
     else
        Dock.restoreDockTileImage();
}

When I launch SC, toChangeDockIcon equals null and Dock class restore
image and strangely it is not the one we add in Xdock:icon (but it works
when we launch SC from the DMG installer). FYI it should work correctly
on a 64-bit Snow Leopard (if someone can test it), because the
RestoreApplicationDockTileImage function is not available on 64-bit and
BTW libDock.jnilib is not compiled for x86_64.

So a quick fix is to add
dockIconOnline =
Resources.getImageURL("service.systray.DOCK_ICON_ONLINE") and assign
toChangeDockIcon with it in "case SystrayService.SC_IMG_TYPE".
And the resourcce
"service.systray.DOCK_ICON_ONLINE"=resources/images/impl/systray/dock-online.png
(convert resources/images/logo/sc_logo_128x128.icns to png).

If you're OK with it, I will prepare patch/dock-online.png icon.

Regards,
--
Seb

Emil Ivov a écrit :

Hey Seb,

That's swell! I've been meaning take care of our
net.java.super.long.string.SIPCommunicator title for a while no and am
very glad you beat me to it :). Thanks!

However, the icon fix is only working for me for a few seconds and then
the icon goes back to the green exec one as soon as the application
actually shows. Better than nothing I guess :slight_smile: ... Still, curious to
know whether it's working for you all the time.

Cheers,
Emil

s_vincent@dev.java.net –Ĺ–į–Ņ–ł—Ā–į:
  

Author: s_vincent
Date: 2010-01-16 14:22:47+0000
New Revision: 6631

Modified:
   trunk/build.xml

Log:
Add SIP Communicator icon in Mac OS X dock, when running from ant command line.

Modified: trunk/build.xml
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/build.xml?view=diff&rev=6631&p1=trunk/build.xml&p2=trunk/build.xml&r1=6630&r2=6631

--- trunk/build.xml (original)
+++ trunk/build.xml 2010-01-16 14:22:47+0000
@@ -658,7 +658,7 @@
         <!-- SIP Communicator on Mac OS X uses a JVMTI agent to handle kAEGetURL
              AppleScript events. -->
         <condition property="jvmarg.line"
- value="-agentlib:AEGetURLEventHandlerAgent -Xdock:name='SIP Communicator'" else="">
+ value="-agentlib:AEGetURLEventHandlerAgent -Xdock:name='SIP Communicator' -Xdock:icon='resources/images/logo/sc_logo_128x128.icns'" else="">
             <isset property="is.running.macos"/>
         </condition>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: commits-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
SIP Communicator
emcho@sip-communicator.org PHONE: +33.1.77.62.43.30
http://sip-communicator.org FAX: +33.1.77.62.47.31

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi,

I've just tested the latest DMG (2343) on a Leopard 64 bits and everything seems fine.

Cheers,
romain

···

On 2010/01/17, at 18:33, Emil Ivov wrote:

Hey Seb, all,

We've just discussed this with Seb offline and we agreed that he would
commit the change he suggests here (he actually just did and you can try
them out with r6637). We were both wondering whether this could cause
any problems with the DMG but since neither of us thinks it would, we
decided to go ahead and give it a try nonetheless. We'll revert and look
for another solution if this turns out to be the case.

Cheers,
Emil

Sebastien Vincent –Ĺ–į–Ņ–ł—Ā–į:

Hi Emil,

Yes it also happen for me (Mac OS X Leopard 32-bit) and I finally found
why it disapears. In fact it is due to
src/net/java/sip/communicator/impl/osdependent/jdic/SystrayServiceJdicImpl.java:

       if (isMac)
       {
           URL toChangeDockIcon = null;
           switch (imageType)
           {
               case SystrayService.SC_IMG_TYPE:
                   // online will restore the original image
                   break;
               case SystrayService.SC_IMG_OFFLINE_TYPE:
                   toChangeDockIcon = dockIconOffline;
                   break;
               case SystrayService.SC_IMG_AWAY_TYPE:
                   toChangeDockIcon = dockIconAway;
                   break;
               case SystrayService.SC_IMG_FFC_TYPE:
                   toChangeDockIcon = dockIconFFC;
                   break;
           }

[...]

if(OSUtils.IS_MAC32)
{
   if (toChangeDockIcon != null)
       Dock.setDockTileImage(toChangeDockIcon);
    else
       Dock.restoreDockTileImage();
}

When I launch SC, toChangeDockIcon equals null and Dock class restore
image and strangely it is not the one we add in Xdock:icon (but it works
when we launch SC from the DMG installer). FYI it should work correctly
on a 64-bit Snow Leopard (if someone can test it), because the
RestoreApplicationDockTileImage function is not available on 64-bit and
BTW libDock.jnilib is not compiled for x86_64.

So a quick fix is to add
dockIconOnline =
Resources.getImageURL("service.systray.DOCK_ICON_ONLINE") and assign
toChangeDockIcon with it in "case SystrayService.SC_IMG_TYPE".
And the resourcce
"service.systray.DOCK_ICON_ONLINE"=resources/images/impl/systray/dock-online.png
(convert resources/images/logo/sc_logo_128x128.icns to png).

If you're OK with it, I will prepare patch/dock-online.png icon.

Regards,
--
Seb

Emil Ivov a écrit :

Hey Seb,

That's swell! I've been meaning take care of our
net.java.super.long.string.SIPCommunicator title for a while no and am
very glad you beat me to it :). Thanks!

However, the icon fix is only working for me for a few seconds and then
the icon goes back to the green exec one as soon as the application
actually shows. Better than nothing I guess :slight_smile: ... Still, curious to
know whether it's working for you all the time.

Cheers,
Emil

s_vincent@dev.java.net –Ĺ–į–Ņ–ł—Ā–į:

Author: s_vincent
Date: 2010-01-16 14:22:47+0000
New Revision: 6631

Modified:
  trunk/build.xml

Log:
Add SIP Communicator icon in Mac OS X dock, when running from ant command line.

Modified: trunk/build.xml
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/build.xml?view=diff&rev=6631&p1=trunk/build.xml&p2=trunk/build.xml&r1=6630&r2=6631

--- trunk/build.xml (original)
+++ trunk/build.xml 2010-01-16 14:22:47+0000
@@ -658,7 +658,7 @@
        <!-- SIP Communicator on Mac OS X uses a JVMTI agent to handle kAEGetURL
             AppleScript events. -->
        <condition property="jvmarg.line"
- value="-agentlib:AEGetURLEventHandlerAgent -Xdock:name='SIP Communicator'" else="">
+ value="-agentlib:AEGetURLEventHandlerAgent -Xdock:name='SIP Communicator' -Xdock:icon='resources/images/logo/sc_logo_128x128.icns'" else="">
            <isset property="is.running.macos"/>
        </condition>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: commits-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
SIP Communicator
emcho@sip-communicator.org PHONE: +33.1.77.62.43.30
http://sip-communicator.org FAX: +33.1.77.62.47.31

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net