diff --git a/TabGroupBar/TabGroupBar@krzysztof.dawidowicz.uj.edu.pl.xpi b/TabGroupBar/TabGroupBar@krzysztof.dawidowicz.uj.edu.pl.xpi index 677b61c..1fd610c 100644 Binary files a/TabGroupBar/TabGroupBar@krzysztof.dawidowicz.uj.edu.pl.xpi and b/TabGroupBar/TabGroupBar@krzysztof.dawidowicz.uj.edu.pl.xpi differ diff --git a/TabGroupBar/chrome/content/tabgroupbar.js b/TabGroupBar/chrome/content/tabgroupbar.js index bce0559..283885a 100644 --- a/TabGroupBar/chrome/content/tabgroupbar.js +++ b/TabGroupBar/chrome/content/tabgroupbar.js @@ -41,6 +41,13 @@ objTabGroupBar.addTab = function(label){ tabsContainer.appendChild(tab); } +/** + * @brief Brief + * + * @return Return_Description + * + * @details Details + */ objTabGroupBar.getTabView = function() { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); @@ -66,29 +73,30 @@ objTabGroupBar.addGroupTabs = function(){ }; objTabGroupBar.addGroupTab = function(groupItem) { - var label = groupItem.getTitle(); - if(!label) { - label = "(none)"; + var title = groupItem.getTitle(); + if(!title) { + title = "(none)"; } - if(this.debug) {label = label + ":" + groupItem.id;} + if(this.debug) {title = title + ":" + groupItem.id;} var tab = document.createElement("tab"); + tab.setAttribute("label", title); + tab.value = groupItem.id; tab.setAttribute("id", "TabGroupBar-GroupTab-" + groupItem.id); - tab.setAttribute("label", label); tab.setAttribute("groupid", groupItem.id); tab.setAttribute("draggable", "true"); tab.setAttribute("droppable", "true"); tab.setAttribute("context", "TabGroupBar-TabContextMenu"); + tab.setAttribute("flex", 1); tab.setAttribute("oncommand", "objTabGroupBar.switchGroupTo(" + groupItem.id + ");"); tab.setAttribute("ondblclick", "objTabGroupBar.onDbClickTab(event);"); // tab.setAttribute("ondragstart", "objTabGroupBar.onTabDragStrart(event);"); - tab.setAttribute("ondragend", "objTabGroupBar.addTab('drag end');objTabGroupBar.addTab(event.dataTransfer.dropEffect);"); + /* tab.setAttribute("ondragend", "objTabGroupBar.addTab('drag end');objTabGroupBar.addTab(event.dataTransfer.dropEffect);"); tab.addEventListener("dragstart", function(e) {objTabGroupBar.addTab("dragstart");}); tab.addEventListener("dragend", function(e) {objTabGroupBar.addTab("dragend");}); tab.addEventListener("dragenter", this.onTabDragOver); - tab.addEventListener("dragover", this.onTabDragOver); - + tab.addEventListener("dragover", this.onTabDragOver); */ tabsContainer.appendChild(tab); }; @@ -140,7 +148,11 @@ objTabGroupBar.switchGroupTo = function(groupId){ }; objTabGroupBar.clearGroupTabs = function(){ - var tabs = []; + while(tabsContainer.firstChild) + { + tabsContainer.removeChild(tabsContainer.firstChild); + } + /* var tabs = []; var childNodes = tabsContainer.childNodes; for(i=0;i -