Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[81_9] Hide tabbar when user chooses 'Documents in separate windows' #2068

Merged
merged 9 commits into from
Sep 6, 2024
2 changes: 2 additions & 0 deletions TeXmacs/plugins/lang/dic/en_US/zh_CN.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,8 @@
("system environment variables" "")
("tab bar" "标签页工具栏")
("tab" "")
("tab" "制表符")
("tab bar" "标签栏")
Copy link
Contributor

@da-liii da-liii Sep 5, 2024

Choose a reason for hiding this comment

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

这个我上次翻译过了,上面(1980行)的标签页工具栏

("tab-completion" "用制表符自动补全")
("table command" "")
("table height" "表格高度")
Expand Down
1 change: 1 addition & 0 deletions TeXmacs/plugins/lang/dic/en_US/zh_TW.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,7 @@ TeXmacs 的資料可參考 Help 說明")
("system command" "")
("system environment variables" "")
("tab" "制表符")
("tab bar" "標籤欄")
("tab-completion" "自動補齊")
("table" "表格")
("table command" "")
Expand Down
10 changes: 9 additions & 1 deletion TeXmacs/progs/texmacs/menus/preferences-widgets.scm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
(when (!= new old)
(notify-restart))))

(define (on-buffer-management-changed pretty-val)
(let ((can-use-tabbar? (== pretty-val "Multiple documents share window")))
(begin
(set-boolean-preference "tab bar" can-use-tabbar?)
(show-icon-bar 4 can-use-tabbar?)
(set-pretty-preference "buffer management" pretty-val)
)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Appearance preferences
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down Expand Up @@ -92,7 +100,7 @@
(get-pretty-preference "detailed menus")
"18em"))
(item (text "Buffer management:")
(enum (set-pretty-preference "buffer management" answer)
(enum (on-buffer-management-changed answer)
'("Documents in separate windows"
"Multiple documents share window")
(get-pretty-preference "buffer management")
Expand Down
2 changes: 1 addition & 1 deletion TeXmacs/progs/texmacs/menus/view-menu.scm
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@
---
(when (visible-header?)
("Main icon bar" (toggle-visible-icon-bar 0))
("Tab bar" (toggle-visible-icon-bar 4))
("Mode dependent icons" (toggle-visible-icon-bar 1))
("Focus dependent icons" (toggle-visible-icon-bar 2))
("User provided icons" (toggle-visible-icon-bar 3)))
(if (not (window-per-buffer?)) ("Tab bar" (toggle-visible-icon-bar 4)))
("Status bar" (toggle-visible-footer))
(if (with-developer-tool?)
("Side tools" (toggle-visible-side-tools 0)))
Expand Down