チェンジセット 79
- 更新日時:
- 2009/08/25 01:06:08 (2 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
branches/release-1.0/chrome/content/vocalofx.js
r76 r79 13 13 TOOL_PROPERTY_TOOL_ONSTARTUP: "extensions.vocalofx.tool_onstartup", 14 14 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", 15 19 TOOLDIALOG_URL: "chrome://vocalofx/content/tool/tool.xul", 16 20 CHROME_TOOL: "chrome://vocalofx/content/tool/", … … 48 52 , 49 53 setVocalofxToolOpened: function(tool, onoff){ 50 this.setMenuitemIcon(document.getElementById( "vocalofx-tool-" + tool), onoff);54 this.setMenuitemIcon(document.getElementById(this.ICONCLASS_TOOL + "-" + tool), onoff); 51 55 } 52 56 , … … 93 97 94 98 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); 96 102 } 97 103 , … … 110 116 this.pref.setCharPref(this.SKIN_PROPERTY_PALLET, pallet); 111 117 this.setVocalofxPalletMenu(); 112 this.selectMenuitemIcon("vocalofx-skin-menu", category);113 118 } 114 119 , … … 152 157 this.setCSSImportRule(document, this.CHROME_SKIN + "skin.css", this.CHROME_SKIN + pallet + ".css"); 153 158 this.setSidebarVocalofxSkin(); 154 this.selectMenuitemIcon( "vocalofx-skin-pallet", pallet);159 this.selectMenuitemIcon(this.ICONCLASS_SKIN_PALLET, pallet); 155 160 } 156 161 , … … 209 214 } 210 215 211 this.setC SSImportRule(document, "chrome://vocalofx/content/icons/" + target + ".css", "chrome://vocalofx-platform/content/" + icon + ".css");216 this.setCustomIcon(document, target, icon); 212 217 this.setSidebarVocalofxIcons(target); 213 218 } … … 225 230 } 226 231 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"); 228 237 } 229 238 , … … 252 261 for(var i = 0; i < skins.length; i++){ 253 262 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); 256 265 menuitem.setAttribute("label", this.vocalofx_properties.getString("vocalofx.skin." + skins[i])); 257 266 menuitem.setAttribute("oncommand", "vocalofx.selectVocalofxSkin('" + skins[i] + "')"); … … 266 275 for(var i = 0; i < pallets.length; i++){ 267 276 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); 270 279 menuitem.setAttribute("label", this.vocalofx_properties.getString("vocalofx.skin.pallet." + pallets[i])); 271 280 menuitem.setAttribute("oncommand", "vocalofx.selectVocalofxSkinPallet('" + pallets[i] + "')"); … … 278 287 for(var i = 0; i < tools.length; i++){ 279 288 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); 282 291 menuitem.setAttribute("label", this.vocalofx_properties.getString("vocalofx.tool." + tools[i])); 283 292 menuitem.setAttribute("oncommand", "vocalofx.openVocalofxTool('" + tools[i] + "')"); … … 338 347 var pallets = this.skin_properties.getString("palletmenu." + category).split(","); 339 348 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]); 341 350 menuitem.collapsed = false; 342 351 } … … 426 435 this.setVocalofxMenu(); 427 436 this.setVocalofxIconsAll(); 428 this.setVocalofxSkinCategory();429 437 this.setVocalofxSkinPallet(); 430 438 this.setVocalofxSkinImage();
