Commit 997565a3 authored by alecf%netscape.com's avatar alecf%netscape.com
Browse files

hook up nsIMsgWindow and status feedback to search #33101

r=sspitzer
parent 2d5f5970
Loading
Loading
Loading
Loading
+38 −7
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ var nsIMsgFolder = Components.interfaces.nsIMsgFolder;
var nsMsgSearchScope = Components.interfaces.nsMsgSearchScope;

var gFolderPicker;

var gStatusFeedback = new nsMsgStatusFeedback;
var RDF;

function searchOnLoad()
@@ -37,12 +37,26 @@ function searchOnLoad()

    setupDatasource();
    onMore(null);

    
}

function initializeSearchWindowWidgets()
{
    gFolderPicker = document.getElementById("searchableFolders");
    gResultsTree = document.getElementById("threadTree");

    msgWindow = Components.classes[msgWindowProgID].createInstance(Components.interfaces.nsIMsgWindow);
    msgWindow.statusFeedback = gStatusFeedback;
}


function onSearchStop() {

}

function onReset() {

}

function onChooseFolder(event) {
@@ -68,7 +82,7 @@ function onSearch(event)
    
    saveSearchTerms(gSearchSession.searchTerms, gSearchSession);

    gSearchSession.search(null);
    gSearchSession.search(msgWindow);
}


@@ -105,11 +119,28 @@ function setupDatasource() {
}


// stub functions for thread pane
function ChangeThreadView() {
    dump("Not supported, column should be hidden!\n");
// this is test stuff only, ignore for now
function onTesting(event)
{
    var testattr;
    
    DumpDOM(document.getElementById("searchTermTree"));
    testattr = document.getElementById("searchAttr");
    testelement(testattr);

    testattr = document.getElementById("searchAttr0");
    testelement(testattr);
    
    testattr = document.getElementById("searchAttr99");
    testelement(testattr);

}

function MsgSortBySubject() {
    dump("Sort by subject..\n");
function testelement(element)
{
    dump(element.id + " = " + element + "\n");
    dump(element.id + ".searchScope = " + element.searchScope + "\n");
    element.searchScope = 0;
    dump(element.id + ".searchScope = " + element.searchScope + "\n");

}
+5 −3
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ Rights Reserved.
<?xul-overlay href="chrome://messenger/content/threadPane.xul"?>
<?xul-overlay href="chrome://messenger/content/searchTermOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/msgFolderPickerOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/mailWindowOverlay.xul"?>

<!DOCTYPE window SYSTEM "chrome://messenger/locale/SearchDialog.dtd" >

@@ -37,7 +38,7 @@ Rights Reserved.

  <script src="chrome://global/content/strres.js"/>
  <script src="chrome://messenger/content/SearchDialog.js"/>

  <script src="chrome://messenger/content/mailWindow.js"/>
  <text value="This dialog is a work in progress! Please don't file any bugs against it."/>
  <box>
    <text class="label" value="&searchHeading.label;"/>
@@ -50,8 +51,8 @@ Rights Reserved.
  <box>
    <titledbox id="searchTermListBox" flex="1"/>
    <box orient="vertical">
      <button value="&searchButton.label;" onclick="onSearch(event)"/>
      <button value="&resetButton.label;" onclick="onReset(event)"/>
      <button value="&searchButton.label;" oncommand="onSearch(event)"/>
      <button value="&resetButton.label;" oncommand="onReset(event)"/>
    </box>
  </box>

@@ -60,4 +61,5 @@ Rights Reserved.
    <spring flex="100%"/>
    <button value="&closeButton.label;" onclick="window.close()"/>
  </box>
  <box id="status-bar"/>
</window>