0

For one of my software, I might need to have to add some objects that could have the same behavior as any of object already present (apps/stack etc.), having a contextual menu.

Is it some how possible ?

Thx.

Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134

1 Answers1

1

Not possible. That's the domain of applications, files and folders, configured by the user. You do, however, have the ability to add a menu to your own application whose icon appears in the Dock.

You might consider menu extras, but those come with their own set of problems. One in particular is the OS making them disappear when space in the menu bar becomes tight.

Extra Savoir-Faire
  • 6,026
  • 4
  • 29
  • 47
  • Then is it possible to add programaticaly folders for exemple ? – Matthieu Riegler Apr 09 '12 at 17:54
  • @MatthieuRiegler : There are some really hacky ways to do it, I understand, but I wouldn't do it, because as I said, the Dock is for the user, and for no one else. – Extra Savoir-Faire Apr 09 '12 at 17:58
  • @MatthieuRiegler You shouldn't do that even if you can find a way. This isn't Windows where every application feels free to put whatever crap it wants all over the user's environment. If a user wants your application in their Dock they'll put it there. – bames53 Apr 09 '12 at 18:00
  • Actually it was the only purpose of my app. Juste add as specified by the user the asked folders. – Matthieu Riegler Apr 09 '12 at 18:02
  • @MatthieuRiegler : If that's the case, then do consider a menu extra. – Extra Savoir-Faire Apr 09 '12 at 18:03
  • 2
    @MatthieuRiegler What's the point of an application for that when the user can just do it directly? – bames53 Apr 09 '12 at 18:05
  • I wanted to add my hard drives on the dock when they're plugged in. – Matthieu Riegler Apr 09 '12 at 18:09
  • 1
    @MatthieuRiegler If you only want specific drives to appear you can add them, and they'll simply remain on the Dock inaccessible when the drive isn't plugged in. If you want all drives to appear you can either try adding /Volumes to the dock or you can just turn on the option that makes drives appear on the Desktop (instead of the Dock). – bames53 Apr 09 '12 at 18:29
  • Yeah I already did your second solution but I liked the way I work on Ubuntu with Unity (actually it's the only thing I like on the unity dock) – Matthieu Riegler Apr 09 '12 at 18:31