Ignore:
Timestamp:
Jan 9, 2017, 11:09:38 AM (3 years ago)
Author:
jrpelegrina
Message:

Update new version: 3.15.02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • filezilla/trunk/fuentes/src/interface/file_utils.h

    r130 r3185  
    11#ifndef FILEZILLA_FILE_UTILS_HEADER
    22#define FILEZILLA_FILE_UTILS_HEADER
     3
     4#include <libfilezilla/recursive_remove.hpp>
    35
    46bool UnquoteCommand(wxString& command, wxString& arguments, bool is_dde = false);
     
    1820CLocalPath GetDownloadDir();
    1921
     22class gui_recursive_remove : public fz::recursive_remove
     23{
     24public:
     25        gui_recursive_remove(wxWindow* parent)
     26                : parent_(parent)
     27        {}
     28
     29#ifdef FZ_WINDOWS
     30        virtual void adjust_shfileop(SHFILEOPSTRUCT & op)
     31        {
     32                op.hwnd = parent_ ? (HWND)parent_->GetHandle() : 0;
     33                if (parent_) {
     34                        // Move to trash if shift is not pressed, else delete
     35                        op.fFlags = wxGetKeyState(WXK_SHIFT) ? 0 : FOF_ALLOWUNDO;
     36                }
     37                else {
     38                        recursive_remove::adjust_shfileop(op);
     39                }
     40        }
    2041#endif
     42
     43        virtual bool confirm() const {
     44                if (parent_) {
     45                        if (wxMessageBoxEx(_("Really delete all selected files and/or directories from your computer?"), _("Confirmation needed"), wxICON_QUESTION | wxYES_NO, parent_) != wxYES)
     46                                return false;
     47                }
     48                return true;
     49        }
     50
     51private:
     52        wxWindow* parent_;
     53};
     54
     55#endif
Note: See TracChangeset for help on using the changeset viewer.