Skip to content
Open
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
14 changes: 8 additions & 6 deletions plugins/wiztree/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ unsafe fn paint(hwnd: HWND) {
head = format!("{head} {}", human(size));
foot = match a.hot.and_then(|n| a.cells.get(n)) {
Some((_, id)) => format!("{} {}", path_of(&t.recs, *id, a.drive).0, human(t.tot[id])),
None => t!("Щелчок: открыть папку / показать файл ПКМ, Backspace: вверх Tab: следующий диск F5: обновить", "Click: open folder / show file Right click, Backspace: up Tab: next drive F5: rescan", ja: "クリック: フォルダーを開く / ファイルを表示 右クリック、Backspace: 上へ Tab: 次のドライブ F5: 再スキャン", pt: "Clique: abrir pasta / mostrar arquivo Botão direito, Backspace: subir Tab: próxima unidade F5: examinar de novo", zh: "单击:打开文件夹 / 定位文件 右键、Backspace:上一层 Tab:下一个磁盘 F5:重新扫描").into(),
None => t!("Щелчок: открыть папку / показать файл Ctrl+щелчок: открыть в проводнике ПКМ, Backspace: вверх Tab: диск F5: обновить", "Click: open folder / show file Ctrl+click: reveal in Explorer Right click, Backspace: up Tab: drive F5: rescan", ja: "クリック: フォルダーを開く / ファイルを表示 Ctrl+クリック: エクスプローラーで開く 右クリック、Backspace: 上へ Tab: ドライブ F5: 再スキャン", pt: "Clique: abrir pasta / mostrar arquivo Ctrl+clique: abrir no Explorer Botão direito, Backspace: subir Tab: unidade F5: examinar", zh: "单击:打开文件夹 / 定位文件 Ctrl+单击:在资源管理器中定位 右键、Backspace:上一层 Tab:磁盘 F5:重新扫描").into(),
};
}
text(&head, RECT { left: (12.0 * k) as i32, top: 0, right: w - 12, bottom: top }, pal.accent, one);
Expand Down Expand Up @@ -268,19 +268,21 @@ unsafe extern "system" fn proc(hwnd: HWND, msg: u32, wp: WPARAM, lp: LPARAM) ->
0
}
WM_LBUTTONDOWN => {
let ctrl = GetKeyState(VK_CONTROL as i32) < 0;
let act = APP.with_borrow_mut(|a| {
let id = a.hot.and_then(|n| a.cells.get(n))?.1;
let t = a.tree.as_ref()?;
if t.recs[&id].dir {
let p = None;
let path = path_of(&t.recs, id, a.drive).0;
if t.recs[&id].dir && !ctrl {
// Click: open folder
(a.cur, a.hot) = (id, None);
p
None
} else {
Some(path_of(&t.recs, id, a.drive).0)
// Ctrl+Click: reveal in Explorer
Some(path)
}
});
if let Some(p) = act {
// show the file in Explorer (delete it from there)
winrust_common::reveal(&p);
}
InvalidateRect(hwnd, null(), 0);
Expand Down