Add mouse right click option in Mac OS X like windows - macos

I have requirement to add mouse right click option in folder or file list like windows explorer. Requirement is like below:
"There are some files with particular extension showed in Finder/folder list in Mac OS X. When user click on file with that particular extension I need to show my .exe or .app name which can open that file".
I want to know how to achieve this functionality in Mac OS X. In windows it is game of registry but I am not sure how to achieve same in Mac OS X.

You get this in the Info.plist file in your app bundle by specifying file extensions your application can open in the CFBundleDocumentTypes array.
http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-101685-TPXREF107

I tried that option. It is working fine and I am getting my application icon with that extension file and also my application is there in Default handler. But now issue is that this application I have created thru Qt and in main function of my application I am getting only application path in argv and argc and not the selected file. So let me know how to achieve this. If more information is required then please let me know. Thank you for valueable answer

Related

How to change mac app name from executable?

I have a mac app. Let's say the app is myapp.app, and runs an executable called myapp. In the docker, when you hover over the icon, it says 'myapp'. I would like to change this so that the hover over says something different, such as My App.
This isn't a question how to do it once I'm on the mac, but how to build the app in such a way that this is the default behavior. I am constructing the .app on a Linux machine. Is this something that can be set in Info.plist or similar?
(I'm specifically wanting to have the display name have a whitespace in it, as it is two words, else I would change the executable name itself)
Unfortunately, Dock uses file system name. So you should change .app name to "My App.app"

Creating Dropbox like DMG package

Does anyone suggest a freeware tool/script/manual_way of creating Dropbox like DMG -
Need to ask couple of questions --
I want double clicking the Folder-Icon should copy the folder(which would contain installer and uninstaller .app files of my application) into the system's /Applications folder.
Solution -- This has been solved using Applescript and changing icon of that applescript file to the folder-icon(i.e double clicking that script will move our folder(which would be present in a hidden folder) to /Applications.Any suggestions for second and third part?
Is it possible to show hyperlink of actual dropbox.com to actually open it's website?
And how we can customize volume's/Drive icon?
You can find a way to do it by reading this: Packaging a Mac OS X Application Using a DMG ยป asmaloney.com
I believe you can also use the trick of naming a shellscript file something.command in order to make it double clickable, (but maybe it will open the terminal, -I haven't tried it).

Qt on Mac: how to get a file dialog that allows to write the desired file path manually?

On Mac OS-X, usually directory dialogues are shown without the possibility to enter the path with the keyboard. This seems to be the default behaviour when I build a Qt application on OS-X.
How can I specify that I do want the path to be manually entered?
I'd recommend using the native dialog obtained thought he QFileDialog's static methods. With the new sandboxing requirements from apple, you must use the standard dialogs for your application to get access to the file system. Its interesting actually, the actual dialog given to the user in a sandboxed application is though something called Powerbox. You can read more about it here in the NSPanel documentation.
Also as elmigranto pointed out in all the file dialogs on the Mac, you can hit command + shift + g to enter the path to navigate to.
Note: In the newer Qt versions the documentation implies that they corrected this such that using the static functions on QFileDialog gets you a native dialog that also goes through PowerBox. I haven't tried it myself though and the bug on the issue remains open against Qt 5.5.0 and 5.6.0. Overriding QFileDialog doesn't get you a native dialog however. If you need a customized dialog, going the NSSavePanel route is the way to go.
If you use the static functions of QFileDialog, such as getExistingDirectory() and getOpenFileName() you get native OS X file dialogs. However, if you create your own QFileDialog without using the static functions you should get a Qt file dialog for which you can specify what the user must select in the dialog by calling setFileMode(). I think the Qt file dialog will let the user manually change the path in the dialog.
Of course if you only want to have the user manually type in a directory path you could also use a simple QInputDialog.

firefox on mac: SAVE AS dialogue. How to make it open file manager so I select where to save the file?

I am a mac newbie. I installed firefox on the mac, OS X lion as I am more familiar with firefox from windows.
The problem, which could be a OS X problem, is this:
When I click on a link, say a PDF document, and I tell it to save it instead of opening in the browser, then now I get a new dialog showing where to save to.
But I do not have any way to select something other than what is shown, like on windows.
On windows (and linux) when I do the same thing, and do SAVE, then I am able to navigate to the directory I want to save the file to. On the mac, I can't. I have to select only from the list given. What if I want to save a file somewhere else?
I'd like to be able to navigate using the file manager and select which directory to save to each time.
Is this an OS X restriction? Can one do this using firefox on OS X?
thank you
The Mac defaults to a compact save dialog; if you look at it closely, you will notice a button containing a small downward-pointing triangle. Click that button to get the full file selector dialog.

Mac OS X, application's developer name?

I have created an app for mac os x using xcode 4
In the build settings I see my name (the mac os x registered user's name)
Anyhow, I want to share the app but I don't want other to know that I created this app
So, is there a way to find out who created the app ?
If there's is how can I remove my name from the app ?
Thanks
It has some smell, to distribute an application anonymously. Anyway: You can change the information of your application by editing the Info.plist file inside your .app-bundle.
Right-click your application and select "Show package contents" from the context-menu. Open the folders and search for the "Info.plist" file. Open the file with TextWrangler, BBEdit oder the PropertyFile-Editor of XCode and search for your name. You can then simply replace it with anything else.
But remember:
An application should never ever been distributed without informations on the developer. The described method will only remove all "visible" informations on you. Informations on you that are part of the compiled binary won't be changed by this.

Resources