Ticket #1521: confirm.diff

File confirm.diff, 2.0 KB (added by Eirik, 13 years ago)

The diff 2.0

  • src/interface/Mainfrm.cpp

     
    791791
    792792void CMainFrame::OnClose(wxCloseEvent &event)
    793793{
     794    if (GetState()->IsRemoteConnected() && GetState()->IsRemoteIdle())
     795    {
     796        CConditionalDialog dlg(this, CConditionalDialog::confirmexit, CConditionalDialog::yesno);
     797        dlg.SetTitle(_("Close FileZilla"));
     798
     799        dlg.AddText(_("You are still connected to a server."));
     800        dlg.AddText(_("Do you really want to close FileZilla?"));
     801
     802        if (!dlg.Run())
     803            return;
     804    }
     805
    794806    if (!m_bQuit)
    795807    {
    796808        RememberSizes();
  • src/interface/sitemanager.cpp

     
    66#include "filezillaapp.h"
    77#include "ipcmutex.h"
    88#include "wrapengine.h"
     9#include "conditionaldialog.h"
    910
    1011std::map<int, CSiteManagerItemData*> CSiteManager::m_idMap;
    1112
     
    671672    wxTreeItemId item = pTree->GetSelection();
    672673    if (!item.IsOk() || item == pTree->GetRootItem() || item == m_ownSites || IsPredefinedItem(item))
    673674        return;
    674        
     675
     676    CConditionalDialog dlg(this, CConditionalDialog::sitemanager_confirmdelete, CConditionalDialog::yesno);
     677    dlg.SetTitle(_("Delete Site Manager entry"));
     678
     679    dlg.AddText(_("Do you really want to delete selected entry?"));
     680
     681    if (!dlg.Run())
     682        return;
     683
    675684    pTree->Delete(item);
    676685}
    677686
  • src/interface/conditionaldialog.h

     
    1313    enum DialogType
    1414    {
    1515        rawcommand_quote,
    16         viewhidden
     16        viewhidden,
     17        confirmexit,
     18        sitemanager_confirmdelete
    1719    };
    1820
    1921    CConditionalDialog(wxWindow* parent, enum DialogType type, enum Modes mode, bool checked = false);