Browse Source

changed according to new plugin specification

fixed dispatch_message macro to display more than one message correctly (unclean initialization)
master
lars 15 years ago
parent
commit
151729c828
  1. 2
      templates/header.cs
  2. 3
      templates/macros.cs
  3. 2
      templates/volume_plugins.cs

2
templates/header.cs

@ -22,7 +22,7 @@
<?cs # sort the Plugins - using the most stupid way :) ?>
<?cs loop: order = #0, #100, #1
?><?cs # plugins ?><?cs each:x = Settings.PluginList
?><?cs if:x.Enabled && x.Types.menu && x.Rank == order ?>
?><?cs if:x.Types.system && x.Visible.menu && x.Rank == order ?>
<?cs call:show_plugin(name(x), 'menu') ?><?cs /if ?><?cs
/each ?><?cs
/loop ?>

3
templates/macros.cs

@ -56,7 +56,8 @@ def:show_messageNode(node) ?><?cs
def:message_dispatch(mname, type, category)
?><?cs # split the message name into a (potentially existing) plugin-name prefix and the suffix (the python equivalent of the following three lines would be:
plugPrefix, PlugSuffix = mname[0:mname.find(".",8), mname[mname.find(".",8)+1:]
?><?cs loop:x = #8, #40, #1 ?><?cs if:(string.slice(mname,x,x+1) == ".") && !(?savedX) ?><?cs set:savedX = x ?><?cs /if ?><?cs /loop
?><?cs # initialization ?><?cs set:savedX = 0 ?><?cs
loop:x = #8, #40, #1 ?><?cs if:(string.slice(mname,x,x+1) == ".") && !savedX ?><?cs set:savedX = x ?><?cs /if ?><?cs /loop
?><?cs set:plugPrefix = string.slice(mname,0,savedX)
?><?cs set:plugSuffix = string.slice(mname,savedX+1,string.length(mname))
?><?cs # choose the appropriate symbol file

2
templates/volume_plugins.cs

@ -13,7 +13,7 @@
<?cs # sort the Plugins - using the most stupid way :) ?>
<?cs loop: order = #0, #100, #1
?><?cs # plugins ?><?cs each:x = Settings.PluginList
?><?cs if:x.Enabled && x.Types.volume && x.Rank == order ?>
?><?cs if:x.Types.volume && x.Visible.volume && x.Rank == order ?>
<td <?cs if:Data.ActivePlugin == name(x)
?>class="volume_plugin_active"<?cs
else ?>class="volume_plugin_passive"<?cs

Loading…
Cancel
Save