Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bin/imports/file-manage.nss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
menu(where=sel.count>0 type='file|dir|drive|namespace|back' mode="multiple" title=loc.file_manage image=\uE253)
menu(where=sel.count>0 type='file|dir|drive|namespace|back' mode="multiple" title=loc.file_manage image=\uE253)
{
menu(separator="after" title=title.copy_path image=icon.copy_path)
{
Expand All @@ -13,7 +13,7 @@
item(mode="single" type='file' where=sel.file.ext.len>0 title=sel.file.ext cmd=command.copy(sel.file.ext))
}

item(mode="single" type="file" title=loc.change_extension image=\uE0B5 cmd=if(input(loc.change_extension, "Type extension"),
item(mode="single" type="file" title=loc.change_extension image=\uE0B5 cmd=if(input(loc.change_extension, loc.type_extension),
io.rename(sel.path, path.join(sel.dir, sel.file.title + "." + input.result))))

menu(separator="after" image=\uE290 title=title.select)
Expand Down
30 changes: 15 additions & 15 deletions src/bin/imports/goto.nss
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ menu(type='*' where=window.is_taskbar||sel.count mode=mode.multiple title=title.
{
menu(title=loc.folder image=\uE1F4)
{
item(title='Windows' image=inherit cmd=sys.dir)
item(title='System' image=inherit cmd=sys.bin)
item(title='Program Files' image=inherit cmd=sys.prog)
item(title='Program Files x86' image=inherit cmd=sys.prog32)
item(title='ProgramData' image=inherit cmd=sys.programdata)
item(title='Applications' image=inherit cmd='shell:appsfolder')
item(title='Users' image=inherit cmd=sys.users)
item(title=loc.windows image=inherit cmd=sys.dir)
item(title=loc.system_bin image=inherit cmd=sys.bin)
item(title=loc.program_files image=inherit cmd=sys.prog)
item(title=loc.program_files_x86 image=inherit cmd=sys.prog32)
item(title=loc.program_data image=inherit cmd=sys.programdata)
item(title=loc.applications image=inherit cmd='shell:appsfolder')
item(title=loc.users image=inherit cmd=sys.users)
separator
//item(title='@user.name@@@sys.name' vis=label)
item(title='Desktop' image=inherit cmd=user.desktop)
item(title='Downloads' image=inherit cmd=user.downloads)
item(title='Pictures' image=inherit cmd=user.pictures)
item(title='Documents' image=inherit cmd=user.documents)
item(title='Startmenu' image=inherit cmd=user.startmenu)
item(title='Profile' image=inherit cmd=user.dir)
item(title='AppData' image=inherit cmd=user.appdata)
item(title='Temp' image=inherit cmd=user.temp)
item(title=loc.desktop image=inherit cmd=user.desktop)
item(title=loc.downloads image=inherit cmd=user.downloads)
item(title=loc.pictures image=inherit cmd=user.pictures)
item(title=loc.documents image=inherit cmd=user.documents)
item(title=loc.startmenu image=inherit cmd=user.startmenu)
item(title=loc.profile image=inherit cmd=user.dir)
item(title=loc.appdata image=inherit cmd=user.appdata)
item(title=loc.temp image=inherit cmd=user.temp)
}
item(title=title.control_panel image=\uE0F3 cmd='shell:::{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}')
item(title=loc.all_control_panel_items image=\uE0F3 cmd='shell:::{ED7BA470-8E54-465E-825C-99712043E01C}')
Expand Down
26 changes: 26 additions & 0 deletions src/bin/imports/lang/en.nss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ all="All"
invert="Invert"
none="None"
change_extension="Change extension"
type_extension="Type extension"
take_ownership="Take ownership"
show_hide="Show/Hide"
system_files="System files"
Expand All @@ -41,6 +42,21 @@ guid="Guid"

// goto.nss
folder="Folder"
windows="Windows"
system_bin="System"
program_files="Program Files"
program_files_x86="Program Files x86"
program_data="ProgramData"
applications="Applications"
users="Users"
desktop="Desktop"
downloads="Downloads"
pictures="Pictures"
documents="Documents"
startmenu="Startmenu"
profile="Profile"
appdata="AppData"
temp="Temp"
all_control_panel_items="All Control Panel Items"
system="System"
about="About"
Expand Down Expand Up @@ -70,6 +86,12 @@ connections="Connections"


// taskbar.nss
config="Config"
manager="Manager"
directory="Directory"
version="Version"
docs="Documentation"
donate="Donate"
apps="Apps"
paint="Paint"
edge="Edge"
Expand All @@ -82,3 +104,7 @@ minimize_all_windows="Minimize all windows"
restore_all_windows="Restore all windows"
task_manager="Task Manager"
taskbar_Settings="Taskbar Settings"

// terminal.nss
tip_run_admin_prefix="Press [SHIFT key] or [RIGHT-CLICK] to run "
tip_run_admin_suffix=" as administrator"
40 changes: 33 additions & 7 deletions src/bin/imports/lang/zh-CN.nss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ by: github.com/JohnsonRan
github.com/XY0797
*/

xxx="欢迎用中文"
xxx="欢迎使用中文"
// shell.nss
pin_unpin="固定/取消固定"

Expand All @@ -15,12 +15,13 @@ windows_notepad="Windows 记事本"

// file-manage.nss
file_manage="文件管理"
copy_multiple_paths='复制选中的 (@sel.count) 个项目'
copy_multiple_paths='复制选中的 (@sel.count) 个项目路径'
all="全选"
invert="反选"
none="全不选"
change_extension="更改扩展名"
take_ownership="更改所有权"
type_extension="请输入扩展名"
take_ownership="取得所有权"
show_hide="显示/隐藏"
system_files="系统文件"
file_name_extensions="文件扩展名"
Expand All @@ -41,12 +42,27 @@ datetime="当前时间"
guid="Guid"

// goto.nss
folder="文件夹"
folder="常用文件夹"
windows="Windows"
system_bin="System32"
program_files="Program Files"
program_files_x86="Program Files (x86)"
program_data="ProgramData"
applications="应用程序"
users="用户"
desktop="桌面"
downloads="下载"
pictures="图片"
documents="文档"
startmenu="开始菜单"
profile="个人文件夹"
appdata="应用数据 (AppData)"
temp="临时文件 (Temp)"
all_control_panel_items="所有控制面板项"
system="系统"
about="系统信息"
your_info="账户信息"
system_info="系统信息(CMD)"
about="关于"
your_info="你的信息"
system_info="系统信息 (CMD)"
search="搜索"
usb="USB"
windows_update="Windows 更新"
Expand All @@ -71,6 +87,12 @@ connections="网络连接"


// taskbar.nss
config="配置文件"
manager="管理器"
directory="程序目录"
version="版本"
docs="帮助文档"
donate="赞助支持"
apps="应用"
paint="画图"
edge="Edge"
Expand All @@ -83,3 +105,7 @@ minimize_all_windows="最小化所有窗口"
restore_all_windows="还原所有窗口"
task_manager="任务管理器"
taskbar_Settings="任务栏设置"

// terminal.nss
tip_run_admin_prefix="按住 [Shift 键] 或 [单击右键] 以管理员身份运行 "
tip_run_admin_suffix=""
4 changes: 4 additions & 0 deletions src/bin/imports/lang/zh-HK.nss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
Chinese (Hong Kong SAR - Traditional Chinese)
*/
import lang "zh-TW.nss"
4 changes: 4 additions & 0 deletions src/bin/imports/lang/zh-MO.nss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
Chinese (Macau SAR - Traditional Chinese)
*/
import lang "zh-TW.nss"
4 changes: 4 additions & 0 deletions src/bin/imports/lang/zh-SG.nss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
Chinese (Singapore - Simplified Chinese)
*/
import lang "zh-CN.nss"
54 changes: 40 additions & 14 deletions src/bin/imports/lang/zh-TW.nss
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ windows_notepad="Windows 記事本"

// file-manage.nss
file_manage="檔案管理"
copy_multiple_paths='複製選中的 (@sel.count) 個項目'
copy_multiple_paths='複製選中的 (@sel.count) 個項目路徑'
all="全選"
invert="反向選擇"
none="全部不選"
change_extension="更改副檔名"
take_ownership="更改所有權"
change_extension="變更副檔名"
type_extension="請輸入副檔名"
take_ownership="取得所有權"
show_hide="顯示/隱藏"
system_files="系統檔案"
file_name_extensions="檔案副檔名"
file_name_extensions="副檔名"
attributes="屬性"
register_server="註冊服務"
register_server="註冊伺服器"
register="註冊"
unregister="取消註冊"
hidden="隱藏"
Expand All @@ -36,20 +37,35 @@ modified="修改時間"
accessed="存取時間"
new_folder="新增資料夾"
new_file="新增檔案"
datetime="當前時間"
datetime="目前時間"
guid="Guid"

// goto.nss
folder="資料夾"
folder="常用資料夾"
windows="Windows"
system_bin="System32"
program_files="Program Files"
program_files_x86="Program Files (x86)"
program_data="ProgramData"
applications="應用程式"
users="使用者"
desktop="桌面"
downloads="下載"
pictures="圖片"
documents="文件"
startmenu="開始功能表"
profile="個人資料夾"
appdata="應用程式資料 (AppData)"
temp="暫存檔案 (Temp)"
all_control_panel_items="所有控制台項目"
system="系統"
about="系統資訊"
your_info="帳戶資訊"
system_info="系統資訊(命令提示字元)"
about="關於"
your_info="您的資訊"
system_info="系統資訊 (CMD)"
search="搜尋"
usb="USB"
windows_update="Windows 更新"
windows_defender="Windows Update"
windows_defender="Windows 安全性"
apps="應用程式"
apps_features="已安裝的應用程式"
default_apps="預設應用程式"
Expand All @@ -70,15 +86,25 @@ connections="網路連線"


// taskbar.nss
config="設定檔"
manager="管理員"
directory="程式目錄"
version="版本"
docs="說明文件"
donate="贊助支援"
apps="應用程式"
paint="小畫家"
edge="Edge"
calculator="小算盤"
windows="視窗"
cascade_windows="階梯式視窗"
Show_windows_stacked="堆疊視窗"
Show_windows_side_by_side="並排視窗"
cascade_windows="重疊顯示視窗"
Show_windows_stacked="堆疊顯示視窗"
Show_windows_side_by_side="並排顯示視窗"
minimize_all_windows="最小化所有視窗"
restore_all_windows="還原所有視窗"
task_manager="工作管理員"
taskbar_Settings="工作列設定"

// terminal.nss
tip_run_admin_prefix="按住 [Shift 鍵] 或 [按右鍵] 以系統管理員身分執行 "
tip_run_admin_suffix=""
4 changes: 4 additions & 0 deletions src/bin/imports/lang/zh.nss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
Chinese (Generic / Fallback to Simplified Chinese)
*/
import lang "zh-CN.nss"
12 changes: 6 additions & 6 deletions src/bin/imports/modify.nss
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ modify(mode=mode.multiple

modify(type="recyclebin" where=window.is_desktop and this.id==id.empty_recycle_bin pos=1 sep)

modify(find="unpin*" pos="bottom" menu="Pin/Unpin")
modify(find="pin*" pos="top" menu="Pin/Unpin")
modify(where=this.id(id.unpin_from_start, id.unpin_from_taskbar, id.unpin_from_quick_access, id.unpin_from_start_menu) || find="unpin*|*取消固定*" pos="bottom" menu=loc.pin_unpin)
modify(where=this.id(id.pin_to_start, id.pin_to_taskbar, id.pin_to_quick_access, id.pin_to_start_menu, id.pin_current_folder_to_quick_access) || find="pin*|*固定*" pos="top" menu=loc.pin_unpin)

modify(where=this.id==id.copy_as_path menu="file manage")
modify(type="dir.back|drive.back" where=this.id==id.customize_this_folder pos=1 sep="top" menu="file manage")
modify(where=this.id==id.copy_as_path menu=loc.file_manage)
modify(type="dir.back|drive.back" where=this.id==id.customize_this_folder pos=1 sep="top" menu=loc.file_manage)

modify(where=str.equals(this.name, ["open in terminal", "open linux shell here"]) || this.id==id.open_powershell_window_here
pos="bottom" menu="Terminal")
modify(where=str.equals(this.name, ["open in terminal", "open linux shell here", "在终端中打开", "在終端機中開啟"]) || this.id==id.open_powershell_window_here
pos="bottom" menu=title.terminal)

modify(mode=mode.multiple
where=this.id(
Expand Down
14 changes: 7 additions & 7 deletions src/bin/imports/taskbar.nss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
menu(type="taskbar" vis=key.shift() or key.lbutton() pos=0 title=app.name image=\uE249)
menu(type="taskbar" vis=key.shift() or key.lbutton() pos=0 title=app.name image=\uE249)
{
item(title="config" image=\uE10A cmd='"@app.cfg"')
item(title="manager" image=\uE0F3 admin cmd='"@app.exe"')
item(title="directory" image=\uE0E8 cmd='"@app.dir"')
item(title="version\t"+@app.ver vis=label col=1)
item(title="docs" image=\uE1C4 cmd='https://nilesoft.org/docs')
item(title="donate" image=\uE1A7 cmd='https://nilesoft.org/donate')
item(title=loc.config image=\uE10A cmd='"@app.cfg"')
item(title=loc.manager image=\uE0F3 admin cmd='"@app.exe"')
item(title=loc.directory image=\uE0E8 cmd='"@app.dir"')
item(title=loc.version+"\t"+@app.ver vis=label col=1)
item(title=loc.docs image=\uE1C4 cmd='https://nilesoft.org/docs')
item(title=loc.donate image=\uE1A7 cmd='https://nilesoft.org/donate')
}
menu(where=@(this.count == 0) type="taskbar" image=icon.settings expanded=true)
{
Expand Down
2 changes: 1 addition & 1 deletion src/bin/imports/terminal.nss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
menu(type='*' where=(sel.count or wnd.is_taskbar or wnd.is_edit) title=title.terminal sep=sep.top image=icon.run_with_powershell)
{
$tip_run_admin=["\xE1A7 Press [SHIFT key] or [RIGHT-CLICK] to run " + this.title + " as administrator", tip.warning, 1.0]
$tip_run_admin=["\xE1A7 " + loc.tip_run_admin_prefix + this.title + loc.tip_run_admin_suffix, tip.warning, 1.0]
$has_admin=key.shift() or key.rbutton()

item(title=title.command_prompt tip=tip_run_admin admin=has_admin image cmd-prompt=`/K TITLE Command Prompt &ver& PUSHD "@sel.dir"`)
Expand Down
6 changes: 4 additions & 2 deletions src/bin/shell.nss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
settings
settings
{
priority=1
exclude.where = !process.is_explorer
Expand All @@ -13,7 +13,9 @@ $loc_path='imports\lang\'
import lang loc_path + "en.nss"
import lang if(path.exists(loc_path + sys.lang + ".nss"),
loc_path + sys.lang + ".nss",
loc_path + "en.nss")
if(path.exists(loc_path + sys.lang.name + ".nss"),
loc_path + sys.lang.name + ".nss",
loc_path + "en.nss"))
// or import lang 'imports/lang/en.nss'
Expand Down
22 changes: 17 additions & 5 deletions src/exe/src/Control.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,26 @@ namespace Nilesoft

Control()
{
Font.Handle = (HFONT)::GetStockObject(DEFAULT_GUI_FONT);
LOGFONT lf{};
if(::GetObject(Font.Handle, sizeof(LOGFONT), &lf))
NONCLIENTMETRICSW ncm{ sizeof(ncm) };
if(::SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0))
{
if(lf.lfQuality < ANTIALIASED_QUALITY)
lf = ncm.lfMessageFont;
lf.lfQuality = CLEARTYPE_NATURAL_QUALITY;
_hfont = ::CreateFontIndirectW(&lf);
Font.Handle = _hfont;
}
else
{
Font.Handle = (HFONT)::GetStockObject(DEFAULT_GUI_FONT);
if(::GetObject(Font.Handle, sizeof(LOGFONT), &lf))
{
lf.lfQuality = CLEARTYPE_NATURAL_QUALITY;
_hfont = CreateFontIndirectW(&lf);
if(lf.lfQuality < ANTIALIASED_QUALITY)
{
lf.lfQuality = CLEARTYPE_NATURAL_QUALITY;
_hfont = ::CreateFontIndirectW(&lf);
Font.Handle = _hfont;
}
}
}
}
Expand Down
Loading