I am developing an application in which I have to mark a set of files/folder. The marked files/folder when viewed in Finder must be shown with a custom icon. But when they are selected for preview ( using spacebar) they must show their original icon ( i.e the blue icon for folder etc) .
This behavior is similar to symbolic links in the fact that for symbolic links , an arrow comes at the lower left corner of the icon whereas when we preview it , it shows the icon of the file/folder it is pointing to (without the arrow) .
Now I went over
[[NSWorkspace sharedWorkspace] setIcon:icon forFile:#"path" options:NSExcludeQuickDrawElementsIconCreationOption];
But it sets the icon of the path permanently and the same custom icon appears when I preview it .
I tried to register a custom file type but the same problem happened . The custom icon also appeared in the preview.
Can anyone please help me out ??
Thanks :)
Starting with OS X 10.6, you will need to inject code into the Finder process and override objective C methods in the Finder process. Refer How to Write OS X Finder plugin post.
Symbolic links are not just documents, but a special entity in the OS, and therefor gets special treatments in some cases.
If you use setIcon:forFile: to set an icon, I do not believe there are any options to say that the icon should only appear in directory view, and not in preview.
Related
I will give my use case first. I have two similar android studio projects which needs to be opened always. Now what happens is, I often make changes in wrong project because there is no easy way to identify which project I'm on by simply looking at UI (other than looking at the project name on top- which will go away on full screen). So it would be great if I could use dracula theme on one project and default theme on other. Is there any way to achieve it.
There is a way to change the background color of project pane and recent files window.
Goto Preference -> Appearance & Behavior -> File Colors -> {Add project files and set color}
Got the solution from here
There is the ability to "to define any image as a background".
Set a background image for the current project only, or for any project you open or create anew.
To set a background image
1. Either press:
Shift twice (Searching Everywhere), or
Ctrl+Shift+A (Navigating to Action)
and start typing set back
2. In the dialog box that opens,
Specify:
the image you want to use as the background,
its opacity,
filling and placement options.
Choose to show background in:
the editor and tool windows, or
in the IntelliJ IDEA frame.
Selecting checkbox This project only:
Show background in the current project and ignore this background in the other projects.
https://www.jetbrains.com/help/idea/2016.2/setting-background-image.html
I have an app that needs to be localized.
After fiddling with the settings for a while, I managed to get the project to the state where it builds a nl.lproj (amongst others) directory in the Resources directory of the app bundle, which contains a MainMenu.strings file that contains all my translations; they seem correct at first glance.
The XIB file is marked as translatable, and seems to be part of the right target:
However, if I run the app in a dutch environment, the localized strings are not shown in the UI. I added
NSLocale *loc = [NSLocale autoupdatingCurrentLocale];
NSString *lang = [loc languageCode];
NSLog(#"Current language: %#",lang);
to verify that the Dutch language is active, and it is.
This question suggests that doing a clean followed by a rebuild of the app should fix such issues. I've tried that, but it did not resolve the issue.
How can I figure out why my app isn't being translated? What else could go wrong? Are there any diagnostics I could be checking?
The application in question is open source, and can be found at https://github.com/Fedict/eid-mw. Select the "eID Viewer" target, and build that, to see what's happening.
There are two different things with the localization. One is localization the UI. This is done by checking those boxes and then editing the string files in the dialog underneath the xib file.
The second is the localization of the Userfacing strings in code. This is done by the Macro NSLocalizedString(#"*key*", *comment*); where key is the key and comment is a provided comment for localization purpose.
These strings are the to edit in the File Localizable.strings.
Here a link with a Beginner Tutorial. And the Apple Docs
To activate the debug function in Xcode for localized strings: pass in -NSShowNonLocalizedStrings YES as launch argument in Xcode. You find it under Product/Scheme/Edit Scheme -Arguments
Hope this helps
You need called .strings file with name "Localizable.strings".
And add language target ( in inspector ) and fill target language file.
Have you tried a check with pseudolocalozations?
Are you setting properly the language and region on your mac?
Are you also trying launching it specifically in Dutch from XCode:
To launch your app in a specific language and region
Click the target in the Run destination menu and choose Edit Scheme.
On the right, select Options.
Optionally, choose a language from the Application Language pop-up menu.
Optionally, choose a region from the Application Region pop-up menu.
Click the Close button.
Click Run to launch your app in the language and region you specified.
It turns out that localisation is supported with OSX 10.8 and above. My app had selected 10.7 as deployment target (we do need to support a few older versions of OSX). Switching the deployment target to 10.8 makes the translations appear.
I have an application which adds a tick mark (overlay icon) on the file icon (similar to the tick mark on files checked out from SVN repositories) after successful execution. I would like to detect through AutoIt whether the overlay icon is present for that file or not
Take a look at _ImageSearch library.
Do a printscreen with icon with overlay visible and then cut the small inner piece of the overlay and save it as a BMP.
Then use that image along with _ImageSearch.
You can do this by using _WinAPI_ShellGetImageList
On other forms, the icon is shown in the taskbar but only in this form, the icon is not shown in the taskbar.
I also made sure that there is an icon in the form's property.
Right Click the Project file and Select Property as follows
Now Change the default Icon here
Have you run the program from the exe in the debug/release folder.
I've found that the icon doesn't show in the taskbar when run from the debugger.
Edit: Just realised how old this is.
Well, hopefully this will help someone else.
To change the main icon for your application, go to the "Application" tab under the project property page, and change the "Icon:" combo box.
You can change icon form from properties form like this picture.
You need to change icon of application from Project Properties -> Application -> Icon
In properties of the form, browse for an icon in the icon tab.
Make sure that the picture you are using is in .ICO format. Sometimes, in newer versions, the language accepts images other than .ICO format but can produce error and doesn't display correctly everywhere.
Make sure that the .ICO you have converted is in more than 1 or 2 sizes (.ICO files have many resolutions in just one file).
I hope you understand!
In addition to other answers here, make sure that the 'ShowInTaskbar' property on the form is set to true. Sometimes settings get toggled. Toggle it back.
possibly an easy answer to this.?
I have a theos built tweak with a preference bundle displayed in the settings app.
This allows me to activate / deactivate my tweak.
My question is, how do you put an icon on the main settings app list along side the title.
I can put an icon by the switch, but thats it.
I have not included any code as the preference bundle is working, it just doesn't have an icon.
The default way to do this is to drag your icon named icon.png into /Resources/.
If you want, you can rename it by editing icon entry in your /layout/Library/PreferenceLoader/Preferences/<yourbundlename>.plist file.