Skip to content

Commit

Permalink
Ask export path with other export options.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jun 22, 2018
1 parent 10a0c6a commit ae18ece
Show file tree
Hide file tree
Showing 12 changed files with 307 additions and 181 deletions.
3 changes: 2 additions & 1 deletion Telegram/Resources/langs/lang.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_export_option_gifs" = "Animated GIFs";
"lng_export_option_files" = "Files";
"lng_export_option_size_limit" = "Size limit: {size}";
"lng_export_header_format" = "Format";
"lng_export_header_format" = "Location and format";
"lng_export_option_location" = "Download path: {path}";
"lng_export_option_text" = "Human-readable text";
"lng_export_option_json" = "Machine-readable JSON";
"lng_export_start" = "Export";
Expand Down
8 changes: 4 additions & 4 deletions Telegram/SourceFiles/boxes/about_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void AboutBox::prepare() {

addButton(langFactory(lng_close), [this] { closeBox(); });

const auto linkHook = [](const ClickHandlerPtr &link, auto button) {
const auto linkFilter = [](const ClickHandlerPtr &link, auto button) {
if (const auto url = dynamic_cast<UrlClickHandler*>(link.get())) {
url->UrlClickHandler::onClick(button);
return false;
Expand All @@ -40,9 +40,9 @@ void AboutBox::prepare() {
};

_text3->setRichText(lng_about_text_3(lt_faq_open, qsl("[a href=\"%1\"]").arg(telegramFaqLink()), lt_faq_close, qsl("[/a]")));
_text1->setClickHandlerHook(linkHook);
_text2->setClickHandlerHook(linkHook);
_text3->setClickHandlerHook(linkHook);
_text1->setClickHandlerFilter(linkFilter);
_text2->setClickHandlerFilter(linkFilter);
_text3->setClickHandlerFilter(linkFilter);

_version->setClickedCallback([this] { showVersionHistory(); });

Expand Down
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ object_ptr<Ui::RpWidget> Controller::createInviteLinkEdit() {
_controls.inviteLink->setSelectable(true);
_controls.inviteLink->setContextCopyText(QString());
_controls.inviteLink->setBreakEverywhere(true);
_controls.inviteLink->setClickHandlerHook([this](auto&&...) {
_controls.inviteLink->setClickHandlerFilter([=](auto&&...) {
Application::clipboard()->setText(inviteLinkText());
Ui::Toast::Show(lang(lng_group_invite_copied));
return false;
Expand Down
6 changes: 6 additions & 0 deletions Telegram/SourceFiles/export/view/export.style
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ exportFileSizeLabel: LabelSimple(defaultLabelSimple) {
}
exportFileSizePadding: margins(22px, 8px, 22px, 8px);
exportFileSizeLabelBottom: 18px;

exportLocationLabel: FlatLabel(boxLabel) {
maxHeight: 21px;
}
exportLocationPadding: margins(22px, 8px, 22px, 8px);

exportErrorLabel: FlatLabel(boxLabel) {
minWidth: 175px;
align: align(top);
Expand Down
Loading

0 comments on commit ae18ece

Please sign in to comment.