mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
slovak stuff
This commit is contained in:
@@ -9,6 +9,7 @@ Changes since version 0.63.1:
|
|||||||
- Fixed broken panels.
|
- Fixed broken panels.
|
||||||
- Renamed se.po to sv.po
|
- Renamed se.po to sv.po
|
||||||
- New version of wkdemenu.pl (from Malcolm Cowe <malk@bruhaha.co.uk>)
|
- New version of wkdemenu.pl (from Malcolm Cowe <malk@bruhaha.co.uk>)
|
||||||
|
- new updated Slovak translations (Jan Tomka/judas@hell <tomka@oalevice.sk>)
|
||||||
|
|
||||||
|
|
||||||
Changes since version 0.63.0:
|
Changes since version 0.63.0:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ nlsdir = $(NLSDIR)
|
|||||||
CLEANFILES = $(CATALOGS)
|
CLEANFILES = $(CATALOGS)
|
||||||
|
|
||||||
EXTRA_DIST = pt.po hr.po fr.po ko.po cs.po ja.po zh_TW.Big5.po es.po\
|
EXTRA_DIST = pt.po hr.po fr.po ko.po cs.po ja.po zh_TW.Big5.po es.po\
|
||||||
zh_CN.po fi.po it.po ru.po de.po hu.po bg.po
|
zh_CN.po fi.po it.po ru.po de.po hu.po bg.po sk.po
|
||||||
|
|
||||||
POTFILES = \
|
POTFILES = \
|
||||||
$(top_builddir)/WPrefs.app/main.c \
|
$(top_builddir)/WPrefs.app/main.c \
|
||||||
|
|||||||
@@ -20,4 +20,5 @@ ru.po Russian Igor P. Roboul <igor@srcso.sochi.su>
|
|||||||
de.po German Bernd Eggert <Bernd.Eggert@t-online.de>
|
de.po German Bernd Eggert <Bernd.Eggert@t-online.de>
|
||||||
hu.po Hungarian Horvath Szabolcs <horvathsz@penguinpowered.com>
|
hu.po Hungarian Horvath Szabolcs <horvathsz@penguinpowered.com>
|
||||||
bg.po Bulgarian Slavei Karadjov <slaff@exco.net>
|
bg.po Bulgarian Slavei Karadjov <slaff@exco.net>
|
||||||
|
menu.sk Slovak judas@hell <tomka@oalevice.sk>
|
||||||
|
|
||||||
|
|||||||
2115
WPrefs.app/po/sk.po
Normal file
2115
WPrefs.app/po/sk.po
Normal file
File diff suppressed because it is too large
Load Diff
@@ -62,6 +62,7 @@ menu.zh_TW.Big5 Chinese Li Wei Jih <lwj83@cs.ccu.edu.tw>
|
|||||||
menu.zh_CN Chinese Wang Jian <wangjian2@asiainfo.com>
|
menu.zh_CN Chinese Wang Jian <wangjian2@asiainfo.com>
|
||||||
menu.pl Polish Maciej Friedel <tytus@tytus.itma.pwr.wroc.pl>
|
menu.pl Polish Maciej Friedel <tytus@tytus.itma.pwr.wroc.pl>
|
||||||
menu.bg Bulgarian Slavei Karadjov <slaff@exco.net>
|
menu.bg Bulgarian Slavei Karadjov <slaff@exco.net>
|
||||||
|
menu.sk Slovak judas@hell <tomka@oalevice.sk>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
230
WindowMaker/menu.sk
Normal file
230
WindowMaker/menu.sk
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
/* Slovak root menu for WindowMaker
|
||||||
|
* (C) 2001 judas@hell
|
||||||
|
*
|
||||||
|
* Original translation by judas@hell on Jan 22 2001
|
||||||
|
* Currently maintained by judas@hell <tomka@oalevice.sk>
|
||||||
|
*
|
||||||
|
* Version history:
|
||||||
|
* mnu-ver WM-ver author email date
|
||||||
|
* 0.10 0.63.1 judas@hell <tomka@oalevice.sk> Jan 22 2001
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Syntax je:
|
||||||
|
*
|
||||||
|
* <Názov> [SHORTCUT <Klávesová skratka>] <Príkaz> <Parametre>
|
||||||
|
*
|
||||||
|
* <Názov> je µubovoµný re»azec, ktorý sa pou¾ije ako názov polo¾ky. Ak obsahuje
|
||||||
|
* medzery, musí by» uzavretý v zátvorkách.
|
||||||
|
*
|
||||||
|
* SHORTCUT udáva klávesovú skratku pre danú polo¾ku. <Klávesová skratka> má
|
||||||
|
* rovnakú syntax ako v súbore $HOME/GNUstep/Defaults/WindowMaker, napr.
|
||||||
|
* RootMenuKey alebo MiniaturizeKey.
|
||||||
|
*
|
||||||
|
* Nemô¾ete uda» klávesovú skratku pre polo¾ky typu MENU A OPEN_MENU.
|
||||||
|
*
|
||||||
|
* <Príkaz> je jeden z nasledujúcich:
|
||||||
|
* MENU - zaèína definíciu (sub)menu
|
||||||
|
* END - ukonèuje definíciu (sub)menu
|
||||||
|
* OPEN_MENU - vlo¾í menu zo súboru, rúry alebo adresáru(ov),
|
||||||
|
* eventuálne pred ka¾dú polo¾ku vlo¾í príkaz
|
||||||
|
* WORKSPACE_MENU - vlo¾í submenu operácií pracovnej plochy. Len jedno
|
||||||
|
* takéto menu je povolené
|
||||||
|
* EXEC <príkaz> - vykoná externý príkaz
|
||||||
|
* SHEXEC <príkaz> - vykoná príkaz shelu (napr. gimp > /dev/null)
|
||||||
|
* EXIT - ukonèí mana¾éra okien
|
||||||
|
* RESTART [<mana¾ér okien>] - re¹tartuje WindowMaker alebo spustí iný
|
||||||
|
* mana¾ér okien
|
||||||
|
* REFRESH - obnoví obrazovku
|
||||||
|
* ARRANGE_ICONS - vyrovná ikony na pracovnej ploche
|
||||||
|
* SHUTDOWN - zabije v¹etkých klientov (a ukonèí sedenie X systému)
|
||||||
|
* SHOW_ALL - zobrazí v¹etky okná na pracovnej ploche
|
||||||
|
* HIDE_OTHERS - skryje v¹etky okná na pracovnej ploche okrem
|
||||||
|
* aktívneho (alebo posledného aktívneho)
|
||||||
|
* SAVE_SESSION - ulo¾í aktuálny stav pracovnej plochy, èo zahàòa v¹etky
|
||||||
|
* spustené aplikácie, ich nastavenia (geometria,
|
||||||
|
* umiestnenie na obrazovke, pracovná plocha, na ktorej sa
|
||||||
|
* nachádzajú, Dok alebo sponka, odkiaµ boli spustené, èi
|
||||||
|
* sú minimalizované, zrolované alebo skryté. Tie¾ sa ulo¾í
|
||||||
|
* plocha, na ktorej sa u¾ívateµ nachádza. Pri ka¾dom ¹tarte
|
||||||
|
* WindowMakeru sa tieto nastavenia obnovia a¾ kým sa nepou-
|
||||||
|
* ¾ije znova SAVE_SESSION alebo CLEAR_SESSION. Ak je
|
||||||
|
* SaveSessionOnExit = Yes; v súbore domén WindowMakeru,
|
||||||
|
* potom sa toto v¹etko ukladá pri ka¾dom ukonèení
|
||||||
|
* WindowMakeru, èím sa prepí¹u predchádzajúce SAVE_SESSION
|
||||||
|
* a CLEAR_SESSION (viï ni¾¹ie).
|
||||||
|
* CLEAR_SESSION - zma¾e ulo¾ené sedenie. Toto nemá úèinok, keï je
|
||||||
|
* nastavené SaveSessionOnExit.
|
||||||
|
* INFO - zobrazí panel Info
|
||||||
|
*
|
||||||
|
* Syntax príkazu OPEN_MENU:
|
||||||
|
* 1. Vkladanie menu zo súboru.
|
||||||
|
* // otvorí súbor.menu, ktorý musí obsahova» definíciu menu a toto
|
||||||
|
* // vlo¾í na aktuálnu pozíciu
|
||||||
|
* OPEN_MENU súbor.menu
|
||||||
|
* 2. Vkladanie menu z rúry
|
||||||
|
* // spustí program a jeho ¹tandardný výstup pou¾ije ako definíciu menu.
|
||||||
|
* // Výstup menu musí by» korektná definícia menu.
|
||||||
|
* // Medzera medzi '|' a samotným príkazom nie je povinná.
|
||||||
|
* // Pou¾ite '||' namiesto '|' ak chcete, aby sa menu obnovovalo
|
||||||
|
* // pri ka¾dom otvorení. Mô¾e to by» pomalé.
|
||||||
|
* OPEN_MENU | príkaz
|
||||||
|
* OPEN_MENU || príkaz
|
||||||
|
* 3. Vkladanie menu z adresára
|
||||||
|
* // Otvorí jeden alebo viac adresárov vytvorí menu z podadresárov a
|
||||||
|
* // spustiteµných súborov zoradených v abecednom poradí.
|
||||||
|
* OPEN_MENU /nejaký/adresár [/ïal¹í/adresár ...]
|
||||||
|
* 4. Vkladanie adresára s príkazom
|
||||||
|
* // Otvorí jeden alebo viac adresárov a vytvorí menu zo v¹etkých
|
||||||
|
* // podadresárov a súborov s právom èítania, zoradených v abecednom
|
||||||
|
* // poradí, prièom pred ka¾dý vlo¾í príkaz.
|
||||||
|
* OPEN_MENU [voµby] /nejaký/adr [/ïal¹í/adr ...] WITH príkaz -voµby
|
||||||
|
* Voµby:
|
||||||
|
* -noext odstráni» zvy¹ok mena súboru za powslednou
|
||||||
|
* bodkou (príponu)
|
||||||
|
*
|
||||||
|
* <Parametre> sú odovzdané aplikácii, ktorá sa má vykona».
|
||||||
|
*
|
||||||
|
* ** Voµby príkazového riadku príkazu EXEC:
|
||||||
|
* %s - nahradi» aktuálnym výberom
|
||||||
|
* %a(titul[,výzva]) - otvorí dialóg s daným titulom, prípadne i výzvou a
|
||||||
|
* nahradí sa v príkaze textom, ktorý zadáte
|
||||||
|
* %w - nahradí sa identifikaèným èíslom (XID) aktuálneho okna
|
||||||
|
* %W - nahradí sa èíslom aktuálnej pracovnej plochy
|
||||||
|
*
|
||||||
|
* Vlo¾i» ¹peciálne znaky (ako % a ") mô¾ete pomocou znaku \ :
|
||||||
|
* xterm -T "\"Ahoj svet\""
|
||||||
|
*
|
||||||
|
* Tie¾ je povolené pou¾íva» ¹peciálne kombinácie znakov, ako napr. \n
|
||||||
|
*
|
||||||
|
* Ka¾dý príkaz MENU musí ma» na konci zodpovedajúci príkaz END.
|
||||||
|
*
|
||||||
|
* Príklad:
|
||||||
|
*
|
||||||
|
* "Test" MENU
|
||||||
|
* "XTerm" EXEC xterm
|
||||||
|
* // vytvorí submenu s obsahom adresára /usr/openwin/bin
|
||||||
|
* "XView apps" OPEN_MENU "/usr/openwin/bin"
|
||||||
|
* // aplikácie X11 v rôznych adresároch
|
||||||
|
* "X11 apps" OPEN_MENU /usr/X11/bin $HOME/bin/X11
|
||||||
|
* // nastaví obrázky pozadia
|
||||||
|
* "Pozadie" OPEN_MENU -noext $HOME/images /usr/share/images WITH wmsetbg -u -t
|
||||||
|
* // vlo¾í menu definované v súbore style.menu
|
||||||
|
* "©týl" OPEN_MENU style.menu
|
||||||
|
* "Test" END
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "wmmacros"
|
||||||
|
|
||||||
|
"Aplikácie" MENU
|
||||||
|
"Informácie" MENU
|
||||||
|
"Panel Info" INFO_PANEL
|
||||||
|
"Panel Legal" LEGAL_PANEL
|
||||||
|
"Systémová konzola" EXEC xconsole
|
||||||
|
"Za»a¾enie systému" SHEXEC xosview || xload
|
||||||
|
"Zoznam procesov" EXEC xterm -e top
|
||||||
|
"Prehliadaè manuálov" EXEC xman
|
||||||
|
"Informácie" END
|
||||||
|
"Spusti»..." SHEXEC %a(Spusti»,Zadajte príkaz:)
|
||||||
|
"XTerm" EXEC xterm -sb
|
||||||
|
"Rxvt" EXEC rxvt -bg black -fg white -fn fixed
|
||||||
|
"Pracovné plochy" WORKSPACE_MENU
|
||||||
|
"Aplikácie" MENU
|
||||||
|
"Grafika" MENU
|
||||||
|
"Gimp" SHEXEC gimp >/dev/null
|
||||||
|
"XV" EXEC xv
|
||||||
|
"XPaint" EXEC xpaint
|
||||||
|
"XFig" EXEC xfig
|
||||||
|
"Grafika" END
|
||||||
|
"Správca súborov Xfm" EXEC xfm
|
||||||
|
"Správca súborov OffiX" EXEC files
|
||||||
|
"LyX" EXEC lyx
|
||||||
|
"Netscape" EXEC netscape
|
||||||
|
"Ghostview" EXEC ghostview %a(GhostView,Zadajte meno súboru)
|
||||||
|
"Acrobat" EXEC /usr/local/Acrobat3/bin/acroread %a(Acrobar,Zadajte meno PDF súboru)
|
||||||
|
"TkDesk" EXEC tkdesk
|
||||||
|
"Aplikácie" END
|
||||||
|
"Editory" MENU
|
||||||
|
"XFte" EXEC xfte
|
||||||
|
"XEmacs" SHEXEC xemacs || emacs
|
||||||
|
"XJed" EXEC xjed
|
||||||
|
"NEdit" EXEC nedit
|
||||||
|
"Xedit" EXEC xedit
|
||||||
|
"VIM" EXEC xterm -e vim
|
||||||
|
"Editory" END
|
||||||
|
"Rôzne" MENU
|
||||||
|
"Xmcd" SHEXEC xmcd 2> /dev/null
|
||||||
|
"CD prehrávaè" EXEC xplaycd
|
||||||
|
"Mixer" EXEC xmixer
|
||||||
|
"Rôzne" END
|
||||||
|
"Nástroje" MENU
|
||||||
|
"Kalkulaèka" EXEC xcalc
|
||||||
|
"Vlastnosti okien" SHEXEC xprop | xmessage -center -title 'xprop' -file -
|
||||||
|
"Výber fontu" EXEC xfontsel
|
||||||
|
"Emulátor terminálu" EXEC xminicom
|
||||||
|
"Lupa" EXEC xmag
|
||||||
|
"Paleta" EXEC xcmap
|
||||||
|
"Zabi» okno" EXEC xkill
|
||||||
|
"Nástenka" EXEC xclipboard
|
||||||
|
"Nástroje" END
|
||||||
|
|
||||||
|
"Výber" MENU
|
||||||
|
"Kopírova»" SHEXEC echo '%s' | wxcopy
|
||||||
|
"Posla» po¹tu" EXEC xterm -name mail -T "Pine" -e pine %s
|
||||||
|
"Prehliada» web" EXEC netscape %s
|
||||||
|
"Hµada» v manuáli" SHEXEC MANUAL_SEARCH(%s)
|
||||||
|
"Výber" END
|
||||||
|
|
||||||
|
"Pracovná plocha" MENU
|
||||||
|
"Skry» ostatné" HIDE_OTHERS
|
||||||
|
"Zobrazi» v¹etky" SHOW_ALL
|
||||||
|
"Vyrovna» ikony" ARRANGE_ICONS
|
||||||
|
"Obnovi» obrazovku" REFRESH
|
||||||
|
"Uzamknú»" EXEC xlock -allowroot -usefirst
|
||||||
|
"Ulo¾i» sedenie" SAVE_SESSION
|
||||||
|
"Zmaza» sedenie" CLEAR_SESSION
|
||||||
|
"Pracovná plocha" END
|
||||||
|
|
||||||
|
"Vzhµad" MENU
|
||||||
|
"Témy" OPEN_MENU -noext THEMES_DIR $HOME/GNUstep/Library/WindowMaker/Themes WITH setstyle
|
||||||
|
"©týly" OPEN_MENU -noext STYLES_DIR $HOME/GNUstep/Library/WindowMaker/Styles WITH setstyle
|
||||||
|
"Sady ikon" OPEN_MENU -noext ICON_SETS_DIR $HOME/GNUstep/Library/WindowMaker/IconSets WITH seticons
|
||||||
|
"Pozadie" MENU
|
||||||
|
"Jedna farba" MENU
|
||||||
|
"Èierna" WS_BACK '(solid, black)'
|
||||||
|
"Modrá" WS_BACK '(solid, "#505075")'
|
||||||
|
"Indigo" WS_BACK '(solid, "#243e6c")'
|
||||||
|
"Námornícka modrá" WS_BACK '(solid, "#224477")'
|
||||||
|
"Fialová" WS_BACK '(solid, "#554466")'
|
||||||
|
"P¹enièná" WS_BACK '(solid, "wheat4")'
|
||||||
|
"Tmavosivá" WS_BACK '(solid, "#333340")'
|
||||||
|
"Vínová" WS_BACK '(solid, "#400020")'
|
||||||
|
"Jedna farba" END
|
||||||
|
"Prechod farieb" MENU
|
||||||
|
"Západ slnka" WS_BACK '(mvgradient, deepskyblue4, black, deepskyblue4, tomato4)'
|
||||||
|
"Obloha" WS_BACK '(vgradient, blue4, white)'
|
||||||
|
"Odtiene modrej" WS_BACK '(vgradient, "#7080a5", "#101020")'
|
||||||
|
"Odtiene indiga" WS_BACK '(vgradient, "#746ebc", "#242e4c")'
|
||||||
|
"Odtiene fialovej" WS_BACK '(vgradient, "#654c66", "#151426")'
|
||||||
|
"Odtiene p¹eniènej" WS_BACK '(vgradient, "#a09060", "#302010")'
|
||||||
|
"Odtiene sivej" WS_BACK '(vgradient, "#636380", "#131318")'
|
||||||
|
"Odtiene vínovej" WS_BACK '(vgradient, "#600040", "#180010")'
|
||||||
|
"Prechod farieb" END
|
||||||
|
"Obrázky" OPEN_MENU -noext BACKGROUNDS_DIR $HOME/GNUstep/Library/WindowMaker/Backgrounds WITH wmsetbg -u -t
|
||||||
|
"Pozadie" END
|
||||||
|
"Ulo¾i» tému" SHEXEC getstyle -t $HOME/GNUstep/Library/WindowMaker/Themes/"%a(Meno témy,Zadajte názov súboru:)"
|
||||||
|
"Ulo¾i» sadu ikon" SHEXEC geticonset $HOME/GNUstep/Library/WindowMaker/IconSets/"%a(Meno sady ikon,Zadajte názov súboru:)"
|
||||||
|
"Konfiguraèný nástroj" EXEC /usr/local/GNUstep/Apps/WPrefs.app/WPrefs
|
||||||
|
"Vzhµad" END
|
||||||
|
|
||||||
|
"Koniec" MENU
|
||||||
|
"Re¹tartova»" RESTART
|
||||||
|
"Spusti» BlackBox" RESTART blackbox
|
||||||
|
"Spusti» kwm" RESTART kwm
|
||||||
|
"Spusti» IceWM" RESTART icewm
|
||||||
|
"Koniec" EXIT
|
||||||
|
"Koniec" END
|
||||||
|
"Aplikácie" END
|
||||||
|
|
||||||
|
|
||||||
106
WindowMaker/plmenu.sk
Normal file
106
WindowMaker/plmenu.sk
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
("Aplikácie",
|
||||||
|
("Info",
|
||||||
|
("Panel Info", INFO_PANEL),
|
||||||
|
("Panel Legal", LEGAL_PANEL),
|
||||||
|
("Systémová konzola", EXEC, "xconsole"),
|
||||||
|
("Za»a¾enie systému", SHEXEC, "xosview || xload"),
|
||||||
|
("Zoznam procesov", EXEC, "xterm -e top"),
|
||||||
|
("Prehliadaè manuálov", EXEC, "xman")
|
||||||
|
),
|
||||||
|
("Spusti»...", SHEXEC, "%a(Spusti»,Zadajte príkaz:)"),
|
||||||
|
("XTerm", EXEC, "xterm -sb"),
|
||||||
|
("Rxvt", EXEC, "rxvt -bg black -fg white -fn fixed"),
|
||||||
|
("Pracovné plochy", WORKSPACE_MENU),
|
||||||
|
("Aplikácie",
|
||||||
|
("Grafika",
|
||||||
|
("Gimp", SHEXEC, "gimp >/dev/null"),
|
||||||
|
("XV", EXEC, "xv"),
|
||||||
|
("XPaint", EXEC, "xpaint"),
|
||||||
|
("XFig", EXEC, "xfig")
|
||||||
|
),
|
||||||
|
("Správca súborov Xfm", EXEC, "xfm"),
|
||||||
|
("Správca súborov OffiX", EXEC, "files"),
|
||||||
|
("LyX", EXEC, "lyx"),
|
||||||
|
("Netscape", EXEC, "netscape"),
|
||||||
|
("Ghostview", EXEC, "ghostview %a(Enter file to view)"),
|
||||||
|
("Acrobat", EXEC, "/usr/local/Acrobat3/bin/acroread %a(Enter PDF to view)"),
|
||||||
|
("TkDesk", EXEC, "tkdesk")
|
||||||
|
),
|
||||||
|
("Editory",
|
||||||
|
("XFte", EXEC, "xfte"),
|
||||||
|
("XEmacs", SHEXEC, "xemacs || emacs"),
|
||||||
|
("XJed", EXEC, "xjed"),
|
||||||
|
("NEdit", EXEC, "nedit"),
|
||||||
|
("Xedit", EXEC, "xedit"),
|
||||||
|
("VIM", EXEC, "xterm -e vim")
|
||||||
|
),
|
||||||
|
("Rôzne",
|
||||||
|
("Xmcd", SHEXEC, "xmcd 2> /dev/null"),
|
||||||
|
("CD prehrávaè", EXEC, "xplaycd"),
|
||||||
|
("Mixer", EXEC, "xmixer")
|
||||||
|
),
|
||||||
|
("Nástroje",
|
||||||
|
("Kalkulaèka", EXEC, "xcalc"),
|
||||||
|
("Vlastnosti okien", SHEXEC, "xprop | xmessage -center -title 'xprop' -file -"),
|
||||||
|
("Výber fontu", EXEC, "xfontsel"),
|
||||||
|
("Emulátor terminálu", EXEC, "xminicom"),
|
||||||
|
("Lupa", EXEC, "xmag"),
|
||||||
|
("Paleta", EXEC, "xcmap"),
|
||||||
|
("Zabi» okno", EXEC, "xkill"),
|
||||||
|
("Hodiny", EXEC, "asclock -shape"),
|
||||||
|
("Nástenka", EXEC, "xclipboard")
|
||||||
|
),
|
||||||
|
("Výber",
|
||||||
|
("Kopírova»", SHEXEC, "echo '%s' | wxcopy"),
|
||||||
|
("Posla» po¹tu", EXEC, "xterm -name mail -T Pine -e pine %s"),
|
||||||
|
("Prehliada» web", EXEC, "netscape %s"),
|
||||||
|
("Hµada» v manuáli", EXEC, "MANUAL_SEARCH(%s)")
|
||||||
|
),
|
||||||
|
("Pracovná plocha",
|
||||||
|
("Skry» ostatné", HIDE_OTHERS),
|
||||||
|
("Zobrazi» v¹etky", SHOW_ALL),
|
||||||
|
("Vyrovna» ikony", ARRANGE_ICONS),
|
||||||
|
("Obnovi» obrazovku", REFRESH),
|
||||||
|
("Uzamknú»", EXEC, "xlock -allowroot -usefirst"),
|
||||||
|
("Ulo¾i» sedenie", SAVE_SESSION),
|
||||||
|
("Zmaza» sedenie", CLEAR_SESSION)
|
||||||
|
),
|
||||||
|
("Vzhµad",
|
||||||
|
("Témy", OPEN_MENU, "-noext #wmdatadir#/Themes $HOME/GNUstep/Library/WindowMaker/Themes WITH setstyle"),
|
||||||
|
("©týly", OPEN_MENU, "-noext #wmdatadir#/Styles $HOME/GNUstep/Library/WindowMaker/Styles WITH setstyle"),
|
||||||
|
("Sada ikon", OPEN_MENU, "-noext #wmdatadir#/IconSets $HOME/GNUstep/Library/WindowMaker/IconSets WITH seticons"),
|
||||||
|
("Pozadie",
|
||||||
|
("Jedna farba",
|
||||||
|
("Èierna", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, black)'"),
|
||||||
|
("Modrá", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, \"#505075\")'"),
|
||||||
|
("Indigo", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, \"#243e6c\")'"),
|
||||||
|
("Námornícka modrá", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, \"#224477\")'"),
|
||||||
|
("Fialová", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, \"#554466\")'"),
|
||||||
|
("P¹enièná", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, wheat4)'"),
|
||||||
|
("Tmavosivá", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, \"#333340\")'"),
|
||||||
|
("Vínová", EXEC, "wdwrite WindowMaker WorkspaceBack '(solid, \"#400020\")'")
|
||||||
|
),
|
||||||
|
("Prechod farieb",
|
||||||
|
("Západ slnka", EXEC, "wdwrite WindowMaker WorkspaceBack '(mvgradient, deepskyblue4, black, deepskyblue4, tomato4)'"),
|
||||||
|
("Obloha", EXEC, "wdwrite WindowMaker WorkspaceBack '(vgradient, blue4, white)'"),
|
||||||
|
("Odtiene modrej", EXEC, "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#7080a5\", \"#101020\")'"),
|
||||||
|
("Odtiene indiga", EXEC, "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#746ebc\", \"#242e4c\")'"),
|
||||||
|
("Odtiene fialovej", EXEC, "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#654c66\", \"#151426\")'"),
|
||||||
|
("Odtiene p¹eniènej", EXEC, "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#a09060\", \"#302010\")'"),
|
||||||
|
("Odtiene sivej", EXEC, "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#636380\", \"#131318\")'"),
|
||||||
|
("Odtiene vínovej", EXEC, "wdwrite WindowMaker WorkspaceBack '(vgradient, \"#600040\", \"#180010\")'")
|
||||||
|
),
|
||||||
|
("Obrázky", OPEN_MENU, "-noext #wmdatadir#/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds WITH wmsetbg -u -t")
|
||||||
|
),
|
||||||
|
("Ulo¾i» tému", SHEXEC, "getstyle -t $HOME/GNUstep/Library/WindowMaker/Themes/\"%a(Theme name)\""),
|
||||||
|
("Ulo¾i» sadu ikon", SHEXEC, "geticonset $HOME/GNUstep/Library/WindowMaker/IconSets/\"%a(IconSet name)\""),
|
||||||
|
("Konfiguraèný nástroj", EXEC, "/usr/local/GNUstep/Apps/WPrefs.app/WPrefs")
|
||||||
|
),
|
||||||
|
("Koniec",
|
||||||
|
("Re¹tartova»", RESTART),
|
||||||
|
("Spusti» BlackBox", RESTART, blackbox),
|
||||||
|
("Spusti» kwm", RESTART, kwm),
|
||||||
|
("Spusti» IceWM", RESTART, icewm),
|
||||||
|
("Koniec", EXIT)
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -32,7 +32,8 @@ ro.po Romanian Andrei Vuta <gigi_man@manag.pub.ro>
|
|||||||
da.po Danish Birger Langkjer <langkjer@post3.tele.dk>
|
da.po Danish Birger Langkjer <langkjer@post3.tele.dk>
|
||||||
zh_TW.Big5.po Chinese Li Wei Jih <lwj83@cs.ccu.edu.tw>
|
zh_TW.Big5.po Chinese Li Wei Jih <lwj83@cs.ccu.edu.tw>
|
||||||
zh_CN.po Chinese Wang Jian <larkw@263.net>
|
zh_CN.po Chinese Wang Jian <larkw@263.net>
|
||||||
sk.po Slovak Milan Hromada <mhromada@elas.sk>
|
sk.po Slovak judas@hell <tomka@oalevice.sk>
|
||||||
|
Milan Hromada <mhromada@elas.sk>
|
||||||
bg.po Bulgarian Slavei Karadjov <slaff@exco.net>
|
bg.po Bulgarian Slavei Karadjov <slaff@exco.net>
|
||||||
hu.po Hungarian HORVATH Szabolcs <horvaths@inf.elte.hu>
|
hu.po Hungarian HORVATH Szabolcs <horvaths@inf.elte.hu>
|
||||||
|
|
||||||
|
|||||||
714
util/wkdemenu.pl
714
util/wkdemenu.pl
@@ -1,357 +1,357 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# kde2wmaker.pl:
|
# kde2wmaker.pl:
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# This script, made for users of Window Maker (http://windowmaker.org) is to
|
# This script, made for users of Window Maker (http://windowmaker.org) is to
|
||||||
# be used along with KDE (http://www.kde.org).
|
# be used along with KDE (http://www.kde.org).
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# The default directory, /usr/share/applnk, will contain various
|
# The default directory, /usr/share/applnk, will contain various
|
||||||
# sub-directories such as Development, Editors, Internet, etc. If for some
|
# sub-directories such as Development, Editors, Internet, etc. If for some
|
||||||
# reason, you wish to use an alternate (parent) directory that contains the
|
# reason, you wish to use an alternate (parent) directory that contains the
|
||||||
# various applnk files, it can be specified on the command line.
|
# various applnk files, it can be specified on the command line.
|
||||||
#
|
#
|
||||||
# The directory, if an alternate is specified, MUST be a parent directory to
|
# The directory, if an alternate is specified, MUST be a parent directory to
|
||||||
# any/all sub-directories.
|
# any/all sub-directories.
|
||||||
#
|
#
|
||||||
# Usage: kde2wmaker.pl [ Options... ]
|
# Usage: kde2wmaker.pl [ Options... ]
|
||||||
#
|
#
|
||||||
# Options:
|
# Options:
|
||||||
#
|
#
|
||||||
# -d <KDE App.kdelnk dir>
|
# -d <KDE App.kdelnk dir>
|
||||||
# -f <output menufile>
|
# -f <output menufile>
|
||||||
# -t <X terminal application>
|
# -t <X terminal application>
|
||||||
#
|
#
|
||||||
# When the script is run, it will write out a proper Window Maker "External
|
# When the script is run, it will write out a proper Window Maker "External
|
||||||
# Menu" entry, that can be included in the menu. When the External Menu has
|
# Menu" entry, that can be included in the menu. When the External Menu has
|
||||||
# been correctly configured, the root menu will display a sub-menu containing
|
# been correctly configured, the root menu will display a sub-menu containing
|
||||||
# all of the KDE related items found. The script only needs to be run when/if
|
# all of the KDE related items found. The script only needs to be run when/if
|
||||||
# KDE is updated.
|
# KDE is updated.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Installation and Configuration:
|
# Installation and Configuration:
|
||||||
#
|
#
|
||||||
# 1) If /usr/bin/perl is not the location of the perl binary on your system,
|
# 1) If /usr/bin/perl is not the location of the perl binary on your system,
|
||||||
# the first line should be changed to reflect upon it's location.
|
# the first line should be changed to reflect upon it's location.
|
||||||
# 2) Run the script.
|
# 2) Run the script.
|
||||||
# 3) Configure Window Maker's menu by editing ~/GNUstep/Defaults/WMRootMenu
|
# 3) Configure Window Maker's menu by editing ~/GNUstep/Defaults/WMRootMenu
|
||||||
# This could be done with any text editor, or by using WPrefs. Insert
|
# This could be done with any text editor, or by using WPrefs. Insert
|
||||||
# the following line (if done with a text editor) into the WMRootMenu file.
|
# the following line (if done with a text editor) into the WMRootMenu file.
|
||||||
# ("External Menu", OPEN_MENU, "$HOME/.kde2wmaker.menu"),
|
# ("External Menu", OPEN_MENU, "$HOME/.kde2wmaker.menu"),
|
||||||
# If done using WPrefs, simply "Add External Menu" from the drop down menu,
|
# If done using WPrefs, simply "Add External Menu" from the drop down menu,
|
||||||
# then type: $HOME/.kde2wmaker.menu into the "Menu Path/Directory List"
|
# then type: $HOME/.kde2wmaker.menu into the "Menu Path/Directory List"
|
||||||
# textbox.
|
# textbox.
|
||||||
# 4) Some KDE entries, such as "Pine" will require a terminal to
|
# 4) Some KDE entries, such as "Pine" will require a terminal to
|
||||||
# execute it. There is a terminal variable below. You may use any
|
# execute it. There is a terminal variable below. You may use any
|
||||||
# terminal, XTerm is the default. Any command line options such as:
|
# terminal, XTerm is the default. Any command line options such as:
|
||||||
# -fg -bg, etc. can be specified in this variable as well.
|
# -fg -bg, etc. can be specified in this variable as well.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Michael Hokenson - logan@dct.com
|
# Michael Hokenson - logan@dct.com
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# 21st January 2001.
|
# 21st January 2001.
|
||||||
#
|
#
|
||||||
# This script has been competely re-written to allow recursion of the
|
# This script has been competely re-written to allow recursion of the
|
||||||
# KDE menu directories to an arbitrary depth, fixing a major
|
# KDE menu directories to an arbitrary depth, fixing a major
|
||||||
# functional limitation in the original script. To do this, I have
|
# functional limitation in the original script. To do this, I have
|
||||||
# rewritten the code to traverse directories recursively, introducing
|
# rewritten the code to traverse directories recursively, introducing
|
||||||
# a subroutine, process_dir() to carry out the task.
|
# a subroutine, process_dir() to carry out the task.
|
||||||
#
|
#
|
||||||
# wkdemenu.pl provides an excellent extension to the user interface in
|
# wkdemenu.pl provides an excellent extension to the user interface in
|
||||||
# Window Maker, working well with the "Generated Submenu" feature.
|
# Window Maker, working well with the "Generated Submenu" feature.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Summary of New Features
|
# Summary of New Features
|
||||||
# -----------------------
|
# -----------------------
|
||||||
#
|
#
|
||||||
# Added support for menus of arbitrary depth.
|
# Added support for menus of arbitrary depth.
|
||||||
#
|
#
|
||||||
# Added basic internationalisation based on KDE's language
|
# Added basic internationalisation based on KDE's language
|
||||||
# setting. The language is taken from "~/.kde/share/config/kdeglobals"
|
# setting. The language is taken from "~/.kde/share/config/kdeglobals"
|
||||||
# or from "~/.kderc".
|
# or from "~/.kderc".
|
||||||
#
|
#
|
||||||
# Corrected the generation of menu names, incorporating
|
# Corrected the generation of menu names, incorporating
|
||||||
# internationalisation, where appropriate.
|
# internationalisation, where appropriate.
|
||||||
#
|
#
|
||||||
# Changed the double quotes to two single quotes in application names
|
# Changed the double quotes to two single quotes in application names
|
||||||
# so that they do not break the Menu parser in Window Maker.
|
# so that they do not break the Menu parser in Window Maker.
|
||||||
#
|
#
|
||||||
# Stripped off the arguments to commands on the Exec= line, except in
|
# Stripped off the arguments to commands on the Exec= line, except in
|
||||||
# a few KDE specific cases (e.g. kfmclient). The extra options are
|
# a few KDE specific cases (e.g. kfmclient). The extra options are
|
||||||
# only usable by KDE and were preventing many applications from
|
# only usable by KDE and were preventing many applications from
|
||||||
# launching, since they could parse the option %c or %s, for example.
|
# launching, since they could parse the option %c or %s, for example.
|
||||||
# This "feature" will probably need a more formal or interactive way
|
# This "feature" will probably need a more formal or interactive way
|
||||||
# of specifying exceptions in the future.
|
# of specifying exceptions in the future.
|
||||||
#
|
#
|
||||||
# Added a command line option for specifying the X terminal to
|
# Added a command line option for specifying the X terminal to
|
||||||
# use. This still defaults to xterm, but could be used to specify
|
# use. This still defaults to xterm, but could be used to specify
|
||||||
# aterm, etc.
|
# aterm, etc.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# To Do
|
# To Do
|
||||||
# -----
|
# -----
|
||||||
#
|
#
|
||||||
# Programmatically determine the system location for the KDE menu
|
# Programmatically determine the system location for the KDE menu
|
||||||
# directory.
|
# directory.
|
||||||
#
|
#
|
||||||
# Organise the output alphabetically, with directories appearing
|
# Organise the output alphabetically, with directories appearing
|
||||||
# before files.
|
# before files.
|
||||||
#
|
#
|
||||||
# Find a better way to parse the Exec= lines. In the short term,
|
# Find a better way to parse the Exec= lines. In the short term,
|
||||||
# provide a user mechanism for generating exceptions to the curtailing
|
# provide a user mechanism for generating exceptions to the curtailing
|
||||||
# of command line options. In the longer term, emulate what KDE does
|
# of command line options. In the longer term, emulate what KDE does
|
||||||
# with these command line features.
|
# with these command line features.
|
||||||
#
|
#
|
||||||
# Optimise the code. This is my first proper PERL script, and I'm sure
|
# Optimise the code. This is my first proper PERL script, and I'm sure
|
||||||
# there's a better way. =)
|
# there's a better way. =)
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Malcolm Cowe, malk@271m.net.
|
# Malcolm Cowe, malk@271m.net.
|
||||||
|
|
||||||
###
|
###
|
||||||
### Variables
|
### Variables
|
||||||
###
|
###
|
||||||
|
|
||||||
### The External Menu file, this should NEVER point to the root menu file
|
### The External Menu file, this should NEVER point to the root menu file
|
||||||
$menufile = "$ENV{'HOME'}/.kde2wmaker.menu";
|
$menufile = "$ENV{'HOME'}/.kde2wmaker.menu";
|
||||||
|
|
||||||
### Base directory, location of all the KDE AppName.kdelnk files +
|
### Base directory, location of all the KDE AppName.kdelnk files +
|
||||||
### Malcolm Cowe, 21/01/2001.
|
### Malcolm Cowe, 21/01/2001.
|
||||||
### Change the base directory default to point at the system files,
|
### Change the base directory default to point at the system files,
|
||||||
### not the user files. Need to find a way of determining the prefix
|
### not the user files. Need to find a way of determining the prefix
|
||||||
### programmatically.
|
### programmatically.
|
||||||
$prefix="/usr";
|
$prefix="/usr";
|
||||||
$basedir = $prefix."/share/applnk";
|
$basedir = $prefix."/share/applnk";
|
||||||
### - Malcolm Cowe, 21/01/2001.
|
### - Malcolm Cowe, 21/01/2001.
|
||||||
|
|
||||||
### Terminal to use. May be specified on the command line with the -t
|
### Terminal to use. May be specified on the command line with the -t
|
||||||
### switch.
|
### switch.
|
||||||
$term = "xterm";
|
$term = "xterm";
|
||||||
|
|
||||||
### Print to STDOUT, default is YES, a filename is specified
|
### Print to STDOUT, default is YES, a filename is specified
|
||||||
$stdout = 1;
|
$stdout = 1;
|
||||||
|
|
||||||
### + Malcolm Cowe, 21/01/2001.
|
### + Malcolm Cowe, 21/01/2001.
|
||||||
### KDE Locale Support
|
### KDE Locale Support
|
||||||
|
|
||||||
### Support for KDE internationalisation so that menu entries appear
|
### Support for KDE internationalisation so that menu entries appear
|
||||||
### in the language chosen by the user. Also gets around some problems
|
### in the language chosen by the user. Also gets around some problems
|
||||||
### with the KDE applnk file format.
|
### with the KDE applnk file format.
|
||||||
|
|
||||||
### The Locale is stored in one of two places, depending on the
|
### The Locale is stored in one of two places, depending on the
|
||||||
### version of KDE that is running.
|
### version of KDE that is running.
|
||||||
$kde2cf="$ENV{'HOME'}/.kde/share/config/kdeglobals";
|
$kde2cf="$ENV{'HOME'}/.kde/share/config/kdeglobals";
|
||||||
$kde1cf="$ENV{'HOME'}/.kderc";
|
$kde1cf="$ENV{'HOME'}/.kderc";
|
||||||
$kdeLanguage = "";
|
$kdeLanguage = "";
|
||||||
|
|
||||||
### Open the file, if it exists, otherwise provide a default language.
|
### Open the file, if it exists, otherwise provide a default language.
|
||||||
unless(open KDERC, $kde2cf) {
|
unless(open KDERC, $kde2cf) {
|
||||||
unless(open KDERC, $kde1cf) {
|
unless(open KDERC, $kde1cf) {
|
||||||
$kdeLanguage = "C";
|
$kdeLanguage = "C";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $kdeLanguage == ""){
|
if ( $kdeLanguage == ""){
|
||||||
$kdeLanguage = "C";
|
$kdeLanguage = "C";
|
||||||
### Search through the contents of the file
|
### Search through the contents of the file
|
||||||
while($line = <KDERC>) {
|
while($line = <KDERC>) {
|
||||||
chomp($line);
|
chomp($line);
|
||||||
### Grab the Language
|
### Grab the Language
|
||||||
if($line =~ /^Language=/) {
|
if($line =~ /^Language=/) {
|
||||||
$kdeLanguage = $line;
|
$kdeLanguage = $line;
|
||||||
$kdeLanguage =~ s/Language=//;
|
$kdeLanguage =~ s/Language=//;
|
||||||
($kdeLanguage) = split /:/,$kdeLanguage;
|
($kdeLanguage) = split /:/,$kdeLanguage;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(KDERC);
|
close(KDERC);
|
||||||
}
|
}
|
||||||
|
|
||||||
### - Malcolm Cowe, 21/01/2001.
|
### - Malcolm Cowe, 21/01/2001.
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
### Begin Main Iteration.
|
### Begin Main Iteration.
|
||||||
###
|
###
|
||||||
|
|
||||||
### Process command line arguments
|
### Process command line arguments
|
||||||
foreach $arg(@ARGV) {
|
foreach $arg(@ARGV) {
|
||||||
if($last) {
|
if($last) {
|
||||||
if($last eq "-d") {
|
if($last eq "-d") {
|
||||||
$basedir = $arg;
|
$basedir = $arg;
|
||||||
}
|
}
|
||||||
elsif($last eq "-f") {
|
elsif($last eq "-f") {
|
||||||
$menufile = $arg;
|
$menufile = $arg;
|
||||||
$stdout = 0;
|
$stdout = 0;
|
||||||
}
|
}
|
||||||
### + Malcolm Cowe, 21/01/2001.
|
### + Malcolm Cowe, 21/01/2001.
|
||||||
elsif($last eq "-t") {
|
elsif($last eq "-t") {
|
||||||
$term = $arg;
|
$term = $arg;
|
||||||
}
|
}
|
||||||
### - Malcolm Cowe, 21/01/2001.
|
### - Malcolm Cowe, 21/01/2001.
|
||||||
undef($last);
|
undef($last);
|
||||||
} elsif($arg =~ /^-/) {
|
} elsif($arg =~ /^-/) {
|
||||||
### + Malcolm Cowe, 21/01/2001.
|
### + Malcolm Cowe, 21/01/2001.
|
||||||
if($arg =~ /^-[dfst]$/) {
|
if($arg =~ /^-[dfst]$/) {
|
||||||
$last = $arg;
|
$last = $arg;
|
||||||
} else {
|
} else {
|
||||||
die("Unknown option: $arg\n\nUsage: kde2wmaker.pl [ Options... ]\n".
|
die("Unknown option: $arg\n\nUsage: kde2wmaker.pl [ Options... ]\n".
|
||||||
"\n\tOptions:\n\n".
|
"\n\tOptions:\n\n".
|
||||||
"\t\t-d <KDE App.kdelnk dir>\n".
|
"\t\t-d <KDE App.kdelnk dir>\n".
|
||||||
"\t\t-f <output menufile>\n".
|
"\t\t-f <output menufile>\n".
|
||||||
"\t\t-t <X terminal application>\n");
|
"\t\t-t <X terminal application>\n");
|
||||||
### - Malcolm Cowe, 21/01/2001.
|
### - Malcolm Cowe, 21/01/2001.
|
||||||
&Usage;
|
&Usage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
### Make sure the KDE Menu's Top Level Directory exists.
|
### Make sure the KDE Menu's Top Level Directory exists.
|
||||||
if(-d $basedir) {
|
if(-d $basedir) {
|
||||||
|
|
||||||
### See if there is an old menu file. If there is, rename it
|
### See if there is an old menu file. If there is, rename it
|
||||||
unless($stdout) {
|
unless($stdout) {
|
||||||
if(-e $menufile) {
|
if(-e $menufile) {
|
||||||
print STDERR "\tFound $menufile, renaming\n\n";
|
print STDERR "\tFound $menufile, renaming\n\n";
|
||||||
rename $menufile, "$menufile.old";
|
rename $menufile, "$menufile.old";
|
||||||
}
|
}
|
||||||
open(MENUFILE,"> $menufile");
|
open(MENUFILE,"> $menufile");
|
||||||
}
|
}
|
||||||
|
|
||||||
### Start the main menu entry
|
### Start the main menu entry
|
||||||
if($stdout) {
|
if($stdout) {
|
||||||
### + Malcolm Cowe, 21/01/2001.
|
### + Malcolm Cowe, 21/01/2001.
|
||||||
print STDOUT "\"KDE Applications\" MENU\n";
|
print STDOUT "\"KDE Applications\" MENU\n";
|
||||||
process_dir (STDOUT, $basedir);
|
process_dir (STDOUT, $basedir);
|
||||||
print STDOUT "\"KDE Applications\" END\n";
|
print STDOUT "\"KDE Applications\" END\n";
|
||||||
} else {
|
} else {
|
||||||
print MENUFILE "\"KDE Applications\" MENU\n";
|
print MENUFILE "\"KDE Applications\" MENU\n";
|
||||||
process_dir (MENUFILE, $basedir);
|
process_dir (MENUFILE, $basedir);
|
||||||
print MENUFILE "\"KDE Applications\" END\n";
|
print MENUFILE "\"KDE Applications\" END\n";
|
||||||
### - Malcolm Cowe, 21/01/2001.
|
### - Malcolm Cowe, 21/01/2001.
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
### Error out :/
|
### Error out :/
|
||||||
print STDERR "ERROR:\n\t$basedir not found\n\tTry another directory.\n";
|
print STDERR "ERROR:\n\t$basedir not found\n\tTry another directory.\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# End of Main Iteration.
|
# End of Main Iteration.
|
||||||
|
|
||||||
### + Malcolm Cowe, 21/01/2001.
|
### + Malcolm Cowe, 21/01/2001.
|
||||||
|
|
||||||
### process_dir() works it's way through each file and directory in
|
### process_dir() works it's way through each file and directory in
|
||||||
### the tree and generates the menu output to be used by Window Maker.
|
### the tree and generates the menu output to be used by Window Maker.
|
||||||
|
|
||||||
sub process_dir {
|
sub process_dir {
|
||||||
|
|
||||||
my $OUT = @_[0];
|
my $OUT = @_[0];
|
||||||
my $path = @_[1];
|
my $path = @_[1];
|
||||||
my $item;
|
my $item;
|
||||||
my @tld;
|
my @tld;
|
||||||
my ($gotLang, $gotDef, $gotExec);
|
my ($gotLang, $gotDef, $gotExec);
|
||||||
my $inDesktop;
|
my $inDesktop;
|
||||||
|
|
||||||
### tld == Top Level Directory.
|
### tld == Top Level Directory.
|
||||||
opendir(TLD, $path) || return;
|
opendir(TLD, $path) || return;
|
||||||
@tld = readdir(TLD);
|
@tld = readdir(TLD);
|
||||||
closedir(TLD);
|
closedir(TLD);
|
||||||
|
|
||||||
foreach $item(@tld) {
|
foreach $item(@tld) {
|
||||||
$gotLang = 0;
|
$gotLang = 0;
|
||||||
$gotDef = 0;
|
$gotDef = 0;
|
||||||
$gotExec = 0;
|
$gotExec = 0;
|
||||||
$inDesktop = 0;
|
$inDesktop = 0;
|
||||||
|
|
||||||
### Ignore hidden files and directories.
|
### Ignore hidden files and directories.
|
||||||
unless($item =~ /^\./) {
|
unless($item =~ /^\./) {
|
||||||
if (-d "$path/$item") {
|
if (-d "$path/$item") {
|
||||||
print $OUT "\"$item\" MENU\n";
|
print $OUT "\"$item\" MENU\n";
|
||||||
process_dir($OUT, "$path/$item");
|
process_dir($OUT, "$path/$item");
|
||||||
print $OUT "\"$item\" END\n";
|
print $OUT "\"$item\" END\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Process the contents of the applnk file to generate a menu
|
# Process the contents of the applnk file to generate a menu
|
||||||
# entry for the application.
|
# entry for the application.
|
||||||
|
|
||||||
open(SUB,"$path/$item");
|
open(SUB,"$path/$item");
|
||||||
|
|
||||||
### Search through the contents of the file
|
### Search through the contents of the file
|
||||||
while($line = <SUB>) {
|
while($line = <SUB>) {
|
||||||
chomp($line);
|
chomp($line);
|
||||||
### Get the application's name. This is stored in the
|
### Get the application's name. This is stored in the
|
||||||
### [Desktop Entry] section of the applnk description.
|
### [Desktop Entry] section of the applnk description.
|
||||||
###
|
###
|
||||||
### The application's name can have one of these forms:
|
### The application's name can have one of these forms:
|
||||||
### Name=
|
### Name=
|
||||||
### Name[]=
|
### Name[]=
|
||||||
### Name[language]=
|
### Name[language]=
|
||||||
###
|
###
|
||||||
### Get the default name anyway (one of the first two, just
|
### Get the default name anyway (one of the first two, just
|
||||||
### in case there is no language specific entry).
|
### in case there is no language specific entry).
|
||||||
if ($inDesktop) {
|
if ($inDesktop) {
|
||||||
# Make sure we are in fact still in the [Desktop Entry]
|
# Make sure we are in fact still in the [Desktop Entry]
|
||||||
# section.
|
# section.
|
||||||
if ($line =~ /^\[/) {
|
if ($line =~ /^\[/) {
|
||||||
$inDesktop = 0;
|
$inDesktop = 0;
|
||||||
}
|
}
|
||||||
### Extract the Name of the Application
|
### Extract the Name of the Application
|
||||||
elsif ($line =~ /^Name=/ && (!$gotDef || !gotLang)) {
|
elsif ($line =~ /^Name=/ && (!$gotDef || !gotLang)) {
|
||||||
$pname = $line;
|
$pname = $line;
|
||||||
$pname =~ s/^Name=//s;
|
$pname =~ s/^Name=//s;
|
||||||
$pname =~ s/\"/\'\'/g;
|
$pname =~ s/\"/\'\'/g;
|
||||||
$gotDef = 1;
|
$gotDef = 1;
|
||||||
}
|
}
|
||||||
elsif ($line =~ /^Name\[\]=/ && (!$gotDef || !gotLang)) {
|
elsif ($line =~ /^Name\[\]=/ && (!$gotDef || !gotLang)) {
|
||||||
$pname = $line;
|
$pname = $line;
|
||||||
$pname =~ s/^Name\[\]=//s;
|
$pname =~ s/^Name\[\]=//s;
|
||||||
$pname =~ s/\"/\'\'/g;
|
$pname =~ s/\"/\'\'/g;
|
||||||
$gotDef = 1;
|
$gotDef = 1;
|
||||||
}
|
}
|
||||||
elsif ($line =~ /^Name\[$kdeLanguage\]=/ && !$gotLang) {
|
elsif ($line =~ /^Name\[$kdeLanguage\]=/ && !$gotLang) {
|
||||||
$pname = $line;
|
$pname = $line;
|
||||||
$pname =~ s/^Name\[$kdeLanguage\]=//s;
|
$pname =~ s/^Name\[$kdeLanguage\]=//s;
|
||||||
$pname =~ s/\"/\'\'/g;
|
$pname =~ s/\"/\'\'/g;
|
||||||
$gotLang = 1;
|
$gotLang = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
### Grab the command
|
### Grab the command
|
||||||
if($line =~ /^Exec=/ && !$gotExec) {
|
if($line =~ /^Exec=/ && !$gotExec) {
|
||||||
$pargs = $line;
|
$pargs = $line;
|
||||||
$pargs =~ s/^Exec=//s;
|
$pargs =~ s/^Exec=//s;
|
||||||
# Strip off all command line options unless the
|
# Strip off all command line options unless the
|
||||||
# application is "kfmclient".
|
# application is "kfmclient".
|
||||||
if ($pargs !~ /^kfmclient/
|
if ($pargs !~ /^kfmclient/
|
||||||
&& $pargs !~ /^kcmshell/
|
&& $pargs !~ /^kcmshell/
|
||||||
&& $pargs !~ /^kdesu/){
|
&& $pargs !~ /^kdesu/){
|
||||||
($pargs) = split(/\s/, $pargs);
|
($pargs) = split(/\s/, $pargs);
|
||||||
}
|
}
|
||||||
$gotExec = 1;
|
$gotExec = 1;
|
||||||
}
|
}
|
||||||
### If Terminal=1, then we need to execute a term
|
### If Terminal=1, then we need to execute a term
|
||||||
if($line =~ /^Terminal=1$/) {
|
if($line =~ /^Terminal=1$/) {
|
||||||
$pargs = "$term -T \"$pname\" -e $pargs";
|
$pargs = "$term -T \"$pname\" -e $pargs";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ($line =~ /^\[Desktop\ Entry\]/ ||
|
elsif ($line =~ /^\[Desktop\ Entry\]/ ||
|
||||||
$line =~ /^\[KDE\ Desktop\ Entry\]/) {
|
$line =~ /^\[KDE\ Desktop\ Entry\]/) {
|
||||||
$inDesktop = 1;
|
$inDesktop = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
close(SUB);
|
close(SUB);
|
||||||
### Begin printing menu items
|
### Begin printing menu items
|
||||||
print $OUT "\t\"$pname\" EXEC $pargs\n";
|
print $OUT "\t\"$pname\" EXEC $pargs\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
### - Malcolm Cowe, 21/01/2001.
|
### - Malcolm Cowe, 21/01/2001.
|
||||||
|
|||||||
Reference in New Issue
Block a user