Changeset 314
- Timestamp:
- 05/28/07 10:58:06 (18 months ago)
- Files:
-
- 1 modified
-
extension/tabcontrol/content/tabcontrol.js (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
extension/tabcontrol/content/tabcontrol.js
r66 r314 27 27 } 28 28 29 //initial tab 'swidth30 gBrowser.mTabContainer.firstChild.minWidth=31 gTabControl.getPref('int', 'tabcontrol.tabMinWidth');32 gBrowser.mTabContainer.firstChild.maxWidth=33 gTabControl.getPref('int', 'tabcontrol.tabMaxWidth');29 //initial tabs' (or tabs') width 30 for (var i=0, t=null; t=gBrowser.mTabContainer.childNodes[i]; i++) { 31 t.minWidth=gTabControl.getPref('int', 'tabcontrol.tabMinWidth'); 32 t.maxWidth=gTabControl.getPref('int', 'tabcontrol.tabMaxWidth'); 33 } 34 34 35 35 //get reference to string bundle … … 41 41 duplicateTabItem.setAttribute('accesskey', bundle.getString('duplicateTabAccessKey')); 42 42 duplicateTabItem.setAttribute('oncommand', 'gTabControl.duplicateTab(this);'); 43 43 44 44 var tabMenu=document 45 45 .getAnonymousElementByAttribute(gBrowser, 'anonid', 'tabContextMenu'); … … 95 95 //skip the rest if we don't need to focus a custom tab 96 96 if (null==tabToSelect) return; 97 97 98 98 //set focus to the tab that we want 99 99 gTabControl.selectTab(tabToSelect); … … 111 111 BrowserCloseTabOrWindow:function() { 112 112 //NOPE! only close tabs 113 if (gBrowser.localName == 'tabbrowser' && 113 if (gBrowser.localName == 'tabbrowser' && 114 114 gBrowser.tabContainer.childNodes.length > 1 115 115 ) { … … 123 123 var originalHistory=gBrowser.getBrowserForTab(aTab) 124 124 .webNavigation.sessionHistory; 125 125 126 126 var newTab=gBrowser.addTab(); 127 127 var newHistory=gBrowser.getBrowserForTab(newTab) … … 154 154 case 'int': return this.prefObj.getIntPref(aName); 155 155 case 'string': 156 default: return this.prefObj.getCharPref(aName); 156 default: return this.prefObj.getCharPref(aName); 157 157 } 158 } catch (e) { 158 } catch (e) { 159 159 return gTabControl.prefDefaults[aName]; 160 160 } … … 198 198 try { 199 199 texts[i].value=gTabControl.getPref( 200 texts[i].getAttribute('preftype'), 200 texts[i].getAttribute('preftype'), 201 201 texts[i].getAttribute('prefstring') 202 202 ); … … 214 214 gTabControl.setPref( 215 215 'bool', 216 'tabcontrol.'+checks[i].getAttribute('id'), 216 'tabcontrol.'+checks[i].getAttribute('id'), 217 217 checks[i].checked 218 218 ); … … 225 225 try { 226 226 gTabControl.setPref( 227 'int', 227 'int', 228 228 drops[i].getAttribute('prefstring'), 229 229 drops[i].selectedItem.value