チェンジセット 79

差分発生行の前後
無視リスト:
更新日時:
2009/08/25 01:06:08 (2 年 前)
更新者:
h
ログメッセージ:

refs #33
右上絵選択時のフォルダアイコンの場所間違えてたので修正。
 http://piapro.jp/content/?id=6two84dn9f3itqvm&cdate=2009-08-24%2001%3A07%3A52

ファイル:
1 変更

凡例:

変更なし
追加
削除
  • branches/release-1.0/chrome/content/vocalofx.js

    r76 r79  
    1313        TOOL_PROPERTY_TOOL_ONSTARTUP: "extensions.vocalofx.tool_onstartup", 
    1414        TOOL_PROPERTY_PIAPROGM_ALERT: "extensions.vocalofx.tool_piaprogm_alert", 
     15        ICONCLASS_TOOL: "vocalofx-tool", 
     16        ICONCLASS_SKIN_PALLET: "vocalofx-skin-pallet", 
     17        ICONCLASS_SKIN_IMAGE: "vocalofx-skin-image", 
     18        ICONCLASS_SKIN_MENU: "vocalofx-skin-menu", 
    1519        TOOLDIALOG_URL: "chrome://vocalofx/content/tool/tool.xul", 
    1620        CHROME_TOOL: "chrome://vocalofx/content/tool/", 
     
    4852        , 
    4953        setVocalofxToolOpened: function(tool, onoff){ 
    50                 this.setMenuitemIcon(document.getElementById("vocalofx-tool-" + tool), onoff); 
     54                this.setMenuitemIcon(document.getElementById(this.ICONCLASS_TOOL + "-" + tool), onoff); 
    5155        } 
    5256        , 
     
    9397 
    9498                var skin = image.substring(image.lastIndexOf("/") + 1, image.length - 4); 
    95                 this.selectMenuitemIcon("vocalofx-skin-image", skin); 
     99                this.selectMenuitemIcon(this.ICONCLASS_SKIN_IMAGE, skin); 
     100                var category = this.skin_properties.getString(skin + ".category_sub"); 
     101                this.selectMenuitemIcon(this.ICONCLASS_SKIN_MENU, category); 
    96102        } 
    97103        , 
     
    110116                this.pref.setCharPref(this.SKIN_PROPERTY_PALLET, pallet); 
    111117                this.setVocalofxPalletMenu(); 
    112                 this.selectMenuitemIcon("vocalofx-skin-menu", category); 
    113118        } 
    114119        , 
     
    152157                this.setCSSImportRule(document, this.CHROME_SKIN + "skin.css", this.CHROME_SKIN + pallet + ".css"); 
    153158                this.setSidebarVocalofxSkin(); 
    154                 this.selectMenuitemIcon("vocalofx-skin-pallet", pallet); 
     159                this.selectMenuitemIcon(this.ICONCLASS_SKIN_PALLET, pallet); 
    155160        } 
    156161        , 
     
    209214                } 
    210215 
    211                 this.setCSSImportRule(document, "chrome://vocalofx/content/icons/" + target + ".css", "chrome://vocalofx-platform/content/" + icon + ".css"); 
     216                this.setCustomIcon(document, target, icon); 
    212217                this.setSidebarVocalofxIcons(target); 
    213218        } 
     
    225230                } 
    226231 
    227                 this.setCSSImportRule(this.sidebar.contentDocument, "chrome://vocalofx/content/icons/" + target + ".css", "chrome://vocalofx-platform/content/" + icon + ".css"); 
     232                this.setCustomIcon(this.sidebar.contentDocument, target, icon); 
     233        } 
     234        , 
     235        setCustomIcon: function(doc, target, icon){ 
     236                this.setCSSImportRule(doc, "chrome://vocalofx/content/icons/" + target + ".css", "chrome://vocalofx-platform/content/" + icon + ".css"); 
    228237        } 
    229238        , 
     
    252261                for(var i = 0; i < skins.length; i++){ 
    253262                        var menuitem = document.createElement("menuitem"); 
    254                         menuitem.setAttribute("id", "vocalofx-skin-image-" + skins[i]); 
    255                         menuitem.setAttribute("class", "menuitem-iconic vocalofx-skin-image"); 
     263                        menuitem.setAttribute("id", this.ICONCLASS_SKIN_IMAGE + "-" + skins[i]); 
     264                        menuitem.setAttribute("class", "menuitem-iconic " + this.ICONCLASS_SKIN_IMAGE); 
    256265                        menuitem.setAttribute("label", this.vocalofx_properties.getString("vocalofx.skin." + skins[i])); 
    257266                        menuitem.setAttribute("oncommand", "vocalofx.selectVocalofxSkin('" + skins[i] + "')"); 
     
    266275                for(var i = 0; i < pallets.length; i++){ 
    267276                        var menuitem = document.createElement("menuitem"); 
    268                         menuitem.setAttribute("id", "vocalofx-skin-pallet-" + pallets[i]); 
    269                         menuitem.setAttribute("class", "menuitem-iconic vocalofx-skin-pallet"); 
     277                        menuitem.setAttribute("id", this.ICONCLASS_SKIN_PALLET + "-" + pallets[i]); 
     278                        menuitem.setAttribute("class", "menuitem-iconic " + this.ICONCLASS_SKIN_PALLET); 
    270279                        menuitem.setAttribute("label", this.vocalofx_properties.getString("vocalofx.skin.pallet." + pallets[i])); 
    271280                        menuitem.setAttribute("oncommand", "vocalofx.selectVocalofxSkinPallet('" + pallets[i] + "')"); 
     
    278287                for(var i = 0; i < tools.length; i++){ 
    279288                        var menuitem = document.createElement("menuitem"); 
    280                         menuitem.setAttribute("id", "vocalofx-tool-" + tools[i]); 
    281                         menuitem.setAttribute("class", "menuitem-iconic vocalofx-tool"); 
     289                        menuitem.setAttribute("id", this.ICONCLASS_TOOL + "-" + tools[i]); 
     290                        menuitem.setAttribute("class", "menuitem-iconic " + this.ICONCLASS_TOOL); 
    282291                        menuitem.setAttribute("label", this.vocalofx_properties.getString("vocalofx.tool." + tools[i])); 
    283292                        menuitem.setAttribute("oncommand", "vocalofx.openVocalofxTool('" + tools[i] + "')"); 
     
    338347                        var pallets = this.skin_properties.getString("palletmenu." + category).split(","); 
    339348                        for(var i = 0; i < pallets.length; i++){ 
    340                                 var menuitem = document.getElementById("vocalofx-skin-pallet-" + pallets[i]); 
     349                                var menuitem = document.getElementById(this.ICONCLASS_SKIN_PALLET + "-" + pallets[i]); 
    341350                                menuitem.collapsed = false; 
    342351                        } 
     
    426435                this.setVocalofxMenu(); 
    427436                this.setVocalofxIconsAll(); 
    428                 this.setVocalofxSkinCategory(); 
    429437                this.setVocalofxSkinPallet(); 
    430438                this.setVocalofxSkinImage();