summaryrefslogtreecommitdiff
path: root/RealtimeSync/functions.cpp
blob: f66db6b4dd227724e0736949b52b923e2b3540af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html       *
// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de)                    *
// **************************************************************************
//
#include "functions.h"
#include <wx/textctrl.h>
#include <wx/filepicker.h>
#include "../shared/string_conv.h"
#include "../shared/file_handling.h"

using namespace ffs3;

void rts::setDirectoryName(const wxString& dirname, wxTextCtrl* txtCtrl, wxDirPickerCtrl* dirPicker)
{
    txtCtrl->SetValue(dirname);
    const Zstring leftDirFormatted = ffs3::getFormattedDirectoryName(wxToZ(dirname));
    if (dirExists(leftDirFormatted))
        dirPicker->SetPath(zToWx(leftDirFormatted));
}

bgstack15