NSWindow's property representedFilename (and its friend, representedURL) allows associating a certain filename with a window. This allows filetype-specific icons to be displayed in the title, dragging the icon to create an alias, and right-clicking to display path to the file.
Associating a single file with a NSWindow is easy. However, Xcode4's window has not one, but two represented filenames, in both Snow Leopard and in Lion. How is this achieved?
Related
When a file is opened in brackets, the full path of the file should be shown in the Title Bar. At the moment, only the filename shows in the title bar, and I cannot find any option to turn on the full path.
This can be particularly dangerous when one is editing two files of the same name in different diferectories, but it is always useful to see the directory clearly at the top. The space is otherwise unused.
(I know that the path is displayed when I hover on the filename on the tab just above the code, but this means mucking about with the mouse when I am keyboarding, and is therefore a real nuisance)
There is a GitHub issue for that with an open PR you can watch
I'm playing with Mingw and embedding Icons. I add a single Icon by using windres and linking it in at compile time.
TRAY_ICON ICON "np.ico"
The Icon for the executable shows as the linked one, and opening the file with CFF explorer or similar tools show the Icon in the resource section.
When loading the Icon from within the application I use LoadIcon like below:
LoadIcon(GetModuleHandle(NULL), "TRAY_ICON");
Which works as expected and I can use the Icon for whatever. When looking at other executables I can see multiple Icons in the resources however. These are similar and are only different in size.
With multiple Icons present in the resource section, how does Windows decide which one to use when viewing the file in explorer or similar?
How are specific Icons selected when specifying a given Icon group?
K, so solved both, just forgot to post an answer here.
Windows uses the first icon group for the program icon.
Icon files can contain multiple images. Use the Linux imagemagic package to merge them. Windows decides which one to use based on size.
I'm interested in switching to the Atom text editor, but one thing that's keeping me with Vim is vim-notes, a plugin that automatically highlights names of your notes and allows you to jump to them by positioning your cursor over them and pressing gf (go to file under cursor). Is there a way to make Atom:
Read all the filenames in my ~/Notes directory
Highlight or underline any text in any .note file that's the name of a file in the ~/Notes directory, even if that note title has spaces.
Allow me to jump to the highlighted note by pressing some kind of key combination while the cursor is over it
I don't think there's a plugin for this, but if it's possible, I might be able to make one.
I'm working on a Qt UI that will run on a touchscreen. At some point it will be useful to select files, in (probably) a QFileDialog.
But little icons on a QFileDialog leads to a terrible touch-user experience, I'd like them to be bigger, so the user doesn't get crazy trying to navigate in the filesystem.
Actually, I'm searching documentation to see if there is a way through css, but haven't seen yet which target/propery to use.
Given the doc of QFileDialog class:
QFileDialog::Detail 0 Displays an icon, a name, and details for each item in the directory.
QFileDialog::List 1 Displays only an icon and a name for each item in the directory.
You can't set icon size this way. I recommend you to set a custom icon provider on the QFileDialog.
I am using QFileSystemModel to represent file structure through the QTreeView. It works fine except that instead of displaying all image files in a directory, I would like to group all image files to a single expandable image sequence node, i.e. it will display one sequence node and if one clicks to expand it, all the image files will be displayed. Any suggestion how I could achieve this? Thanks.
Example:
-root_folder
+image_sequence_%04d.jpg(222-1000)
-folder_2
+image_sequence2_%04d.jpg(1243-5050)