diff --git a/mail/app/Makefile.in b/mail/app/Makefile.in index fd9f390bd594..26b0591be3d7 100644 --- a/mail/app/Makefile.in +++ b/mail/app/Makefile.in @@ -50,9 +50,9 @@ PREF_JS_EXPORTS = \ $(NULL) ifeq ($(USE_SHORT_LIBNAME), 1) -PROGRAM = minotaur$(BIN_SUFFIX) +PROGRAM = thunderbird$(BIN_SUFFIX) else -PROGRAM = minotaur-bin$(BIN_SUFFIX) +PROGRAM = thunderbird-bin$(BIN_SUFFIX) endif REQUIRES = \ @@ -98,7 +98,7 @@ endif ifeq ($(OS_ARCH),WINNT) OS_LIBS += comctl32.lib comdlg32.lib uuid.lib shell32.lib ole32.lib oleaut32.lib version.lib winspool.lib RCINCLUDE = splash.rc -RCFLAGS += -DMOZ_MINOTAUR -I$(srcdir) +RCFLAGS += -DMOZ_THUNDERBIRD -I$(srcdir) endif include $(topsrcdir)/config/rules.mk @@ -119,27 +119,27 @@ install:: $(DESKTOP_ICONS) $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/chrome/icons/default ifneq (,$(filter-out OS2 WINNT Darwin,$(OS_ARCH))) -minotaur:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk +thunderbird:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ -e "s|%MREDIR%|$(mredir)|" \ -e "s|mozilla-bin|$(PROGRAM)|g" > $@ chmod +x $@ -libs:: minotaur +libs:: thunderbird $(INSTALL) $< $(DIST)/bin -install:: minotaur +install:: thunderbird $(SYSINSTALL) $< $(DESTDIR)$(bindir) -GARBAGE += minotaur +GARBAGE += thunderbird endif ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) ifdef MOZ_DEBUG -APP_NAME = MinotaurDebug +APP_NAME = ThunderbirdDebug else -APP_NAME = Minotaur +APP_NAME = Thunderbird endif libs:: $(PROGRAM) diff --git a/mail/app/nsMailApp.cpp b/mail/app/nsMailApp.cpp index ac2cf56e7715..bfa5a7947da9 100644 --- a/mail/app/nsMailApp.cpp +++ b/mail/app/nsMailApp.cpp @@ -46,7 +46,7 @@ int main(int argc, char* argv[]) { nsXREAppData appData; appData.SetSplashEnabled(PR_FALSE); - appData.SetProductName(NS_LITERAL_CSTRING("Minotaur")); + appData.SetProductName(NS_LITERAL_CSTRING("Thunderbird")); appData.SetUseStartupPrefs(PR_TRUE); return xre_main(argc, argv, appData); } diff --git a/mail/app/profile/all.js b/mail/app/profile/all.js index 12f588a6820d..ae7ee7c0248d 100644 --- a/mail/app/profile/all.js +++ b/mail/app/profile/all.js @@ -48,8 +48,8 @@ pref("keyword.URL", "http://keyword.netscape.com/keyword/"); pref("keyword.enabled", false); pref("general.useragent.locale", "chrome://navigator/locale/navigator.properties"); pref("general.useragent.contentlocale", "chrome://navigator-region/locale/region.properties"); -pref("general.useragent.misc", "rv:1.3b"); -pref("general.useragent.vendor", "Minotaur"); +pref("general.useragent.misc", "rv:1.4b"); +pref("general.useragent.vendor", "Thunderbird"); pref("general.useragent.vendorSub", "0.1a"); pref("general.startup.browser", false); diff --git a/mail/app/profile/mailnews.js b/mail/app/profile/mailnews.js index a2e111d1c138..344f99f672cd 100644 --- a/mail/app/profile/mailnews.js +++ b/mail/app/profile/mailnews.js @@ -53,6 +53,9 @@ // mail file at the same time pref("mail.migration.copyMailFiles", true); +// pref defined by stand alone mail apps +pref("mail.standalone", true); + //mailnews.timeline_is_enabled should be set to true ONLY for perf measurement-timeline builds. pref("mailnews.timeline_is_enabled", false); diff --git a/mail/app/profile/thunderbird.js b/mail/app/profile/thunderbird.js index 12f588a6820d..ae7ee7c0248d 100644 --- a/mail/app/profile/thunderbird.js +++ b/mail/app/profile/thunderbird.js @@ -48,8 +48,8 @@ pref("keyword.URL", "http://keyword.netscape.com/keyword/"); pref("keyword.enabled", false); pref("general.useragent.locale", "chrome://navigator/locale/navigator.properties"); pref("general.useragent.contentlocale", "chrome://navigator-region/locale/region.properties"); -pref("general.useragent.misc", "rv:1.3b"); -pref("general.useragent.vendor", "Minotaur"); +pref("general.useragent.misc", "rv:1.4b"); +pref("general.useragent.vendor", "Thunderbird"); pref("general.useragent.vendorSub", "0.1a"); pref("general.startup.browser", false); diff --git a/mail/base/content/commandglue.js b/mail/base/content/commandglue.js index f27b03658238..87963c293e4e 100644 --- a/mail/base/content/commandglue.js +++ b/mail/base/content/commandglue.js @@ -44,7 +44,6 @@ var MSG_FOLDER_FLAG_TEMPLATES = 0x400000; function OpenURL(url) { - //dump("\n\nOpenURL from XUL\n\n\n"); messenger.SetWindow(window, msgWindow); messenger.OpenURL(url); } @@ -100,19 +99,18 @@ function LoadMessageByUri(uri) function setTitleFromFolder(msgfolder, subject) { - if (!msgfolder) return; + var title = subject || ""; - var title; - var server = msgfolder.server; + if (msgfolder) + { + if (title) + title += " - "; - if (null != subject) - title = subject+" - "; - else - title = ""; + title += msgfolder.prettyName; - if (msgfolder.isServer) - title += server.prettyName; - else { + if (!msgfolder.isServer) + { + var server = msgfolder.server; var middle; var end; if (server.type == "nntp") { @@ -128,16 +126,12 @@ function setTitleFromFolder(msgfolder, subject) // for middle = gMessengerBundle.getString("titleMailPreHost"); end = identity.email; - } catch (ex) { + } catch (ex) {} } - - } - - title += msgfolder.prettyName; if (middle) title += " " + middle; if (end) title += " " + end; } - + } title += " - " + gBrandBundle.getString("brandShortName"); window.title = title; } diff --git a/mail/base/content/mailWindowOverlay.js b/mail/base/content/mailWindowOverlay.js index 1c10ec34d242..2a53d5632b57 100644 --- a/mail/base/content/mailWindowOverlay.js +++ b/mail/base/content/mailWindowOverlay.js @@ -1113,7 +1113,7 @@ function MsgOpenExistingWindowForMessage(aMessageUri) windowID.gCurrentFolderUri = msgHdr.folder.URI; windowID.UpdateMailToolbar('MsgOpenExistingWindowForMessage'); windowID.CreateView(gDBView); - windowID.gDBView.loadMessageByMsgKey(msgHdr.messageKey); + windowID.LoadMessageByMsgKey(msgHdr.messageKey); } else return false; @@ -1585,25 +1585,24 @@ function MsgAddAllToAddressBook() {} function SpaceHit(event) { var contentWindow = window.top._content; - var oldScrollY = contentWindow.scrollY; - - var numPages; - var command; if (event && event.shiftKey) { - numPages = -1; - command = "cmd_previousUnreadMsg"; + // if at the start of the message, go to the previous one + if (contentWindow.scrollY > 0) { + contentWindow.scrollByPages(-1); + } + else { + goDoCommand("cmd_previousUnreadMsg"); + } } else { - numPages = 1; - command = "cmd_nextUnreadMsg"; - } - - contentWindow.scrollByPages(numPages); - - // if at the end (or start) of the message, go to the next one - if (oldScrollY == contentWindow.scrollY) { - goDoCommand(command); + // if at the end of the message, go to the next one + if (contentWindow.scrollY < contentWindow.scrollMaxY) { + contentWindow.scrollByPages(1); + } + else { + goDoCommand("cmd_nextUnreadMsg"); + } } } @@ -1834,7 +1833,11 @@ function SetupUndoRedoCommand(command) function HandleJunkStatusChanged(folder) { - if (IsCurrentLoadedFolder(folder)) { + // this might be the stand alone window, open to a message that was + // and attachment (or on disk), in which case, we want to ignore it. + var loadedMessage = GetLoadedMessage(); + if (loadedMessage && (!(/type=x-message-display/.test(loadedMessage))) && IsCurrentLoadedFolder(folder)) + { var messageURI = GetLoadedMessage(); // if multiple message are selected // and we change the junk status @@ -1873,8 +1876,13 @@ function SetUpJunkBar(aMsgHdr) function OnMsgLoaded(folder, aMessageURI) { + if (/type=x-message-display/.test(aMessageURI)) + SetUpJunkBar(null); + else + { var msgHdr = messenger.messageServiceFromURI(aMessageURI).messageURIToMsgHdr(aMessageURI); SetUpJunkBar(msgHdr); + } var currentMsgFolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder); if (!IsImapMessage(aMessageURI)) @@ -1976,11 +1984,12 @@ function OpenOrFocusWindow(args, windowType, chromeURL) window.openDialog(chromeURL, "", "chrome,resizable,status,centerscreen,dialog=no", args); } + function loadThrobberUrl(urlPref) { var url; try { url = gPrefs.getComplexValue(urlPref, Components.interfaces.nsIPrefLocalizedString).data; - messenger.loadURL(window, url); + messenger.loadExternalURL(window, url); } catch (ex) {} } diff --git a/mail/base/content/messageWindow.js b/mail/base/content/messageWindow.js index 18fb182c22cf..edcf268396e8 100644 --- a/mail/base/content/messageWindow.js +++ b/mail/base/content/messageWindow.js @@ -203,7 +203,7 @@ function HandleDeleteOrMoveMsgCompleted(folder) { var nextMstKey = gDBView.getKeyAt(gNextMessageViewIndexAfterDelete); if (nextMstKey != nsMsgKey_None) { - gDBView.loadMessageByMsgKey(nextMstKey); + LoadMessageByMsgKey(nextMstKey); } else { window.close(); @@ -271,34 +271,62 @@ function delayedOnLoadMessageWindow() } var originalView = null; - + var folder = null; + var messageUri; + var loadCustomMessage = false; //set to true when either loading a message/rfc822 attachment or a .eml file if (window.arguments) { if (window.arguments[0]) + { + try + { + messageUri = window.arguments[0]; + if (messageUri instanceof Components.interfaces.nsIURI) + { + loadCustomMessage = /type=x-message-display/.test(messageUri.spec); + gCurrentMessageUri = messageUri.spec; + if (messageUri instanceof Components.interfaces.nsIMsgMailNewsUrl) + folder = messageUri.folder; + } + } + catch(ex) + { + folder = null; + dump("## ex=" + ex + "\n"); + } + + if (!gCurrentMessageUri) gCurrentMessageUri = window.arguments[0]; + } else gCurrentMessageUri = null; if (window.arguments[1]) gCurrentFolderUri = window.arguments[1]; else - gCurrentFolderUri = null; + gCurrentFolderUri = folder ? folder.folderURL : null; if (window.arguments[2]) originalView = window.arguments[2]; + } - CreateView(originalView) + CreateView(originalView); - setTimeout(OnLoadMessageWindowDelayed, 0); + setTimeout(OnLoadMessageWindowDelayed, 0, loadCustomMessage); SetupCommandUpdateHandlers(); } -function OnLoadMessageWindowDelayed() +function OnLoadMessageWindowDelayed(loadCustomMessage) +{ + if (loadCustomMessage) + gDBView.loadMessageByUrl(gCurrentMessageUri); + else { var msgKey = extractMsgKeyFromURI(gCurrentMessageUri); gDBView.loadMessageByMsgKey(msgKey); + } gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete; UpdateStandAloneMessageCounts(); @@ -616,7 +644,7 @@ function GetMsgHdrFromUri(messageUri) function SelectMessage(messageUri) { var msgHdr = GetMsgHdrFromUri(messageUri); - gDBView.loadMessageByMsgKey(msgHdr.messageKey); + LoadMessageByMsgKey(msgHdr.messageKey); } function ReloadMessage() @@ -651,10 +679,8 @@ var MessageWindowController = { supportsCommand: function(command) { - switch ( command ) { - case "cmd_close": case "cmd_reply": case "button_reply": case "cmd_replySender": @@ -666,8 +692,6 @@ var MessageWindowController = case "cmd_forwardInline": case "cmd_forwardAttachment": case "cmd_editAsNew": - case "cmd_createFilterFromPopup": - case "cmd_createFilterFromMenu": case "cmd_delete": case "cmd_undo": case "cmd_redo": @@ -676,32 +700,15 @@ var MessageWindowController = case "button_delete": case "button_junk": case "cmd_shiftDelete": - case "button_print": - case "cmd_print": - case "cmd_printpreview": - case "cmd_printSetup": case "cmd_saveAsFile": case "cmd_saveAsTemplate": case "cmd_viewPageSource": - case "cmd_reload": - case "cmd_getNewMessages": - case "button_getNewMessages": case "cmd_getMsgsForAuthAccounts": - case "cmd_getNextNMessages": - case "cmd_find": - case "cmd_findAgain": - case "cmd_findPrev": - case "cmd_search": case "button_mark": case "cmd_markAsRead": case "cmd_markAllRead": case "cmd_markThreadAsRead": case "cmd_markAsFlagged": - case "cmd_markAsJunk": - case "cmd_markAsNotJunk": - case "cmd_applyFilters": - case "cmd_runJunkControls": - case "cmd_deleteJunk": case "cmd_label0": case "cmd_label1": case "cmd_label2": @@ -710,7 +717,11 @@ var MessageWindowController = case "cmd_label5": case "button_file": case "cmd_file": - case "cmd_settingsOffline": + case "cmd_markAsJunk": + case "cmd_markAsNotJunk": + case "cmd_applyFilters": + case "cmd_runJunkControls": + case "cmd_deleteJunk": case "cmd_nextMsg": case "button_next": case "cmd_nextUnreadMsg": @@ -719,6 +730,23 @@ var MessageWindowController = case "cmd_previousMsg": case "cmd_previousUnreadMsg": case "cmd_previousFlaggedMsg": + return !(gDBView.keyForFirstSelectedMessage == nsMsgKey_None); + case "cmd_getNextNMessages": + case "cmd_find": + case "cmd_findAgain": + case "cmd_findPrev": + case "cmd_search": + case "cmd_reload": + case "cmd_getNewMessages": + case "button_getNewMessages": + case "button_print": + case "cmd_print": + case "cmd_printpreview": + case "cmd_printSetup": + case "cmd_close": + case "cmd_settingsOffline": + case "cmd_createFilterFromPopup": + case "cmd_createFilterFromMenu": return true; case "cmd_synchronizeOffline": case "cmd_downloadFlagged": @@ -1021,7 +1049,7 @@ function LoadMessageByNavigationType(type) if ((resultId.value != nsMsgKey_None) && (resultIndex.value != nsMsgKey_None)) { // load the message key - gDBView.loadMessageByMsgKey(resultId.value); + LoadMessageByMsgKey(resultId.value); // if we changed folders, the message counts changed. UpdateStandAloneMessageCounts(); @@ -1053,4 +1081,15 @@ function GetDBView() return gDBView; } - +function LoadMessageByMsgKey(messageKey) +{ + // we only want to update the toolbar if there was no previous selected message. + if (nsMsgKey_None == gDBView.keyForFirstSelectedMessage) + { + gDBView.loadMessageByMsgKey(messageKey); + UpdateMailToolbar("update toolbar for message Window"); + } + else + gDBView.loadMessageByMsgKey(messageKey); + +} diff --git a/mail/base/content/msgMail3PaneWindow.js b/mail/base/content/msgMail3PaneWindow.js index 1031b106a567..c4dc82bee1c8 100644 --- a/mail/base/content/msgMail3PaneWindow.js +++ b/mail/base/content/msgMail3PaneWindow.js @@ -1364,15 +1364,17 @@ function SetNextMessageAfterDelete() { var treeSelection = GetThreadTree().treeBoxObject.selection; - // Only set gThreadPaneDeleteOrMoveOccurred to true if the message was - // truly moved to the trash or deleted, as opposed to an IMAP delete - // (where it is only "marked as deleted". This will prevent bug 142065. - // - // If it's an IMAP delete, then just set gNextMessageViewIndexAfterDelete - // to treeSelection.currentIndex (where the outline is at) because nothing - // was moved or deleted from the folder. - if(gDBView.removeRowOnMoveOrDelete) + if (treeSelection.isSelected(treeSelection.currentIndex)) + gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete; + else if(gDBView.removeRowOnMoveOrDelete) { + // Only set gThreadPaneDeleteOrMoveOccurred to true if the message was + // truly moved to the trash or deleted, as opposed to an IMAP delete + // (where it is only "marked as deleted". This will prevent bug 142065. + // + // If it's an IMAP delete, then just set gNextMessageViewIndexAfterDelete + // to treeSelection.currentIndex (where the outline is at) because nothing + // was moved or deleted from the folder. gThreadPaneDeleteOrMoveOccurred = true; gNextMessageViewIndexAfterDelete = treeSelection.currentIndex - NumberOfSelectedMessagesAboveCurrentIndex(treeSelection.currentIndex); } diff --git a/mail/base/locale/brand.dtd b/mail/base/locale/brand.dtd index 08f67a8093e8..04f220ebcd70 100644 --- a/mail/base/locale/brand.dtd +++ b/mail/base/locale/brand.dtd @@ -1,4 +1,4 @@ - - + + \ No newline at end of file diff --git a/mail/base/locale/brand.properties b/mail/base/locale/brand.properties index b55d012beff3..2fe680c6e785 100644 --- a/mail/base/locale/brand.properties +++ b/mail/base/locale/brand.properties @@ -1,3 +1,3 @@ -brandShortName=Minotaur -vendorShortName=Minotaur +brandShortName=Thunderbird +vendorShortName=Thunderbird sidebarName=Sidebar diff --git a/mail/base/locale/messenger.dtd b/mail/base/locale/messenger.dtd index 42a99e4ad57e..43e7f7917b21 100644 --- a/mail/base/locale/messenger.dtd +++ b/mail/base/locale/messenger.dtd @@ -564,8 +564,8 @@ Rights Reserved. - - + + diff --git a/mail/base/locale/region.properties b/mail/base/locale/region.properties index 668abc50e500..6d7991a93a60 100644 --- a/mail/base/locale/region.properties +++ b/mail/base/locale/region.properties @@ -3,7 +3,7 @@ # mailnews.js mailnews.start_page.url=http://www.mozilla.org/mailnews/minotaur/ mailnews.release_notes.url=http://www.mozilla.org/mailnews/minotaur/ -mailnews.hints_and_tips.url=http://texturizer.net/minotaur/ +mailnews.hints_and_tips.url=http://texturizer.net/thunderbird/ messenger.throbber.url=http://www.mozilla.org/mailnews/minotaur/ compose.throbber.url=http://www.mozilla.org/mailnews/minotaur/ addressbook.throbber.url=http://www.mozilla.org/mailnews/minotaur/ diff --git a/mail/components/compose/content/messengercompose.xul b/mail/components/compose/content/messengercompose.xul index b644bb2dafb7..419be0d81db8 100644 --- a/mail/components/compose/content/messengercompose.xul +++ b/mail/components/compose/content/messengercompose.xul @@ -466,7 +466,6 @@ -