Skip to content
Merged
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
9 changes: 9 additions & 0 deletions src/bin/edit/draw_menubar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ fn draw_menu_view(ctx: &mut Context, state: &mut State) {
tb.set_word_wrap(!word_wrap);
ctx.needs_rerender();
}

if ctx.menubar_menu_checkbox(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that you picked the wrong type here. This should be menubar_menu_button. Oh well, I'll fix that later. 🙂

loc(LocId::ViewDocumentPicker),
'P',
kbmod::CTRL | vk::P,
state.wants_document_picker,
) {
state.wants_document_picker = !state.wants_document_picker;
};
}

ctx.menubar_menu_end();
Expand Down
15 changes: 15 additions & 0 deletions src/bin/edit/localization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub enum LocId {
View,
ViewFocusStatusbar,
ViewWordWrap,
ViewDocumentPicker,

// Help menu
Help,
Expand Down Expand Up @@ -482,6 +483,20 @@ const S_LANG_LUT: [[&str; LangId::Count as usize]; LocId::Count as usize] = [
/* zh_hans */ "自动换行",
/* zh_hant */ "自動換行",
],
// ViewDocumentPicker
[
/* en */ "Document Picker",
/* de */ "Dokumentauswahl",
/* es */ "Selector de documentos",
/* fr */ "Sélecteur de documents",
/* it */ "Selettore di documenti",
/* ja */ "ドキュメントピッカー",
/* ko */ "문서 선택기",
/* pt_br */ "Seletor de documentos",
/* ru */ "Выбор документа",
/* zh_hans */ "文档选择器",
/* zh_hant */ "文件選擇器",
],

// Help (a menu bar item)
[
Expand Down