DownloadPathBox::DownloadPathBox() : AbstractBox() , _path(cDownloadPath()) , _pathBookmark(cDownloadPathBookmark()) , _default(this, qsl("dir_type"), 0, lang(lng_download_path_default_radio), _path.isEmpty()) , _temp(this, qsl("dir_type"), 1, lang(lng_download_path_temp_radio), _path == qsl("tmp")) , _dir(this, qsl("dir_type"), 2, lang(lng_download_path_dir_radio), !_path.isEmpty() && _path != qsl("tmp")) , _pathLink(this, QString(), st::defaultBoxLinkButton) , _save(this, lang(lng_connection_save), st::defaultBoxButton) , _cancel(this, lang(lng_cancel), st::cancelBoxButton) { connect(&_save, SIGNAL(clicked()), this, SLOT(onSave())); connect(&_cancel, SIGNAL(clicked()), this, SLOT(onClose())); connect(&_default, SIGNAL(changed()), this, SLOT(onChange())); connect(&_temp, SIGNAL(changed()), this, SLOT(onChange())); connect(&_dir, SIGNAL(changed()), this, SLOT(onChange())); connect(&_pathLink, SIGNAL(clicked()), this, SLOT(onEditPath())); if (!_path.isEmpty() && _path != qsl("tmp")) { setPathText(QDir::toNativeSeparators(_path)); } prepare(); }
void psDownloadPathEnableAccess() { objc_downloadPathEnableAccess(cDownloadPathBookmark()); }