Changeset 695

Show
Ignore:
Timestamp:
03/16/08 18:19:08 (9 months ago)
Author:
oyasu..@gmail.com
Message:

Reverts switch-case normalization [693]. (This is also the second time I notice my branch work has hit trunk when it was not intended to. I should probably look into why, even if it was not a bad thing, this time.)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/chrome/chromeFiles/content/config.js

    r694 r695  
    7171      for (var i = 0, childNode; childNode = node.childNodes[i]; i++) { 
    7272        switch (childNode.nodeName) { 
    73           case "Include": 
    74             script._includes.push(childNode.firstChild.nodeValue); 
    75             break; 
    76           case "Exclude": 
    77             script._excludes.push(childNode.firstChild.nodeValue); 
    78             break; 
    79           case "Require": 
    80             var scriptRequire = new ScriptRequire(script); 
    81             scriptRequire._filename = childNode.getAttribute("filename"); 
    82             script._requires.push(scriptRequire); 
    83             break; 
    84           case "Resource": 
    85             var scriptResource = new ScriptResource(script); 
    86             scriptResource._name = childNode.getAttribute("name"); 
    87             scriptResource._filename = childNode.getAttribute("filename"); 
    88             scriptResource._mimetype = childNode.getAttribute("mimetype"); 
    89             scriptResource._charset = childNode.getAttribute("charset"); 
    90             script._resources.push(scriptResource); 
    91             break; 
     73        case "Include": 
     74          script._includes.push(childNode.firstChild.nodeValue); 
     75          break; 
     76        case "Exclude": 
     77          script._excludes.push(childNode.firstChild.nodeValue); 
     78          break; 
     79        case "Require": 
     80          var scriptRequire = new ScriptRequire(script); 
     81          scriptRequire._filename = childNode.getAttribute("filename"); 
     82          script._requires.push(scriptRequire); 
     83          break; 
     84        case "Resource": 
     85          var scriptResource = new ScriptResource(script); 
     86          scriptResource._name = childNode.getAttribute("name"); 
     87          scriptResource._filename = childNode.getAttribute("filename"); 
     88          scriptResource._mimetype = childNode.getAttribute("mimetype"); 
     89          scriptResource._charset = childNode.getAttribute("charset"); 
     90          script._resources.push(scriptResource); 
     91          break; 
    9292        } 
    9393      } 
  • trunk/src/chrome/chromeFiles/content/manage.js

    r694 r695  
    2525 
    2626    switch (event) { 
    27       case "edit-enabled": 
    28         node.style.color = data ? "" : "gray"; 
    29         if (script == selectedScript) 
    30           chkEnabled.checked = data; 
    31         break; 
    32       case "install": 
    33         addListitem(script, -1); 
    34         break; 
    35       case "uninstall": 
    36         var selected = listbox.selectedItem == node; 
    37         listbox.removeChild(node); 
    38    
    39         if (selected && listbox.childNodes.length > 0) { 
    40           chooseScript(Math.max(Math.min(listbox.selectedIndex, 
    41                                          listbox.childNodes.length - 1), 0)); 
    42         } 
    43         break; 
    44       case "move": 
    45         listbox.removeChild(node); 
    46         listbox.insertBefore(node, listbox.childNodes[data]); 
    47         // then re-select the dropped script 
    48         listbox.selectedIndex = data; 
    49         break; 
     27    case "edit-enabled": 
     28      node.style.color = data ? "" : "gray"; 
     29      if (script == selectedScript) 
     30        chkEnabled.checked = data; 
     31      break; 
     32    case "install": 
     33      addListitem(script, -1); 
     34      break; 
     35    case "uninstall": 
     36      var selected = listbox.selectedItem == node; 
     37      listbox.removeChild(node); 
     38 
     39      if (selected && listbox.childNodes.length > 0) { 
     40        chooseScript(Math.max(Math.min(listbox.selectedIndex, listbox.childNodes.length - 1), 0)); 
     41      } 
     42      break; 
     43    case "move": 
     44      listbox.removeChild(node); 
     45      listbox.insertBefore(node, listbox.childNodes[data]); 
     46      // then re-select the dropped script 
     47      listbox.selectedIndex = data; 
     48      break; 
    5049    } 
    5150 
  • trunk/src/chrome/chromeFiles/content/pages-overlay.js

    r694 r695  
    55  this.notifyEvent = function(script, event, data) { 
    66    switch (event) { 
    7       case "edit-include-add":    includesBox.pageAdded(data);  break; 
    8       case "edit-include-remove": includesBox.pageRemoved(data); break; 
    9       case "edit-exclude-add":    excludesBox.pageAdded(data);  break; 
    10       case "edit-exclude-remove": excludesBox.pageRemoved(data); break; 
     7    case "edit-include-add": includesBox.pageAdded(data); break; 
     8    case "edit-include-remove": includesBox.pageRemoved(data); break; 
     9    case "edit-exclude-add": excludesBox.pageAdded(data); break; 
     10    case "edit-exclude-remove": excludesBox.pageRemoved(data); break; 
    1111    } 
    1212  };