Skip to content

A fast file manager for Windows and macOS that never freezes: tabs, dual panes, archives as folders, Quick Look-style previews. A File Explorer and Finder alternative written in Rust.

Print can be shown in the first right-click menu (1125)

gelenmedyaa50de67ec5d4
diff --git a/crates/rf-app/src/ctx_menu.rs b/crates/rf-app/src/ctx_menu.rs
index 282f1f20..bd6c6b0c 100644
--- a/crates/rf-app/src/ctx_menu.rs
+++ b/crates/rf-app/src/ctx_menu.rs
@@ -597,6 +597,19 @@ impl FolderView {
let _ = w;
}));
}
+ // Print, for files Windows has a print command for (issue 1125; a switch in Settings, off by default). Looked up for a short
+ // selection only: each file's type is asked.
+ if mp.print && !in_archive && !items.is_empty() && items.len() <= 32 && items.iter().all(|p| p.is_file() && rf_win::fileactions::has_verb(p, "print")) {
+ let files = items.to_vec();
+ v.push(Item::action(t!("Yazdır"), icon(L::Printer), move |_, _| {
+ let files = files.clone();
+ rf_win::sta::run(move |owner| {
+ if let Err(e) = rf_win::ctxmenu::invoke_verb(owner, &ShellTarget::Items(files), "print", cursor()) {
+ log::warn!("print: {e:#}");
+ }
+ });
+ }));
+ }
raise(&mut v, type_from, &mut type_at);
v.push(Item::Separator);
diff --git a/crates/rf-app/src/i18n_en.rs b/crates/rf-app/src/i18n_en.rs
index a944a40e..9cd059c4 100644
--- a/crates/rf-app/src/i18n_en.rs
+++ b/crates/rf-app/src/i18n_en.rs
@@ -2216,6 +2216,9 @@ pub const EN: &[(&str, &str)] = &[
("SOL ADA", "LEFT ISLAND"),
("ORTA ADA", "MIDDLE ISLAND"),
("SAĞ ADA", "RIGHT ISLAND"),
+ ("ÜST ADA", "TOP ISLAND"),
+ ("ALT ADA", "BOTTOM ISLAND"),
+ ("Yazdır", "Print"),
("MASAÜSTÜ VE KABUK", "DESKTOP AND SHELL"),
("DENEYSEL", "EXPERIMENTAL"),
("Dock kapalı: bu ayar yalnızca Dock çalışırken işe yarar. Açmak için sayfanın başındaki Dock anahtarını kullanın.", "The dock is off: this setting only works while the dock runs. Use the dock switch at the top of the page to turn it on."),
diff --git a/crates/rf-app/src/settings.rs b/crates/rf-app/src/settings.rs
index bfb1912a..165d25ad 100644
--- a/crates/rf-app/src/settings.rs
+++ b/crates/rf-app/src/settings.rs
@@ -500,6 +500,9 @@ pub struct MenuPrefs {
pub terminal: bool,
/// Explorer's "Send to" (the SendTo folder's entries and the drives) in the first menu. Issue 117.
pub send_to: bool,
+ /// "Yazdır" in the first menu for files Windows can print (issue 1125: "a print shop"). Off by default: it is otherwise under
+ /// "Show more options", and most people print from the program.
+ pub print: bool,
/// Shell extensions under "Show more options" (off = listed at the bottom of the menu).
pub shell_submenu: bool,
/// A program that puts the same command into Windows 11's new menu and into the classic one (NanaZip does) is listed once: with
@@ -540,6 +543,7 @@ impl Default for MenuPrefs {
shelf: true,
terminal: true,
send_to: true,
+ print: false,
shell_submenu: true,
prefer_classic_commands: false,
always_classic: false,
diff --git a/crates/rf-app/src/settings_view.rs b/crates/rf-app/src/settings_view.rs
index 0dcdb001..aca67339 100644
--- a/crates/rf-app/src/settings_view.rs
+++ b/crates/rf-app/src/settings_view.rs
@@ -1303,7 +1303,7 @@ fn general(p: &Palette, s: &Settings, cx: &mut App) -> Vec<AnyElement> {
None,
move || {
type Set = fn(&mut Settings, bool);
- let rows: [(&str, bool, Set); 17] = [
+ let rows: [(&str, bool, Set); 18] = [
(t!("Yeni sekmede aç"), m.open_in_new_tab, |s, v| s.menu.open_in_new_tab = v),
(t!("Yeni sekmede arka planda aç"), m.open_in_background_tab, |s, v| s.menu.open_in_background_tab = v),
(t!("Yeni pencerede aç"), m.open_in_new_window, |s, v| s.menu.open_in_new_window = v),
@@ -1317,6 +1317,7 @@ fn general(p: &Palette, s: &Settings, cx: &mut App) -> Vec<AnyElement> {
(t!("Rafa ekle"), m.shelf, |s, v| s.menu.shelf = v),
(t!("Terminalde aç"), m.terminal, |s, v| s.menu.terminal = v),
(t!("Gönder"), m.send_to, |s, v| s.menu.send_to = v),
+ (t!("Yazdır"), m.print, |s, v| s.menu.print = v),
(t!("Aç"), m.open, |s, v| s.menu.open = v),
(t!("Özellikler"), m.properties, |s, v| s.menu.properties = v),
(t!("Yenile"), m.refresh, |s, v| s.menu.refresh = v),