mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
updated for version 7.0027
This commit is contained in:
@ -5,19 +5,19 @@ static char * tb_print_xpm[] = {
|
|||||||
/* colors */
|
/* colors */
|
||||||
" s none m none c none",
|
" s none m none c none",
|
||||||
". s iconColor1 m black c #000000",
|
". s iconColor1 m black c #000000",
|
||||||
"X s iconColor2 m none c #FFFFFF",
|
"X s iconColor2 m none c #FFFFFF",
|
||||||
"o s iconGray2 m none c #bdbdbd",
|
"o s iconGray2 m none c #bdbdbd",
|
||||||
"O s iconGray5 m black c #737373",
|
"O s iconGray5 m black c #737373",
|
||||||
"+ s bottomShadowColor m black c #5D6069",
|
"+ s bottomShadowColor m black c #5D6069",
|
||||||
"@ c #FF1144",
|
"@ c #FF1144",
|
||||||
/* pixels */
|
/* pixels */
|
||||||
" ....... ",
|
" ....... ",
|
||||||
" .XXXXX.. ",
|
" .XXXXX.. ",
|
||||||
" .X...X.X. ",
|
" .XXXXX.X. ",
|
||||||
" .XXXXX.... ",
|
" .XXXXX.... ",
|
||||||
" .X...XXXX.O ",
|
" .XXXXXXXX. ",
|
||||||
" .XXXXXXXX.O ",
|
" .XXXXXXXX. ",
|
||||||
" .X.....XX.O ",
|
" ..XXXXXXXX.. ",
|
||||||
" .XXXXXXXX.O ",
|
" .XXXXXXXX.O ",
|
||||||
"................ ",
|
"................ ",
|
||||||
".XXXXXXXXXXXXXO. ",
|
".XXXXXXXXXXXXXO. ",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*help.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
|
*help.txt* For Vim version 7.0aa. Last change: 2004 Dec 30
|
||||||
|
|
||||||
VIM - main help file
|
VIM - main help file
|
||||||
k
|
k
|
||||||
@ -189,12 +189,6 @@ Standard plugins ~
|
|||||||
|pi_expl.txt| File explorer
|
|pi_expl.txt| File explorer
|
||||||
|
|
||||||
LOCAL ADDITIONS: *local-additions*
|
LOCAL ADDITIONS: *local-additions*
|
||||||
|engspchk.txt| English Spelling Checker (v57) May 25, 2004
|
|
||||||
|example.txt| Example for a locally added help file
|
|
||||||
|matchit.txt| Extended "%" matching
|
|
||||||
|test.txt| Testing the h<>lp c<>mm<6D>nd n<>w
|
|
||||||
|typecorr.txt| Plugin for correcting typing mistakes
|
|
||||||
|helpp.txt| Dummy line to avoid an error message
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*bars* Bars example
|
*bars* Bars example
|
||||||
|
261
runtime/lang/menu_pl_pl.utf-8.vim
Normal file
261
runtime/lang/menu_pl_pl.utf-8.vim
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
" Menu Translations: Polish
|
||||||
|
" Maintainer: Rafal M. Sulejman <rms@poczta.onet.pl>
|
||||||
|
" Initial Translation: Marcin Dalecki <dalecki@cs.net.pl>
|
||||||
|
" Last Change: 06 Sep 2001
|
||||||
|
|
||||||
|
" Quit when menu translations have already been done.
|
||||||
|
if exists("did_menu_trans")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let did_menu_trans = 1
|
||||||
|
|
||||||
|
scriptencoding iso-8859-2
|
||||||
|
|
||||||
|
" Help menu
|
||||||
|
menutrans &Help Po&moc
|
||||||
|
menutrans &Overview<Tab><F1> &Spis\ Tre<EFBFBD>ci<Tab><F1>
|
||||||
|
menutrans &How-to\ links &Odno<EFBFBD>niki\ JTZ
|
||||||
|
menutrans &Credits Po&dzi<EFBFBD>kowania
|
||||||
|
menutrans &User\ Manual Podr<EFBFBD>cznik\ &u<EFBFBD>ytkownika
|
||||||
|
menutrans Co&pying &Kopiowanie
|
||||||
|
menutrans &Version &Wersja
|
||||||
|
menutrans &About o\ &Aplikacji
|
||||||
|
|
||||||
|
" File menu
|
||||||
|
menutrans &File &Plik
|
||||||
|
menutrans &Open\.\.\.<Tab>:e &Otw<EFBFBD>rz\.\.\.<Tab>:e
|
||||||
|
menutrans Sp&lit-Open\.\.\.<Tab>:sp Otw<EFBFBD>rz\ z\ &podzia<EFBFBD>em\.\.\.<Tab>:sp
|
||||||
|
menutrans &New<Tab>:enew &Nowy<Tab>:enew
|
||||||
|
menutrans &Close<Tab>:close &Zamknij<Tab>:close
|
||||||
|
menutrans &Save<Tab>:w Za&pisz<Tab>:w
|
||||||
|
menutrans Save\ &As\.\.\.<Tab>:sav Zapisz\ &jako\.\.\.<Tab>:sav
|
||||||
|
menutrans Split\ &Diff\ with\.\.\. Podziel\ na\ diff-a\ mi<EFBFBD>dzy\.\.\.
|
||||||
|
menutrans Split\ Patched\ &By\.\.\. Podziel\ <20>atane\ przez\.\.\.
|
||||||
|
menutrans &Print &Drukuj
|
||||||
|
menutrans Sa&ve-Exit<Tab>:wqa Zapisz\ i\ w&yjd<EFBFBD><Tab>:wqa
|
||||||
|
menutrans E&xit<Tab>:qa &Wyj<EFBFBD>cie<Tab>:qa
|
||||||
|
|
||||||
|
" Edit menu
|
||||||
|
menutrans &Edit &Edycja
|
||||||
|
menutrans &Undo<Tab>u &Cofnij<Tab>u
|
||||||
|
menutrans &Redo<Tab>^R &Pon<EFBFBD>w<Tab>^R
|
||||||
|
menutrans Rep&eat<Tab>\. P&owt<EFBFBD>rz<Tab>\.
|
||||||
|
menutrans Cu&t<Tab>"+x W&ytnij<Tab>"+x
|
||||||
|
menutrans &Copy<Tab>"+y &Kopiuj<Tab>"+y
|
||||||
|
menutrans &Paste<Tab>"+gP &Wklej<Tab>"+gP
|
||||||
|
menutrans Put\ &Before<Tab>[p Wstaw\ p&rzed<Tab>[p
|
||||||
|
menutrans Put\ &After<Tab>]p Wstaw\ p&o<Tab>]p
|
||||||
|
menutrans &Select\ all<Tab>ggVG Z&aznacz\ ca<EFBFBD>o<EFBFBD><EFBFBD><Tab>ggVG
|
||||||
|
menutrans &Find\.\.\. &Szukaj\.\.\.
|
||||||
|
menutrans &Find<Tab>/ &Szukaj<Tab>/
|
||||||
|
menutrans Find\ and\ Rep&lace\.\.\. &Zamie<EFBFBD>\.\.\.
|
||||||
|
menutrans Find\ and\ Rep&lace<Tab>:%s &Zamie<EFBFBD><Tab>:%s
|
||||||
|
menutrans Find\ and\ Rep&lace &Zamie<EFBFBD>
|
||||||
|
menutrans Find\ and\ Rep&lace<Tab>:s &Zamie<EFBFBD><Tab>:s
|
||||||
|
menutrans Options\.\.\. Opcje\.\.\.
|
||||||
|
menutrans Settings\ &Window Ustawienia
|
||||||
|
menutrans &Global\ Settings Ustawienia\ &globalne
|
||||||
|
menutrans F&ile\ Settings Ustawienia\ dla\ pliku
|
||||||
|
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! &Numerowanie\ wierszy<Tab>:set\ nu!
|
||||||
|
menutrans Toggle\ &List\ Mode<Tab>:set\ list! Tryb\ &listowania<Tab>:set\ list!
|
||||||
|
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! Za&wijanie\ wierszy<Tab>:set\ wrap!
|
||||||
|
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! <09>amanie\ wie&rsza<Tab>:set\ lbr!
|
||||||
|
menutrans Toggle\ &expand-tab<Tab>:set\ et! Rozwijani&e\ tabulator<EFBFBD>w<Tab>:set\ et!
|
||||||
|
menutrans Toggle\ &auto-indent<Tab>:set\ ai! &Automatyczne\ wci<EFBFBD>cia<Tab>:set\ ai!
|
||||||
|
menutrans Toggle\ &C-indenting<Tab>:set\ cin! Wci<EFBFBD>cia\ &C<Tab>:set\ cin!
|
||||||
|
menutrans &Shiftwidth &Szeroko<EFBFBD><EFBFBD>\ wci<EFBFBD>cia
|
||||||
|
menutrans Te&xt\ Width\.\.\. D<EFBFBD>ugo<EFBFBD><EFBFBD>\ linii\.\.\.
|
||||||
|
menutrans &File\ Format\.\.\. &Format\ pliku\.\.\.
|
||||||
|
menutrans Soft\ &Tabstop Rozmiar\ &tabulacji
|
||||||
|
menutrans C&olor\ Scheme Zestawy\ kolor<EFBFBD>w
|
||||||
|
menutrans &Keymap Uk<EFBFBD>ady\ klawiatury
|
||||||
|
menutrans None <09>aden
|
||||||
|
menutrans accents akcenty
|
||||||
|
menutrans hebrew hebrajski
|
||||||
|
menutrans hebrewp hebrajski\ p
|
||||||
|
menutrans russian-jcuken rosyjski-jcuken
|
||||||
|
menutrans russian-jcukenwin rosyjski-jcukenwin
|
||||||
|
menutrans russian-yawerty rosyjski-yawerty
|
||||||
|
|
||||||
|
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Podkre<EFBFBD>lanie\ &wzorc<EFBFBD>w<Tab>:set\ hls!
|
||||||
|
|
||||||
|
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! &Ignorowanie\ wielko<EFBFBD>ci<Tab>:set\ ic!
|
||||||
|
menutrans Toggle\ &Showmatch<Tab>:set\ sm! &Pokazywanie\ pasuj<EFBFBD>cych<Tab>:set\ sm!
|
||||||
|
|
||||||
|
menutrans &Context\ lines Wiersze\ &kontekstowe
|
||||||
|
menutrans &Virtual\ Edit Obr<EFBFBD>bka\ &wirtualna
|
||||||
|
|
||||||
|
menutrans Never Nigdy
|
||||||
|
menutrans Block\ Selection Zaznaczanie\ zakresu
|
||||||
|
menutrans Insert\ mode Tryb\ wprowadzania
|
||||||
|
menutrans Block\ and\ Insert Zakres\ i\ wprowadzanie
|
||||||
|
menutrans Always Zawsze
|
||||||
|
|
||||||
|
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! Tryb\ wprowadzania<Tab>:set\ im!
|
||||||
|
menutrans Search\ &Path\.\.\. Scie<EFBFBD>ka\ poszukiwania\.\.\.
|
||||||
|
menutrans Ta&g\ Files\.\.\. Pliki\ tag<EFBFBD>w\.\.\.
|
||||||
|
|
||||||
|
|
||||||
|
"
|
||||||
|
" GUI options
|
||||||
|
menutrans Toggle\ &Toolbar Pasek\ narz<EFBFBD>dzi
|
||||||
|
menutrans Toggle\ &Bottom\ Scrollbar Dolny\ przewijacz
|
||||||
|
menutrans Toggle\ &Left\ Scrollbar &Lewy\ przewijacz
|
||||||
|
menutrans Toggle\ &Right\ Scrollbar P&rawy\ przewijacz
|
||||||
|
|
||||||
|
" Programming menu
|
||||||
|
menutrans &Tools &Narz<EFBFBD>dzia
|
||||||
|
menutrans &Jump\ to\ this\ tag<Tab>g^] &Skocz\ do\ taga<Tab>g^]
|
||||||
|
menutrans Jump\ &back<Tab>^T Skok\ w\ &ty<EFBFBD><Tab>^T
|
||||||
|
menutrans Build\ &Tags\ File &Tw<EFBFBD>rz\ plik\ tag<EFBFBD>w
|
||||||
|
" Folding
|
||||||
|
menutrans &Folding &Zwijanie
|
||||||
|
menutrans &Enable/Disable\ folds<Tab>zi &Zwi<77>/rozwi<EFBFBD><Tab>zi
|
||||||
|
menutrans &View\ Cursor\ Line<Tab>zv &Linia\ kursora<Tab>zv
|
||||||
|
menutrans Vie&w\ Cursor\ Line\ only<Tab>zMzx &Tylko\ linia\ kursora<Tab>zMzx
|
||||||
|
menutrans C&lose\ more\ folds<Tab>zm Zwi<EFBFBD>\ wi<EFBFBD>cej<Tab>zm
|
||||||
|
menutrans &Close\ all\ folds<Tab>zM Z&wi<EFBFBD>\ wszystkie<Tab>zM
|
||||||
|
menutrans &Open\ all\ folds<Tab>zR Rozwi<EFBFBD>\ wszystkie<Tab>zR
|
||||||
|
menutrans O&pen\ more\ folds<Tab>zr R&ozwi<EFBFBD>\ wi<EFBFBD>cej<Tab>zr
|
||||||
|
|
||||||
|
menutrans Create\ &Fold<Tab>zf T&w<EFBFBD>rz\ zawini<EFBFBD>cie<Tab>zf
|
||||||
|
menutrans &Delete\ Fold<Tab>zd U&su<EFBFBD>\ zawini<EFBFBD>cie<Tab>zd
|
||||||
|
menutrans Delete\ &All\ Folds<Tab>zD &Usu<EFBFBD>\ wszystkie\ zawini<EFBFBD>cia<Tab>zD
|
||||||
|
menutrans Fold\ column\ &width Szeroko<EFBFBD><EFBFBD>\ kolumny\ za&wini<EFBFBD><EFBFBD>
|
||||||
|
menutrans Fold\ Met&hod Me&toda\ zawijania
|
||||||
|
menutrans M&anual &R<EFBFBD>cznie
|
||||||
|
menutrans I&ndent W&ci<EFBFBD>cie
|
||||||
|
menutrans E&xpression W&yrazenie
|
||||||
|
menutrans S&yntax S&k<EFBFBD>adnia
|
||||||
|
menutrans Ma&rker Zn&acznik
|
||||||
|
|
||||||
|
" Diff
|
||||||
|
menutrans &Update &Od<EFBFBD>wie<EFBFBD>
|
||||||
|
menutrans &Get\ Block &Pobierz\ blok
|
||||||
|
menutrans &Put\ Block &Wstaw\ blok
|
||||||
|
|
||||||
|
" Make and stuff...
|
||||||
|
menutrans &Make<Tab>:make M&ake<Tab>:make
|
||||||
|
menutrans &List\ Errors<Tab>:cl &Poka<EFBFBD>\ b<EFBFBD><EFBFBD>dy<Tab>:cl
|
||||||
|
menutrans L&ist\ Messages<Tab>:cl! W&ylicz\ powiadomienia<Tab>:cl!
|
||||||
|
menutrans &Next\ Error<Tab>:cn &Nast<EFBFBD>pny\ b<EFBFBD><EFBFBD>d<Tab>:cn
|
||||||
|
menutrans &Previous\ Error<Tab>:cp &Poprzedni\ b<EFBFBD><EFBFBD>d<Tab>:cp
|
||||||
|
menutrans &Older\ List<Tab>:cold &Starsza\ lista<Tab>:cold
|
||||||
|
menutrans N&ewer\ List<Tab>:cnew N&owsza\ lista<Tab>:cnew
|
||||||
|
menutrans Error\ &Window Okno\ komu&nikat<EFBFBD>w
|
||||||
|
menutrans &Update<Tab>:cwin Akt&ualizuj<Tab>:cwin
|
||||||
|
menutrans &Close<Tab>:cclose &Zamknij<Tab>:cclose
|
||||||
|
menutrans &Open<Tab>:copen &Otw<EFBFBD>rz<Tab>:copen
|
||||||
|
|
||||||
|
menutrans &Set\ Compiler U&staw\ kompilator
|
||||||
|
menutrans &Convert\ to\ HEX<Tab>:%!xxd Kody\ szesnastkowe<Tab>:%!xxd
|
||||||
|
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Zwyk<EFBFBD>y\ tekst<Tab>:%!xxd\ -r
|
||||||
|
|
||||||
|
" Names for buffer menu.
|
||||||
|
menutrans &Buffers &Bufory
|
||||||
|
menutrans &Refresh\ menu Od<EFBFBD>wie<EFBFBD>
|
||||||
|
menutrans Delete Skasuj
|
||||||
|
menutrans &Alternate &Zmie<EFBFBD>
|
||||||
|
menutrans &Next &Nast<EFBFBD>pny
|
||||||
|
menutrans &Previous &Poprzedni
|
||||||
|
menutrans [No\ File] [Brak\ Pliku]
|
||||||
|
|
||||||
|
" Window menu
|
||||||
|
menutrans &Window &Widoki
|
||||||
|
menutrans &New<Tab>^Wn &Nowy<Tab>^Wn
|
||||||
|
menutrans S&plit<Tab>^Ws Po&dziel<Tab>^Ws
|
||||||
|
menutrans Sp&lit\ To\ #<Tab>^W^^ P&odziel\ na\ #<Tab>^W^^
|
||||||
|
menutrans Split\ &Vertically<Tab>^Wv Podziel\ pionowo<Tab>^Wv
|
||||||
|
menutrans Split\ File\ E&xplorer Otw<EFBFBD>rz\ mened<EFBFBD>er\ plik<EFBFBD>w
|
||||||
|
|
||||||
|
menutrans &Close<Tab>^Wc &Zamknij<Tab>^Wc
|
||||||
|
menutrans Close\ &Other(s)<Tab>^Wo Zamknij\ &inne<Tab>^Wo
|
||||||
|
menutrans Ne&xt<Tab>^Ww &Nast<EFBFBD>pny<Tab>^Ww
|
||||||
|
menutrans P&revious<Tab>^WW &Poprzedni<Tab>^WW
|
||||||
|
menutrans &Equal\ Size<Tab>^W= &Wyr<EFBFBD>wnaj\ wysoko<EFBFBD>ci<Tab>^W=
|
||||||
|
menutrans &Max\ Height<Tab>^W_ Z&maksymalizuj\ wysoko<EFBFBD><EFBFBD><Tab>^W_
|
||||||
|
menutrans M&in\ Height<Tab>^W1_ Zminim&alizuj\ wysoko<EFBFBD><EFBFBD><Tab>^W1_
|
||||||
|
menutrans Max\ Width<Tab>^W\| Maksymalna\ szeroko<EFBFBD><EFBFBD><Tab>^W\|
|
||||||
|
menutrans Min\ Width<Tab>^W1\| Minimalna\ szeroko<EFBFBD><EFBFBD><Tab>^W1\|
|
||||||
|
menutrans Max\ &Width<Tab>^W\| Zmaksymalizuj\ szeroko<EFBFBD><EFBFBD><Tab>^W\|
|
||||||
|
menutrans Min\ Widt&h<Tab>^W1\| Zminimalizuj\ szeroko<EFBFBD><EFBFBD><Tab>^W1\|
|
||||||
|
menutrans Move\ &To &Id<EFBFBD>\ do
|
||||||
|
menutrans &Top<Tab>^WK &G<EFBFBD>ra<Tab>^WK
|
||||||
|
menutrans &Bottom<Tab>^WJ &D<EFBFBD><EFBFBD><Tab>^WJ
|
||||||
|
menutrans &Left\ side<Tab>^WH &Lewa\ strona<Tab>^WH
|
||||||
|
menutrans &Right\ side<Tab>^WL &Prawa\ strona<Tab>^WL
|
||||||
|
menutrans Rotate\ &Up<Tab>^WR Obr<EFBFBD><EFBFBD>\ w\ &g<EFBFBD>r<EFBFBD><Tab>^WR
|
||||||
|
menutrans Rotate\ &Down<Tab>^Wr Obr<EFBFBD><EFBFBD>\ w\ &d<EFBFBD><EFBFBD><Tab>^Wr
|
||||||
|
menutrans Split\ &Vertically<Tab>^Wv &Podziel\ w\ poziomie<Tab>^Wv
|
||||||
|
menutrans Select\ Fo&nt\.\.\. Wybierz\ &czcionk<EFBFBD>\.\.\.
|
||||||
|
|
||||||
|
" The popup menu
|
||||||
|
menutrans &Undo &Cofnij
|
||||||
|
menutrans Cu&t W&ytnij
|
||||||
|
menutrans &Copy &Kopiuj
|
||||||
|
menutrans &Paste &Wklej
|
||||||
|
menutrans &Delete &Skasuj
|
||||||
|
menutrans Select\ Blockwise Zaznacz\ &blok
|
||||||
|
menutrans Select\ &Word Zaznacz\ &s<EFBFBD>owo
|
||||||
|
menutrans Select\ &Line Zaznacz\ w&iersz
|
||||||
|
menutrans Select\ &Block Zaznacz\ &blok
|
||||||
|
menutrans Select\ &All Zaznacz\ c&a<EFBFBD>o<EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
" The GUI toolbar
|
||||||
|
if has("toolbar")
|
||||||
|
if exists("*Do_toolbar_tmenu")
|
||||||
|
delfun Do_toolbar_tmenu
|
||||||
|
endif
|
||||||
|
fun Do_toolbar_tmenu()
|
||||||
|
tmenu ToolBar.Open Otw<EFBFBD>rz plik
|
||||||
|
tmenu ToolBar.Save Zapisz bie<EFBFBD><EFBFBD>cy plik
|
||||||
|
tmenu ToolBar.SaveAll Zapisz wszystkie pliki
|
||||||
|
tmenu ToolBar.Print Drukuj
|
||||||
|
tmenu ToolBar.Undo Cofnij
|
||||||
|
tmenu ToolBar.Redo Pon<EFBFBD>w
|
||||||
|
tmenu ToolBar.Cut Wytnij
|
||||||
|
tmenu ToolBar.Copy Skopiuj
|
||||||
|
tmenu ToolBar.Paste Wklej
|
||||||
|
tmenu ToolBar.Find Szukaj...
|
||||||
|
tmenu ToolBar.FindNext Szukaj nast<EFBFBD>pnego
|
||||||
|
tmenu ToolBar.FindPrev Szukaj poprzedniego
|
||||||
|
tmenu ToolBar.Replace Szukaj i zamieniaj...
|
||||||
|
if 0 " disabled; These are in the Windows menu
|
||||||
|
tmenu ToolBar.New Nowy widok
|
||||||
|
tmenu ToolBar.WinSplit Podziel widok
|
||||||
|
tmenu ToolBar.WinMax Zmaksymalizuj widok
|
||||||
|
tmenu ToolBar.WinMin Zminimalizuj widok
|
||||||
|
tmenu ToolBar.WinClose Zamknij widok
|
||||||
|
endif
|
||||||
|
tmenu ToolBar.LoadSesn Za<EFBFBD>aduj sesj<EFBFBD>
|
||||||
|
tmenu ToolBar.SaveSesn Zachowaj bie<EFBFBD><EFBFBD>c<EFBFBD> sesj<EFBFBD>
|
||||||
|
tmenu ToolBar.RunScript Uruchom skrypt Vima
|
||||||
|
tmenu ToolBar.Make Wykonaj bie<EFBFBD><EFBFBD>cy projekt
|
||||||
|
tmenu ToolBar.Shell Otw<EFBFBD>rz pow<EFBFBD>ok<EFBFBD>
|
||||||
|
tmenu ToolBar.RunCtags Tw<EFBFBD>rz tagi w bie<EFBFBD><EFBFBD>cym katalogu
|
||||||
|
tmenu ToolBar.TagJump Skok do taga pod kursorem
|
||||||
|
tmenu ToolBar.Help Pomoc Vima
|
||||||
|
tmenu ToolBar.FindHelp Przeszukuj pomoc Vim-a
|
||||||
|
endfun
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Syntax menu
|
||||||
|
menutrans &Show\ filetypes\ in\ menu &Pokazuj\ rodzaj\ pliku\ w\ menue
|
||||||
|
menutrans &Syntax &Sk<EFBFBD>adnia
|
||||||
|
menutrans Set\ '&syntax'\ only Ustaw\ tylko\ '&syntax'
|
||||||
|
menutrans Set\ '&filetype'\ too Ustaw\ r<EFBFBD>wnie<EFBFBD>\ '&filetype'
|
||||||
|
menutrans &Off &Wy<EFBFBD><EFBFBD>cz
|
||||||
|
menutrans &Manual &R<EFBFBD>cznie
|
||||||
|
menutrans A&utomatic A&utomatyczne
|
||||||
|
menutrans on/off\ for\ &This\ file w<><77>cz/w&y<EFBFBD><EFBFBD>cz\ dla\ pliku
|
||||||
|
menutrans Co&lor\ test Test\ &kolor<EFBFBD>w
|
||||||
|
menutrans &Highlight\ test &Test\ pod<EFBFBD>wietlania
|
||||||
|
menutrans &Convert\ to\ HTML Przetw<EFBFBD>rz\ na\ &HTML
|
||||||
|
|
||||||
|
" dialog texts
|
||||||
|
let menutrans_no_file = "[Brak pliku]"
|
||||||
|
let menutrans_help_dialog = "Wprowad<61> komend<6E> lub s<>owo, aby otrzyma<6D> pomoc o:\n\nPrzedrostek i_ oznacza komend<6E> trybu Wprowadzania (np. i_CTRL-X)\nPrzedrostek c_ oznacza komend<6E> edycji wiersza komend (np. c_<Del>)\nPrzedrostek ' oznacza nazw<7A> opcji (np. 'shiftwidth')"
|
||||||
|
let g:menutrans_path_dialog = "Wprowad<61> <20>cie<69>k<EFBFBD> poszukiwania plik<69>w.\nProsz<73> rozdziela<6C> nazwy katalog<6F>w przecinkiem."
|
||||||
|
let g:menutrans_tags_dialog = "Podaj nazwy plik<69>w tag<61>w.\nProsz<73> rozdziela<6C> nazwy przecinkiem."
|
||||||
|
let g:menutrans_textwidth_dialog = "Wprowad<61> now<6F> szeroko<6B><6F> tekstu (0 wy<77><79>cza przewijanie): "
|
||||||
|
let g:menutrans_fileformat_dialog = "Wybierz format w kt<6B>rym ten plik ma by<62> zapisany"
|
@ -382,7 +382,7 @@ if has("keymap")
|
|||||||
endif
|
endif
|
||||||
unlet s:n
|
unlet s:n
|
||||||
endif
|
endif
|
||||||
if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_photon") || has("gui_mac")
|
if has("win32") || has("win16") || has("gui_motif") || has("gui_gtk") || has("gui_kde") || has("gui_photon") || has("gui_mac")
|
||||||
an 20.470 &Edit.Select\ Fo&nt\.\.\. :set guifont=*<CR>
|
an 20.470 &Edit.Select\ Fo&nt\.\.\. :set guifont=*<CR>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
185
runtime/plugin/tar.vim
Normal file
185
runtime/plugin/tar.vim
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
" vim:set ts=4 sw=4 ai nobackup:
|
||||||
|
|
||||||
|
" tar.vim -- a vim plugin for browsing tarfiles
|
||||||
|
" Copyright (c) 2002, Michael C. Toren <mct@toren.net>
|
||||||
|
"
|
||||||
|
" Updates are available from <http://michael.toren.net/code/>. If you
|
||||||
|
" find this script useful, or have suggestions for improvements, please
|
||||||
|
" let me know.
|
||||||
|
"
|
||||||
|
" Usage:
|
||||||
|
" Once this script is installed, attempting to edit a tarfile will present
|
||||||
|
" the user with a list of files contained in the tar archive. By moving the
|
||||||
|
" cursor over a filename and pressing ENTER, the contents of a file can be
|
||||||
|
" viewed in read-only mode, in a new window. Unfortunately, write support
|
||||||
|
" for tarfile components is not currently possible.
|
||||||
|
"
|
||||||
|
" Requirements:
|
||||||
|
" GNU tar, or a tar implementation that supports the "P" (don't strip
|
||||||
|
" out leading /'s from filenames), and "O" (extract files to standard
|
||||||
|
" output) options. Additionally, gzip is required for handling *.tar.Z,
|
||||||
|
" *.tar.gz, and *.tgz compressed tarfiles, and bzip2 is required for
|
||||||
|
" handling *.tar.bz2 compressed tarfiles. A unix-like operating system
|
||||||
|
" is probably also required.
|
||||||
|
"
|
||||||
|
" Installation:
|
||||||
|
" Place this file, tar.vim, in your $HOME/.vim/plugin directory, and
|
||||||
|
" either restart vim, or execute ":source $HOME/.vim/plugin/tar.vim"
|
||||||
|
"
|
||||||
|
" Todo:
|
||||||
|
" - Handle zipfiles?
|
||||||
|
" - Implement write support, somehow.
|
||||||
|
"
|
||||||
|
" License:
|
||||||
|
" This program is free software; you can redistribute it and/or modify it
|
||||||
|
" under the terms of the GNU General Public License, version 2, as published
|
||||||
|
" by the Free Software Foundation.
|
||||||
|
"
|
||||||
|
" This program is distributed in the hope that it will be useful, but
|
||||||
|
" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||||
|
" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
" for more details.
|
||||||
|
"
|
||||||
|
" A copy of the GNU GPL is available as /usr/doc/copyright/GPL on Debian
|
||||||
|
" systems, or on the World Wide Web at http://www.gnu.org/copyleft/gpl.html
|
||||||
|
" You can also obtain it by writing to the Free Software Foundation, Inc.,
|
||||||
|
" 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
|
"
|
||||||
|
" Changelog:
|
||||||
|
" Tue Dec 31 13:38:08 EST 2002 First release to beta testers
|
||||||
|
" Sat Jan 4 14:06:19 EST 2003 Version 1.00 released
|
||||||
|
|
||||||
|
let s:version = "1.00"
|
||||||
|
|
||||||
|
if has("autocmd")
|
||||||
|
augroup tar
|
||||||
|
au!
|
||||||
|
au BufReadCmd tarfile:* call s:TarRead(expand("<afile>"), 1)
|
||||||
|
au BufReadCmd tarfile:*/* call s:TarRead(expand("<afile>"), 1)
|
||||||
|
au FileReadCmd tarfile:* call s:TarRead(expand("<afile>"), 0)
|
||||||
|
au FileReadCmd tarfile:*/* call s:TarRead(expand("<afile>"), 0)
|
||||||
|
|
||||||
|
au BufWriteCmd tarfile:* call s:TarWrite(expand("<afile>"))
|
||||||
|
au BufWriteCmd tarfile:*/* call s:TarWrite(expand("<afile>"))
|
||||||
|
au FileWriteCmd tarfile:* call s:TarWrite(expand("<afile>"))
|
||||||
|
au FileWriteCmd tarfile:*/* call s:TarWrite(expand("<afile>"))
|
||||||
|
|
||||||
|
au BufReadCmd *.tar call s:TarBrowse(expand("<afile>"))
|
||||||
|
au BufReadCmd *.tar.gz call s:TarBrowse(expand("<afile>"))
|
||||||
|
au BufReadCmd *.tar.bz2 call s:TarBrowse(expand("<afile>"))
|
||||||
|
au BufReadCmd *.tar.Z call s:TarBrowse(expand("<afile>"))
|
||||||
|
au BufReadCmd *.tgz call s:TarBrowse(expand("<afile>"))
|
||||||
|
augroup END
|
||||||
|
endif
|
||||||
|
|
||||||
|
function! s:TarWrite(argument)
|
||||||
|
echo "ERROR: Sorry, no write support for tarfiles yet"
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:TarRead(argument, cleanup)
|
||||||
|
let l:argument = a:argument
|
||||||
|
let l:argument = substitute(l:argument, '^tarfile:', '', '')
|
||||||
|
let l:argument = substitute(l:argument, '^\~', $HOME, '')
|
||||||
|
|
||||||
|
let l:tarfile = l:argument
|
||||||
|
while 1
|
||||||
|
if (l:tarfile == "" || l:tarfile == "/")
|
||||||
|
echo "ERROR: Could not find a readable tarfile in path:" l:argument
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
if filereadable(l:tarfile) " found it!
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
|
||||||
|
let l:tarfile = fnamemodify(l:tarfile, ":h")
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
let l:toextract = strpart(l:argument, strlen(l:tarfile) + 1)
|
||||||
|
|
||||||
|
if (l:toextract == "")
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
let l:cat = s:TarCatCommand(l:tarfile)
|
||||||
|
execute "r !" . l:cat . " < '" . l:tarfile . "'"
|
||||||
|
\ " | tar OPxf - '" . l:toextract . "'"
|
||||||
|
|
||||||
|
if (a:cleanup)
|
||||||
|
0d "blank line
|
||||||
|
execute "doautocmd BufReadPost " . expand("%")
|
||||||
|
setlocal readonly
|
||||||
|
silent preserve
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:TarBrowse(tarfile)
|
||||||
|
setlocal noswapfile
|
||||||
|
setlocal buftype=nofile
|
||||||
|
setlocal bufhidden=hide
|
||||||
|
setlocal filetype=
|
||||||
|
setlocal nobuflisted
|
||||||
|
setlocal buftype=nofile
|
||||||
|
setlocal wrap
|
||||||
|
|
||||||
|
let l:tarfile = a:tarfile
|
||||||
|
let b:tarfile = l:tarfile
|
||||||
|
let l:cat = s:TarCatCommand(l:tarfile)
|
||||||
|
|
||||||
|
if ! filereadable(l:tarfile)
|
||||||
|
let l:tarfile = substitute(l:tarfile, '^tarfile:', '', '')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ! filereadable(l:tarfile)
|
||||||
|
echo "ERROR: File not readable:" l:tarfile
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
call s:Say("\" tar.vim version " . s:version)
|
||||||
|
call s:Say("\" Browsing tarfile " . l:tarfile)
|
||||||
|
call s:Say("\" Hit ENTER to view contents in new window")
|
||||||
|
call s:Say("")
|
||||||
|
|
||||||
|
silent execute "r!" . l:cat . "<'" . l:tarfile . "'| tar Ptf - "
|
||||||
|
0d "blank line
|
||||||
|
/^$/1
|
||||||
|
|
||||||
|
setlocal readonly
|
||||||
|
setlocal nomodifiable
|
||||||
|
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:TarBrowseSelect()
|
||||||
|
let l:line = getline(".")
|
||||||
|
|
||||||
|
if (l:line =~ '^" ')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
if (l:line =~ '/$')
|
||||||
|
echo "Please specify a file, not a directory"
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
let l:selection = "tarfile:" . b:tarfile . "/" . l:line
|
||||||
|
new
|
||||||
|
wincmd _
|
||||||
|
execute "e " . l:selection
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" kludge to deal with compressed archives
|
||||||
|
function! s:TarCatCommand(tarfile)
|
||||||
|
if a:tarfile =~# '\.\(gz\|tgz\|Z\)$'
|
||||||
|
let l:cat = "gzip -d -c"
|
||||||
|
elseif a:tarfile =~# '\.bz2$'
|
||||||
|
let l:cat = "bzip2 -d -c"
|
||||||
|
else
|
||||||
|
let l:cat = "cat"
|
||||||
|
endif
|
||||||
|
return l:cat
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:Say(string)
|
||||||
|
let @" = a:string
|
||||||
|
$ put
|
||||||
|
endfunction
|
@ -2,8 +2,9 @@
|
|||||||
" Language: BIND 8.x configuration file
|
" Language: BIND 8.x configuration file
|
||||||
" Maintainer: glory hump <rnd@web-drive.ru>
|
" Maintainer: glory hump <rnd@web-drive.ru>
|
||||||
" Last change: Mon May 21 04:51:01 SAMST 2001
|
" Last change: Mon May 21 04:51:01 SAMST 2001
|
||||||
|
" Updated: by Martin Dalecki 2004-12-31
|
||||||
" Filenames: named.conf
|
" Filenames: named.conf
|
||||||
" URL: http://rnd.web-drive.ru/vim/syntax/named.vim
|
" URL: http://rnd.web-drive.ru/vim/syntax/named.vim [DEFUNCT]
|
||||||
" $Id$
|
" $Id$
|
||||||
"
|
"
|
||||||
" NOTE
|
" NOTE
|
||||||
@ -33,10 +34,11 @@ set cpo-=C
|
|||||||
" BIND configuration file
|
" BIND configuration file
|
||||||
|
|
||||||
syn match namedComment "//.*"
|
syn match namedComment "//.*"
|
||||||
|
syn match namedComment "#.*"
|
||||||
syn region namedComment start="/\*" end="\*/"
|
syn region namedComment start="/\*" end="\*/"
|
||||||
syn region namedString start=/"/ end=/"/ contained
|
syn region namedString start=/"/ end=/"/ contained
|
||||||
" --- omitted trailing semicolon FIXME
|
" --- omitted trailing semicolon
|
||||||
syn match namedError /[^;{]$/
|
syn match namedError /[^;{#]$/
|
||||||
|
|
||||||
" --- top-level keywords
|
" --- top-level keywords
|
||||||
|
|
||||||
|
13
src/Makefile
13
src/Makefile
@ -1089,9 +1089,11 @@ GTK_MAN_TARGETS = yes
|
|||||||
GTK_TESTTARGET = gui
|
GTK_TESTTARGET = gui
|
||||||
|
|
||||||
### Motif GUI
|
### Motif GUI
|
||||||
MOTIF_SRC = gui.c gui_motif.c gui_x11.c pty.c gui_beval.c
|
MOTIF_SRC = gui.c gui_motif.c gui_x11.c pty.c gui_beval.c \
|
||||||
|
gui_xmdlg.c
|
||||||
MOTIF_OBJ = objects/gui.o objects/gui_motif.o objects/gui_x11.o \
|
MOTIF_OBJ = objects/gui.o objects/gui_motif.o objects/gui_x11.o \
|
||||||
objects/pty.o objects/gui_beval.o
|
objects/pty.o objects/gui_beval.o \
|
||||||
|
objects/gui_xmdlg.o
|
||||||
MOTIF_DEFS = -DFEAT_GUI_MOTIF $(NARROW_PROTO)
|
MOTIF_DEFS = -DFEAT_GUI_MOTIF $(NARROW_PROTO)
|
||||||
MOTIF_IPATH = $(GUI_INC_LOC)
|
MOTIF_IPATH = $(GUI_INC_LOC)
|
||||||
MOTIF_LIBS_DIR = $(GUI_LIB_LOC)
|
MOTIF_LIBS_DIR = $(GUI_LIB_LOC)
|
||||||
@ -1203,8 +1205,8 @@ CARBONGUI_BUNDLE = $(VIMNAME).app
|
|||||||
CARBONGUI_TESTARG = VIMPROG=../$(CARBONGUI_BUNDLE)/Contents/MacOS/$(VIMTARGET)
|
CARBONGUI_TESTARG = VIMPROG=../$(CARBONGUI_BUNDLE)/Contents/MacOS/$(VIMTARGET)
|
||||||
|
|
||||||
# All GUI files
|
# All GUI files
|
||||||
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c pty.c gui_kde.cc gui_kde_wid.cc gui_kde_x11.cc gui_kde_wid_moc.cc
|
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c pty.c gui_kde.cc gui_kde_wid.cc gui_kde_x11.cc gui_kde_wid_moc.cc
|
||||||
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_amiga.pro gui_photon.pro
|
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_amiga.pro gui_photon.pro
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
@ -2194,6 +2196,9 @@ objects/gui_gtk_x11.o: gui_gtk_x11.c
|
|||||||
objects/gui_motif.o: gui_motif.c
|
objects/gui_motif.o: gui_motif.c
|
||||||
$(CCC) -o $@ gui_motif.c
|
$(CCC) -o $@ gui_motif.c
|
||||||
|
|
||||||
|
objects/gui_xmdlg.o: gui_xmdlg.c
|
||||||
|
$(CCC) -o $@ gui_xmdlg.c
|
||||||
|
|
||||||
objects/gui_x11.o: gui_x11.c
|
objects/gui_x11.o: gui_x11.c
|
||||||
$(CCC) -o $@ gui_x11.c
|
$(CCC) -o $@ gui_x11.c
|
||||||
|
|
||||||
|
@ -1238,6 +1238,7 @@ gui_mch_get_font(char_u *name, int giveErrorIfMissing)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Return the name of font "font" in allocated memory.
|
* Return the name of font "font" in allocated memory.
|
||||||
* We always use the default font.
|
* We always use the default font.
|
||||||
@ -1247,6 +1248,7 @@ gui_mch_get_fontname(GuiFont font, char_u *name)
|
|||||||
{
|
{
|
||||||
return vim_strsave((char_u *)"default");
|
return vim_strsave((char_u *)"default");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
gui_mch_set_font(GuiFont font)
|
gui_mch_set_font(GuiFont font)
|
||||||
|
@ -2396,6 +2396,7 @@ error:
|
|||||||
return (GuiFont)font;
|
return (GuiFont)font;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Return the name of font "font" in allocated memory.
|
* Return the name of font "font" in allocated memory.
|
||||||
*/
|
*/
|
||||||
@ -2404,6 +2405,7 @@ gui_mch_get_fontname(GuiFont font, char_u *name)
|
|||||||
{
|
{
|
||||||
return vim_strsave(((VimFont *)font)->name);
|
return vim_strsave(((VimFont *)font)->name);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the current text font.
|
* Set the current text font.
|
||||||
|
@ -700,6 +700,7 @@ gui_mch_get_font(char_u * name, int report_error)//{{{
|
|||||||
return (GuiFont) myFont;
|
return (GuiFont) myFont;
|
||||||
}//}}}
|
}//}}}
|
||||||
|
|
||||||
|
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Return the name of font "font" in allocated memory.
|
* Return the name of font "font" in allocated memory.
|
||||||
* Don't know how to get the actual name, thus use the provided name.
|
* Don't know how to get the actual name, thus use the provided name.
|
||||||
@ -711,6 +712,7 @@ gui_mch_get_fontname(GuiFont font, char_u *name)//{{{
|
|||||||
return NULL;
|
return NULL;
|
||||||
return vim_strsave(name);
|
return vim_strsave(name);
|
||||||
}//}}}
|
}//}}}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the current text font.
|
* Set the current text font.
|
||||||
|
@ -3569,6 +3569,7 @@ gui_mch_get_font(name, giveErrorIfMissing)
|
|||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Return the name of font "font" in allocated memory.
|
* Return the name of font "font" in allocated memory.
|
||||||
* Don't know how to get the actual name, thus use the provided name.
|
* Don't know how to get the actual name, thus use the provided name.
|
||||||
@ -3582,6 +3583,7 @@ gui_mch_get_fontname(font, name)
|
|||||||
return NULL;
|
return NULL;
|
||||||
return vim_strsave(name);
|
return vim_strsave(name);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the current text font.
|
* Set the current text font.
|
||||||
|
608
src/gui_motif.c
608
src/gui_motif.c
@ -93,9 +93,6 @@ static void attachDump(Widget, char *);
|
|||||||
|
|
||||||
static void gui_motif_menu_colors __ARGS((Widget id));
|
static void gui_motif_menu_colors __ARGS((Widget id));
|
||||||
static void gui_motif_scroll_colors __ARGS((Widget id));
|
static void gui_motif_scroll_colors __ARGS((Widget id));
|
||||||
#ifdef FEAT_MENU
|
|
||||||
static void gui_motif_menu_fontlist __ARGS((Widget id));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (XmVersion >= 1002)
|
#if (XmVersion >= 1002)
|
||||||
# define STRING_TAG XmFONTLIST_DEFAULT_TAG
|
# define STRING_TAG XmFONTLIST_DEFAULT_TAG
|
||||||
@ -125,17 +122,122 @@ scroll_cb(w, client_data, call_data)
|
|||||||
gui_drag_scrollbar(sb, value, dragging);
|
gui_drag_scrollbar(sb, value, dragging);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* End of call-back routines
|
* End of call-back routines
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef LESSTIF_VERSION
|
||||||
|
/*
|
||||||
|
* Implement three dimensional shading of insensitive labels.
|
||||||
|
* By Martin Dalecki.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Xm/XmP.h>
|
||||||
|
#include <Xm/LabelP.h>
|
||||||
|
|
||||||
|
static XtExposeProc old_label_expose = NULL;
|
||||||
|
|
||||||
|
static void label_expose __ARGS((Widget _w, XEvent *_event, Region _region));
|
||||||
|
|
||||||
|
static void
|
||||||
|
label_expose(_w, _event, _region)
|
||||||
|
Widget _w;
|
||||||
|
XEvent *_event;
|
||||||
|
Region _region;
|
||||||
|
{
|
||||||
|
GC insensitiveGC;
|
||||||
|
XmLabelWidget lw = (XmLabelWidget)_w;
|
||||||
|
unsigned char label_type = XmSTRING;
|
||||||
|
|
||||||
|
XtVaGetValues(_w, XmNlabelType, &label_type, (XtPointer)0);
|
||||||
|
|
||||||
|
if (XtIsSensitive(_w) || label_type != XmSTRING)
|
||||||
|
(*old_label_expose)(_w, _event, _region);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XGCValues values;
|
||||||
|
XtGCMask mask;
|
||||||
|
XtGCMask dynamic;
|
||||||
|
XFontStruct *fs;
|
||||||
|
|
||||||
|
_XmFontListGetDefaultFont(lw->label.font, &fs);
|
||||||
|
|
||||||
|
/* FIXME: we should be doing the whole drawing ourself here. */
|
||||||
|
insensitiveGC = lw->label.insensitive_GC;
|
||||||
|
|
||||||
|
mask = GCForeground | GCBackground | GCGraphicsExposures;
|
||||||
|
dynamic = GCClipMask | GCClipXOrigin | GCClipYOrigin;
|
||||||
|
values.graphics_exposures = False;
|
||||||
|
|
||||||
|
if (fs != 0)
|
||||||
|
{
|
||||||
|
mask |= GCFont;
|
||||||
|
values.font = fs->fid;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lw->primitive.top_shadow_pixmap != None
|
||||||
|
&& lw->primitive.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
|
||||||
|
{
|
||||||
|
mask |= GCFillStyle | GCTile;
|
||||||
|
values.fill_style = FillTiled;
|
||||||
|
values.tile = lw->primitive.top_shadow_pixmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
lw->label.TextRect.x += 1;
|
||||||
|
lw->label.TextRect.y += 1;
|
||||||
|
if (lw->label._acc_text != 0)
|
||||||
|
{
|
||||||
|
lw->label.acc_TextRect.x += 1;
|
||||||
|
lw->label.acc_TextRect.y += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
values.foreground = lw->primitive.top_shadow_color;
|
||||||
|
values.background = lw->core.background_pixel;
|
||||||
|
|
||||||
|
lw->label.insensitive_GC =
|
||||||
|
XtAllocateGC((Widget) lw, 0, mask, &values, dynamic, 0);
|
||||||
|
(*old_label_expose)(_w, _event, _region);
|
||||||
|
XtReleaseGC(_w, lw->label.insensitive_GC);
|
||||||
|
|
||||||
|
lw->label.TextRect.x -= 1;
|
||||||
|
lw->label.TextRect.y -= 1;
|
||||||
|
if (lw->label._acc_text != 0)
|
||||||
|
{
|
||||||
|
lw->label.acc_TextRect.x -= 1;
|
||||||
|
lw->label.acc_TextRect.y -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
values.foreground = lw->primitive.bottom_shadow_color;
|
||||||
|
values.background = lw->core.background_pixel;
|
||||||
|
|
||||||
|
lw->label.insensitive_GC =
|
||||||
|
XtAllocateGC((Widget) lw, 0, mask, &values, dynamic, 0);
|
||||||
|
(*old_label_expose)(_w, _event, _region);
|
||||||
|
XtReleaseGC(_w, lw->label.insensitive_GC);
|
||||||
|
|
||||||
|
lw->label.insensitive_GC = insensitiveGC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create all the motif widgets necessary.
|
* Create all the motif widgets necessary.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gui_x11_create_widgets()
|
gui_x11_create_widgets()
|
||||||
{
|
{
|
||||||
|
#ifndef LESSTIF_VERSION
|
||||||
|
/*
|
||||||
|
* Install the 3D shade effect drawing routines.
|
||||||
|
*/
|
||||||
|
if (old_label_expose == NULL)
|
||||||
|
{
|
||||||
|
old_label_expose = xmLabelWidgetClass->core_class.expose;
|
||||||
|
xmLabelWidgetClass->core_class.expose = label_expose;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Start out by adding the configured border width into the border offset
|
* Start out by adding the configured border width into the border offset
|
||||||
*/
|
*/
|
||||||
@ -329,9 +431,7 @@ gui_x11_set_back_color()
|
|||||||
* Manage dialog centered on pointer. This could be used by the Athena code as
|
* Manage dialog centered on pointer. This could be used by the Athena code as
|
||||||
* well.
|
* well.
|
||||||
*/
|
*/
|
||||||
static void manage_centered __ARGS((Widget dialog_child));
|
void
|
||||||
|
|
||||||
static void
|
|
||||||
manage_centered(dialog_child)
|
manage_centered(dialog_child)
|
||||||
Widget dialog_child;
|
Widget dialog_child;
|
||||||
{
|
{
|
||||||
@ -855,16 +955,15 @@ gui_mch_add_menu_item(menu, idx)
|
|||||||
xms = XmStringCreate((char *)menu->dname, STRING_TAG);
|
xms = XmStringCreate((char *)menu->dname, STRING_TAG);
|
||||||
XtSetArg(args[n], XmNlabelString, xms); n++;
|
XtSetArg(args[n], XmNlabelString, xms); n++;
|
||||||
|
|
||||||
#ifndef FEAT_SUN_WORKSHOP
|
|
||||||
|
|
||||||
/* Without shadows one can't sense whatever the button has been
|
/* Without shadows one can't sense whatever the button has been
|
||||||
* pressed or not! However we wan't to save a bit of space...
|
* pressed or not! However we wan't to save a bit of space...
|
||||||
|
* Need the highlightThickness to see the focus.
|
||||||
*/
|
*/
|
||||||
XtSetArg(args[n], XmNhighlightThickness, 0); n++;
|
XtSetArg(args[n], XmNhighlightThickness, 1); n++;
|
||||||
XtSetArg(args[n], XmNhighlightOnEnter, True); n++;
|
XtSetArg(args[n], XmNhighlightOnEnter, True); n++;
|
||||||
XtSetArg(args[n], XmNmarginWidth, 0); n++;
|
XtSetArg(args[n], XmNmarginWidth, 0); n++;
|
||||||
XtSetArg(args[n], XmNmarginHeight, 0); n++;
|
XtSetArg(args[n], XmNmarginHeight, 0); n++;
|
||||||
#endif
|
|
||||||
if (menu->image == 0)
|
if (menu->image == 0)
|
||||||
{
|
{
|
||||||
XtSetArg(args[n], XmNlabelType, XmSTRING); n++;
|
XtSetArg(args[n], XmNlabelType, XmSTRING); n++;
|
||||||
@ -1384,7 +1483,6 @@ gui_mch_create_scrollbar(sb, orient)
|
|||||||
int n;
|
int n;
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
XtSetArg(args[n], XmNshadowThickness, 1); n++;
|
|
||||||
XtSetArg(args[n], XmNminimum, 0); n++;
|
XtSetArg(args[n], XmNminimum, 0); n++;
|
||||||
XtSetArg(args[n], XmNorientation,
|
XtSetArg(args[n], XmNorientation,
|
||||||
(orient == SBAR_VERT) ? XmVERTICAL : XmHORIZONTAL); n++;
|
(orient == SBAR_VERT) ? XmVERTICAL : XmHORIZONTAL); n++;
|
||||||
@ -1484,6 +1582,219 @@ gui_x11_get_wid()
|
|||||||
return(XtWindow(textArea));
|
return(XtWindow(textArea));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Look for a widget in the widget tree w, with a mnemonic matching keycode.
|
||||||
|
* When one is found, simulate a button press on that widget and give it the
|
||||||
|
* keyboard focus. If the mnemonic is on a label, look in the userData field
|
||||||
|
* of the label to see if it points to another widget, and give that the focus.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
do_mnemonic(Widget w, unsigned int keycode)
|
||||||
|
{
|
||||||
|
WidgetList children;
|
||||||
|
int numChildren, i;
|
||||||
|
Boolean isMenu;
|
||||||
|
KeySym mnemonic = '\0';
|
||||||
|
char mneString[2];
|
||||||
|
Widget userData;
|
||||||
|
unsigned char rowColType;
|
||||||
|
|
||||||
|
if (XtIsComposite(w))
|
||||||
|
{
|
||||||
|
if (XtClass(w) == xmRowColumnWidgetClass)
|
||||||
|
{
|
||||||
|
XtVaGetValues(w, XmNrowColumnType, &rowColType, 0);
|
||||||
|
isMenu = (rowColType != (unsigned char)XmWORK_AREA);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
isMenu = False;
|
||||||
|
if (!isMenu)
|
||||||
|
{
|
||||||
|
XtVaGetValues(w, XmNchildren, &children, XmNnumChildren,
|
||||||
|
&numChildren, 0);
|
||||||
|
for (i = 0; i < numChildren; i++)
|
||||||
|
do_mnemonic(children[i], keycode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XtVaGetValues(w, XmNmnemonic, &mnemonic, 0);
|
||||||
|
if (mnemonic != '\0')
|
||||||
|
{
|
||||||
|
mneString[0] = mnemonic;
|
||||||
|
mneString[1] = '\0';
|
||||||
|
if (XKeysymToKeycode(XtDisplay(XtParent(w)),
|
||||||
|
XStringToKeysym(mneString)) == keycode)
|
||||||
|
{
|
||||||
|
if (XtClass(w) == xmLabelWidgetClass
|
||||||
|
|| XtClass(w) == xmLabelGadgetClass)
|
||||||
|
{
|
||||||
|
XtVaGetValues(w, XmNuserData, &userData, 0);
|
||||||
|
if (userData != NULL && XtIsWidget(userData))
|
||||||
|
XmProcessTraversal(userData, XmTRAVERSE_CURRENT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XKeyPressedEvent keyEvent;
|
||||||
|
|
||||||
|
XmProcessTraversal(w, XmTRAVERSE_CURRENT);
|
||||||
|
|
||||||
|
memset((char *) &keyEvent, 0, sizeof(XKeyPressedEvent));
|
||||||
|
keyEvent.type = KeyPress;
|
||||||
|
keyEvent.serial = 1;
|
||||||
|
keyEvent.send_event = True;
|
||||||
|
keyEvent.display = XtDisplay(w);
|
||||||
|
keyEvent.window = XtWindow(w);
|
||||||
|
XtCallActionProc(w, "Activate", (XEvent *) & keyEvent,
|
||||||
|
NULL, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Callback routine for dialog mnemonic processing.
|
||||||
|
*/
|
||||||
|
/*ARGSUSED*/
|
||||||
|
static void
|
||||||
|
mnemonic_event(Widget w, XtPointer call_data, XKeyEvent *event)
|
||||||
|
{
|
||||||
|
do_mnemonic(w, event->keycode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Search the widget tree under w for widgets with mnemonics. When found, add
|
||||||
|
* a passive grab to the dialog widget for the mnemonic character, thus
|
||||||
|
* directing mnemonic events to the dialog widget.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
add_mnemonic_grabs(Widget dialog, Widget w)
|
||||||
|
{
|
||||||
|
char mneString[2];
|
||||||
|
WidgetList children;
|
||||||
|
int numChildren, i;
|
||||||
|
Boolean isMenu;
|
||||||
|
KeySym mnemonic = '\0';
|
||||||
|
unsigned char rowColType;
|
||||||
|
|
||||||
|
if (XtIsComposite(w))
|
||||||
|
{
|
||||||
|
if (XtClass(w) == xmRowColumnWidgetClass)
|
||||||
|
{
|
||||||
|
XtVaGetValues(w, XmNrowColumnType, &rowColType, 0);
|
||||||
|
isMenu = (rowColType != (unsigned char)XmWORK_AREA);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
isMenu = False;
|
||||||
|
if (!isMenu)
|
||||||
|
{
|
||||||
|
XtVaGetValues(w, XmNchildren, &children, XmNnumChildren,
|
||||||
|
&numChildren, 0);
|
||||||
|
for (i = 0; i < numChildren; i++)
|
||||||
|
add_mnemonic_grabs(dialog, children[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XtVaGetValues(w, XmNmnemonic, &mnemonic, 0);
|
||||||
|
if (mnemonic != '\0')
|
||||||
|
{
|
||||||
|
mneString[0] = mnemonic;
|
||||||
|
mneString[1] = '\0';
|
||||||
|
XtGrabKey(dialog, XKeysymToKeycode(XtDisplay(dialog),
|
||||||
|
XStringToKeysym(mneString)),
|
||||||
|
Mod1Mask, True, GrabModeAsync, GrabModeAsync);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add a handler for mnemonics in a dialog. Motif itself only handles
|
||||||
|
* mnemonics in menus. Mnemonics added or changed after this call will be
|
||||||
|
* ignored.
|
||||||
|
*
|
||||||
|
* To add a mnemonic to a text field or list, set the XmNmnemonic resource on
|
||||||
|
* the appropriate label and set the XmNuserData resource of the label to the
|
||||||
|
* widget to get the focus when the mnemonic is typed.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
activate_dialog_mnemonics(Widget dialog)
|
||||||
|
{
|
||||||
|
if (!dialog)
|
||||||
|
return;
|
||||||
|
|
||||||
|
XtAddEventHandler(dialog, KeyPressMask, False,
|
||||||
|
(XtEventHandler) mnemonic_event, (XtPointer) NULL);
|
||||||
|
add_mnemonic_grabs(dialog, dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Removes the event handler and key-grabs for dialog mnemonic handling.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
suppress_dialog_mnemonics(Widget dialog)
|
||||||
|
{
|
||||||
|
if (!dialog)
|
||||||
|
return;
|
||||||
|
|
||||||
|
XtUngrabKey(dialog, AnyKey, Mod1Mask);
|
||||||
|
XtRemoveEventHandler(dialog, KeyPressMask, False,
|
||||||
|
(XtEventHandler) mnemonic_event, (XtPointer) NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(FEAT_BROWSE) || defined(FEAT_GUI_DIALOG)
|
||||||
|
static void set_fontlist __ARGS((Widget wg));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Use the 'guifont' or 'guifontset' as a fontlist for a dialog widget.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
set_fontlist(id)
|
||||||
|
Widget id;
|
||||||
|
{
|
||||||
|
XmFontList fl;
|
||||||
|
|
||||||
|
#ifdef FONTSET_ALWAYS
|
||||||
|
if (gui.fontset != NOFONTSET) {
|
||||||
|
fl = gui_motif_fontset2fontlist((XFontSet *)&gui.fontset);
|
||||||
|
if (fl != NULL)
|
||||||
|
{
|
||||||
|
if (XtIsManaged(id))
|
||||||
|
{
|
||||||
|
XtUnmanageChild(id);
|
||||||
|
XtVaSetValues(id, XmNfontList, fl, NULL);
|
||||||
|
/* We should force the widget to recalculate it's
|
||||||
|
* geometry now. */
|
||||||
|
XtManageChild(id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
XtVaSetValues(id, XmNfontList, fl, NULL);
|
||||||
|
XmFontListFree(fl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (gui.norm_font != NOFONT) {
|
||||||
|
fl = gui_motif_create_fontlist((XFontStruct *)gui.norm_font);
|
||||||
|
if (fl != NULL)
|
||||||
|
{
|
||||||
|
if (XtIsManaged(id))
|
||||||
|
{
|
||||||
|
XtUnmanageChild(id);
|
||||||
|
XtVaSetValues(id, XmNfontList, fl, NULL);
|
||||||
|
/* We should force the widget to recalculate it's
|
||||||
|
* geometry now. */
|
||||||
|
XtManageChild(id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
XtVaSetValues(id, XmNfontList, fl, NULL);
|
||||||
|
XmFontListFree(fl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(FEAT_BROWSE) || defined(PROTO)
|
#if defined(FEAT_BROWSE) || defined(PROTO)
|
||||||
|
|
||||||
@ -1517,29 +1828,67 @@ static void DialogAcceptCB __ARGS((Widget, XtPointer, XtPointer));
|
|||||||
* - equalize the messages between different GUI implementations as far as
|
* - equalize the messages between different GUI implementations as far as
|
||||||
* possible.
|
* possible.
|
||||||
*/
|
*/
|
||||||
static void set_predefined_label __ARGS((Widget parent, String name, char * new_label));
|
static void set_predefined_label __ARGS((Widget parent, String name, char *new_label));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_predefined_label(parent, name, new_label)
|
set_predefined_label(parent, name, new_label)
|
||||||
Widget parent;
|
Widget parent;
|
||||||
String name;
|
String name;
|
||||||
char * new_label;
|
char *new_label;
|
||||||
{
|
{
|
||||||
XmString str;
|
XmString str;
|
||||||
Widget w;
|
Widget w;
|
||||||
|
char_u *p, *next;
|
||||||
|
KeySym mnemonic = NUL;
|
||||||
|
|
||||||
w = XtNameToWidget(parent, name);
|
w = XtNameToWidget(parent, name);
|
||||||
|
|
||||||
if (!w)
|
if (!w)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
str = XmStringCreate(new_label, STRING_TAG);
|
p = vim_strsave((char_u *)new_label);
|
||||||
|
if (p == NULL)
|
||||||
if (str)
|
return;
|
||||||
|
for (next = p; *next; ++next)
|
||||||
{
|
{
|
||||||
XtVaSetValues(w, XmNlabelString, str, NULL);
|
if (*next == DLG_HOTKEY_CHAR)
|
||||||
|
{
|
||||||
|
int len = STRLEN(next);
|
||||||
|
|
||||||
|
if (len > 0)
|
||||||
|
{
|
||||||
|
mch_memmove(next, next + 1, len);
|
||||||
|
mnemonic = next[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
str = XmStringCreate((char *)p, STRING_TAG);
|
||||||
|
vim_free(p);
|
||||||
|
|
||||||
|
if (str != NULL)
|
||||||
|
{
|
||||||
|
XtVaSetValues(w,
|
||||||
|
XmNlabelString, str,
|
||||||
|
XmNmnemonic, mnemonic,
|
||||||
|
NULL);
|
||||||
XmStringFree(str);
|
XmStringFree(str);
|
||||||
}
|
}
|
||||||
|
gui_motif_menu_fontlist(w);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
set_predefined_fontlist(parent, name)
|
||||||
|
Widget parent;
|
||||||
|
String name;
|
||||||
|
{
|
||||||
|
Widget w;
|
||||||
|
w = XtNameToWidget(parent, name);
|
||||||
|
|
||||||
|
if (!w)
|
||||||
|
return;
|
||||||
|
|
||||||
|
set_fontlist(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1561,7 +1910,12 @@ gui_mch_browse(saving, title, dflt, ext, initdir, filter)
|
|||||||
char_u *pattern;
|
char_u *pattern;
|
||||||
char_u *tofree = NULL;
|
char_u *tofree = NULL;
|
||||||
|
|
||||||
dialog_wgt = XmCreateFileSelectionDialog(vimShell, (char *)title, NULL, 0);
|
/* There a difference between the resource name and value, Therefore, we
|
||||||
|
* avoid to (ab-)use the (maybe internationalized!) dialog title as a
|
||||||
|
* dialog name.
|
||||||
|
*/
|
||||||
|
|
||||||
|
dialog_wgt = XmCreateFileSelectionDialog(vimShell, "browseDialog", NULL, 0);
|
||||||
|
|
||||||
if (initdir == NULL || *initdir == NUL)
|
if (initdir == NULL || *initdir == NUL)
|
||||||
{
|
{
|
||||||
@ -1614,15 +1968,21 @@ gui_mch_browse(saving, title, dflt, ext, initdir, filter)
|
|||||||
XmNdialogTitle, XmRString, (char *)title, STRLEN(title) + 1,
|
XmNdialogTitle, XmRString, (char *)title, STRLEN(title) + 1,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
set_predefined_label(dialog_wgt, "Apply", _("Filter"));
|
set_predefined_label(dialog_wgt, "Apply", _("&Filter"));
|
||||||
set_predefined_label(dialog_wgt, "Cancel", _("Cancel"));
|
set_predefined_label(dialog_wgt, "Cancel", _("&Cancel"));
|
||||||
set_predefined_label(dialog_wgt, "Dir", _("Directories"));
|
set_predefined_label(dialog_wgt, "Dir", _("Directories"));
|
||||||
set_predefined_label(dialog_wgt, "FilterLabel", _("Filter"));
|
set_predefined_label(dialog_wgt, "FilterLabel", _("Filter"));
|
||||||
set_predefined_label(dialog_wgt, "Help", _("Help"));
|
set_predefined_label(dialog_wgt, "Help", _("&Help"));
|
||||||
set_predefined_label(dialog_wgt, "Items", _("Files"));
|
set_predefined_label(dialog_wgt, "Items", _("Files"));
|
||||||
set_predefined_label(dialog_wgt, "OK", _("OK"));
|
set_predefined_label(dialog_wgt, "OK", _("&OK"));
|
||||||
set_predefined_label(dialog_wgt, "Selection", _("Selection"));
|
set_predefined_label(dialog_wgt, "Selection", _("Selection"));
|
||||||
|
|
||||||
|
/* This is to save us from silly external settings using not fixed with
|
||||||
|
* fonts for file selection.
|
||||||
|
*/
|
||||||
|
set_predefined_fontlist(dialog_wgt, "DirListSW.DirList");
|
||||||
|
set_predefined_fontlist(dialog_wgt, "ItemsListSW.ItemsList");
|
||||||
|
|
||||||
gui_motif_menu_colors(dialog_wgt);
|
gui_motif_menu_colors(dialog_wgt);
|
||||||
if (gui.scroll_bg_pixel != INVALCOLOR)
|
if (gui.scroll_bg_pixel != INVALCOLOR)
|
||||||
XtVaSetValues(dialog_wgt, XmNtroughColor, gui.scroll_bg_pixel, NULL);
|
XtVaSetValues(dialog_wgt, XmNtroughColor, gui.scroll_bg_pixel, NULL);
|
||||||
@ -1634,6 +1994,7 @@ gui_mch_browse(saving, title, dflt, ext, initdir, filter)
|
|||||||
(unsigned char)XmDIALOG_HELP_BUTTON));
|
(unsigned char)XmDIALOG_HELP_BUTTON));
|
||||||
|
|
||||||
manage_centered(dialog_wgt);
|
manage_centered(dialog_wgt);
|
||||||
|
activate_dialog_mnemonics(dialog_wgt);
|
||||||
|
|
||||||
/* sit in a loop until the dialog box has gone away */
|
/* sit in a loop until the dialog box has gone away */
|
||||||
do
|
do
|
||||||
@ -1642,6 +2003,7 @@ gui_mch_browse(saving, title, dflt, ext, initdir, filter)
|
|||||||
(XtInputMask)XtIMAll);
|
(XtInputMask)XtIMAll);
|
||||||
} while (XtIsManaged(dialog_wgt));
|
} while (XtIsManaged(dialog_wgt));
|
||||||
|
|
||||||
|
suppress_dialog_mnemonics(dialog_wgt);
|
||||||
XtDestroyWidget(dialog_wgt);
|
XtDestroyWidget(dialog_wgt);
|
||||||
vim_free(tofree);
|
vim_free(tofree);
|
||||||
|
|
||||||
@ -1746,31 +2108,6 @@ butproc(w, client_data, call_data)
|
|||||||
dialogStatus = (int)(long)client_data + 1;
|
dialogStatus = (int)(long)client_data + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gui_motif_set_fontlist __ARGS((Widget wg));
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Use the 'guifont' or 'guifontset' as a fontlist for a dialog widget.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
gui_motif_set_fontlist(wg)
|
|
||||||
Widget wg;
|
|
||||||
{
|
|
||||||
XmFontList fl;
|
|
||||||
|
|
||||||
fl =
|
|
||||||
#ifdef FEAT_XFONTSET
|
|
||||||
gui.fontset != NOFONTSET ?
|
|
||||||
gui_motif_fontset2fontlist((XFontSet *)&gui.fontset)
|
|
||||||
:
|
|
||||||
#endif
|
|
||||||
gui_motif_create_fontlist((XFontStruct *)gui.norm_font);
|
|
||||||
if (fl != NULL)
|
|
||||||
{
|
|
||||||
XtVaSetValues(wg, XmNfontList, fl, NULL);
|
|
||||||
XmFontListFree(fl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_XPM
|
#ifdef HAVE_XPM
|
||||||
|
|
||||||
static Widget create_pixmap_label(Widget parent, String name, char **data, ArgList args, Cardinal arg);
|
static Widget create_pixmap_label(Widget parent, String name, char **data, ArgList args, Cardinal arg);
|
||||||
@ -1853,6 +2190,7 @@ gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
|
|||||||
XtAppContext app;
|
XtAppContext app;
|
||||||
XmString label;
|
XmString label;
|
||||||
int butcount;
|
int butcount;
|
||||||
|
Widget w;
|
||||||
Widget dialogform = NULL;
|
Widget dialogform = NULL;
|
||||||
Widget form = NULL;
|
Widget form = NULL;
|
||||||
Widget dialogtextfield = NULL;
|
Widget dialogtextfield = NULL;
|
||||||
@ -1913,10 +2251,20 @@ gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
|
|||||||
p = buts;
|
p = buts;
|
||||||
for (butcount = 0; *p; ++butcount)
|
for (butcount = 0; *p; ++butcount)
|
||||||
{
|
{
|
||||||
|
KeySym mnemonic = NUL;
|
||||||
|
|
||||||
for (next = p; *next; ++next)
|
for (next = p; *next; ++next)
|
||||||
{
|
{
|
||||||
if (*next == DLG_HOTKEY_CHAR)
|
if (*next == DLG_HOTKEY_CHAR)
|
||||||
mch_memmove(next, next + 1, STRLEN(next));
|
{
|
||||||
|
int len = STRLEN(next);
|
||||||
|
|
||||||
|
if (len > 0)
|
||||||
|
{
|
||||||
|
mch_memmove(next, next + 1, len);
|
||||||
|
mnemonic = next[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
if (*next == DLG_BUTTON_SEP)
|
if (*next == DLG_BUTTON_SEP)
|
||||||
{
|
{
|
||||||
*next++ = NUL;
|
*next++ = NUL;
|
||||||
@ -1930,12 +2278,14 @@ gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
|
|||||||
buttons[butcount] = XtVaCreateManagedWidget("button",
|
buttons[butcount] = XtVaCreateManagedWidget("button",
|
||||||
xmPushButtonWidgetClass, dialogform,
|
xmPushButtonWidgetClass, dialogform,
|
||||||
XmNlabelString, label,
|
XmNlabelString, label,
|
||||||
|
XmNmnemonic, mnemonic,
|
||||||
XmNbottomAttachment, XmATTACH_FORM,
|
XmNbottomAttachment, XmATTACH_FORM,
|
||||||
XmNbottomOffset, 4,
|
XmNbottomOffset, 4,
|
||||||
XmNshowAsDefault, butcount == dfltbutton - 1,
|
XmNshowAsDefault, butcount == dfltbutton - 1,
|
||||||
XmNdefaultButtonShadowThickness, 1,
|
XmNdefaultButtonShadowThickness, 1,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(label);
|
XmStringFree(label);
|
||||||
|
gui_motif_menu_fontlist(buttons[butcount]);
|
||||||
|
|
||||||
/* Layout properly. */
|
/* Layout properly. */
|
||||||
|
|
||||||
@ -2041,7 +2391,7 @@ gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
|
|||||||
XmNbottomAttachment, XmATTACH_FORM,
|
XmNbottomAttachment, XmATTACH_FORM,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
gui_motif_set_fontlist(dialogtextfield);
|
set_fontlist(dialogtextfield);
|
||||||
XmTextFieldSetString(dialogtextfield, (char *)textfield);
|
XmTextFieldSetString(dialogtextfield, (char *)textfield);
|
||||||
XtManageChild(dialogtextfield);
|
XtManageChild(dialogtextfield);
|
||||||
XtAddEventHandler(dialogtextfield, KeyPressMask, False,
|
XtAddEventHandler(dialogtextfield, KeyPressMask, False,
|
||||||
@ -2093,13 +2443,19 @@ gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
|
|||||||
XtManageChild(dialogpixmap);
|
XtManageChild(dialogpixmap);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Create the dialog message. */
|
/* Create the dialog message.
|
||||||
label = XmStringLtoRCreate((char *)message, STRING_TAG);
|
* Since LessTif is apparently having problems with the creation of
|
||||||
|
* properly localized string, we use LtoR here. The symptom is that the
|
||||||
|
* string sill not show properly in multiple lines as it does in native
|
||||||
|
* Motif.
|
||||||
|
*/
|
||||||
|
label = XmStringCreateLtoR((char *)message, STRING_TAG);
|
||||||
if (label == NULL)
|
if (label == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
(void)XtVaCreateManagedWidget("dialogMessage",
|
w = XtVaCreateManagedWidget("dialogMessage",
|
||||||
xmLabelGadgetClass, form,
|
xmLabelGadgetClass, form,
|
||||||
XmNlabelString, label,
|
XmNlabelString, label,
|
||||||
|
XmNalignment, XmALIGNMENT_BEGINNING,
|
||||||
XmNtopAttachment, XmATTACH_FORM,
|
XmNtopAttachment, XmATTACH_FORM,
|
||||||
XmNtopOffset, 8,
|
XmNtopOffset, 8,
|
||||||
#ifdef HAVE_XPM
|
#ifdef HAVE_XPM
|
||||||
@ -2115,6 +2471,7 @@ gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
|
|||||||
XmNbottomOffset, 8,
|
XmNbottomOffset, 8,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(label);
|
XmStringFree(label);
|
||||||
|
set_fontlist(w);
|
||||||
|
|
||||||
if (textfield != NULL)
|
if (textfield != NULL)
|
||||||
{
|
{
|
||||||
@ -2149,6 +2506,7 @@ gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
manage_centered(dialogform);
|
manage_centered(dialogform);
|
||||||
|
activate_dialog_mnemonics(dialogform);
|
||||||
|
|
||||||
if (textfield != NULL && *textfield != NUL)
|
if (textfield != NULL && *textfield != NUL)
|
||||||
{
|
{
|
||||||
@ -2185,6 +2543,7 @@ gui_mch_dialog(type, title, message, button_names, dfltbutton, textfield)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
suppress_dialog_mnemonics(dialogform);
|
||||||
XtDestroyWidget(dialogform);
|
XtDestroyWidget(dialogform);
|
||||||
|
|
||||||
return dialogStatus;
|
return dialogStatus;
|
||||||
@ -2246,8 +2605,11 @@ gui_mch_set_footer(s)
|
|||||||
XmString xms;
|
XmString xms;
|
||||||
|
|
||||||
xms = XmStringCreate((char *)s, STRING_TAG);
|
xms = XmStringCreate((char *)s, STRING_TAG);
|
||||||
XtVaSetValues(footer, XmNlabelString, xms, NULL);
|
if (xms != NULL)
|
||||||
XmStringFree(xms);
|
{
|
||||||
|
XtVaSetValues(footer, XmNlabelString, xms, NULL);
|
||||||
|
XmStringFree(xms);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -2522,14 +2884,15 @@ gui_motif_scroll_colors(id)
|
|||||||
XtVaSetValues(id, XmNforeground, gui.scroll_fg_pixel, NULL);
|
XtVaSetValues(id, XmNforeground, gui.scroll_fg_pixel, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEAT_MENU
|
|
||||||
/*
|
/*
|
||||||
* Set the fontlist for Widget "id" to use gui.menu_fontset or gui.menu_font.
|
* Set the fontlist for Widget "id" to use gui.menu_fontset or gui.menu_font.
|
||||||
*/
|
*/
|
||||||
static void
|
/*ARGSUSED*/
|
||||||
|
void
|
||||||
gui_motif_menu_fontlist(id)
|
gui_motif_menu_fontlist(id)
|
||||||
Widget id;
|
Widget id;
|
||||||
{
|
{
|
||||||
|
#ifdef FEAT_MENU
|
||||||
#ifdef FONTSET_ALWAYS
|
#ifdef FONTSET_ALWAYS
|
||||||
if (gui.menu_fontset != NOFONTSET)
|
if (gui.menu_fontset != NOFONTSET)
|
||||||
{
|
{
|
||||||
@ -2573,9 +2936,9 @@ gui_motif_menu_fontlist(id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We don't create it twice for the sake of speed.
|
* We don't create it twice for the sake of speed.
|
||||||
@ -2617,8 +2980,10 @@ find_replace_destroy_callback(w, client_data, call_data)
|
|||||||
{
|
{
|
||||||
SharedFindReplace *cd = (SharedFindReplace *)client_data;
|
SharedFindReplace *cd = (SharedFindReplace *)client_data;
|
||||||
|
|
||||||
if (cd != NULL)
|
if (cd != NULL) {
|
||||||
|
/* suppress_dialog_mnemonics(cd->dialog); */
|
||||||
cd->dialog = (Widget)0;
|
cd->dialog = (Widget)0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
@ -2718,6 +3083,48 @@ find_replace_keypress(w, frdp, event)
|
|||||||
XtUnmanageChild(frdp->dialog);
|
XtUnmanageChild(frdp->dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
set_label(w, label)
|
||||||
|
Widget w;
|
||||||
|
char_u *label;
|
||||||
|
{
|
||||||
|
XmString str;
|
||||||
|
char_u *p, *next;
|
||||||
|
KeySym mnemonic = NUL;
|
||||||
|
|
||||||
|
if (!w)
|
||||||
|
return;
|
||||||
|
|
||||||
|
p = vim_strsave(label);
|
||||||
|
if (p == NULL)
|
||||||
|
return;
|
||||||
|
for (next = p; *next; ++next)
|
||||||
|
{
|
||||||
|
if (*next == DLG_HOTKEY_CHAR)
|
||||||
|
{
|
||||||
|
int len = STRLEN(next);
|
||||||
|
|
||||||
|
if (len > 0)
|
||||||
|
{
|
||||||
|
mch_memmove(next, next + 1, len);
|
||||||
|
mnemonic = next[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
str = XmStringCreateSimple((char *)p);
|
||||||
|
vim_free(p);
|
||||||
|
if (str)
|
||||||
|
{
|
||||||
|
XtVaSetValues(w,
|
||||||
|
XmNlabelString, str,
|
||||||
|
XmNmnemonic, mnemonic,
|
||||||
|
NULL);
|
||||||
|
XmStringFree(str);
|
||||||
|
}
|
||||||
|
gui_motif_menu_fontlist(w);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
find_replace_dialog_create(arg, do_replace)
|
find_replace_dialog_create(arg, do_replace)
|
||||||
char_u *arg;
|
char_u *arg;
|
||||||
@ -2746,6 +3153,8 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
/* If the dialog already exists, just raise it. */
|
/* If the dialog already exists, just raise it. */
|
||||||
if (frdp->dialog)
|
if (frdp->dialog)
|
||||||
{
|
{
|
||||||
|
gui_motif_synch_fonts();
|
||||||
|
|
||||||
/* If the window is already up, just pop it to the top */
|
/* If the window is already up, just pop it to the top */
|
||||||
if (XtIsManaged(frdp->dialog))
|
if (XtIsManaged(frdp->dialog))
|
||||||
XMapRaised(XtDisplay(frdp->dialog),
|
XMapRaised(XtDisplay(frdp->dialog),
|
||||||
@ -2789,16 +3198,14 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
XmNbottomOffset, 4,
|
XmNbottomOffset, 4,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
str = XmStringCreateSimple(_("Find Next"));
|
|
||||||
frdp->find = XtVaCreateManagedWidget("findButton",
|
frdp->find = XtVaCreateManagedWidget("findButton",
|
||||||
xmPushButtonWidgetClass, button_form,
|
xmPushButtonWidgetClass, button_form,
|
||||||
XmNlabelString, str,
|
|
||||||
XmNsensitive, True,
|
XmNsensitive, True,
|
||||||
XmNtopAttachment, XmATTACH_FORM,
|
XmNtopAttachment, XmATTACH_FORM,
|
||||||
XmNleftAttachment, XmATTACH_FORM,
|
XmNleftAttachment, XmATTACH_FORM,
|
||||||
XmNrightAttachment, XmATTACH_FORM,
|
XmNrightAttachment, XmATTACH_FORM,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
set_label(frdp->find, _("Find &Next"));
|
||||||
|
|
||||||
XtAddCallback(frdp->find, XmNactivateCallback,
|
XtAddCallback(frdp->find, XmNactivateCallback,
|
||||||
find_replace_callback,
|
find_replace_callback,
|
||||||
@ -2806,57 +3213,50 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
|
|
||||||
if (do_replace)
|
if (do_replace)
|
||||||
{
|
{
|
||||||
str = XmStringCreateSimple(_("Replace"));
|
|
||||||
frdp->replace = XtVaCreateManagedWidget("replaceButton",
|
frdp->replace = XtVaCreateManagedWidget("replaceButton",
|
||||||
xmPushButtonWidgetClass, button_form,
|
xmPushButtonWidgetClass, button_form,
|
||||||
XmNlabelString, str,
|
|
||||||
XmNtopAttachment, XmATTACH_WIDGET,
|
XmNtopAttachment, XmATTACH_WIDGET,
|
||||||
XmNtopWidget, frdp->find,
|
XmNtopWidget, frdp->find,
|
||||||
XmNleftAttachment, XmATTACH_FORM,
|
XmNleftAttachment, XmATTACH_FORM,
|
||||||
XmNrightAttachment, XmATTACH_FORM,
|
XmNrightAttachment, XmATTACH_FORM,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
set_label(frdp->replace, _("&Replace"));
|
||||||
XtAddCallback(frdp->replace, XmNactivateCallback,
|
XtAddCallback(frdp->replace, XmNactivateCallback,
|
||||||
find_replace_callback, (XtPointer)FRD_REPLACE);
|
find_replace_callback, (XtPointer)FRD_REPLACE);
|
||||||
|
|
||||||
str = XmStringCreateSimple(_("Replace All"));
|
|
||||||
frdp->all = XtVaCreateManagedWidget("replaceAllButton",
|
frdp->all = XtVaCreateManagedWidget("replaceAllButton",
|
||||||
xmPushButtonWidgetClass, button_form,
|
xmPushButtonWidgetClass, button_form,
|
||||||
XmNlabelString, str,
|
|
||||||
XmNtopAttachment, XmATTACH_WIDGET,
|
XmNtopAttachment, XmATTACH_WIDGET,
|
||||||
XmNtopWidget, frdp->replace,
|
XmNtopWidget, frdp->replace,
|
||||||
XmNleftAttachment, XmATTACH_FORM,
|
XmNleftAttachment, XmATTACH_FORM,
|
||||||
XmNrightAttachment, XmATTACH_FORM,
|
XmNrightAttachment, XmATTACH_FORM,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
set_label(frdp->all, _("Replace &All"));
|
||||||
XtAddCallback(frdp->all, XmNactivateCallback,
|
XtAddCallback(frdp->all, XmNactivateCallback,
|
||||||
find_replace_callback, (XtPointer)FRD_REPLACEALL);
|
find_replace_callback, (XtPointer)FRD_REPLACEALL);
|
||||||
|
|
||||||
str = XmStringCreateSimple(_("Undo"));
|
|
||||||
frdp->undo = XtVaCreateManagedWidget("undoButton",
|
frdp->undo = XtVaCreateManagedWidget("undoButton",
|
||||||
xmPushButtonWidgetClass, button_form,
|
xmPushButtonWidgetClass, button_form,
|
||||||
XmNlabelString, str,
|
|
||||||
XmNtopAttachment, XmATTACH_WIDGET,
|
XmNtopAttachment, XmATTACH_WIDGET,
|
||||||
XmNtopWidget, frdp->all,
|
XmNtopWidget, frdp->all,
|
||||||
XmNleftAttachment, XmATTACH_FORM,
|
XmNleftAttachment, XmATTACH_FORM,
|
||||||
XmNrightAttachment, XmATTACH_FORM,
|
XmNrightAttachment, XmATTACH_FORM,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
set_label(frdp->undo, _("&Undo"));
|
||||||
XtAddCallback(frdp->undo, XmNactivateCallback,
|
XtAddCallback(frdp->undo, XmNactivateCallback,
|
||||||
find_replace_callback, (XtPointer)FRD_UNDO);
|
find_replace_callback, (XtPointer)FRD_UNDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
str = XmStringCreateSimple(_("Cancel"));
|
|
||||||
frdp->cancel = XtVaCreateManagedWidget("closeButton",
|
frdp->cancel = XtVaCreateManagedWidget("closeButton",
|
||||||
xmPushButtonWidgetClass, button_form,
|
xmPushButtonWidgetClass, button_form,
|
||||||
XmNlabelString, str,
|
|
||||||
XmNleftAttachment, XmATTACH_FORM,
|
XmNleftAttachment, XmATTACH_FORM,
|
||||||
XmNrightAttachment, XmATTACH_FORM,
|
XmNrightAttachment, XmATTACH_FORM,
|
||||||
XmNbottomAttachment, XmATTACH_FORM,
|
XmNbottomAttachment, XmATTACH_FORM,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
set_label(frdp->cancel, _("&Cancel"));
|
||||||
XtAddCallback(frdp->cancel, XmNactivateCallback,
|
XtAddCallback(frdp->cancel, XmNactivateCallback,
|
||||||
find_replace_dismiss_callback, frdp);
|
find_replace_dismiss_callback, frdp);
|
||||||
|
gui_motif_menu_fontlist(frdp->cancel);
|
||||||
|
|
||||||
XtManageChild(button_form);
|
XtManageChild(button_form);
|
||||||
|
|
||||||
@ -2894,6 +3294,7 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
XmNtopOffset, 4,
|
XmNtopOffset, 4,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
XmStringFree(str);
|
||||||
|
gui_motif_menu_fontlist(label_what);
|
||||||
|
|
||||||
frdp->what = XtVaCreateManagedWidget("whatText",
|
frdp->what = XtVaCreateManagedWidget("whatText",
|
||||||
xmTextFieldWidgetClass, input_form,
|
xmTextFieldWidgetClass, input_form,
|
||||||
@ -2928,6 +3329,7 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
XmNbottomAttachment, XmATTACH_FORM,
|
XmNbottomAttachment, XmATTACH_FORM,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
XmStringFree(str);
|
||||||
|
gui_motif_menu_fontlist(label_with);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make the entry activation only change the input focus onto the
|
* Make the entry activation only change the input focus onto the
|
||||||
@ -2975,6 +3377,7 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
|
|
||||||
{
|
{
|
||||||
Widget radio_box;
|
Widget radio_box;
|
||||||
|
Widget w;
|
||||||
|
|
||||||
frame = XtVaCreateWidget("directionFrame",
|
frame = XtVaCreateWidget("directionFrame",
|
||||||
xmFrameWidgetClass, frdp->dialog,
|
xmFrameWidgetClass, frdp->dialog,
|
||||||
@ -2988,13 +3391,14 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
str = XmStringCreateSimple(_("Direction"));
|
str = XmStringCreateSimple(_("Direction"));
|
||||||
(void)XtVaCreateManagedWidget("directionFrameLabel",
|
w = XtVaCreateManagedWidget("directionFrameLabel",
|
||||||
xmLabelGadgetClass, frame,
|
xmLabelGadgetClass, frame,
|
||||||
XmNlabelString, str,
|
XmNlabelString, str,
|
||||||
XmNchildHorizontalAlignment, XmALIGNMENT_BEGINNING,
|
XmNchildHorizontalAlignment, XmALIGNMENT_BEGINNING,
|
||||||
XmNchildType, XmFRAME_TITLE_CHILD,
|
XmNchildType, XmFRAME_TITLE_CHILD,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
XmStringFree(str);
|
||||||
|
gui_motif_menu_fontlist(w);
|
||||||
|
|
||||||
radio_box = XmCreateRadioBox(frame, "radioBox",
|
radio_box = XmCreateRadioBox(frame, "radioBox",
|
||||||
(ArgList)NULL, 0);
|
(ArgList)NULL, 0);
|
||||||
@ -3006,6 +3410,7 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
XmNset, False,
|
XmNset, False,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
XmStringFree(str);
|
||||||
|
gui_motif_menu_fontlist(frdp->up);
|
||||||
|
|
||||||
str = XmStringCreateSimple(_("Down"));
|
str = XmStringCreateSimple(_("Down"));
|
||||||
frdp->down = XtVaCreateManagedWidget("downRadioButton",
|
frdp->down = XtVaCreateManagedWidget("downRadioButton",
|
||||||
@ -3014,6 +3419,7 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
XmNset, True,
|
XmNset, True,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
XmStringFree(str);
|
||||||
|
gui_motif_menu_fontlist(frdp->down);
|
||||||
|
|
||||||
XtManageChild(radio_box);
|
XtManageChild(radio_box);
|
||||||
XtManageChild(frame);
|
XtManageChild(frame);
|
||||||
@ -3057,6 +3463,8 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
XmNset, mcase,
|
XmNset, mcase,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree(str);
|
XmStringFree(str);
|
||||||
|
gui_motif_menu_fontlist(frdp->wword);
|
||||||
|
gui_motif_menu_fontlist(frdp->mcase);
|
||||||
|
|
||||||
XtManageChild(toggle_form);
|
XtManageChild(toggle_form);
|
||||||
|
|
||||||
@ -3064,7 +3472,10 @@ find_replace_dialog_create(arg, do_replace)
|
|||||||
XmTextFieldSetString(frdp->what, (char *)entry_text);
|
XmTextFieldSetString(frdp->what, (char *)entry_text);
|
||||||
vim_free(entry_text);
|
vim_free(entry_text);
|
||||||
|
|
||||||
XtManageChild(frdp->dialog);
|
gui_motif_synch_fonts();
|
||||||
|
|
||||||
|
manage_centered(frdp->dialog);
|
||||||
|
activate_dialog_mnemonics(frdp->dialog);
|
||||||
XmProcessTraversal(frdp->what, XmTRAVERSE_CURRENT);
|
XmProcessTraversal(frdp->what, XmTRAVERSE_CURRENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3088,3 +3499,40 @@ gui_mch_replace_dialog(eap)
|
|||||||
|
|
||||||
find_replace_dialog_create(eap->arg, TRUE);
|
find_replace_dialog_create(eap->arg, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Synchronize all gui elements, which are dependant upon the
|
||||||
|
* main text font used. Those are in esp. the find/replace dialogs.
|
||||||
|
* If you don't understand why this should be needed, please try to
|
||||||
|
* search for "pi<70><69><EFBFBD>" in iso8859-2.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gui_motif_synch_fonts(void)
|
||||||
|
{
|
||||||
|
SharedFindReplace *frdp;
|
||||||
|
int do_replace;
|
||||||
|
XFontStruct *font;
|
||||||
|
XmFontList font_list;
|
||||||
|
|
||||||
|
/* FIXME: Unless we find out how to create a XmFontList from a XFontSet,
|
||||||
|
* we just give up here on font synchronization. */
|
||||||
|
font = (XFontStruct *)gui.norm_font;
|
||||||
|
if (font == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
font_list = gui_motif_create_fontlist(font);
|
||||||
|
|
||||||
|
/* OK this loop is a bit tricky... */
|
||||||
|
for (do_replace = 0; do_replace <= 1; ++do_replace)
|
||||||
|
{
|
||||||
|
frdp = (do_replace) ? (&repl_widgets) : (&find_widgets);
|
||||||
|
if (frdp->dialog)
|
||||||
|
{
|
||||||
|
XtVaSetValues(frdp->what, XmNfontList, font_list, NULL);
|
||||||
|
if (do_replace)
|
||||||
|
XtVaSetValues(frdp->with, XmNfontList, font_list, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XmFontListFree(font_list);
|
||||||
|
}
|
||||||
|
@ -3047,6 +3047,7 @@ gui_mch_get_font(char_u *vim_font_name, int report_error)
|
|||||||
return( FAIL );
|
return( FAIL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Return the name of font "font" in allocated memory.
|
* Return the name of font "font" in allocated memory.
|
||||||
* Don't know how to get the actual name, thus use the provided name.
|
* Don't know how to get the actual name, thus use the provided name.
|
||||||
@ -3060,6 +3061,7 @@ gui_mch_get_fontname(font, name)
|
|||||||
return NULL;
|
return NULL;
|
||||||
return vim_strsave(name);
|
return vim_strsave(name);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
gui_mch_set_font(GuiFont font)
|
gui_mch_set_font(GuiFont font)
|
||||||
|
@ -1052,6 +1052,7 @@ gui_mch_get_font(name, giveErrorIfMissing)
|
|||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Return the name of font "font" in allocated memory.
|
* Return the name of font "font" in allocated memory.
|
||||||
* Don't know how to get the actual name, thus use the provided name.
|
* Don't know how to get the actual name, thus use the provided name.
|
||||||
@ -1065,6 +1066,7 @@ gui_mch_get_fontname(font, name)
|
|||||||
return NULL;
|
return NULL;
|
||||||
return vim_strsave(name);
|
return vim_strsave(name);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the current text font.
|
* Set the current text font.
|
||||||
|
@ -1249,6 +1249,7 @@ gui_mch_get_font(
|
|||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Return the name of font "font" in allocated memory.
|
* Return the name of font "font" in allocated memory.
|
||||||
* Don't know how to get the actual name, thus use the provided name.
|
* Don't know how to get the actual name, thus use the provided name.
|
||||||
@ -1262,6 +1263,7 @@ gui_mch_get_fontname(font, name)
|
|||||||
return NULL;
|
return NULL;
|
||||||
return vim_strsave(name);
|
return vim_strsave(name);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
gui_mch_free_font(GuiFont font)
|
gui_mch_free_font(GuiFont font)
|
||||||
|
1287
src/gui_xmdlg.c
Normal file
1287
src/gui_xmdlg.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -107,9 +107,9 @@ coladvance(wcol)
|
|||||||
|
|
||||||
if (wcol == MAXCOL || rc == FAIL)
|
if (wcol == MAXCOL || rc == FAIL)
|
||||||
curwin->w_valid &= ~VALID_VIRTCOL;
|
curwin->w_valid &= ~VALID_VIRTCOL;
|
||||||
else
|
else if (*ml_get_cursor() != TAB)
|
||||||
{
|
{
|
||||||
/* Virtcol is valid */
|
/* Virtcol is valid when not on a TAB */
|
||||||
curwin->w_valid |= VALID_VIRTCOL;
|
curwin->w_valid |= VALID_VIRTCOL;
|
||||||
curwin->w_virtcol = wcol;
|
curwin->w_virtcol = wcol;
|
||||||
}
|
}
|
||||||
|
@ -194,6 +194,7 @@ extern char_u *vimpty_getenv __ARGS((const char_u *string)); /* from pty.c */
|
|||||||
# endif
|
# endif
|
||||||
# ifdef FEAT_GUI_MOTIF
|
# ifdef FEAT_GUI_MOTIF
|
||||||
# include "gui_motif.pro"
|
# include "gui_motif.pro"
|
||||||
|
# include "gui_xmdlg.pro"
|
||||||
# endif
|
# endif
|
||||||
# ifdef FEAT_GUI_ATHENA
|
# ifdef FEAT_GUI_ATHENA
|
||||||
# include "gui_athena.pro"
|
# include "gui_athena.pro"
|
||||||
|
3
src/proto/gui_xmdlg.pro
Normal file
3
src/proto/gui_xmdlg.pro
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/* gui_xmdlg.c */
|
||||||
|
char_u *gui_xm_select_font __ARGS((char_u *current));
|
||||||
|
/* vim: set ft=c : */
|
@ -15,10 +15,10 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#ifdef HAVE_LIBGEN_H
|
#ifdef HAVE_LIBGEN_H
|
||||||
# include <libgen.h>
|
# include <libgen.h>
|
||||||
|
Reference in New Issue
Block a user