Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

[MBS] Hide Dock Icon? (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: Re: [MBS] WebPreferencesMBS on Mactel
Next thread: [MBS] 7.0pr2


Re: [MBS] MIDI Destinations and External Devices   -   Ron Benditt
  [MBS] Hide Dock Icon?   -   Tim Jones
   Re: [MBS] Hide Dock Icon?   -   Massimo Valle
   Re: [MBS] Hide Dock Icon?   -   Christian Schmitz
    Re: [MBS] Hide Dock Icon?   -   Tim Jones
     Re: [MBS] Hide Dock Icon?   -   Christian Schmitz

[MBS] Hide Dock Icon?
Date: 04.01.07 20:22 (Thu, 4 Jan 2007 12:22:11 -0700)
From: Tim Jones
Hi Folks,

Is there a call that can be made to hide the application's icon in
the dock? I use the CocoaStatusItemMBS features to place a
notification icon while the App is idle. Also, if the user elects to
open the App from the Login Items, it is set to hide the dock icon.
What I'm looking for is a way to hide the Dock Icon if the user sets
the app into statusbar mode and then redisplay it if the app is
brought back to full interface.

Thanks,

Tim

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Hide Dock Icon?
Date: 04.01.07 21:57 (Thu, 4 Jan 2007 21:57:39 +0100)
From: Massimo Valle

On 04/gen/07, at 20:22, Tim Jones wrote:

> Hi Folks,
>
> Is there a call that can be made to hide the application's icon in
> the dock? I use the CocoaStatusItemMBS features to place a
> notification icon while the App is idle. Also, if the user elects to
> open the App from the Login Items, it is set to hide the dock icon.
> What I'm looking for is a way to hide the Dock Icon if the user sets
> the app into statusbar mode and then redisplay it if the app is
> brought back to full interface.
>
> Thanks,
>
> Tim

This is a raw method I used in one applications and it works.

First, displaying or not the Dock icon is controlled by a setting
into the Info.plist file of the application.
Just set LSUIElement = 1 to avoid the dock icon.

Then to change it dynamically you must change this flag to 0 and then
require the user to quit and relaunch the application.
However, since Panther, the Finder caches a lot, therefore you must
also "touch" the bundle or the executable to let the Finder to
recognize the application is changed and discard the cache. Just
changing the modify date of the bundle should be enough.

I know this is not an elegant solutions, but I never found a standard
API call to do this. I'm open to a better solution if available.

Massimo Valle

Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Hide Dock Icon?
Date: 05.01.07 00:22 (Fri, 5 Jan 2007 00:22:24 +0100)
From: Christian Schmitz
Tim Jones <<email address removed>> wrote:

> Hi Folks,
>
> Is there a call that can be made to hide the application's icon in
> the dock?

you may need this one:
<http://www.monkeybreadsoftware.de/Freeware/MakeInvisible.shtml>

Gruß
Christian

Re: [MBS] Hide Dock Icon?
Date: 05.01.07 00:38 (Thu, 4 Jan 2007 16:38:27 -0700)
From: Tim Jones
On Jan 4, 2007, at 4:22 PM, Christian Schmitz wrote:

> Tim Jones <<email address removed>> wrote:
>
>> Hi Folks,
>>
>> Is there a call that can be made to hide the application's icon in
>> the dock?
>
> you may need this one:
> <http://www.monkeybreadsoftware.de/Freeware/MakeInvisible.shtml>
Hi Christian,

I was hoping for a dynamic mechanism as I want the dock icon to be
there while the main window is active and displayed. I only want it
to disappear when the user has the tool in the background "Watch" mode.

Thanks though!

Tim

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Hide Dock Icon?
Date: 05.01.07 00:49 (Fri, 5 Jan 2007 00:49:22 +0100)
From: Christian Schmitz
Tim Jones <<email address removed>> wrote:

> I was hoping for a dynamic mechanism as I want the dock icon to be
> there while the main window is active and displayed. I only want it
> to disappear when the user has the tool in the background "Watch" mode.

Split the app into two applications.

Make one macho app (a bundle) with the user setting app which the user
can double click. And place a second app into that bundle as a helper
app which runs in background and does the StatusItem menu.

That is the way you should do it.

Gruß
Christian