NTLinks + NTLinksMaker: NTFS links creation and information

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thank you for your translation, I'll add it to package. However these lines may still be changed, it's a beta.
ps. You missed NTLinksMaker64.ini in the plugin package. :p
It is only a sample showing how to set language.
BTW, is it possible for the plugin to use the font and size defined in total commander? Or I'd like to specify the size and font name if not possible to do that.
Dialog uses default font/size. It would be useful to see a screenshot with NTLinksMaker window and some of Windows dialogs (e.g. Windows Run dialog Win+R) for comparing, I can't imagine what do you see in your language.
ps. One more thing I'd like to see is the option to force elevation from the first to remove one step. Currently, one more click is required.
Internal structure allows only asking for elevation after closing dialog, not before. And, you'll need this click in Windows elevation request window in any case, before of after. However, currently you may only need this click for operations that can't be done w/o elevation.
Currently you can do this in TC, just add an asterisk before path to program. e.g.:

Code: Select all

*%COMMANDER_PATH%\Plugins\Content\NTLinks\NTLinksMaker.exe
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Now combobox holds all modes of link creation: only old links, symlinks when old link can't be made, only symlinks.

NTLinksMaker Beta 236

Language file was changed seriously. I corrected Korean language file a bit but new lines require translation.
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

Hi,

I've updated the lang file.
https://dl.dropboxusercontent.com/u/97052378/Korean.lng
Dialog uses default font/size.
Do you mean OS(windows) default? Well, it seems not. Compare the font size in the pictures below.

[img]http://fs2.directupload.net/images/150123/58h9yyv4.jpg[/img]

[img]http://fs2.directupload.net/images/150123/flj2gsx9.jpg[/img]

Internal structure allows only asking for elevation after closing dialog, not before. And, you'll need this click in Windows elevation request window in any case, before of after. However, currently you may only need this click for operations that can't be done w/o elevation.
Currently you can do this in TC, just add an asterisk before path to program. e.g.:
Code:
*%COMMANDER_PATH%\Plugins\Content\NTLinks\NTLinksMaker.exe
Thanks for the info. :)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Do you mean OS(windows) default? Well, it seems not. Compare the font size in the pictures below.
I was talking about default font/size for English/Russian languages:

Code: Select all

FONT 8, "MS Shell Dlg"
But according to dialog resources in C:\Windows\System32\ko-KR\ (strange that I have such folder 'cause I don't have Korean MUI installed) folder default font size is 9 for your language, however I can't read font name (if it is interesting for you, you can try viewing *.mui files with Resource Hacker):

Code: Select all

FONT 9, "??"
I'll try to do something with it.


Please try this version, I've added a copy of dialog with another font size for Korean.

NTLinksMaker Beta 238

Or even better this version, I've added FontSize option instead:

NTLinksMaker Beta 242
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thanks, but the font size is somewhat weird.
What do you mean? I can only see that with FontSize=9 texts are unsharp, but with FontSize=10 all seems to be clear. And increasing dimensions of dialog is an expected thing.
Hm-m, it seems that only English characters increase size but Korean ones remain small... Please try to modify dialog in program resources (using mentioned Resource Hacker) and play with font faces/sizes, I think changing font too should help but I don't know your fonts.
By the way, is there any easy way to go to the original folder from symlink?
You can view target of any link in a custom column or tooltip using plugin, you can read and copy it from Attributes dialog but currently there's no way to use values from content plugins in commands.
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

it seems that only English characters increase size but Korean ones remain small...
Correct.
Please try to modify dialog in program resources (using mentioned Resource Hacker) and play with font faces/sizes, I think changing font too should help but I don't know your fonts.
It's not something I'd like to do but it did the trick. NTlinks seems not recognize the default font and size of the running Windows.
tooltip using plugin
Thanks for the tip.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It is good that changing the font solved the problem? I'll try adding INI key to change font.

It would be useful if you upload your executable with fixed font.
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

https://www.dropbox.com/s/o3eczdqj6hlsw06/NTLinksMaker.rar?dl=0

The fixed font is a default font defined in windows.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thank you for the file.
The fixed font is a default font defined in windows.
Problem is that I don't know your Windows' default font. :)


Added after 3 hours:

Please try this beta version, it tries to read font from Windows taskbar tray area and use it for dialog controls. I've added a message showing used font, you can check if font was determined correctly.
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

Please try this beta version, it tries to read font from Windows taskbar tray area and use it for dialog controls. I've added a message showing used font, you can check if font was determined correctly.
Oh, it works except for font size. The font size of taskbar seems not to be detected correctly. Generally the size is "9", but the plugin recognizes it as "11"
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

sheppaul,
My message shows:
Got font face 'Tahoma' size -11 (8 points).
It shows font size in pixels and points, first one (negative) is taken from font information structure returned by Windows and second one (in points) I calculate from first one according to screen resolution - it should match font size that is specified in dialogs. I tested it with standard and high DPI and all seems to be correct. Anyway second value is only used to determine size of dialog and buttons (I set font created exactly from information structure then).
If your second one is determined incorrectly and dialog fonts look small, we should find some other standard Windows control to take font from.

I found another way to detect font. Please try this beta, it shows fonts taken using two methods, second one is via system information function, it returns font that is set in theme (however both ways return same font for me and unfortunately second one doesn't work under Windows 2000).
sheppaul
Member
Member
Posts: 134
Joined: 2003-12-05, 07:59 UTC

Post by *sheppaul »

I have the following message.
Got font face '맑은 고딕' size -15 (11 points).
If your second one is determined incorrectly and dialog fonts look small,
The problem is that the font size is too big. The size of taskbar is "9" (all major font size of windows has a same value).

--------------
The latest plugin's message:
---------------------------
Font
---------------------------
This was taken from taskbar tray area:

Face:
맑은 고딕
Height:
-15
Size:
11 points


This was returned by SystemParametersInfo with SPI_GETNONCLIENTMETRICS:

Face:
맑은 고딕
Height:
-12
Size:
9 points
---------------------------
확인
---------------------------
SystemParametersInfo seems to find a right one. :)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Thank you for the message, now I see the difference.

Sad, I tested it under Windows XP and SystemParametersInfo fails too. So it seems to be working under Windows 7 only...


Please send me a report from this tool, it enumerates windows and their fonts (you can edit file in order to remove some windows with private information). I want to find some window that exists in all Windows versions to get rid of SystemParametersInfo.

Or maybe we can leave only SystemParametersInfo and use generic dialog for older systems?
Last edited by MVV on 2015-02-04, 19:58 UTC, edited 1 time in total.
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

You're poking around in the dark IMO.
Instead of using some "hackish" stuff, like enumerating some Windows controls,
maybe you should read this or this to see how things actually work,
and why some characters are displayed weird for CJK systems,
and maybe add the DS_SHELLFONT flag (or look here), or switch to MS Shell Dlg 2 then.
TC plugins: PCREsearch and RegXtract
Post Reply