Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 08, 2005 10:09AM

I would like to translate km into German-Language. The *.exe is already complete in German. Which files have to be still translated, btw. which files are still necessary?

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: Hao Jiang
Date: January 08, 2005 07:07PM

You also need to translate menus.cfg, macros.cfg and all *.dll plugin files ASAP if you want to full translate the KM.

Hao

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: rumpel
Date: January 08, 2005 08:07PM

http://kmeleonbrowser.org/forum/read.php?f=1&i=20029&t=20006

Die Liste ist ganz gut.Die meisten Dateien hab ich allerdings schon übersetzt.Auch die Plugins.Bin jetzt bei den Zertifikatsdateien.
Es wird aber noch etwas dauern bis alles fertig ist.
Aber schick mir doch mal deine *.exe Datei, ich bin neugierig.

rumpel@public-files.de

rumpel

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 08, 2005 08:16PM

Thanks Hao, now I can start my night-work ;-)

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 08, 2005 08:43PM

kann ich machen. An diese Adresse: rumpel@public-files.de?

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: rumpel
Date: January 08, 2005 09:04PM

Ja, an die Adresse.Bei http://rapidshare.de/de/main.html
zum herunterladen bereitstellen geht auch.

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: Hao Jiang
Date: January 10, 2005 11:14PM

Hi, Clickfish:
I just found one typo in my previous post. I mean AFAIK, not ASAP. Sorry about that. I did translate K-M into Chinese including W-B 's version. It 's fun for me to make more people know KM and use it and also it is my motive for my unofficial version.

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: alain.NOSPAM.aupeix@wanadoo.fr
Date: January 12, 2005 09:24PM

Here is the list I use (for 09a, 09b2, 09b3, 09b4 and now for rc1 & rc2)

#################################
ExeFile translated with resHacker
#################################
K-Meleon.exe (*) (URL Bar title + buttons Yes;No;Cancel)

(*) Hex editor also needed for some strings

##################################
kplugins translated with resHacker
##################################
bookmark.dll (*) (Bookmarks window title)
favorites.dll (*) (Favorites window title)
fullscreen.dll
history.dll (*) (Day names + month names + ...)
hotlist.dll
layers.dll (*) (Layers Bar title)
macros.dll
privacy.dll

(*) Hex editor also needed for some strings

#############################
Files translated in en-US.jar
#############################

root
----
licence.txt

locale\en-US\global
-------------------
appstrings.properties
dialog.properties
css.properties
console.dtd
console.properties
config.dtd
config.properties
about.xhtml
printdialog.properties
printing.properties
printProgress.dtd
printPreviewProgress.dtd

-------------------------
locale\en-US\communicator
-------------------------
plugins.properties
security.properties
utilityOverlay.dtd

--------------------------------
locale\en-US\communicator\wallet
--------------------------------
wallet.properties

------------------
locale\en-US\necko
------------------
necko.properties

-------------------
locale\en-US\pippki
-------------------
certManager.dtd
newserver.dtd
newserver.properties
pippki.properties

-----------------------------------
It seems to be enough for en-US.jar
-----------------------------------

###############################
Files translated in toolkit.jar
###############################

root
----
licence.txt

--------------
content\global
--------------
aboutabout.html
buildconfig.html
mozilla.xhtml
credits.xhtml

###############################
Files translated in aggreg8.jar
###############################

-------------------------
locale\en-US
-------------------------
aggreg8.dtd
strings.properties
about.html

################################################
Files translated km folder (except k-meleon.exe)
################################################
license.txt
readme.html

##################################
Files translated defaults\profiles
##################################
macros.cfg
menus.cfg
prefs.js
user.js

#######################################
Files translated in skins
#######################################
commands.txt

#######################################
Files translated in skins\all skins folder
#######################################
toolbars.cfg

###################################
That seems to be enough to have an
as complete translation as we need.
###################################

If you find and locate other strings,
thank's to mail me it with nospam, obviously smiling smiley

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 17, 2005 07:12AM

Thanks a lot - now I wait for the final release of K-M 0.9

Quote

If you find and locate other strings,
thank's to mail me it with nospam, obviously smiling smiley

Yes, I make it ;-)

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: Andrew
Date: January 17, 2005 02:54PM

Alain,

Has that info. been added to the Wiki?

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: alain.NOSPAM.aupeix@wanadoo.fr
Date: January 17, 2005 04:11PM

Not yet, but I'm going to do it.

Well, also, I've tested today if I can modify wiki, and after a long period where I can't, now it seems ok.

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: Andrew
Date: January 17, 2005 05:55PM

Thanks for taking care of that.

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: jsnj
Date: January 19, 2005 10:29AM

bump

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: alain.NOSPAM.aupeix@wanadoo.fr
Date: January 19, 2005 02:29PM

bump ???

Options: ReplyQuote
Bump
Posted by: Mardus
Date: January 21, 2005 02:50AM

Are you incredulous as to why a guy wrote 'bump' or what does it rather mean?

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 21, 2005 06:20AM

@alain: I'm not shure what words I must replace in macros.cfg - can I see your file to comparing?

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 21, 2005 10:06AM

@alain: command return, my macro.cfg is ready and works ;-)

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: alain.NOSPAM.aupeix@wanadoo.fr
Date: January 21, 2005 04:03PM

Here is my file if you want.

You'll can see how I translate some strings for example with Navigation Settings
or the way to translate mouse gestures in menu.

macros.cfg
***************************************************************************************************
# MACROS DEFINITION FILE (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

$parm = "";

# ----ENGINES----

Google{
&OldSearch; $search = "Google";
$eng = "http://www.google.fr/search?q=";;
&SetSearch;
}

Yahoo{
&OldSearch; $search = "Yahoo";
$eng = "http://search.yahoo.com/bin/search?p=";;
&SetSearch;
}

Wikipedia{
&OldSearch; $search = "Wikipedia";
$eng = "http://en.wikipedia.org/wiki/";;
&SetSearch;
}

Dictionaries{
&OldSearch; $search = "Dictionnaires (One Look)";
$eng = "http://www.onelook.com/?w=";;
&SetSearch;
}

KM{
&OldSearch; $search = "Forums K-Meleon";
$eng = "http://kmeleonbrowser.org/forum/search.php?f=3&globalsearch=1&match=1&date=0&fldsubject=1&fldbody=1&search=";;
&SetSearch;
}

URL{
&OldSearch; $search = "URL"; $eng = ""; &Locked;
}


EngineSync{
setcheck("macros(Google)", getpref(STRING, $sen) == "Google" ? true:false);
setcheck("macros(Yahoo)", getpref(STRING, $sen) == "Yahoo" ? true:false);
setcheck("macros(Wikipedia)", getpref(STRING, $sen) == "Wikipedia" ? true:false);
setcheck("macros(Dictionaries)", getpref(STRING, $sen) == "Dictionnaires (One Look)" ? true:false);
}


# ----SEARCH MACROS----

$se="kmeleon.general.searchEngine";
$sl="kmeleon.general.searchLocked";
$sen="kmeleon.general.searchEngineName";
$so="kmeleon.general.searchOpen";
$eng=getpref(STRING, $se) ;
$search=getpref(STRING, $sen);
$layers="kmeleon.plugins.layers.load";
$layer=getpref(BOOL, $layers);

OldSearch{
$oldeng=$eng; $oldsearch=$search;
}

SetSearch{
getpref(BOOL,$sl)==false ? &Unlocked:&Locked; &Sync;
}
Unlocked{
setpref(STRING,$sen,$search); setpref(STRING,$se,$eng); &Search;
}
Locked{
&Search; $search=$oldsearch; $eng=$oldeng;
}
Search{
$tmp=getclipboard(); setclipboard(); id(ID_EDIT_COPY); $word=getclipboard();
$word=="" ? &URLBarSearch:$word==$URL ? &PromptSearch:&OpenSearch; setclipboard($tmp);
}
URLBarSearch{
id(ID_SELECT_URL); id(ID_EDIT_COPY); $word=getclipboard();
$word=="" ? $word=$URL:""; $word==$URL ? &PromptSearch:&OpenSearch;
}
PromptSearch{
$search=="" ? $search="Google":0;
$search == "URL" ? $tip = "Entrer l'adresse:" : $tip = "Recherche sur " . $search . ":";
setclipboard($tmp); $word=prompt($tip,$search); $word==""?"": &OpenSearch;
}
OpenSearch{
$how=getpref(INT, $so); $search!="Google"?"":&Umlauts;
$how==0 ? open($eng.$word):$how==1 ? &SearchNew:$how==2 ? &SearchBack:0;
}
Umlauts{
$word=gsub("ä","%C3%A4",$word); $word=gsub("ö","%C3%B6",$word);
$word=gsub("ü","%C3%BC",$word); $word=gsub("ß","%C3%9F",$word);
$word=gsub("Ä","%C3%84",$word); $word=gsub("Ö","%C3%96",$word);
$word=gsub("Ü","%C3%9C",$word);
}
SearchNew{
&ResetURL; $layer==true ? pluginmsg(layers,"OpenURL",$eng.$word)yawning smileypennew($eng.$word);
}
ResetURL{
setclipboard($URL); id(ID_SELECT_URL); id(ID_EDIT_PASTE); id(ID_SELECT_URL);
}
SearchBack{
&ResetURL; $layer==true ? pluginmsg(layers,"OpenURLBg",$eng.$word):OpenBg($eng.$word);
}

SN0{
setpref(INT,$so,0); &Sync;
}
SN1{
setpref(INT,$so,1); &Sync;
}
SN2{
setpref(INT,$so,2); &Sync;
}

SearchLock{
$search==""? $search="Google":0; togglepref(BOOL,$sl);
getpref(BOOL, $sl) == "true" ? $how = "verrouillé sur: " . $search : $how = "déverrouillé";
alert("Le moteur de recherche est maintenant " . $how . "\n\n\nPour définir le moteur par défaut:\n\n1. Déverrouiller\n2. Cliquer sur le moteur désiré depuis le menu\n3. Verrouiller", "Bouton de recherche", INFO);
&Sync;
}

AddEng{
$theurl="http://kmeleon.sourceforge.net/wiki/index.php?id=Search+Engines";;
$layer=="true"? pluginmsg(layers,"OpenURL",$theurl)yawning smileypennew($theurl);
$loaded="MacMen";
}
MacMen{
&Macros; &Menus; $loaded="";
}

JSEnable {
getpref(BOOL,$jscript)==false ? &JS:macros($macro);
}
JS{
&JSToggle; macros($macro); &JSToggle;
}

Highlight{
$macro="Find"; &JSEnable;
}
Find{
open("javascriptsad smileyfunction(){var count=0, text, dv;text=prompt(%22Find and Highlight the following:%22, %22%22);if(text==null || text.length==0)return;dv=document.defaultView;function searchWithinNode(node, te, len){var pos, skip, spannode, middlebit, endbit, middleclone;skip=0;if( node.nodeType==3 ){pos=node.data.toUpperCase().indexOf(te);if(pos>=0){spannode=document.createElement(%22SPAN%22);spannode.style.backgroundColor=%22yellow%22;middlebit=node.splitText(pos);endbit=middlebit.splitText(len);middleclone=middlebit.cloneNode(true);spannode.appendChild(middleclone);middlebit.parentNode.replaceChild(spannode,middlebit);++count;skip=1;}}else if( node.nodeType==1&& node.childNodes&& dv.getComputedStyle(node, null).getPropertyValue(%22display%22)!=%22none%22){for (var child=0; child < node.childNodes.length; ++child){child=child+searchWithinNode(node.childNodes[child], te, len);}}return skip;}window.status=%22Searching for '%22+text+%22'...%22;searchWithinNode(document.body, text.toUpperCase(), text.length);window.status=%22Found %22+count+%22 occurrence%22+(count==1?%22%22:%22s%22)+%22 of '%22+text+%22'.%22;})();");
}

Keyword{
togglepref(BOOL,"keyword.enabled"); &Sync;
}

CheckKey{
$eng=getpref(STRING,"keyword.URL");
}
KeyEngBBN{
$eng="http://www.google.fr/search?gfns=1&q=";;
$string="BBN"; &KeyEng;
}
KeyEngIFL{
$eng="http://www.google.fr/search?btnI=1&q=";;
$string="IFL"; &KeyEng;
}
KeyEngGoog{
$eng="http://www.google.fr/search?q=";;
$string="GOOG"; &KeyEng;
}
KeyConfig{
&CheckKey; $eng=prompt("Donnez le moteur de recherche automatique de mots:","Recherche automatique de mots",$eng)
$eng==""?"":$string=""; $eng==""?"": &KeyEng;
}
KeyEng{
setpref(STRING,"keyword.URL",$eng); setpref(STRING,"keyword.eng",$string); &Sync;
alert("Moteur de Recherche automatique de mots = '" . $eng . "'\n\n\nLe moteur de recherche de mots sera mis à jour après un redémarrage de K-Meleon.'", "Moteur de Recherche automatique de mots", INFO);
}

$taf="accessibility.typeaheadfind";

TAF{
togglepref(BOOL,$taf); &Sync;
}
TAFAuto{
togglepref(BOOL,$taf.".autostart");
$var = getpref(BOOL, $taf . ".autostart") == true ? $bool = " - ACTIVEE. Lors du chargement d'une page, la frappe démarrera automatiquement la recherche." : $bool = " - DESACTIVEE ";
$tip="Démarrage automatique de la recherche de texte saisi"; &Sync; &AlertTAF;
}
TAFLinks{
togglepref(BOOL,$taf.".linksonly");
$var=getpref(BOOL,$taf.".linksonly")==true ? $bool=" - ACTIVEE. Seul les liens seront concernés par le démarrage automatique de la saisie. Vous pouvez modifier ponctuellement cette règle en saisissant / pour tout texte, ou ' pour les liens seulement.":$bool=" - DESACTIVE ";
$tip="Démarrage automatique de la recherche des liens"; &Sync; &AlertTAF;
}
AlertTAF{
alert($tip.$bool,$tip,INFO);
}


# ----IMAGE & ZOOM MACROS----

ImageInfo{
$macro="ImgInfo"; &JSEnable;
}
ImgInfo {
$FrameURL=""; $PageURL=$FrameURL;
open("javascript: function chkframes(elem) { var rep; if (unescape(elem.location) == '".$PageURL."' || '".$PageURL."'=='') { rep=chkimg(elem); if (rep) return rep; } for (var f=0; f<elem.frames.length; f++) { rep=chkframes(elem.frames[f]); if (rep) return rep; } return; } function chkimg(elem){ if(elem.document.images.length>0){ var i; for(i=0;i<elem.document.images.length;i++){ if(unescape(elem.document.images[ i ].src) == '".$ImageURL."'){ return elem.document.images; } } } } function XyZ() { var img=chkframes(window); if (img) { alert(\"* I M A G E P R O P E R T I E S *\\r\\n\\r\\nURL:\\t\" + unescape(img.src) + \"\\r\\nWidth:\\t\" + img.width + \"\\r\\nHeight:\\t\" + img.height + \"\\r\\nALT:\\t\" + img.alt + \"\\r\\nTitle:\\t\" + img.title); } } void(XyZ()); ");
}

ImageCache{
$i=index($ImageURL,"#");
$addr=$i==-1 ? $ImageURL:substr($ImageURL,0,$i);
$client=index($addr,"https://")==0 ? "HTTP-memory-only":"HTTP";
$var="about:cache-entry?client=".$client."&sb=1&key=".$addr;
index($addr,"http")==0 ? opennew($var):"";
}

ZoomInImage{
$macro="ZoomInImg"; &JSEnable;
}
ZoomInImg{
$FrameURL=""; $PageURL=$FrameURL;
open("javascript:function chkframes(elem) { var rep; if (unescape(elem.location) == '".$PageURL."' || '".$PageURL."'=='') { rep=chkimg(elem); if (rep) return rep; } for (var f=0; f<elem.frames.length; f++) { rep=chkframes(elem.frames[f]); if (rep) return rep; } return; } function chkimg(elem){ if(elem.document.images.length>0){ var i; for(i=0;i<elem.document.images.length;i++){ if(unescape(elem.document.images[ i ].src) == '".$ImageURL."'){ return elem.document.images; } } } } function zoomImage(image, amt) { if(image.initialHeight == null) { /* avoid losing height information due to integer rounding while zooming out */ image.initialHeight = image.height; image.initialWidth = image.width; image.scalingFactor = 1; } image.scalingFactor *= amt; image.width = image.scalingFactor * image.initialWidth; image.height = image.scalingFactor * image.initialHeight; } function findIMG() { var img=chkframes(window); zoomImage(img,2); } void(findIMG());");
}

ZoomOutImage{
$macro="ZoomOutImg"; &JSEnable;
}
ZoomOutImg {
$FrameURL=""; $PageURL=$FrameURL;
open("javascript:function chkframes(elem) { var rep; if (unescape(elem.location) == '".$PageURL."' || '".$PageURL."'=='') { rep=chkimg(elem); if (rep) return rep; } for (var f=0; f<elem.frames.length; f++) { rep=chkframes(elem.frames[f]); if (rep) return rep; } return; } function chkimg(elem){ if(elem.document.images.length>0){ var i; for(i=0;i<elem.document.images.length;i++){ if(unescape(elem.document.images[ i ].src) == '".$ImageURL."'){ return elem.document.images; } } } } function zoomImage(image, amt) { if(image.initialHeight == null) { /* avoid losing height information due to integer rounding while zooming out */ image.initialHeight = image.height; image.initialWidth = image.width; image.scalingFactor = 1; } image.scalingFactor *= amt; image.width = image.scalingFactor * image.initialWidth; image.height = image.scalingFactor * image.initialHeight; } function findIMG() { var img=chkframes(window); zoomImage(img,.5); } void(findIMG());");
}

ZoomInImages{
$macro="ZoomInImgs"; &JSEnable;
}
ZoomInImgs{
open("javascriptsad smileyfunction(){ function zoomImage(image, amt) { if(image.initialHeight == null) { /* avoid losing height information due to integer rounding while zooming out */ image.initialHeight = image.height; image.initialWidth = image.width; image.scalingFactor = 1; } image.scalingFactor *= amt; image.width = image.scalingFactor * image.initialWidth; image.height = image.scalingFactor * image.initialHeight; } for (i=0; i<document.images.length; ++i) zoomImage(document.images, 1.1); })();");
}

ZoomOutImages{
$macro="ZoomOutImgs"; &JSEnable;
}
ZoomOutImgs{
open("javascriptsad smileyfunction(){ function zoomImage(image, amt) { if(image.initialHeight == null) { /* avoid losing height information due to integer rounding while zooming out */ image.initialHeight = image.height; image.initialWidth = image.width; image.scalingFactor = 1; } image.scalingFactor *= amt; image.width = image.scalingFactor * image.initialWidth; image.height = image.scalingFactor * image.initialHeight; } for (i=0; i<document.images.length; ++i) zoomImage(document.images, .9092); })();");
}

ZoomImageLinks{
$macro="ZoomImgLinks"; &JSEnable;
}
ZoomImgLinks{
open("javascript:{var hrefs=document.getElementsByTagName('A'),images='';for(idx=0;idx<hrefs.length;idx++){href=hrefs[idx].href.toUpperCase(); if(href.indexOf('.GIF')>-1||href.indexOf('.BMP')>-1||href.indexOf('.JPEG')>-1||href.indexOf('.JPG')>-1||href.indexOf('.PNG')>-1)images+='<img src='+hrefs[idx]+'><br><br>';}images='<html><body><center><h2>Images</h2><br><br>'+images+'</center></body></html>';document.write(images);document.close();}");
}

ZoomInPage{
$macro="ZoomInPg"; &JSEnable;
}
ZoomInPg{
open("javascript:function zoomImage(image, amt) { if(image.initialHeight == null) {image.initialHeight = image.height; image.initialWidth = image.width; image.scalingFactor = 1; } image.scalingFactor *= amt; image.width = image.scalingFactor * image.initialWidth; image.height = image.scalingFactor * image.initialHeight; }function rZoomFont(n, node) {for ( var i = 0; i < node.childNodes.length; i++ ) {if (node.childNodes.nodeType == 1) rZoomFont(n, node.childNodes);}startSize = getComputedStyle(node,'').getPropertyValue('font-size');startSize = Number(startSize.substr(0,startSize.length-2));lh = getComputedStyle(node,'').getPropertyValue('line-height');if (lh != 'normal') {lh = Number(lh.substr(0,lh.length-2)) * n + 'px';node.style.lineHeight = lh;}newSize = (startSize * n) + 'px';node.style.fontSize = newSize;}rZoomFont(1.1,document.getElementsByTagName('body')[0]); for (i=0; i<document.images.length; ++i) zoomImage(document.images, 1.1);");
}

ZoomOutPage{
$macro="ZoomOutPg"; &JSEnable;
}
ZoomOutPg{
open("javascript:function zoomImage(image, amt) { if(image.initialHeight == null) {image.initialHeight = image.height; image.initialWidth = image.width; image.scalingFactor = 1; } image.scalingFactor *= amt; image.width = image.scalingFactor * image.initialWidth; image.height = image.scalingFactor * image.initialHeight; }function rZoomFont(n, node) {for ( var i = 0; i < node.childNodes.length; i++ ) {if (node.childNodes.nodeType == 1) rZoomFont(n, node.childNodes);}startSize = getComputedStyle(node,'').getPropertyValue('font-size');startSize = Number(startSize.substr(0,startSize.length-2));lh = getComputedStyle(node,'').getPropertyValue('line-height');if (lh != 'normal') {lh = Number(lh.substr(0,lh.length-2)) * n + 'px';node.style.lineHeight = lh;}newSize = (startSize * n) + 'px';node.style.fontSize = newSize;}rZoomFont(0.9092,document.getElementsByTagName('body')[0]); for (i=0; i<document.images.length; ++i) zoomImage(document.images, .9092);");
}

$zoom="kmeleon.general.zoomButtons";

ZoomSet{
setpref(STRING,$zoom,$var); &Sync;
alert("Les boutons de la barre d'outils Zoom affecteront " . $what, Boutons de la barre d'outils Zoom, INFO);
}
ZoomText{
$var = "text"; $what = "texte seul."; &ZoomSet;
}
ZoomImages{
$var = "images"; $what = "images seules."; &ZoomSet;
}
ZoomPage{
$var = ""; $what = "texte et images."; &ZoomSet;
}

ZoomIn{
$zi=getpref(STRING,$zoom); $zi==""? &ZoomInPage:&ZoomInCheck;
}
ZoomInCheck{
$zi=="text"? id(ID_FONT_INCREASE):&ZoomInImages;
}

ZoomOut{
$zo=getpref(STRING,$zoom); $zo==""? &ZoomOutPage:&ZoomOutCheck;
}
ZoomOutCheck{
$zo=="text"? id(ID_FONT_DECREASE):&ZoomOutImages;
}


# ----BOOKMARK MACROS----

FileBook{
plugin(bookmarks,Add); plugin(bookmarks,Edit);
}
FileHot{
plugin(hotlist,Add); plugin(hotlist,Edit);
}
FileFav{
plugin(favorites,Add); plugin(favorites,Edit);
}

FavToolbar{
$tf="kmeleon.plugins.favorites.toolbarFolder";
$folder = getpref(STRING, $tf); $folder == "" ? $folder = "Liens" : "";
$folder = prompt("Entrer le nom du dossier devant être affiché dans la barre des favoris.", "Dossier de la barre des favoris", $folder);
$folder == "" ? "" : setpref(STRING, $tf, $folder);
$folder == "" ? "" : alert("Le dossier de la barre des Favoris sera ' " . $folder . " ' après redémarrage de K-Meleon", Dossier de la barre des favoris, INFO);
}
ChangeLinks{
$tit="kmeleon.plugins.favorites.title";
$favtit = getpref(STRING, $tit); $favtit == "" ? $favtit = "Liens" : "";
$favtit = prompt("Entrer le titre de la barre des favoris.", "Titre de la barre (Laisser vide ou cliquer Annuler pour effacer le titre)", $favtit);
setpref(STRING, $tit, $favtit);
alert("Les changements apportés au titre ne seront visibles qu'après redémarrage de K-Meleon", Titre de la barre des Favoris, INFO);
}

Chevron{
$chevron="kmeleon.plugins.".$plugin.".chevron"; togglepref(BOOL,$chevron);
&Sync; getpref(BOOL, $chevron) == "true" ? $var = "- ACTIVE" : $var = "- DESACTIVE";
alert("\nChevron de la barre d'outils " . $var . "\n\n\nLes changements apportés au titre ne seront visibles qu'après redémarrage de K-Meleon.", "Chevron de barre d'outils", INFO);
}
BookChev{
$plugin="bookmarks"; &Chevron;
}
FavChev{
$plugin="favorites"; &Chevron;
}
HotChev{
$plugin="hotlist"; &Chevron;
}

$ol="ID_OPEN_LINK"; $nw="ID_OPEN_LINK_IN_NEW_WINDOW";
$bw="ID_OPEN_LINK_IN_BACKGROUND"; $lo="layers(OpenURL)"; $bl="layers(OpenURLBg)";
$book="kmeleon.plugins.bookmarks.openurl";
$fav="kmeleon.plugins.favorites.openurl";
$hot="kmeleon.plugins.hotlist.openurl";

openurl{
setpref(STRING,"kmeleon.plugins.".$plugin.".openurl",$how); &Sync;
}

OpenBook1{
$plugin="bookmarks"; $how=$ol; &openurl;
}
OpenBook2{
$plugin="bookmarks"; $how=$nw; &openurl;
}
OpenBook3{
$plugin="bookmarks"; $how=$lo; &openurl;
}
OpenBook4{
$plugin="bookmarks"; $how=$bl; &openurl;
}
OpenBook5{
$plugin="bookmarks"; $how=$bw; &openurl;
}

OpenFav1{
$plugin="favorites"; $how=$ol; &openurl;
}
OpenFav2{
$plugin="favorites"; $how=$nw; &openurl;
}
OpenFav3{
$plugin="favorites"; $how=$lo; &openurl;
}
OpenFav4{
$plugin="favorites"; $how=$bl; &openurl;
}
OpenFav5{
$plugin="favorites"; $how=$bw; &openurl;
}

OpenHot1{
$plugin="hotlist"; $how=$ol; &openurl;
}
OpenHot2{
$plugin="hotlist"; $how=$nw; &openurl;
}
OpenHot3{
$plugin="hotlist"; $how=$lo; &openurl;
}
OpenHot4{
$plugin="hotlist"; $how=$bl; &openurl;
}
OpenHot5{
$plugin="hotlist"; $how=$bw; &openurl;
}


# ----GROUP MACROS----

$kg="kmeleon.group."; $URL="";
$rl="ReplaceLayersInWindow";
$al="AddLayersToWindow";
$gl="GetLayersInWindow";
$fn="FindNick"; $lc="";
$gn="kmeleon.groupnames";

ReadNames{
$names=getpref(STRING, $gn);
}
Checkname{
$checkname="\n".$name."\n"; $exists=index($names,$checkname);
}

SaveAsGroup{
&ReadNames; $names==""? $names="\n":0;
$group=pluginmsgex(layers,$gl,"",STRING);
$name = prompt("Donnez le nom du groupe où sauver ces onglets:", "Nom du groupe?", "");
$name==""?"": &Checkname;
$name==""?"": $exists!=-1? &ConfirmGroup:&SaveGroup;
}
ConfirmGroup{
confirm("Le nom du groupe existe déjà. Ecraser?", "Nom du groupe '" . $name . "' existant", YESNO, EXCLAIM)=="YES" ? setpref(STRING, $kg . $name, $group) : &SaveAsGroup;
}
SaveGroup{
setpref(STRING,$gn,$names.$name."\n"); setpref(STRING,$kg.$name,$group);
confirm("\nTapez '" . $name . "' dans la barre d'adresse et appuyez sur SHIFT+ENTREE pour l'ouvrir ou ALT+ENTREE pour l'ouvrir en arrière-plan.\n\n\nOuvrir ce groupe à chaque démarrage de K-Meleon?","Groupe enregistré sous: " . $name, YESNO) == "NO" ? "" : &AlertGroup;
}

SavedGroups{
&ReadNames; $names==""? $var="Folder": $var="Group";
$names==""? $names="Pas de groupe trouvé" ."\n":0;
$open = confirm($names . "\n\nOuvrir un " . $var . " maintenant?", "Groupes enregistrés") == "OK" ? &GroupNext:"";
}

URLToGroup{
$name = prompt("Entrer le nom du groupe où ajouter cette adresse:", "Nom du groupe?", "");
getpref(STRING,$kg.$name); $group=getpref(STRING,$kg.$name);
$name==""?"":$group==""? &NoGroup:&AddURL;
}
AddURL{
setpref(STRING,$kg.$name,$group.$URL."\t");
alert("L'adresse de '" . $TITLE . "' a été ajoutée au groupe: " . $name, "Groupe: '" . $name . "' mis à jour", INFO);
}

NoGroup{
alert("Groupe inexistant");
}

LayersToGroup {
$name = prompt("Donnez le nom du groupe où ajouter ces onglets:", "Group Name?", "");
getpref(STRING,$kg.$name); $group=getpref(STRING,$kg.$name);
$name==""?"": $group==""? &NoGroup:&AddLayers;
}
AddLayers{
$curr=pluginmsgex(layers,"GetLayersInWindow","",STRING);
setpref(STRING,$kg.$name,$group.$curr);
alert("Les onglets ont été ajoutés au groupe: " . $name, "Groupe: '" . $name . "' mis à jour", INFO);
}

DeleteGroup{
&ReadNames; $names==""? &NoGroup:&ConfirmDelete;
}
ConfirmDelete{
$open = confirm($names . "\n\nVoulez-vous supprimer un de ces groupes?", "Groupes enregistrés", YESNO);
$open=="NO"? "":&PromptDelete;
}
PromptDelete{
$name = prompt("Donnez le nom du groupe à supprimer:", "Nom du groupe?", "");
$name==""?"": &Checkname;
$name==""?"": $exists!=-1? &DeleteURLs:&NoGroup;
}
DeleteURLs{
$names=sub($checkname,"\n",$names);
setpref(STRING,$gn,$names); delpref($kg.$name);
alert("Groupe: '" . $name . "' effacé.", "Groupe effacé", INFO);
}

PluginCheck{
getpref(BOOL,"kmeleon.plugins.bookmarks.load")==false ? $hot=getpref(BOOL,"kmeleon.plugins.hotlist.load"):"";
$hot == "false" ? $tip = "Donnez le nom du groupe" : $tip = "Donnez le nom du groupe ou le nom de dossier";
}

SetOnly{
setpref(STRING,$og,"layers(ReplaceLayersInWindow)");
}
SetNext{
setpref(STRING,$og,"layers(AddLayersToWindow)");
}
GroupOnly{
$lc=$rl; &SetOnly; &OpenGroup; $lc=$al; &SetNext;
}
OpenGroup{
$old=getclipboard(); setclipboard(); id(ID_SELECT_URL); id(ID_EDIT_COPY);
$name=getclipboard(); $name==""?$name=$URL:"";
$name==$URL? &PromptGroup:&ChkGroup; setclipboard($old);
}
PromptGroup{
&PluginCheck; $name = prompt($tip, "Nom de groupe?", "");
$name==""?"":&ChkGroup;
}
ChkGroup{
$group=getpref(STRING,$kg.$name); $group==""? &ChkFolder:&Group;
}
ChkFolder{
$plugin="bookmarks"; $group=pluginmsgex($plugin,$fn,$name,STRING)==""? $plugin="hotlist":"";
pluginmsgex($plugin,$fn,$name,STRING)==""? &ResetURL:&Folder;
}
Group{
$lc==""? $lc=$al:""; pluginmsg(layers,$lc,$group);
}
Folder{
setclipboard($name); id(ID_SELECT_URL); id(ID_EDIT_PASTE); id(ID_NAV_GO); &ResetURL;
}

# STARTUP GROUP & LAST SESSION MACROS

$loaded="";
$sg="kmeleon.general.startGroup";
$sn="kmeleon.general.startGroupName";
$sh="kmeleon.general.startHome";
$og="kmeleon.general.opengroup";
$gt="kmeleon.grouptemp";
$kl="kmeleon.grouplast";
$ln="ID_OPEN_LINK_IN_NEW_WINDOW|ID_OPEN_LINK_IN_BACKGROUND";

StartGroup{
$oldname=getpref(STRING,$sn); &PluginCheck;
$name = prompt($tip, "Nom du groupe de démarrage?", $oldname);
$name==""?"":$group=getpref(STRING,$kg.$name)==""? &FolderCheck:&SetGroup;
}
FolderCheck{
$plugin="bookmarks"; $group=pluginmsgex($plugin,$fn,$name,STRING)==""? $plugin="hotlist":0;
$group=pluginmsgex($plugin,$fn,$name,STRING)==""? &NoStart:&SetGroup;
}
SetGroup{
setpref(INT,$sg,2); setpref(STRING,$sn,$name); setpref(BOOL,$sh,false); &Sync;
}
NoStart{
&NoGroup; setpref(STRING,$sn,$oldname); &StartGroup;
}
StartLast{
setpref(INT,$sg,3); setpref(BOOL, $sh, false); &Sync;
}
StartHome{
setpref(INT,$sg,0); setpref(BOOL,$sh,true); &Sync;
}
StartBlank{
setpref(INT,$sg,1); setpref(BOOL,$sh,false); &Sync;
}

GroupStart{
$oldclip=getclipboard(); $name=getpref(STRING,$sn);
id(ID_SELECT_URL); id(ID_EDIT_COPY); $theurl=getclipboard();
$theurl=="about:blank"? &LayersCheck:"";
setclipboard($oldclip); $loaded="";
}
LayersCheck{
$layer=="true"? &StartLayers:&StartWindows;
}
StartLayers{
$lc=$rl; &SetOnly; getpref(INT,$sg)==3 ? &OpenLast:&OpenStart;
$lc=$al; &SetNext;
}
OpenLast{
$group=getpref(STRING,$kl); $group==""?"":&Group;
}
OpenStart{
$name=getpref(STRING,$sn); &ChkGroup;
}
StartWindows{
setpref(STRING,$og,"ID_OPEN_LINK|ID_OPEN_LINK_IN_BACKGROUND");
$name=getpref(STRING,$sn); getpref(INT,$sg)==3 ?"":&ChkFolder;
setpref(STRING,$og,$ln);
}

GetSetTemp{
$group=pluginmsgex(layers,$gl,"",STRING); setpref(STRING,$gt,$group);
}
SetLast{
$group=getpref(STRING, $gt); setpref(STRING,$kl,$group);
}
OpenClosed{
$lc=$rl; $group=getpref(STRING,$gt); $curr=pluginmsgex(layers,$gl,"",STRING);
$group==$curr?"":$curr=""; $curr==""? &Group:"";
}

ReloadAll{
pluginmsg(layers,"AllLayersInWindow","ID_NAV_RELOAD");
}

Home{
getpref(INT,$sg)!=2 ? id(ID_NAV_HOME):&OpenStart;
}


# EVENT MACROS w/LAST SESSION & STARTUP GROUP SUPPORT

OnStartup{
&SetLast;
$layer=="true"? &SetNext:setpref(STRING,$og,$ln);
getpref(INT,$sg)<2 ? "":$loaded="GroupStart"; &Sync;
}

OnLoad{
$loaded==""?"":macros($loaded); &GetSetTemp; &Sync;
}

OnCloseGroup{
&GetSetTemp;
}

OnWMAppExit{
&GetSetTemp;
}

OnQuit{
&SetLast; getpref(BOOL,$uar)!=true? &UA:"";
getpref(INT, $monster) == 1 ? exec("c:\\program Files\\Cookie Monster\\CookieMonster.exe -auto"): 0;
getpref(INT, $km_pass) == 1 ? &km_pass: 0;
setpref(INT, $km_pass, 0);
getpref(INT, $npchooser) == 1 ? &npchooser: 0;
setpref(INT, $npchooser, 0);
getpref(INT, $permedit) == 1 ? &permedit: 0;
setpref(INT, $permedit, 0);
$parm = "out";
getpref(INT, $connect) == 1 ? &connect: 0;
}


# ----MAIL MACROS----

ReadClient{
$mclient=getpref(STRING,"kmeleon.general.MailClient");
$nclient=getpref(STRING,"kmeleon.general.NewsClient");
}
ParseMail{
&ReadClient; $which="Mail"; $client=$mclient; $ex="hotmail.com";
}
ParseNews{
&ReadClient; $which="News"; $client=$nclient; $ex="groups.google.com";
}
Mail{
&ParseMail;
$mclient==""? &ClientPath:$web=index($mclient,"http")==-1?exec($mclient)yawning smileypennew($mclient);
}
News{
&ParseNews;
$nclient==""? &ClientPath:$web=index($nclient,"http")==-1?exec($nclient)yawning smileypennew($nclient);
}
ClientPath{
&ReadClient; $client == "" ? $client = "C:\\Program Files\\Outlook Express\\msimn.exe":0;
$client = prompt("Donnez le chemin ou l'adresse (ex. http://" . $ex . ") du client.", " Chemin du client" . $which, $client);
$client == "" ? "" : setpref(STRING, "kmeleon.general." . $which . "Client", $client);
$client == "" ? "" : alert("\n" . " Client " . $which . "= '" . $client . "'\n\n\nCliquer sur le bouton " . $which . " pour visualiser vos " . $which . ".", " Client " . $which . " modifié", INFO);
}
MCFG{
&ParseMail; &ClientPath;
}
NCFG{
&ParseNews; &ClientPath;
}

Compose{
$old=getclipboard(); open("mailto:"); &ResetURL; setclipboard($old);
}

EmailURL{
$old=getclipboard(); open("mailtomoody smileysubject=".gsub("&","%26",$TITLE)."&body=".gsub("&","%26",$URL));
&ResetURL; setclipboard($old);
}
EmailImageURL{
$old=getclipboard(); open("mailtomoody smileysubject=".gsub("&","%26",$TITLE)."&body=".gsub("&","%26",$IMAGEURL));
&ResetURL; setclipboard($old);
}
EmailFrameURL{
$old=getclipboard(); open("mailtomoody smileysubject=".gsub("&","%26",$TITLE)."&body=".gsub("&","%26",$FRAMEURL));
&ResetURL; setclipboard($old);
}
EmailText{
$macro="EmailTxt"; &JSEnable;
}
EmailTxt{
open("javascriptsad smileyfunction(){var sel=document.getSelection();if(sel)self.location=\"mailtomoody smileysubject=\"+document.title+\"&body=\"+escape(sel)})()");
}


# ----PRIVACY MACROS----

$animation="image.animation_mode";
$colors="browser.display.use_document_colors";
$cookies="network.cookie.cookieBehavior";
$images="network.image.imageBehavior";
$java="security.enable_java";
$jscript="javascript.enabled";
$popups="dom.disable_open_during_load";
$referer="network.http.sendRefererHeader";
$jsconsole = "kmeleon.plugins.jsconsole.layer"
$npchooser = "kmeleon.tools.npchooser.inactiv"
$permedit = "kmeleon.tools.hostperm_edit.inactiv"
$monster = "kmeleon.tools.monster.activ"
$km_pass = "kmeleon.tools.km_pass.activ"
$connect = "kmeleon.tools.connect.activ"

AniToggle {
togglepref(STRING,$animation,"normal","none"); &Sync;
getpref(STRING, $animation) == "none" ? $tip = "BLOQUES" : $tip = "AUTORISES";
statusbar("Animation ".$tip);
}

CToggle{
togglepref(BOOL,$colors); &Sync;
getpref(BOOL, $colors) == false ? $tip = "BLOQUEES" : $tip = "AUTORISEES";
statusbar("Couleurs de Page ".$tip);
}

CKToggle {
togglepref(INT,$cookies,2,0); &Sync;
getpref(INT, $cookies) == 2 ? $tip = "BLOQUES" : $tip = "AUTORISES";
statusbar("Cookies ".$tip);
}

PBToggle{
togglepref(BOOL,$popups); &Sync;
getpref(BOOL, $popups) == true ? $tip = "BLOQUES" : $tip = "AUTORISES";
statusbar("Popups ".$tip);
}

JToggle{
togglepref(BOOL,$java); &Sync;
getpref(BOOL, $java) == false ? $tip = "BLOQUE" : $tip = "AUTORISE";
statusbar("Java ".$tip);
}

JSToggle{
togglepref(BOOL,$jscript); &Sync;
getpref(BOOL, $jscript) == false ? $tip = "BLOQUE" : $tip = "AUTORISE";
statusbar("JavaScript ".$tip);
}

ImgToggle {
togglepref(INT,$images,2,0); &Sync;
getpref(INT, $images) == 2 ? $tip = "BLOQUEES" : $tip = "AUTORISEES";
statusbar("Images ".$tip);
}

RefToggle {
togglepref(INT,$referer,2,0); &Sync;
getpref(INT,$referer)==2 ? $tip="AUTORISES":$tip="BLOQUES";
statusbar("Referer ".$tip);
}

JSCToggle{
togglepref(BOOL, $jsconsole); &Sync;
getpref(BOOL, $jsconsole) == "true" ? $tip = "un onglet" : $tip = "une fenêtre";
statusbar("La console s'ouvre dans " . $tip);
}

NPToggle {
togglepref(INT, $npchooser, 1,0); &Sync;
getpref(INT, $npchooser) == 1 ? $tip = "ACTIVE" : $tip = "INACTIVE";
statusbar("Gestionnaire de plugins " . $tip);
}

KPToggle {
togglepref(INT, $km_pass, 1,0); &Sync;
getpref(INT, $km_pass) == 1 ? $tip = "ACTIVE" : $tip = "INACTIVE";
statusbar("Gestionnaire mots de passe " . $tip);
}

CXToggle {
togglepref(INT, $connect, 1,0); &Sync;
getpref(INT, $connect) == 1 ? $tip = "ACTIVE" : $tip = "INACTIVE";
statusbar("Afficher la connexion en quittant " . $tip);
}

$ua="general.useragent.override"; $uas="";
$pu="kmeleon.privacy.useragent"; $ps=".string";
$uar="kmeleon.privacyUA.noReset";

UA{
delpref($ua); &Sync;
}
UA1{
$uas=getpref(STRING,$pu."1".$ps); &SetUA;
}
UA2{
$uas=getpref(STRING,$pu."2".$ps); &SetUA;
}
UA3{
$uas=getpref(STRING,$pu."3".$ps); &SetUA;
}
UACust{
$uas=getpref(STRING,$ua);
$uas=prompt("Entrez la chaîne User Agent qui identifiera K-Meleon:","User Agent personnalisé",$uas);
$uas==""?"":&SetUA;
}
SetUA{
setpref(STRING,$ua,$uas); &Sync;
}
ResetUA{
togglepref(BOOL,$uar); &Sync;
}

ClearAll{
plugin(privacy,ClearCache); plugin(privacy,ClearCookies);
plugin(privacy,ClearHistory); plugin(privacy,ClearMRU);
plugin(privacy,ClearSignon);
}

KillFlash{
$old=getclipboard(); $macro="KillFlsh"; &JSEnable; &ResetURL; setclipboard($old);
}
KillFlsh{
open(" javascript: (function(){var d=document; function K(N,t) { var b = d.createElement('div'); b.style.width=N.width; b.style.height=N.height; b.innerHTML='<del>' + t + '</del>'; N.parentNode.replaceChild(b,N); } function Z(t) { var T = d.getElementsByTagName(t), i; for (i=T.length-1;i+1;--i) K(T[ i ],t); } Z('object'); Z('embed');})(); (function(){document.close();})(); ");
}

KillApplets{
$old=getclipboard(); $macro="KillApp"; &JSEnable; &ResetURL; setclipboard($old);
}
KillApp{
open(" javascript: (function(){var d=document; function K(N,t) { var b = d.createElement('div'); b.style.width=N.width; b.style.height=N.height; b.innerHTML='<del>' + t + '</del>'; N.parentNode.replaceChild(b,N); } function Z(t) { var T = d.getElementsByTagName(t), i; for (i=T.length-1;i+1;--i) K(T[ i ],t); } Z('applet');})(); (function(){document.close();})(); ");
}


# ----LAYER MACROS----

$catch="kmeleon.plugins.layers.catchOpen";
$mode="kmeleon.general.mode";
$flip="dom.disable_window_flip";
$tip="";

LayersOnly{
$tip = "ONGLETS SEULEMENT";
$var="LAYERS ONLY"; setpref(BOOL,$layers,true); setpref(BOOL,$catch,true);
$bool=true; $menu=false; &Scripts; setpref(STRING,$mode,$var); &Sync;
alert("Toutes les fenêtres s'ouvriront dans des onglets. Si vous venez du mode Fenêtres seules, vous devrez redemarrer K-Meleon pour que le nouveau mode prenne effet.", "Mode de navigation: " . $tip, INFO);
}

LayersWindows{
$var=""; setpref(BOOL,$layers,true);
setpref(BOOL,$catch,false); setpref(STRING,$mode,$var); &Sync;
alert("Vous pourrez naviguer en utilisant onglets et fenêtres multiples. Si vous venez du mode Fenêtres seules, vous devrez redemarrer K-Meleon pour que le nouveau mode prenne effet.", "Mode de navigation: Onglets & Fenêtres", INFO);
}

WindowsOnly{
$tip = "FENETRES SEULEMENT";
$var = "WINDOWS ONLY"; $quest = confirm("\nLe mode Fenêtres seules désactivera le plugin des onglets. Groupes et sessions ne seront plus disponibles, à l'exception des groupes de dossiers pour les signets & la Hotlist.\n\n\nVoulez-vous désactiver le plugin des onglets?", "Mode de navigation: " . $tip, YESNO, EXCLAIM);
$quest=="NO"?"":&SetWO;
}
SetWO{
setpref(BOOL,$layers,false); setpref(BOOL,$catch,false); setpref(STRING,$mode,$var); &Sync;
alert("Relancer K-Meleon pour que le mode Fenêtres seulement puisse prendre effet.", "Mode de navigation: " . $tip, INFO);
}

BlockScripts{
$bool=true; $menu=false; &Scripts; &Sync;
alert("Les Sites ne peuvent maintenant pas cacher des barres d'outils, redimentionner le navigateur et désactiver les menus contextuels.", Scripts, INFO);
}
AllowScripts{
$bool=false; $menu=true; &Scripts; &Sync;
alert("Les Sites peuvent maintenant cacher des barres d'outils, redimentionner le navigateur et désactiver les menus contextuels.", Scripts, INFO);
}
Scripts{
setpref(BOOL,$flip,$bool);
setpref(BOOL,"dom.disable_window_move_resize",$bool);
setpref(BOOL,"dom.disable_window_open_feature.*",$bool);
setpref(BOOL,"dom.disable_window_open_feature.minimizable",$bool);
setpref(BOOL,"dom.disable_window_open_feature.titlebar",$bool);
setpref(BOOL,"dom.disable_window_open_feature.close",$bool);
setpref(BOOL,"dom.disable_window_open_feature.toolbar",$bool);
setpref(BOOL,"dom.disable_window_open_feature.location",$bool);
setpref(BOOL,"dom.disable_window_open_feature.directories",$bool);
setpref(BOOL,"dom.disable_window_open_feature.personalbar",$bool);
setpref(BOOL,"dom.disable_window_open_feature.menubar",$bool);
setpref(BOOL,"dom.disable_window_open_feature.scrollbars",$bool);
setpref(BOOL,"dom.disable_window_open_feature.resizable",$bool);
setpref(BOOL,"dom.disable_window_open_feature.status",$bool);
setpref(BOOL,"dom.disable_window_status_change",$bool);
setpref(BOOL,"dom.event.contextmenu.enabled",$menu);
}

$num="kmeleon.plugins.layers.numbers";
$style="kmeleon.plugins.layers.style";

LayerAlert{
alert("Certains changements ne seront pleinement pris en compte qu'au prochain onglet ouvert.", "Prise en compte des changements de l'apparence des onglets", INFO);
}
Enumerate{
togglepref(BOOL,$num); &Sync; &LayerAlert;
}
Style{
setpref(INT,$style,$int); &Sync; &LayerAlert;
}
Pressed{
$int=2; &Style;
}
Pressed+{
$int=10; &Style;
}
Buttons{
$int=6; &Style;
}
Buttons+{
$int=14; &Style;
}

LayersTitle{
$lt="kmeleon.plugins.layers.title";
$var=getpref(STRING, $lt); $var==""?$var="Onglets:":"";
$var = prompt("Entrer le titre de la barre des onglets:", "Titre de la barre des onglets ( Pour effacer le titre, laisser en blanc ou taper Annuler )", $var);
setpref(STRING,$lt,$var);
alert("Titre de la barre des onglets = " . $var . "\n\nLes changements ne seront pris en compte qu'après redémarrage de K-Meleon.", "Titre de la barre des onglets", INFO);
}

LayerWidth{
$max="kmeleon.plugins.layers.maxWidth";
$min="kmeleon.plugins.layers.minWidth";
$maxwid=getpref(INT,$max); $minwid=getpref(INT,$min);
$maxwid==0 ? $maxwid=35:"";
$maxwid = prompt("Donnez la largeur maximale:", Maximum Width, $maxwid);
$maxwid==""?"":setpref(INT,$max,$maxwid);
$maxwid == "" ? "" : $minwid = prompt("Donnez la largeur minimale:", Minimum Width, $minwid);
$maxwid==""?"":$minwid==""?"":setpref(INT,$min,$minwid);
$maxwid == "" ? "" : $minwid == "" ? "" : alert("Maximum = " . $maxwid . "\nMinimum = " . $minwid, "Largeur de la barre de boutons des onglets", INFO);
}

$onClose="kmeleon.plugins.layers.onCloseOption";
$onOpen="kmeleon.plugins.layers.onOpenOption";

SetCloseRight{
setpref(INT,$onClose,2); &Sync;
}
SetCloseLeft{
setpref(INT,$onClose,1); &Sync;
}
SetCloseLast{
setpref(INT,$onClose,0); &Sync;
}
SetOpenNext{
setpref(INT,$onOpen,1); &Sync;
}
SetOpenLast{
setpref(INT,$onOpen,0); &Sync;
}

$confirm="kmeleon.plugins.layers.confirmClose";

ConfirmToggle{
togglepref(BOOL,$confirm); &Sync;
getpref(BOOL,$confirm)==false ? $tip="DESACTIVE":$tip="ACTIVE";
statusbar("Confirmation avant fermeture " . $tip);
}

Selected{
$old=getclipboard(); setclipboard(); id(ID_EDIT_COPY); $add=getclipboard();
}

New{
&Selected; setclipboard($URL); id(ID_SELECT_URL); id(ID_EDIT_PASTE);
$add==""? &Opensad smileygetpref(STRING,$ou)!="ID_OPEN_LINK"? &PasteSel:&OpenNew);
}
Open{
$layer==true ? plugin(layers,Open):id(ID_NEW_BROWSER); setclipboard($old);
}
OpenNew{
&ResetURL; setclipboard($add);
$layer==true ? pluginmsg(layers,OpenURL,"about:blank")yawning smileypennew("about:blank");
$loaded="go";
}

PasteSel{
setclipboard($add); $add==""?id(ID_NAV_GO): &go; setclipboard($old);
}

go{
&PasteGo; setclipboard($old); $loaded="";
}


# ----URL BAR MACROS----

SelectGo{
&Selected; &PasteSel;
}

Copy{
id(ID_SELECT_URL); id(ID_EDIT_COPY);
}

PasteGo{
id(ID_SELECT_URL); id(ID_EDIT_PASTE); id(ID_NAV_GO);
}

PasteSearch{
id(ID_SELECT_URL); id(ID_EDIT_PASTE); &Search;
}

ResetURLBar{
$old = getclipboard(); &ResetURL; setclipboard($old);
}

$ou="kmeleon.general.openurl";

URLBar{
setpref(STRING,$ou,$var); &Sync
}
URLInCurr{
$var="ID_OPEN_LINK"; &URLBar;
}
URLInLayer{
$var="layers(OpenURL)"; &URLBar;
}
URLInNew{
$var="ID_OPEN_LINK_IN_NEW_WINDOW"; &URLBar;
}
URLInBgLayer{
$var="layers(OpenURLBg)"; &URLBar;
}
URLInBg{
$var="ID_OPEN_LINK_IN_BACKGROUND"; &URLBar;
}

OpenInNew{
$old=getpref(STRING,$ou); $layer==true? &URLInLayer:&URLInNew;
id(ID_NAV_GO); setpref(STRING,$ou,$old);
}

up_directory {
$var=dirname($URL); $var=="."?""yawning smileypen($var);
}

top_level {
$macro="top"; &JSEnable;
}
top{
open("javascript:location.pathname = ""; void 0");
}

$dom="kmeleon.general.domComplete";

ctrl_enter{
$var="0"; &GetComplete; &Domain;
}
ctrl_alt_enter{
$var="1"; &GetComplete; &Domain;
}
ctrl_shift_enter{
$var="2"; &GetComplete; &Domain;
}

GetComplete{
$prefix=getpref(STRING,$dom.$var.".prefix");
$prefix==""? $prefix="http://www.":"";;
$suffix=getpref(STRING,$dom.$var.".suffix");
$var=="0"?($suffix==""?$suffix=".com":""winking smiley:"";
$var=="1"?($suffix==""?$suffix=".net":""winking smiley:"";
$var=="2"?($suffix==""?$suffix=".org":""winking smiley:"";
}

Domain{
$old=getclipboard(); setclipboard(); id(ID_SELECT_URL); id(ID_EDIT_COPY);
$theurl=getclipboard(); $theurl==""? &ResetURL: &Complete; setclipboard($old);
}
Complete{
$fullurl=$prefix.$theurl.$suffix;
setclipboard($fullurl); id(ID_EDIT_PASTE); id(ID_NAV_GO);
}

CEConfig{
$var="0"; &GetComplete; $tip="Ctrl + Entrée"; &DomConfig;
}
CAEConfig{
$var="1"; &GetComplete; $tip="Ctrl + Alt + Entrée"; &DomConfig;
}
CSEConfig{
$var="2"; &GetComplete; $tip="Ctrl + Shift + Entrée"; &DomConfig;
}

DomConfig{
$prefix=prompt("Préfixe:",$tip,$prefix);
$prefix==""?"":setpref(STRING,$dom.$var.".prefix", $prefix);
$prefix==""?"":$suffix=prompt("Suffixe:",$tip,$suffix);
$prefix==""?"":$suffix==""?"":setpref(STRING,$dom.$var.".suffix", $suffix);
$prefix==""?"":$suffix==""?"":alert($prefix." + ".$suffix,$tip,INFO);
}


# ----DOWNLOAD MACROS----

$sd="kmeleon.general.saveDir";
$sp="kmeleon.general.savePageDir";
$si="kmeleon.general.saveImageDir";
$sld="kmeleon.general.saveLinkDir";
$dir="kmeleon.general.profileDir";
$path=getpref(STRING, $dir);

GetDir{
$which=getpref(STRING,$el);
}
GetDef{
$el=$sd; $dl="Default"; &GetDir;
}
GetPage{
$el=$sp; $dl="Save Page As"; &GetDir;
}
GetImage{
$el=$si; $dl="Save Image As"; &GetDir;
}
GetLink{
$el=$sld; $dl="Save Link As"; &GetDir;
}

Save{
&GetDef; $oldsave=$which; macros($get); setpref(STRING,$sd,$which);
id($id); setpref(STRING,$sd,$oldsave);
}

SavePage{
$get="GetPage"; $id="ID_FILE_SAVE_AS"; &Save;
}

SaveFrame{
$get="GetPage"; $id="ID_FILE_SAVE_FRAME_AS"; &Save;
}

SaveImage{
$get="GetImage"; $id="ID_SAVE_IMAGE_AS"; &Save;
}

SaveLink{
$get="GetLink"; $id="ID_SAVE_LINK_AS"; &Save;
}

SetDir{
$savetip = "Entrer le chemin de sauvegarde. (Inclure l'antislash à la fin du nom de dossier.)";
$which==""?$which=$path:"";
$which=prompt($savetip,$dl,$which);
$which==""?"":setpref(STRING,$el,$which);
$which==""?"":$savepath=$which; $which==""?"":&AlertSave;
}

DefaultDir{
&GetDef; &SetDir;
}

PageDir{
&GetPage; &SetDir;
}

ImageDir{
&GetImage; &SetDir;
}

LinkDir{
&GetLink; &SetDir;
}

AlertSave{
&GetDef; $def=$which; $dtip=$dl; &GetPage; $page=$which; $ptip=$dl;
&GetImage; $image=$which; $itip=$dl; &GetLink; $link=$which; $ltip=$dl;
alert($dtip." = ".$def.\n.$ptip." = ".$page.\n.$itip." = ".$image.\n.$ltip." = ".$link, "Dossiers de téléchargements",INFO);
}


# ----MOUSE GESTURES----

$mouse="kmeleon.plugins.gestures.";

Gestures{
togglepref(BOOL,$mouse."load"); &Sync;
getpref(BOOL,$mouse."load")==true ? $tip = "ACTIFS" : $tip = "INACTIFS";
alert("Les mouvements de souris seront " . $tip . " après redémarrage de K-Meleon.", "Mouvements de souris " . $tip, INFO);
}

GestGuide{
$var = confirm("* G U I D E D E C O N F I G U R A T I O N M O U V E M E N T S D E S O U R I S *\n\nCe guide présentera une demande de saisie pour chaque mouvement de souris disponible. Chaque demande montrera le mouvement dans le titre. Donnez la commande ou macro que vous désirez assigner à chaque mouvement. Pour vous aider, vous pouvez copier/coller la commande ou macro depuis la liste des commandes disponibles.\n\n\nVoulez-vous visualiser la liste des commandes et macros disponibles utilisables par les mouvements de souris? (Recommandé)","MOUVEMENTS DE SOURIS", YESNOCANCEL);
$var=="YES"? &Commands1st:0; $var=="NO"? &left:0; $var=="CANCEL"?"":0;
}
Commands1st{
&Commands; &left;
}

GestCFG{
$cmd=getpref(STRING,$mouse.$gest);
$cmd = prompt("Cmd KMELEON, Cmd PLUGIN, ou MACRO pour ce mouvement.", $var, $cmd);
$cmd==""?"":setpref(STRING,$mouse.$gest,$cmd);
$cmd == "" ? "" : confirm($var . " = " . $cmd . "\n\nConfigurer le mouvement suivant?", "MOUVEMENT DE SOURIS", YESNO) == "YES" ? macros($next):0;
}

left{
Menu = Gauche
$gest = "left"; $var = "Gauche"; $next = "right"; &GestCFG;
}
right{
Menu = Droite
$gest = "right"; $var = "Droite"; $next = "down"; &GestCFG;
}
down{
Menu = Bas
$gest = "down"; $var = "Bas"; $next = "downleft"; &GestCFG;
}
downleft{
Menu = Bas-Gauche
$gest = "downleft"; $var = "Bas-Gauche"; $next = "downright"; &GestCFG;
}
downright{
Menu = Bas-Droite
$gest = "downright"; $var = "Bas-Droite"; $next = "up"; &GestCFG;
}
up{
Menu = Haut
$gest = "up"; $var = "Haut"; $next = "upleft"; &GestCFG;
}
upleft{
Menu = Haut-Gauche
$gest="upleft"; $var = "Haut-Gauche"; $next="upright"; &GestCFG;
}
upright{
Menu = Haut-Droite
$gest="upright"; $var = "Haut-Droite";$next="left"; &GestCFG;
}


# ----BUTTON & MENU SYNC----

Sync{

&EngineSync;
setcheck("macros(SN0)",getpref(INT,$so)==0? true:false);
setcheck("macros(SN1)",getpref(INT,$so)==1? true:false);
setcheck("macros(SN2)",getpref(INT,$so)==2? true:false);
setcheck("macros(SearchLock)",getpref(BOOL,$sl));

setcheck("macros(Keyword)",getpref(BOOL,"keyword.enabled"));
setcheck("macros(KeyEngBBN)",getpref(STRING,"keyword.eng")=="BBN"? true:false);
setcheck("macros(KeyEngIFL)",getpref(STRING,"keyword.eng")=="IFL"? true:false);
setcheck("macros(KeyEngGoog)",getpref(STRING,"keyword.eng")=="GOOG"? true:false);
setcheck("macros(KeyConfig)",getpref(STRING,"keyword.eng")==""? true:false);

setcheck("macros(TAF)",getpref(BOOL,$taf));
setcheck("macros(TAFAuto)",getpref(BOOL,$taf.".autostart"));
setcheck("macros(TAFLinks)", getpref(BOOL,$taf.".linksonly"));

getpref(BOOL,$sh)==true ? setpref(INT,$sg,0):"";
setcheck("macros(StartHome)",getpref(BOOL,$sh));
setcheck("macros(StartBlank)",getpref(INT,$sg)==1? true:false);
setcheck("macros(StartGroup)",getpref(INT,$sg)==2? true:false);
setcheck("macros(StartLast)",getpref(INT,$sg)==3? true:false);

setcheck("macros(ZoomPage)",getpref(STRING,$zoom)==""? true:false);
setcheck("macros(ZoomText)",getpref(STRING,$zoom)=="text"? true:false);
setcheck("macros(ZoomImages)",getpref(STRING,$zoom)=="images"? true:false);

setcheck("macros(BookChev)",getpref(BOOL,"kmeleon.plugins.bookmarks.chevron"));
setcheck("macros(FavChev)",getpref(BOOL,"kmeleon.plugins.favorites.chevron"));
setcheck("macros(HotChev)",getpref(BOOL,"kmeleon.plugins.hotlist.chevron"));
setcheck("macros(OpenBook1)",getpref(STRING,$book)=="ID_OPEN_LINK" ? true:false);
setcheck("macros(OpenBook2)",getpref(STRING,$book)=="ID_OPEN_LINK_IN_NEW_WINDOW"? true:false);
setcheck("macros(OpenBook3)",getpref(STRING,$book)=="layers(OpenURL)"? true:false);
setcheck("macros(OpenBook4)",getpref(STRING,$book)=="layers(OpenURLBg)"? true:false);
setcheck("macros(OpenBook5)",getpref(STRING,$book)=="ID_OPEN_LINK_IN_BACKGROUND"? true:false);
setcheck("macros(OpenFav1)",getpref(STRING,$fav)=="ID_OPEN_LINK"? true:false);
setcheck("macros(OpenFav2)",getpref(STRING,$fav)=="ID_OPEN_LINK_IN_NEW_WINDOW"? true:false);
setcheck("macros(OpenFav3)",getpref(STRING,$fav)=="layers(OpenURL)"? true:false);
setcheck("macros(OpenFav4)",getpref(STRING,$fav)=="layers(OpenURLBg)"? true:false);
setcheck("macros(OpenFav5)",getpref(STRING,$fav)=="ID_OPEN_LINK_IN_BACKGROUND"? true:false);
setcheck("macros(OpenHot1)",getpref(STRING,$hot)=="ID_OPEN_LINK"? true:false);
setcheck("macros(OpenHot2)",getpref(STRING,$hot)=="ID_OPEN_LINK_IN_NEW_WINDOW"? true:false);
setcheck("macros(OpenHot3)",getpref(STRING,$hot)=="layers(OpenURL)"? true:false);
setcheck("macros(OpenHot4)",getpref(STRING,$hot)=="layers(OpenURLBg)"? true:false);
setcheck("macros(OpenHot5)",getpref(STRING,$hot)=="ID_OPEN_LINK_IN_BACKGROUND"? true:false);

setcheck("macros(Enumerate)",getpref(BOOL,$num));
setcheck("macros(Pressed)",getpref(INT,$style)==2? true:false);
setcheck("macros(Pressed+)",getpref(INT,$style)==10? true:false);
setcheck("macros(Buttons)",getpref(INT,$style)==6? true:false);
setcheck("macros(Buttons+)",getpref(INT,$style)==14? true:false);
setcheck("macros(SetCloseLast)",getpref(INT,$onClose)==0? true:false);
setcheck("macros(SetCloseLeft)",getpref(INT,$onClose)==1? true:false);
setcheck("macros(SetCloseRight)",getpref(INT,$onClose)==2? true:false);
setcheck("macros(SetOpenNext)",getpref(INT,$onOpen)==1? true:false);
setcheck("macros(SetOpenLast)",getpref(INT,$onOpen)==0? true:false);
setcheck("macros(ConfirmToggle)",getpref(BOOL,$confirm));

setcheck("macros(Gestures)",getpref(BOOL,$mouse."load"));

setcheck("macros(UA)",""==getpref(STRING,$ua)? true:false);
setcheck("macros(UA1)",getpref(STRING,$pu."1".$ps)==getpref(STRING,$ua)? true:false);
setcheck("macros(UA2)",getpref(STRING,$pu."2".$ps)==getpref(STRING,$ua)? true:false);
setcheck("macros(UA3)",getpref(STRING,$pu."3".$ps)==getpref(STRING,$ua)? true:false);
setcheck("macros(ResetUA)",getpref(BOOL,$uar)?false:true);

getpref(BOOL,$layers)==false ? setpref(BOOL,$catch,false):"";
getpref(BOOL,$layers)==false ? setpref(STRING,$mode,"WINDOWS ONLY")sad smileygetpref(BOOL,$catch)==true ? setpref(STRING,$mode,"LAYERS ONLY"):setpref(STRING,$mode,""));
setcheck("macros(LayersOnly)",getpref(BOOL,$catch)==true ? true:false);
setcheck("macros(LayersWindows)",getpref(STRING,$mode)==""? true:false);
setcheck("macros(WindowsOnly)",$layer==false ? true:false);

setcheck("macros(URLInCurr)",getpref(STRING,$ou)=="ID_OPEN_LINK"? true:false);
setcheck("macros(URLInNew)", getpref(STRING,$ou)=="ID_OPEN_LINK_IN_NEW_WINDOW"? true:false);
setcheck("macros(URLInLayer)",getpref(STRING,$ou)=="layers(OpenURL)"? true:false);
setcheck("macros(URLInBg)",getpref(STRING,$ou)=="ID_OPEN_LINK_IN_BACKGROUND"? true:false);
setcheck("macros(URLInBgLayer)",getpref(STRING,$ou)=="layers(OpenURLBg)"? true:false);

setcheck("macros(BlockScripts)",getpref(BOOL,$flip));
setcheck("macros(AllowScripts)",getpref(BOOL,$flip)==false ? true:false);

setcheck("macros(AniToggle)", getpref(STRING, $animation) == "none" ? true:false);
pluginmsg(toolbars, "CheckButton", "Vie Privée, macros(AniToggle), " . (getpref(STRING, $animation) == "none" ? 1 : 0));

setcheck("macros(CToggle)", getpref(BOOL, $colors) ? false:true);
pluginmsg(toolbars, "CheckButton", "Vie Privée, macros(CToggle), " . (getpref(BOOL, $colors) ? 0 : 1));

setcheck("macros(CKToggle)", getpref(INT, $cookies));
pluginmsg(toolbars, "CheckButton", "Vie Privée, macros(CKToggle), " . (getpref(INT, $cookies) ? 1 : 0));

setcheck("macros(ImgToggle)", getpref(INT, $images));
pluginmsg(toolbars, "CheckButton", "Vie Privée, macros(ImgToggle), " . (getpref(INT, $images) ? 1 : 0));

setcheck("macros(JToggle)", getpref(BOOL, $java) ? false:true);
pluginmsg(toolbars, "CheckButton", "Vie Privée, macros(JToggle), " . (getpref(BOOL, $java) ? 0 : 1));

setcheck("macros(JSToggle)", getpref(BOOL, $jscript) ? false:true);
pluginmsg(toolbars, "CheckButton", "Vie Privée, macros(JSToggle), " . (getpref(BOOL, $jscript) ? 0 : 1));

setcheck("macros(PBToggle)", getpref(BOOL, $popups));
pluginmsg(toolbars, "CheckButton", "Barre Principale, macros(PBToggle), " . (getpref(BOOL, $popups) ? 1 : 0));
pluginmsg(toolbars, "CheckButton", "Vie Privée, macros(PBToggle), " . (getpref(BOOL, $popups) ? 1 : 0));

setcheck("macros(RefToggle)", getpref(INT, $referer) ? false:true);
pluginmsg(toolbars, "CheckButton", "Vie Privée, macros(RefToggle), " . (getpref(INT, $referer) ? 0 : 1));

setcheck("macros(JSCToggle)", getpref(BOOL, $jsconsole) ? true:false);
setcheck("macros(NPToggle)", getpref(INT, $npchooser));
setcheck("macros(KPToggle)", getpref(INT, $km_pass));
setcheck("macros(CXToggle)", getpref(INT, $connect));
}


# ----CONFIG MACROS----

$skindir=getpref(STRING,"kmeleon.general.skinsDir");
$skin=getpref(STRING,"kmeleon.general.skinsCurrent");

Commands{
exec("notepad.exe ".$skindir."commands.txt");
}
Toolbars{
exec("notepad.exe ".$skindir.$skin."toolbars.cfg");
}
Macros{
exec("notepad.exe ".$path."macros.cfg");
}
Menus{
exec("notepad.exe ".$path."menus.cfg");
}
Accel{
exec("notepad.exe ".$path."accel.cfg");
}
Prefs{
exec("notepad.exe ".$path."prefs.js");
}
User{
exec("notepad.exe ".$path."user.js");
}
UserContent{
exec("notepad.exe ".$path."\chrome\\userContent.css");
}

JSConsole{
$xul = "chrome://global/content/console.xul";
getpref(BOOL, $jsconsole) == "true" ? &XUL : open("javascript:");
}

XUL{
$layer==true ? pluginmsg(layers,OpenURL,$xul)yawning smileypennew($xul);
}
AllPrefs{
$xul="about:config"; &XUL;
}
aboutmimes {
# $xul = "chrome://mtypes/content/pref/pref.xul"); &XUL;
opennew("chrome://mtypes/content/pref/pref.xul");
}
aboutplugs {
$xul = "about:plugins"; &XUL;
}

RSS{
$xul="chrome://aggreg8/content/aggreg8.xul"; &XUL;
}
Master{
$xul="chrome://pippki/content/pref-masterpass.xul"; &XUL;
}
Popups{
$xul="chrome://communicator/content/popupManager.xul"; &XUL;
}
Cert{
$xul="chrome://pippki/content/certManager.xul"; &XUL;
}
Cookies{
$xul="chrome://cookie/content/pref-cookies.xul"; &XUL; $loaded="CookMgr";
}
CookMgr{
open("javascript:viewCookies()"); $loaded="";
}
Images{
$xul="chrome://cookie/content/pref-images.xul"; &XUL; $loaded="ImgMgr";
}
ImgMgr{
open("javascript:viewImages()"); $loaded="";
}


# ----MISC. MACROS----

SetHome{
setpref(STRING,"kmeleon.general.homePage",$URL);
setpref(INT,$sg,0); setpref(BOOL,$sh,true); &Sync;
alert("'" . $TITLE . "' est maintenant votre page d'accueil.", "Page d'Accueil mise à jour", INFO);
}

KMWiki{
open("http://kmeleon.sourceforge.net/wiki/index.php?id=Welcome"winking smiley;
}

LinkInfo {
confirm($LinkURL . "\n\n\nVoulez aller à cette adresse maintenant?", "ADRESSE DU LIEN SELECTIONNE:", YESNO) == "YES" ? open($LINKURL):"";
}

ListLinks{
getpref(BOOL,$popups)==true ? &PB:&ViewLinks;
}
PB{
&PBToggle; &ViewLinks; &PBToggle;
}
ViewLinks{
$macro="OpenLinks"; &JSEnable;
}
OpenLinks{
open("javascript:LnkW=open('','LnkW','width=600,height=300,scrollbars,resizable');sLFw=window.name;if(!sLFw){sLFw=window.name='sLFw'};sLFd=document;DlnK=document.links;with(LnkW.document){write('<base target='+sLFw+'>'+DlnK.length+' total links from:<br><b>'+sLFd.title+'</b><br>'+sLFd.URL.link(sLFd.URL)+'<hr>');for(lNK=0;lNK<DlnK.length;lNK++){write('<p>'+DlnK[lNK].text+'<br>'+DlnK[lNK].href.link(DlnK[lNK]))};close();LnkW.focus()}") ;
}

FrameInLayer{
pluginmsg(layers,OpenURL,$FRAMEURL);
}

FrameInBack{
$layer==true ? pluginmsg(layers,OpenURLBg,$FRAMEURL):OpenBg($FRAMEURL);
}

ReloadFrame {
$macro="ReloadFrm"; &JSEnable;
}
ReloadFrm {
$FrameURL=""; $PageURL=$FrameURL;
open("javascript: function chkframes(elem) { var rep; if (unescape(elem.location) == '".$PageURL."' || '".$PageURL."'=='') { return elem; } for (var f=0; f<elem.frames.length; f++) { rep=chkframes(elem.frames[f]); if (rep) return rep; } return; } function reloadFrame() { var elem=chkframes(window); elem.location.reload(); } void(reloadFrame()); ");");
}

AutoDetect {
setpref(STRING,"intl.charset.detector",$ARG); forcecharset();
}

ForceCharset {
forcecharset($ARG);
}

$ie="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"";

URLInIE{
$oldclip=getclipboard(); setclipboard();
id(ID_SELECT_URL); id(ID_EDIT_COPY); $theurl=getclipboard();
$theurl==""? $theurl=$URL:"";
&ResetURL; setclipboard($oldclip);
exec($ie.$theurl);
}
LinkInIE{
exec($ie.$LINKURL);
}

Default{
exec("\SetDefault.exe ");
}

Continuous{
getpref(BOOL, $jscript) == "false" ? (confirm("JavaScript est actuellement désactivé. Vous devez l'activer pour utiliser cette fonctionnalité.\n\n\nValider JavaScript et continuer?", "JavaScript Désactivé", YESNO, EXCLAIM) == "YES" ? &JS1st : "") : &Reload;
}
JS1st{
&JSToggle; &Reload;
}
Reload{
open("javascriptsad smileyfunction(){var intv=prompt('Enter number of seconds between reloads. (Click Back button to stop)');if(intv&&!isNaN(intv)){with(document){write('<html><frameset rows=\"*,22\" framespacing=0 border=0 frameborder=no><frame noresize frameborder=no><frame scrolling=no noresize frameborder=no></frameset></html>');frames[0].location.href=document.location.href;var docstr='<html><body bgcolor=cyan style=\"margin-top:0px\">\n';docstr+='Reloading in <span id=\"caption\"></span>secs.</body>\n';docstr+='<script>\nvar reloadIntv='+intv+';\nvar secsLeft='+intv+';\nfunction reloadFrame(){secsLeft=reloadIntv+1;parent.frames[0].location.href=parent.frames[0].location.href;}\nfunction countDown(){secsLeft--;showTime();}\nfunction showTime(){document.getElementById(\"caption\").innerHTML=parseInt(secsLeft)+\" \";}\nsetInterval(\"reloadFrame()\",'+intv*1000+');\nsetInterval(\"countDown()\",1000);\nshowTime();\n</script>\n</html>';frames[1].document.write(docstr);}}})()");
}


# ---- Autres Outils -----

connect {
exec("tools\\Connexion.exe " . $parm);
}

shortcut{
exec("tools\\ShortCut.exe");
}
npchooser {
exec("tools\\NpChooser.exe");
}
km_pass {
exec("tools\\Km_Pass.exe " . "c:\progra~4\k-mele~6");
}
validate_html {
menu = "Valider le (x)HTML du site courant";
open("http://validator.w3.org/check?uri=".$URL);
}
DownFolder{
$downdir = getpref(STRING, "kmeleon.general.saveDir");
$downdir == "" ? 0 : exec("explorer.exe " . $downdir);
}

LocalHelp {
opennew( "file:///" . $skindir . "..\\help\\index.html");
}
***************************************************************************************************

menus.cfg
***************************************************************************************************
# MENU DEFINITION FILE by Jeff Doozan & Brian Harris

# Note: Popup Menu must be defined *before* being used as a submenu


Moteurs{
macros(Google)
macros(Yahoo)
macros(Wikipedia)
macros(Dictionaries,Dictionnaires)
}


Options{
macros(SearchLock, Verrouiller le moteur de recherche)
-
macros(SN0,Ouvrir les résultats dans la page courante);
macros(SN1, Ouvrir les résultats dans une nouvelle page);
macros(SN2, Ouvrir les résultats en arrière-plan);
-
macros(AddEng, Ajouter des moteurs (en ligne)...)
}


Recherche Web{
!Moteurs
-
:Options
}


Options du texte en barre d'adresse{
macros(URLInCurr, Toujours ouvrir dans l'onglet courant)
%ifplugin layers
macros(URLInLayer, Toujours ouvrir dans un nouvel onglet)
macros(URLInBgLayer, Toujours ouvrir dans un onglet en arrière-plan)
-
%endif
macros(URLInNew, Toujours ouvrir dans une nouvelle fenêtre)
macros(URLInBg, Toujours ouvrir dans une fenêtre en arrière-plan)
}


Naviguer{
macros(URLInNew, Ouvrir dans une nouvelle page\tCtrl+Alt+N)
macros(URLInIE, Ouvrir dans Internet Explorer\tCtrl+Alt+I)
-
macros(Copy,Copier)
macros(PasteGo, Copier et ouvrir\tCtrl+Alt+V)
macros(PasteSearch, Copier et chercher\tCtrl+Shift+V)
-
macros(ResetURLBar, Effacer la barre d'adresse)
privacy(ClearMRU, Effacer l'historique de la barre d'adresse)
:Options du texte en barre d'adresse
}


Remonter{
macros(up_directory, Remonter d'un répertoire)
macros(top_level, Revenir à la racine du site)
}


Nouveau{
layers(Open, Nouvel onglet\tCtrl+T)
&Nouvelle Fenêtre\tCtrl+N = ID_NEW_BROWSER
}


Options d'ouverture{
macros(SetOpenNext, Après l'onglet courant)
macros(SetOpenLast, Après le dernier l'onglet)
}


Ouvrir{
!Nouveau
%ifplugin layers
-
!Options d'ouverture
%endif
#bmpmenu()
}


Fermer les onglets{
layers(Close, &Fermer l'onglet\tCtrl+W)
layers(CloseAll, Fermer &tous les onglets\tCtrl+Shift+W)
layers(CloseAllOther, Fermer les &autres onglets\tCtrl+Alt+W)
-
}


Fermer{
%ifplugin layers
!Fermer les onglets
%endif
&Fermer la fenêtre\tAlt+F4 = ID_FILE_CLOSE
&Quitter\tCtrl+Alt+F4 = ID_APP_EXIT
}


Options de fermeture{
macros(SetCloseRight, Activer l'onglet suivant)
macros(SetCloseLeft, Activer l'onglet précédent)
macros(SetCloseLast, Activer le dernier onglet sélectionné)
-
macros(ConfirmToggle, Confirmer avant fermeture si plusieurs onglets)
}


Bouton Fermer{
!Fermer
%ifplugin layers & macros
-
!Options de fermeture
%endif
#bmpmenu()
}


Imprimer{
&Imprimer...\tCtrl+P = ID_FILE_PRINT
Pré&visualisation = ID_FILE_PRINTPREVIEW
Mi&se en page = ID_FILE_PRINTSETUP
#bmpmenu()
}


&Fichier {
!Nouveau
-
Fenêtre suivante = ID_WINDOW_NEXT
Fenêtre précédente = ID_WINDOW_PREV
-
&Ouvrir...\tCtrl+O = ID_FILE_OPEN
%ifplugin layers
macros(OpenLast, Ouvrir la dernière session\tCtrl+Alt+L)
%endif
%ifplugin macros
macros(SavePage, Enregistrer la page &sous...\tCtrl+S)
%else
Enregistrer &sous...\tCtrl+S = ID_FILE_SAVE_AS
%endif
-
!Imprimer
-
Navigation Hors-ligne = ID_OFFLINE
-
!Fermer
}


Editer{
Co&uper\tCtrl+X = ID_EDIT_CUT
&Copier\tCtrl+C = ID_EDIT_COPY
C&oller\tCtrl+V = ID_EDIT_PASTE
&Sélectionner tout\tCtrl+A = ID_EDIT_SELECT_ALL
}


&Edition {
%ifplugin layers & macros
macros(OpenClosed, Réouvrir le dernier onglet\tCtrl+Alt+Z)
-
%endif
!Editer
-
%ifplugin macros
macros(Highlight, &Chercher et surligner\tCtrl+F)
-
%endif
&Chercher dans la page\tCtrl+F = ID_EDIT_FIND
Chercher le suivant\tF3 = ID_EDIT_FINDNEXT
Chercher le précédent\tShift+F3 = ID_EDIT_FINDPREV
-
&Gérer les Profils... = ID_MANAGE_PROFILES
Pr&éférences = ID_PREFERENCES
}


&Barres d'outils {
@ToolBars
&Barre d'état = ID_VIEW_STATUS_BAR
-
&Verrouiller les barres d'outils = ID_TOOLBARS_LOCK
macros(User, Menu/Throbber...)
macros(Toolbars, Personnaliser...)
}


Accueil{
Ouvrir la page d'accueil\tAlt+Home = ID_NAV_HOME
%ifplugin layers
macros(OpenStart, Ouvrir le groupe de démarrage\tCtrl+Alt+Home)
macros(OpenLast, Ouvrir la dernière session\tCtrl+Alt+L)
%else
%ifplugin bookmarks|hotlist
macros(OpenStart, Ouvrir le dossier de démarrage\tCtrl+Alt+Home)
%endif
%endif
-
macros(SetHome, Définir comme page d'accueil)
-
macros(StartHome, Démarrer avec la page d'accueil)
macros(StartBlank, Démarrer avec une page vierge)
%ifplugin layers
macros(StartGroup, Démarrer avec un groupe...)
macros(StartLast, Démarrer avec la dernière session)
%else
%ifplugin bookmarks|hotlist
macros(StartGroup, Démarrer avec un dossier...)
%endif
%endif
}


Historique{
history(Config, Paramétrage...)
history(View, Ouvrir l'historique\tCtrl+H)
privacy(ClearHistory, Effacer l'historique)
history()
}


Apparence{
macros(Enumerate, Numérotation des onglets)
-
macros(Pressed, Pressé (défaut))
macros(Pressed+, Pressé + Astérisques)
-
macros(Buttons, Boutons)
macros(Buttons+, Boutons + Astérisques)
-
macros(LayersTitle, Titre de la barre d'onglet...)
macros(LayerWidth, Largeur des boutons de la barre d'onglet...)
}


&Onglets{
%ifplugin macros
:Apparence
:Options d'ouverture
:Options de fermeture
-
%endif
layers()
}


&Encodage {
macros(AutoDetect(), (Off))
macros(AutoDetect(universal_charset_detector), Auto-Détection)
-
macros(ForceCharset(iso-8859-1), Western (ISO-8859-1))
-
macros(ForceCharset(iso-8859-2), Europe Centrale (ISO-8859-2))
macros(ForceCharset(windows-1250), Europe Centrale (Windows-1250))
-
macros(ForceCharset(utf-8), Unicode (UTF-8))
macros(ForceCharset(utf-7), Unicode (UTF-7))
}


Zoom +{
macros(ZoomInPage, Zoom + de la Page\tCtrl+Alt++)
Zoom + du Texte\tCtrl++ = ID_FONT_INCREASE
macros(ZoomInImages, Zoom + des Images\tAlt++)
-
macros(ZoomImageLinks, Zoom des Liens Images)
#bmpmenu()
}


Zoom -{
macros(ZoomOutPage, Zoom - de la Page\tCtrl+Alt+ -)
Zoom - du Texte\tCtrl+ - = ID_FONT_DECREASE
macros(ZoomOutImages, Zoom - des Images\tAlt+ -)
#bmpmenu()
}


Options Bouton Zoom{
macros(ZoomPage, Page entière (défaut))
macros(ZoomImages, Images seulement)
macros(ZoomText, Texte seulement)
}


Zoom{
!Zoom +
-
!Zoom -
-
:Options Bouton Zoom
}


Options de rechargement{
Forcer le rechargement = ID_NAV_FORCE_RELOAD
%ifplugin layers
macros(ReloadAll, Recharger tous les onglets)
%endif
macros(Continuous, Rechargement automatique)
}


Navigation{
&Précédent = ID_NAV_BACK
&Suivant = ID_NAV_FORWARD
&Arrêter = ID_NAV_STOP
&Recharger = ID_NAV_RELOAD
%ifplugin macros
:Options de rechargement
%else
Forcer le rechargement = ID_NAV_FORCE_RELOAD
%endif
}


Visualiser les Infos de la page{
macros(ListLinks, Liens de la page)
Page en Cache = ID_VIEW_PAGE_INFO
So&urce de la page = ID_VIEW_SOURCE
}


Fullscreen{
%ifplugin fullscreen
-
fullscreen(P&lein Ecran\tF11)
%endif
}


&Affichage {
:&Barres d'outils
-
!Navigation
%ifplugin macros
-
:Accueil
%else
Accueil\tAlt+Home = ID_NAV_HOME
-
%endif
%ifplugin history
:Historique
%endif
%ifplugin layers
:&Onglets
%endif
%ifplugin history|layers
-
%endif
%ifplugin macros
:Zoom
:&Encodage
%else
Zoom + du Texte\tCtrl++ = ID_FONT_INCREASE
Zoom - du Texte\tCtrl+- = ID_FONT_DECREASE
%endif
-
!Visualiser les Infos de la page
!Fullscreen
}


&Signets {
bookmarks(Add, Ajout)
bookmarks(Edit, Edition)
macros(FileBook, Ajout et Edition)
-
bookmarks(Config, Configuration)
-
bookmarks()
}


F&avoris {
favorites(Add, Ajout)
favorites(Edit, Explorer)
macros(FileFav, Ajout et Explorer)
-
favorites(Config, Configuration)
-
favorites()
}


&Hotlist {
hotlist(Add, Ajout)
hotlist(Edit, Editer)
macros(FileHot, Ajout et Edition)
-
hotlist(Config, Configuration)
-
hotlist()
}


G&roupes{
macros(SaveAsGroup, Sauver comme groupe...\tCtrl+Alt+G)
macros(URLToGroup, Ajouter l'adresse au groupe...)
macros(LayersToGroup, Ajouter les onglets au groupe...)
-
macros(SavedGroups, Voir les groupes enregistrés...\tAlt+Shift+Enter)
macros(GroupOnly, Ouvrir seulement un groupe...\tShift+Enter)
macros(OpenGroup, Ouvrir un groupe apres l'onglet courant...\tAlt+Enter)
macros(DeleteGroup, Supprimer le groupe...)
-
layers()
}

Courrier{
macros(Mail, Lire son courrier)
macros(Compose, Créer un nouveau mail)
macros(EmailURL, Envoyer la page comme lien)
macros(EmailText, Envoyer le texte sélectionné)
-
macros(News, Lire les nouvelles)
macros(RSS, Flux de Nouvelles RSS)
-
macros(MCFG, Configurer le mail...)
macros(NCFG, Configurer les news...)
}

User Agent{
macros(UA, K-Meleon (Défaut))
macros(UA1, Internet Explorer 6 (XP))
macros(UA2, Netscape 4.8 (XP))
macros(UA3, Opera 7.54 (XP))
macros(UACust, Personnalisé...)
-
macros(ResetUA, Réinitialiser à Défaut en quittant)
}


Permissions{
macros(Cookies,Gestion des cookies)
macros(Images,Gestion des images)
macros(Popups,Gestion des popups)
-
macros(Master, Mot de passe principal)
macros(Cert, Certificats électroniques)
}


Vie Privée{
%ifplugin macros
tongue sticking out smileyermissions
-
macros(AniToggle, Bloquer les Animations)
macros(CToggle, Bloquer les Couleurs)
macros(CKToggle, Bloquer les Cookies)
macros(ImgToggle, Bloquer les Images\tF9)
macros(JToggle, Bloquer Java)
macros(JSToggle, Bloquer JavaScript)
macros(PBToggle, Bloquer les Popups\tF8)
macros(RefToggle, Bloquer les Referer)
%endif
%ifplugin macros & privacy
-
%endif
%ifplugin privacy
privacy(Config, Paramétrage...)
-
privacy(ClearCache, Effacer le cache)
privacy(ClearCookies, Effacer les cookies)
privacy(ClearHistory, Effacer l'historique)
privacy(ClearSignon, Effacer les mots de passe)
privacy(ClearMRU, Effacer l'historique de la barre d'adresse)
macros(ClearAll, Tout effacer)
%endif
%ifplugin macros
-
macros(KillFlash, Tuer les Animations Flash)
macros(KillApplets, Tuer les Applets java)
%endif
}


Options des Signets{
bookmarks(Config, Paramétrage...)
%ifplugin macros
-
macros(OpenBook1, Ouvrir dans l'onglet courant (défaut))
%endif
%ifplugin layers & macros
macros(OpenBook3, Ouvrir dans un nouvel onglet)
macros(OpenBook4, Ouvrir dans un onglet en arrière-plan)
-
%endif
%ifplugin macros
macros(OpenBook2, Ouvrir dans une nouvelle fenêtre)
macros(OpenBook5, Ouvrir dans une fenêtre en arrière-plan)
-
macros(BookChev, Valider le chevron de barre d'outils)
%endif
}


Options des Favoris{
favorites(Config, Paramétrage...)
%ifplugin macros
-
macros(OpenFav1, Ouvrir dans l'onglet courant (défaut))
%endif
%ifplugin layers & macros
macros(OpenFav3, Ouvrir dans un nouvel onglet)
macros(OpenFav4, Ouvrir dans un onglet en arrière-plan)
-
%endif
%ifplugin macros
macros(OpenFav2, Ouvrir dans une nouvelle fenêtre)
macros(OpenFav5, Ouvrir dans une fenêtre en arrière-pl


Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 21, 2005 06:29PM

Great - Big thanks !! But in this moment where I read your posting, my translations are ready yet.
I just only fight a little war with some little problems (forgotton some charakters here and there...) . Now here I'm sitting and fixing :-)

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: jsnj
Date: January 21, 2005 07:28PM

Alain, the forum broke some of the JS code in some of the JS macros. That's why text appears italicized. Probably be better to post in wiki between <pre> & </pre>

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: alain.NOSPAM.aupeix@wanadoo.fr
Date: January 22, 2005 02:49PM

ok, the next time, I take care of it ... but I dont think to make the totality of macros.cfg, just some parts to explain how to translate, so as I havent tranlated thiings, except about image info, I shall not send js macros.

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 22, 2005 04:50PM

@Alain:

My translations are almost complete, but there is a little problem with my
privacy bar, the buttons (Popups etc.) didn't stay pressed (x) by clicking on it.
I only have the mouse-over effect.
But they works correct, I see it in the statusbar ("Popups ERLAUBT" or "Popups BLOCKIERD"). Do you have an idea? I can't find the little (it must be a little, all the other things works fantastic) problem/error.

Thanks, and beautiful weekend

clickfish

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: alain.NOSPAM.aupeix@wanadoo.fr
Date: January 22, 2005 04:55PM

Verify if toolbar names are the same beetween toolbars.cfg and macros.cfg (toogle function)

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 22, 2005 06:56PM

@Alain: All items are the same, see example. Or can you see an error?

Cookies {
macros(CKToggle)
Cookies blockieren
privhot.bmp[2]
privcold.bmp[2]
}
-----------------------------------------
CKToggle {
togglepref(INT,$cookies,2,0); &Sync;
getpref(INT,$cookies)==2 ? $tip="BLOCKIERT":$tip="ERLAUBT";
statusbar("Cookies ".$tip);
}

the functions are allready ok, but the buttons dont display it.

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: alain.NOSPAM.aupeix@wanadoo.fr
Date: January 22, 2005 08:00PM

Ok, I don't give the good location:

Verify if the toolbar name is the same

here in macros.cfg

setcheck("macros(CKToggle)", getpref(INT, $cookies));
pluginmsg(toolbars, "CheckButton", "Vie Privée, macros(CKToggle), " . (getpref(INT, $cookies) ? 1 : 0)); /\ here

and there in toolbars.cfg for all the skins

-----------------------------------------------------------------------
%ifplugin macros|privacy

Vie Privée(64,13){ <<<<< There

%ifplugin macros

# Animation {
# macros(AniToggle)
-------------------------------------------------------------------------

I'm sure it's the error (I made in in my first translation)

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 22, 2005 08:01PM

I found the small error:

right:
...(toolbars,"CheckButton","Privat,macros(RefToggle)...

false:
...(toolbars,"CheckButton","Privacy Bar,macros(RefToggle)...

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: clickfish
Date: January 22, 2005 08:04PM

Posting in the same time :-)

big thanks Alain

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: alain.NOSPAM.aupeix@wanadoo.fr
Date: January 22, 2005 08:04PM

That right smiling smiley

Options: ReplyQuote
Re: K-Meleon 0.9RC1, need help to translate
Posted by: Lyx
Date: January 25, 2005 06:09PM

clickfish, do you think you could send me your almost-translated-version to:

moonblade&&&nospammail.net

(replace the &&& with the at-character. The domain nospammail.net does really exist)

That would help me alot since i have a feeling that you already translated all those parts which i need for installation in an inet-cafe.

- Lyx

Options: ReplyQuote


K-Meleon forum is powered by Phorum.