home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / FolderFrame.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  15.9 KB  |  594 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. /* 
  19.    FolderFrame.cpp -- Folder window stuff
  20.    Created: Chris Toshok <toshok@netscape.com>, 29-Aug-96.
  21.  */
  22.  
  23.  
  24.  
  25. #include "MozillaApp.h"
  26. #include "FolderFrame.h"
  27. #include "FolderView.h"
  28. #include "FolderMenu.h"
  29. #include "Dashboard.h"
  30. #include "Command.h"
  31. #ifdef CLEAN_UP_NEWS
  32. #include "MailDownloadFrame.h"
  33. #include "Xfe/Xfe.h"
  34. #endif
  35. #include "xpassert.h"
  36.  
  37. #include "libi18n.h"
  38. #include "intl_csi.h"
  39.  
  40. #ifdef DEBUG_toshok
  41. #define D(x) x
  42. #else
  43. #define D(x)
  44. #endif
  45.  
  46. #include "xpgetstr.h"
  47. extern int XFE_SILLY_NAME_FOR_SEEMINGLY_UNAMEABLE_THING;
  48. extern int XFE_MN_FOLDER_TITLE;
  49. extern int XFE_INBOX_DOESNT_EXIST;
  50.  
  51. /* there is only one folder frame. */
  52. static XFE_FolderFrame *theFrame = NULL;
  53.  
  54. MenuSpec XFE_FolderFrame::file_menu_spec[] = {
  55.   { "newSubmenu",        CASCADEBUTTON, (MenuSpec *) &XFE_Frame::new_submenu_spec },
  56.   { xfeCmdNewFolder,        PUSHBUTTON },
  57.   { xfeCmdNewNewsHost,        PUSHBUTTON },
  58.   { xfeCmdOpenSelected,        PUSHBUTTON },
  59.   MENU_SEPARATOR,
  60.   { xfeCmdRenameFolder,        PUSHBUTTON },
  61.   { xfeCmdEmptyTrash,        PUSHBUTTON },
  62.   { xfeCmdCompressFolders,    PUSHBUTTON },
  63.   { xfeCmdCleanUpDisk,      PUSHBUTTON },
  64.   MENU_SEPARATOR,
  65.   { "newMsgSubmenu",    CASCADEBUTTON, (MenuSpec *) &XFE_Frame::newMsg_submenu_spec },
  66.   { xfeCmdSendMessagesInOutbox,    PUSHBUTTON },
  67. #if 0
  68.   { xfeCmdUpdateMessageCount,    PUSHBUTTON },
  69. #endif
  70.   { xfeCmdAddNewsgroup,        PUSHBUTTON },
  71.   //MENU_SEPARATOR,
  72.   //{ xfeCmdGoOffline,        PUSHBUTTON },
  73.   MENU_SEPARATOR,
  74.   { xfeCmdClose,        PUSHBUTTON },
  75.   { xfeCmdExit,            PUSHBUTTON },
  76.   { NULL }
  77. };
  78.  
  79. MenuSpec XFE_FolderFrame::edit_menu_spec[] = {
  80.     { xfeCmdUndo,            PUSHBUTTON },
  81.     { xfeCmdRedo,            PUSHBUTTON },
  82.     MENU_SEPARATOR,
  83.     { xfeCmdCut,            PUSHBUTTON },
  84.     { xfeCmdCopy,            PUSHBUTTON },
  85.     { xfeCmdPaste,        PUSHBUTTON },
  86.     { xfeCmdDeleteFolder,        PUSHBUTTON },
  87.     { xfeCmdSelectAll,        PUSHBUTTON },
  88.     MENU_SEPARATOR,
  89.     { xfeCmdSearch,                PUSHBUTTON },
  90.     { xfeCmdSearchAddress,        PUSHBUTTON },
  91.     MENU_SEPARATOR,
  92.     { xfeCmdEditConfiguration,    PUSHBUTTON },
  93.     { xfeCmdModerateDiscussion,    PUSHBUTTON },
  94.     MENU_SEPARATOR,
  95.     { xfeCmdEditMailFilterRules,PUSHBUTTON },
  96.     { xfeCmdViewProperties,        PUSHBUTTON },
  97.     { xfeCmdEditPreferences,    PUSHBUTTON },
  98.     { NULL }
  99. };
  100.  
  101. MenuSpec XFE_FolderFrame::view_menu_spec[] = {
  102.   { xfeCmdToggleNavigationToolbar,    PUSHBUTTON },
  103.   { xfeCmdToggleLocationToolbar,    PUSHBUTTON },
  104.   MENU_SEPARATOR,
  105.   { "expandCollapseSubmenu",    CASCADEBUTTON,
  106.     (MenuSpec *) &XFE_Frame::expand_collapse_submenu_spec },
  107. // Move Folders out of the menu for now -- see bug 68204.
  108. //  { "moveSubmenu",        DYNA_CASCADEBUTTON, NULL, NULL, False,
  109. //    (void*)xfeCmdMoveFoldersInto, XFE_FolderMenu::generate },
  110.   MENU_SEPARATOR,
  111.   { xfeCmdStopLoading,            PUSHBUTTON },
  112.   { NULL }
  113. };
  114.  
  115. MenuSpec XFE_FolderFrame::menu_bar_spec[] = {
  116.   { xfeMenuFile,     CASCADEBUTTON, file_menu_spec },
  117.   { xfeMenuEdit,     CASCADEBUTTON, edit_menu_spec },
  118.   { xfeMenuView,     CASCADEBUTTON, view_menu_spec },
  119.   { xfeMenuWindow,    CASCADEBUTTON, XFE_Frame::window_menu_spec },
  120.   { xfeMenuHelp,     CASCADEBUTTON, XFE_Frame::help_menu_spec },
  121.   { NULL }
  122. };
  123.  
  124. ToolbarSpec XFE_FolderFrame::toolbar_spec[] = {
  125.   { xfeCmdGetNewMessages,    PUSHBUTTON, &MNTB_GetMsg_group },
  126.   {  // XX mail only
  127.     xfeCmdComposeMessage,
  128.     CASCADEBUTTON,
  129.     &MNTB_Compose_group, NULL, NULL, NULL,     // Icons
  130.     compose_message_submenu_spec,           // Submenu spec
  131.     NULL, NULL,                  // Generate proc/arg
  132.     XFE_TOOLBAR_DELAY_LONG                 // Popup delay
  133.   },
  134.   { xfeCmdNewFolder,        PUSHBUTTON, &MNTB_NewFolder_group },
  135.   { xfeCmdAddNewsgroup,        PUSHBUTTON, &MNTB_AddGroup_group },
  136. #if 0
  137.   { xfeCmdDeleteFolder,         PUSHBUTTON, &MNTB_Trash_group },
  138. #endif
  139.   { xfeCmdStopLoading,        PUSHBUTTON, &TB_Stop_group },
  140.   { NULL }
  141. };
  142.  
  143. XFE_FolderFrame::XFE_FolderFrame(Widget toplevel,
  144.                                  XFE_Frame *parent_frame,
  145.                                  Chrome *chromespec) 
  146.   : XFE_Frame("MailFolder", toplevel, parent_frame,
  147.               FRAME_MAILNEWS_FOLDER, chromespec)
  148. {
  149.   INTL_CharSetInfo c = LO_GetDocumentCharacterSetInfo(m_context);
  150.   INTL_SetCSIWinCSID(c, 
  151.         INTL_DocToWinCharSetID (CONTEXT_DATA (m_context)->xfe_doc_csid));
  152.  
  153.   geometryPrefName = "mail.folder";
  154.  
  155. D(    printf ("in XFE_FolderFrame::XFE_FolderFrame()\n");)
  156.  
  157.   // create the folder view
  158.   XFE_FolderView *view = new XFE_FolderView(this, getViewParent(), NULL, m_context);
  159.   char banner_title[1024];
  160.  
  161.   m_banner = new XFE_MNBanner(this, m_toolbox);
  162.  
  163.   setView(view);
  164.  
  165.   PR_snprintf(banner_title, sizeof(banner_title),
  166.               XP_GetString( XFE_SILLY_NAME_FOR_SEEMINGLY_UNAMEABLE_THING ),
  167.               FE_UsersFullName());
  168.  
  169.   m_banner->setTitle( banner_title );
  170.   m_banner->setSubtitle("");
  171.  
  172.   // window title
  173.   char title[1024];
  174.   PR_snprintf(title, sizeof(title),
  175.               XP_GetString(XFE_MN_FOLDER_TITLE),
  176.               FE_UsersFullName());
  177.  
  178.   setTitle(title );
  179.  
  180.   XtVaSetValues(view->getBaseWidget(),
  181.         XmNleftAttachment, XmATTACH_FORM,
  182.         XmNtopAttachment, XmATTACH_FORM,
  183.         XmNrightAttachment, XmATTACH_FORM,
  184.         XmNbottomAttachment, XmATTACH_FORM,
  185.         NULL);
  186.  
  187.   setMenubar(menu_bar_spec);
  188.   setToolbar(toolbar_spec);
  189.  
  190. //  m_banner->show();
  191.   view->show();
  192.  
  193.  
  194.   XFE_MozillaApp::theApp()->registerInterest(XFE_MNView::MNChromeNeedsUpdating,
  195.                                              this,
  196.                                              (XFE_FunctionNotification)MNChromeUpdate_cb);
  197.  
  198.   {
  199.       Pixel bg_pixel;
  200.  
  201.       XtVaGetValues(m_banner->getBaseWidget(),
  202.                     XmNbackground, &bg_pixel,
  203.                     NULL);
  204.  
  205.       if (!XFE_MNView::collectionsIcon.pixmap)
  206.           fe_NewMakeIcon(m_widget,
  207.                          getFGPixel(),
  208.                          bg_pixel,
  209.                          &XFE_MNView::collectionsIcon,
  210.                          NULL, 
  211.                          MN_MessageCenter.width, MN_MessageCenter.height,
  212.                          MN_MessageCenter.mono_bits, MN_MessageCenter.color_bits,
  213.                          MN_MessageCenter.mask_bits, FALSE);
  214.   }
  215.  
  216.   m_banner->setProxyIcon(&XFE_MNView::collectionsIcon);
  217.  
  218.   m_dashboard->setShowStatusBar(True);
  219.   m_dashboard->setShowProgressBar(True);
  220.  
  221.   // Configure the toolbox for the first time
  222.   configureToolbox();
  223.  
  224. D(    printf ("leaving XFE_FolderFrame::XFE_FolderFrame()\n");)
  225. }
  226.  
  227. XFE_FolderFrame::~XFE_FolderFrame()
  228. {
  229. D(    printf ("in XFE_FolderFrame::~XFE_FolderFrame()\n");)
  230.  
  231.     XFE_MozillaApp::theApp()->unregisterInterest(XFE_MNView::MNChromeNeedsUpdating,
  232.                                                  this,
  233.                                                  (XFE_FunctionNotification)MNChromeUpdate_cb);
  234.  
  235.     theFrame = NULL;
  236.  
  237. D(    printf ("leaving XFE_FolderFrame::~XFE_FolderFrame()\n");)
  238. }
  239.  
  240. XP_Bool
  241. XFE_FolderFrame::isCommandEnabled(CommandType cmd,
  242.                                    void *calldata, XFE_CommandInfo*)
  243. {
  244.     if (cmd == xfeCmdToggleLocationToolbar)
  245.         return True;
  246.     else if (cmd == xfeCmdCleanUpDisk)
  247.         return True;
  248.     else
  249.         return XFE_Frame::isCommandEnabled(cmd, calldata);
  250. }
  251.  
  252. void
  253. XFE_FolderFrame::doCommand(CommandType cmd,
  254.                             void *calldata, XFE_CommandInfo* info)
  255. {
  256.     if (cmd == xfeCmdToggleLocationToolbar)
  257.     {
  258.         if (m_banner)
  259.         {
  260.             // Toggle the showing state
  261.             m_banner->toggle();
  262.             
  263.             // Configure the logo
  264.             configureLogo();
  265.             
  266.             // Do the attachments
  267.             doAttachments();
  268.             
  269.             // Update prefs
  270.             toolboxItemChangeShowing(m_banner);
  271.  
  272.             // Update chrome
  273.             notifyInterested(XFE_View::chromeNeedsUpdating);
  274.         }
  275.  
  276.         return;
  277.     } else if ( (cmd == xfeCmdComposeMessage) ||
  278.                 (cmd == xfeCmdComposeMessagePlain) ||
  279.                 (cmd == xfeCmdComposeMessageHTML) || 
  280.                 (cmd == xfeCmdComposeArticle) ||
  281.                 (cmd == xfeCmdComposeArticlePlain) ||
  282.                 (cmd == xfeCmdComposeArticleHTML) )
  283.  
  284.         {
  285.                 XFE_FolderView *tview = (XFE_FolderView*)m_view;
  286.  
  287.                 tview->doCommand(cmd, calldata,info);  
  288.  
  289.         }
  290.  
  291.     else
  292.         XFE_Frame::doCommand(cmd, calldata, info);
  293. }
  294.  
  295. XP_Bool
  296. XFE_FolderFrame::handlesCommand(CommandType cmd,
  297.                  void *calldata, XFE_CommandInfo*)
  298. {
  299.     if (cmd == xfeCmdToggleLocationToolbar)
  300.         return True;
  301.     else
  302.         return XFE_Frame::handlesCommand(cmd, calldata);
  303. }
  304.  
  305. char *
  306. XFE_FolderFrame::commandToString(CommandType cmd,
  307.                                   void *calldata, XFE_CommandInfo*)
  308. {
  309.     if (cmd == xfeCmdToggleLocationToolbar)
  310.     {
  311.         char *res = NULL;
  312.         
  313.         if (m_banner->isShown())
  314.             res = "hideLocationToolbarCmdString";
  315.         else
  316.             res = "showLocationToolbarCmdString";
  317.         
  318.         return stringFromResource(res);
  319.     }
  320.     else
  321.     {
  322.         return XFE_Frame::commandToString(cmd, calldata);
  323.     }
  324. }
  325.  
  326. void
  327. XFE_FolderFrame::show()
  328. {
  329.   XFE_Frame::show();
  330. }
  331.  
  332. XFE_CALLBACK_DEFN(XFE_FolderFrame, MNChromeUpdate)(XFE_NotificationCenter*,
  333.                                                    void*, void*)
  334. {
  335.     notifyInterested(XFE_View::chromeNeedsUpdating);
  336. }
  337.  
  338. void
  339. XFE_FolderFrame::show(MSG_FolderInfo *info)
  340. {
  341.   XFE_FolderView *fview = (XFE_FolderView*)m_view;
  342.  
  343.   show();
  344.  
  345.   fview->selectFolder(info);
  346. }
  347.  
  348. void
  349. XFE_FolderFrame::show(MSG_ViewIndex index)
  350. {
  351.     MSG_FolderInfo *info = NULL;
  352.     XFE_FolderView *fview = (XFE_FolderView*)m_view;
  353.  
  354.     if (!index) {
  355.         int m_inboxes = MSG_GetFoldersWithFlag(XFE_MNView::getMaster(),
  356.                                                MSG_FOLDER_FLAG_INBOX,
  357.                                                NULL, 0);
  358.         if (m_inboxes == 1) {
  359.             if (1 != MSG_GetFoldersWithFlag(XFE_MNView::getMaster(),
  360.                                             MSG_FOLDER_FLAG_INBOX,
  361.                                             &info, 1))
  362.                 info = NULL;
  363.         }/* if */
  364.         if (!info) {
  365.             // Prompt the user to enter the email address
  366.             char tmp[256];
  367.             XP_SAFE_SPRINTF(tmp, sizeof(tmp),
  368.                             "%s",
  369.                             XP_GetString(XFE_INBOX_DOESNT_EXIST));
  370.             fe_Alert_2(CONTEXT_WIDGET(m_context), tmp);
  371.  
  372.         }/* if */
  373.     }/* if */
  374.     else {
  375.         info = MSG_GetFolderInfo(fview->getPane(),
  376.                                  index);
  377.     }/* else */
  378.  
  379.     show();
  380.     if (info && fview)
  381.         fview->selectFolder(info);
  382. }
  383.  
  384. extern "C" MWContext*
  385. fe_showFoldersWithSelected(Widget toplevel,
  386.                            XFE_Frame *parent_frame,
  387.                            Chrome *chromespec,
  388.                            MSG_FolderInfo *info)
  389. {
  390.   if (theFrame == NULL)
  391.     theFrame = new XFE_FolderFrame(toplevel, parent_frame, chromespec);
  392.   
  393.   if (info)
  394.     theFrame->show(info);
  395.   else
  396.     theFrame->show();
  397.  
  398.   return theFrame->getContext();
  399. }
  400.  
  401. extern "C" MWContext*
  402. fe_showFolders(Widget toplevel, XFE_Frame *parent_frame, Chrome *chromespec)
  403. {
  404. D(    printf ("in fe_showFolders()\n");)
  405.  
  406.   // we are assuming that the first folder with the MAIL flag
  407.   // is the mail server...  I hope this is an ok assumption to
  408.   // make.
  409.  
  410.   if (theFrame == NULL)
  411.       theFrame = new XFE_FolderFrame(toplevel, parent_frame, chromespec);
  412.   
  413.   theFrame->show((MSG_ViewIndex)0);
  414.  
  415. D(    printf ("leaving fe_showFolders()\n");)
  416.     
  417.     return theFrame->getContext();
  418. }
  419.  
  420. extern "C" MWContext*
  421. fe_showNewsgroups(Widget toplevel,
  422.                   XFE_Frame *parent_frame,
  423.                   Chrome *chromespec)
  424. {
  425. D(    printf ("in fe_showNewsgroups()\n");)
  426.   MSG_FolderInfo *folderinfo = NULL;
  427.  
  428.   if (MSG_GetFoldersWithFlag(XFE_MNView::getMaster(),
  429.                  MSG_FOLDER_FLAG_NEWS_HOST,
  430.                  NULL, 0) > 0)
  431.     {
  432.       MSG_GetFoldersWithFlag(XFE_MNView::getMaster(),
  433.                  MSG_FOLDER_FLAG_NEWS_HOST,
  434.                  &folderinfo, 1);
  435.     }
  436.  
  437. D(    printf ("leaving fe_showNewsgroups()\n");)
  438.  
  439.   return fe_showFoldersWithSelected(toplevel, parent_frame, chromespec, folderinfo);
  440. }
  441.  
  442. //////////////////////////////////////////////////////////////////////////
  443. //
  444. // Toolbox methods
  445. //
  446. //////////////////////////////////////////////////////////////////////////
  447. void
  448. XFE_FolderFrame::toolboxItemSnap(XFE_ToolboxItem * item)
  449. {
  450.     XP_ASSERT( item == m_toolbar || item == m_banner );
  451.  
  452.     // Navigation
  453.     fe_globalPrefs.folders_navigation_toolbar_position = m_toolbar->getPosition();
  454.  
  455.     // Location
  456.     fe_globalPrefs.folders_location_toolbar_position = m_banner->getPosition();
  457. }
  458. //////////////////////////////////////////////////////////////////////////
  459. void
  460. XFE_FolderFrame::toolboxItemClose(XFE_ToolboxItem * item)
  461. {
  462.     XP_ASSERT( item != NULL );
  463.  
  464.     // Navigation
  465.     if (item == m_toolbar)
  466.     {
  467.         fe_globalPrefs.folders_navigation_toolbar_open = False;
  468.     }
  469.     // Location
  470.     else if (item == m_banner)
  471.     {
  472.         fe_globalPrefs.folders_location_toolbar_open = False;
  473.     }
  474. }
  475. //////////////////////////////////////////////////////////////////////////
  476. void
  477. XFE_FolderFrame::toolboxItemOpen(XFE_ToolboxItem * item)
  478. {
  479.     XP_ASSERT( item != NULL );
  480.  
  481.     // Navigation
  482.     if (item == m_toolbar)
  483.     {
  484.         fe_globalPrefs.folders_navigation_toolbar_open = True;
  485.     }
  486.     // Location
  487.     else if (item == m_banner)
  488.     {
  489.         fe_globalPrefs.folders_location_toolbar_open = True;
  490.     }
  491. }
  492. //////////////////////////////////////////////////////////////////////////
  493. void
  494. XFE_FolderFrame::toolboxItemChangeShowing(XFE_ToolboxItem * item)
  495. {
  496.     XP_ASSERT( item != NULL );
  497.  
  498.     // Navigation
  499.     if (item == m_toolbar)
  500.     {
  501.         fe_globalPrefs.folders_navigation_toolbar_showing = item->isShown();
  502.     }
  503.     // Location
  504.     else if (item == m_banner)
  505.     {
  506.         fe_globalPrefs.folders_location_toolbar_showing = item->isShown();
  507.     }
  508. }
  509. //////////////////////////////////////////////////////////////////////////
  510. void
  511. XFE_FolderFrame::configureToolbox()
  512. {
  513.     // If a the frame was constructed with a chromespec, then we ignore
  514.     // all the preference magic.
  515.     if (m_chromespec_provided)
  516.     {
  517.         return;
  518.     }
  519.  
  520.     // Make sure the toolbox is alive
  521.     if (!m_toolbox || (m_toolbox && !m_toolbox->isAlive()))
  522.     {
  523.         return;
  524.     }
  525.  
  526.     // Navigation
  527.     if (m_toolbar)
  528.     {
  529.         m_toolbar->setShowing(fe_globalPrefs.folders_navigation_toolbar_showing);
  530.         m_toolbar->setOpen(fe_globalPrefs.folders_navigation_toolbar_open);
  531.         m_toolbar->setPosition(fe_globalPrefs.folders_navigation_toolbar_position);
  532.     }
  533.  
  534.     // Location
  535.     if (m_banner)
  536.     {
  537.         m_banner->setShowing(fe_globalPrefs.folders_location_toolbar_showing);
  538.         m_banner->setOpen(fe_globalPrefs.folders_location_toolbar_open);
  539.         m_banner->setPosition(fe_globalPrefs.folders_location_toolbar_position);
  540.     }
  541.  
  542. }
  543.  
  544. extern int XFE_SEND_UNSENTMAIL;
  545.  
  546. XP_Bool 
  547. XFE_FolderFrame::isOkToClose()
  548. {
  549.    Boolean haveQueuedMail = False;
  550.    XFE_FolderView *tview = (XFE_FolderView*)m_view;
  551.  
  552.    if ( XFE_MozillaApp::theApp()->mailNewsWindowCount() == 1 )
  553.    {    
  554.  
  555.    MSG_CommandStatus(tview->getPane(), MSG_DeliverQueuedMessages, NULL, 0,
  556.                 &haveQueuedMail, NULL, NULL, NULL );
  557.  
  558.    if (haveQueuedMail) {
  559.           void * sendNow = 0;
  560.           const char *buf =  XP_GetString (XFE_SEND_UNSENTMAIL);
  561.           sendNow = fe_dialog (CONTEXT_WIDGET(m_context),
  562.                                  "sendNow", buf, TRUE, 0, TRUE, FALSE, 0);
  563.           if (sendNow) {
  564.             MSG_Command (tview->getPane(), MSG_DeliverQueuedMessages, NULL, 0);
  565.             return False;
  566.           }
  567.         }
  568.  
  569. #ifdef CLEAN_UP_NEWS    // see comment in ThreadFrame.cpp
  570. #ifdef DEBUG_akkana
  571.         printf("FolderFrame: Checking whether cleanup is needed\n");
  572. #endif
  573.  
  574.         // See if we need to clean up based on disk space prefs
  575.         if (MSG_CleanupNeeded(tview->getMaster()))
  576.         {
  577. #ifdef DEBUG_akkana
  578.             printf("Cleaning up\n");
  579. #endif
  580.             // create progress pane
  581.             XFE_MailDownloadFrame* progressFrame = 
  582.                 new XFE_MailDownloadFrame(XfeAncestorFindApplicationShell(getBaseWidget()),
  583.                                           this,
  584.                                           tview->getPane());
  585.             progressFrame->cleanUpNews();
  586.             return True;
  587.         }
  588. #endif /* CLEAN_UP_NEWS */
  589.     }
  590.     return True;
  591.  
  592. }
  593. //////////////////////////////////////////////////////////////////////////
  594.