View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/
Update of /cvsroot/dqsd/dqsd
In directory usw-pr-cvs1:/tmp/cvs-serv32040
Modified Files:
helpmenu.js loader.js
Log Message:
Fixed bug that shows up when a user-defined local alias overrides an existing search
Index: helpmenu.js
===================================================================
RCS file: /cvsroot/dqsd/dqsd/helpmenu.js,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** helpmenu.js 15 Jul 2002 06:19:50 -0000 1.27
--- helpmenu.js 25 Jul 2002 16:07:18 -0000 1.28
***************
*** 33,37 ****
if ( search.enabled )
! mb.AppendMenuItem( search.name + '\t' + alias.replace(/&/g, '&&'),
search.aliases[0], makeToolTipString(search), hsubmenu );
}
}
--- 33,40 ----
if ( search.enabled )
! mb.AppendMenuItem( search.name + '\t' + (search.menudisplay ?
alias.replace(/&/g, '&&') : ""), // menu text along with alias
! search.aliases[0], // function invoked when user
selects menu item
! makeToolTipString(search),
! hsubmenu );
}
}
Index: loader.js
===================================================================
RCS file: /cvsroot/dqsd/dqsd/loader.js,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** loader.js 5 Jul 2002 20:43:00 -0000 1.44
--- loader.js 25 Jul 2002 16:07:18 -0000 1.45
***************
*** 5,9 ****
try
{
! searches[fname] = {fname:fname, name:name, desc:desc, link:link, cat:cat,
fun:eval(fname), aliases:[], enabled:!disabledsearches[fname]};
if( !aliases[fname] )
addalias( fname, fname );
--- 5,9 ----
try
{
! searches[fname] = {fname:fname, name:name, desc:desc, link:link, cat:cat,
fun:eval(fname), aliases:[], enabled:!disabledsearches[fname], menudisplay:true};
if( !aliases[fname] )
addalias( fname, fname );
***************
*** 37,41 ****
}
}
! searches[prevfname].aliases = newaliases;
}
catch (e)
--- 37,53 ----
}
}
! // Gotta have one alias; even if the local alias overrides a non-local alias
! if ( newaliases.length > 0 )
! {
! searches[prevfname].aliases = newaliases;
! }
! else
! {
! // reset the one and only alias to the search name
! // but don't display the alias on the menu because
! // there's a local alias that is overriding it.
! searches[prevfname].aliases = [ prevfname ];
! searches[prevfname].menudisplay = false;
! }
}
catch (e)
***************
*** 249,254 ****
{
// There may be a better way to do this - I'm
! // trying to remove the <description> tags which end-up bracketing
! // the description XML
descriptionXml = descriptionNode.xml.replace(/\<description\>/, '');
descriptionXml = descriptionXml.replace(/\<\/description\>/, '');
--- 261,266 ----
{
// There may be a better way to do this - I'm
! // trying to remove the <description> tags which end-up bracketing
! // the description XML
descriptionXml = descriptionNode.xml.replace(/\<description\>/, '');
descriptionXml = descriptionXml.replace(/\<\/description\>/, '');
-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing
real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/