adjust the print-to-ps preference in DrRacket so that you can also

choose to print to pdf as well. Also, enable the preference
under linux (ie, make it available to be chosen-- all platforms
still default to printing via the platform-specific mechanism)
This commit is contained in:
Robby Findler 2012-09-17 10:47:22 -05:00
parent b1ba81d0cc
commit c675cf47f0
15 changed files with 25 additions and 21 deletions

View File

@ -228,7 +228,7 @@
(preferences:set-default (preferences:set-default
'framework:print-output-mode 'framework:print-output-mode
'standard 'standard
(λ (x) (or (eq? x 'standard) (eq? x 'postscript)))) (λ (x) (or (eq? x 'standard) (eq? x 'postscript) (eq? x 'pdf))))
(preferences:set-default 'framework:highlight-parens #t boolean?) (preferences:set-default 'framework:highlight-parens #t boolean?)
(preferences:set-default 'framework:fixup-parens #t boolean?) (preferences:set-default 'framework:fixup-parens #t boolean?)

View File

@ -527,13 +527,26 @@ the state transitions / contracts are:
'framework:display-line-numbers 'framework:display-line-numbers
(string-constant display-line-numbers) (string-constant display-line-numbers)
values values) values values)
(unless (eq? (system-type) 'unix) (define print-rb (new radio-box%
(make-check editor-panel [label (string-constant printing-mode)]
'framework:print-output-mode [parent editor-panel]
(string-constant automatically-to-ps) [choices (list (string-constant print-using-platform-specific-mode)
(λ (b) (string-constant print-to-ps)
(if b 'postscript 'standard)) (string-constant print-to-pdf))]
(λ (n) (eq? 'postscript n)))) [callback
(λ (rb evt)
(preferences:set 'framework:print-output-mode
(case (send print-rb get-selection)
[(0) 'standard]
[(1) 'postscript]
[(2) 'pdf])))]))
(define (update-print-rb what)
(send print-rb set-selection (case what
[(standard) 0]
[(postscript) 1]
[(pdf) 2])))
(update-print-rb (preferences:get 'framework:print-output-mode))
(preferences:add-callback 'framework:print-output-mode (λ (p v) (update-print-rb v)))
(general-panel-procs editor-panel))))]) (general-panel-procs editor-panel))))])
(add-general-checkbox-panel))) (add-general-checkbox-panel)))

View File

@ -397,7 +397,6 @@ please adhere to these guidelines:
(show-line-and-column-numbers "Vis linje og søjlenumre") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "Vis linje og søjlenumre") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "Vis tegnnummerering") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "Vis tegnnummerering") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "Slå tastaturgenveje i menuer til") (enable-keybindings-in-menus "Slå tastaturgenveje i menuer til")
(automatically-to-ps "Udskriv automatisk til postscriptfil")
(option-as-meta "Brugtion option-tasten som meta") ;; macos/macos x only (option-as-meta "Brugtion option-tasten som meta") ;; macos/macos x only
(reuse-existing-frames "Genbrug gamle vinduer, når nye filer åbnes") (reuse-existing-frames "Genbrug gamle vinduer, når nye filer åbnes")
(default-fonts "Standardskrifttyper") (default-fonts "Standardskrifttyper")

View File

@ -221,7 +221,6 @@
(count-from-one "Regels en kolommen tellen vanaf 1") (count-from-one "Regels en kolommen tellen vanaf 1")
(display-line-numbers "Toon regelnummers (geen letternummers) in buffer") ; -- 'buffer' is not wrong, but unclear (display-line-numbers "Toon regelnummers (geen letternummers) in buffer") ; -- 'buffer' is not wrong, but unclear
(enable-keybindings-in-menus "Gebruik sneltoetsen in menus") (enable-keybindings-in-menus "Gebruik sneltoetsen in menus")
(automatically-to-ps "Automatically print to postscript file")
(reuse-existing-frames "Reuse existing frames when opening new files") (reuse-existing-frames "Reuse existing frames when opening new files")
(default-fonts "Verstek-lettertypen") (default-fonts "Verstek-lettertypen")

View File

@ -499,7 +499,10 @@ please adhere to these guidelines:
(show-line-and-column-numbers "Show Line && Column Numbers") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "Show Line && Column Numbers") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "Show Character Offsets") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "Show Character Offsets") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "Enable keybindings in menus") (enable-keybindings-in-menus "Enable keybindings in menus")
(automatically-to-ps "Automatically print to PostScript file") (printing-mode "Printing Mode")
(print-using-platform-specific-mode "Platform-specific printing")
(print-to-ps "Print to PostScript File")
(print-to-pdf "Print to PDF File")
(command-as-meta "Treat command key as meta") ;; macos/macos x only (command-as-meta "Treat command key as meta") ;; macos/macos x only
(reuse-existing-frames "Reuse existing frames when opening new files") (reuse-existing-frames "Reuse existing frames when opening new files")
(default-fonts "Default Fonts") (default-fonts "Default Fonts")

View File

@ -485,7 +485,6 @@
(show-line-and-column-numbers "Montrer les numéros de ligne et de colonne") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "Montrer les numéros de ligne et de colonne") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "Montrer la distance depuis le début de l'éditeur") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "Montrer la distance depuis le début de l'éditeur") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "Raccourcis clavier dans les menus.") (enable-keybindings-in-menus "Raccourcis clavier dans les menus.")
(automatically-to-ps "Imprimer automatiquement dans un fichier postscript.")
(command-as-meta "Utiliser la touche de commande comme touche meta") ;; macos/macos x only (command-as-meta "Utiliser la touche de commande comme touche meta") ;; macos/macos x only
(reuse-existing-frames "Réutiliser les fenêtres existantes lors de l'ouverture de nouveaux fichiers") (reuse-existing-frames "Réutiliser les fenêtres existantes lors de l'ouverture de nouveaux fichiers")
(default-fonts "Polices par défaut") (default-fonts "Polices par défaut")

View File

@ -396,7 +396,6 @@
(show-line-and-column-numbers "Zeilen- && Spaltennummern anzeigen") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "Zeilen- && Spaltennummern anzeigen") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "Zeichen-Offsets anzeigen") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "Zeichen-Offsets anzeigen") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "Tastenbelegung für Menüs") (enable-keybindings-in-menus "Tastenbelegung für Menüs")
(automatically-to-ps "Automatisch in PostScript-Datei drucken")
(command-as-meta "Command-Taste als Meta behandeln") ;; macos/macos x only (command-as-meta "Command-Taste als Meta behandeln") ;; macos/macos x only
(reuse-existing-frames "Existierende Fenster für neu geöffnete Dateien wiederverwenden") (reuse-existing-frames "Existierende Fenster für neu geöffnete Dateien wiederverwenden")
(default-fonts "Standard-Fonts") (default-fonts "Standard-Fonts")

View File

@ -426,7 +426,6 @@ please adhere to these guidelines:
(show-line-and-column-numbers "行番号と桁番号を表示する") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "行番号と桁番号を表示する") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "文字オフセットを表示する") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "文字オフセットを表示する") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "メニューのキーバインドを有効にする") (enable-keybindings-in-menus "メニューのキーバインドを有効にする")
(automatically-to-ps "自動的に PostScript ファイルに印刷する")
(command-as-meta "Command キーを Meta キーとして処理する") ;; macos/macos x only (command-as-meta "Command キーを Meta キーとして処理する") ;; macos/macos x only
(reuse-existing-frames "新しいファイルを開くときに既存のフレームを再利用する") (reuse-existing-frames "新しいファイルを開くときに既存のフレームを再利用する")
(default-fonts "既定のフォント") (default-fonts "既定のフォント")

View File

@ -356,7 +356,6 @@
(show-line-and-column-numbers "행번호 && 열번호 표시") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "행번호 && 열번호 표시") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "글자수 보기") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "글자수 보기") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "메뉴 단축키 사용") (enable-keybindings-in-menus "메뉴 단축키 사용")
(automatically-to-ps "PostScript 파일로 자동 출력")
(command-as-meta "명령 키 메타로 취급") ;; macos/macos x only (command-as-meta "명령 키 메타로 취급") ;; macos/macos x only
(reuse-existing-frames "새로운 파일을 열 때 기존 프레임 사용") (reuse-existing-frames "새로운 파일을 열 때 기존 프레임 사용")
(default-fonts "기본 글꼴") (default-fonts "기본 글꼴")

View File

@ -399,7 +399,6 @@ please adhere to these guidelines:
(show-line-and-column-numbers "Mostrar número de linha e coluna") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "Mostrar número de linha e coluna") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "Mostrar caractéres de offset") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "Mostrar caractéres de offset") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "Activar ligações de teclas nos menus") (enable-keybindings-in-menus "Activar ligações de teclas nos menus")
(automatically-to-ps "Imprimir automaticamente para um ficheiro postscript")
(option-as-meta "Tratar tecla option como meta") ;; macos/macos x only (option-as-meta "Tratar tecla option como meta") ;; macos/macos x only
(reuse-existing-frames "Reutilizar janelas já existentes para abrir novos ficheiros") (reuse-existing-frames "Reutilizar janelas já existentes para abrir novos ficheiros")
(default-fonts "Fontes por Defeito") (default-fonts "Fontes por Defeito")

View File

@ -431,7 +431,6 @@ please adhere to these guidelines:
(show-line-and-column-numbers "Показывать номера строк и столбцов") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "Показывать номера строк и столбцов") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "Показывать смещение символов") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "Показывать смещение символов") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "Разрешить сочетания клавиш в меню") (enable-keybindings-in-menus "Разрешить сочетания клавиш в меню")
(automatically-to-ps "Автоматически печатать в PostScript-файле")
(command-as-meta "Считать командную клавишу мета-клавишей") ;; macos/macos x only (command-as-meta "Считать командную клавишу мета-клавишей") ;; macos/macos x only
(reuse-existing-frames "Использовать существующие окна при открытии новых файлов") (reuse-existing-frames "Использовать существующие окна при открытии новых файлов")
(default-fonts "Шрифты по умолчанию") (default-fonts "Шрифты по умолчанию")

View File

@ -348,7 +348,6 @@
(show-line-and-column-numbers "显示行号和列号") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "显示行号和列号") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "显示字符在文件中的位置") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "显示字符在文件中的位置") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "允许使用菜单中的快捷键") (enable-keybindings-in-menus "允许使用菜单中的快捷键")
(automatically-to-ps "自动打印成postscript文件")
(command-as-meta "将command键当作meta") ;; macos/macos x only (command-as-meta "将command键当作meta") ;; macos/macos x only
(reuse-existing-frames "在打开新文件时,使用现有的视窗") (reuse-existing-frames "在打开新文件时,使用现有的视窗")
(default-fonts "默认字体") (default-fonts "默认字体")

View File

@ -297,7 +297,6 @@
(count-columns-from-one "Cuenta números de columna a partir de uno") (count-columns-from-one "Cuenta números de columna a partir de uno")
(display-line-numbers "Muestra números de línea en el contenedor; sin desplazamiento de caracteres") (display-line-numbers "Muestra números de línea en el contenedor; sin desplazamiento de caracteres")
(enable-keybindings-in-menus "Habilita enlaces de teclas en los menús") (enable-keybindings-in-menus "Habilita enlaces de teclas en los menús")
(automatically-to-ps "Imprime automáticamente a un archivo en postscript")
(option-as-meta "Tratar cualquier tecla como meta") ;; macos/macos x only (option-as-meta "Tratar cualquier tecla como meta") ;; macos/macos x only
(reuse-existing-frames "Reutilizar marcos existentes cuando se abre un nuevo archivo") (reuse-existing-frames "Reutilizar marcos existentes cuando se abre un nuevo archivo")
(default-fonts "Fuentes por omisión") (default-fonts "Fuentes por omisión")

View File

@ -347,7 +347,6 @@
(show-line-and-column-numbers "显示行号和列号") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "显示行号和列号") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "显示字符在文件中的位置") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "显示字符在文件中的位置") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "允许使用菜单中的快捷键") (enable-keybindings-in-menus "允许使用菜单中的快捷键")
(automatically-to-ps "自动打印成postscript文件")
(command-as-meta "将command键当作meta") ;; macos/macos x only (command-as-meta "将command键当作meta") ;; macos/macos x only
(reuse-existing-frames "在打开新文件时,使用现有的视窗") (reuse-existing-frames "在打开新文件时,使用现有的视窗")
(default-fonts "默认字体") (default-fonts "默认字体")

View File

@ -431,7 +431,6 @@ please adhere to these guidelines:
(show-line-and-column-numbers "Показувати номери рядків і стовбців") ; used for popup menu; right click on line/column box in bottom of drs window (show-line-and-column-numbers "Показувати номери рядків і стовбців") ; used for popup menu; right click on line/column box in bottom of drs window
(show-character-offsets "Показувати зміщення символів") ; used for popup menu; right click on line/column box in bottom of drs window (show-character-offsets "Показувати зміщення символів") ; used for popup menu; right click on line/column box in bottom of drs window
(enable-keybindings-in-menus "Дозволити комбінації клавіш в меню") (enable-keybindings-in-menus "Дозволити комбінації клавіш в меню")
(automatically-to-ps "Автоматично друкувати в PostScript-файлі")
(command-as-meta "Вважати командний рядок мета-клавішою") ;; macos/macos x only (command-as-meta "Вважати командний рядок мета-клавішою") ;; macos/macos x only
(reuse-existing-frames "Використовувати існуючі вікна при відкритті нових файлів") (reuse-existing-frames "Використовувати існуючі вікна при відкритті нових файлів")
(default-fonts "Шрифти за замовчуванням") (default-fonts "Шрифти за замовчуванням")