Review Request 116520: Renames the label of the File Dialog Button from "Open" to "Send"
Martin Klapetek
martin.klapetek at gmail.com
Sun Mar 2 21:42:54 UTC 2014
> On March 2, 2014, 9:12 p.m., Martin Klapetek wrote:
> > Nooooo! Please don't add a whole new class for one string change, you can change it by doing KFileDialog::okButton()->setText("send"), that is all that is needed, as stated exactly in the bug report.
>
> Martin Klapetek wrote:
> To be more specific and helpful, look at ktp-contact-list/contact-list-widget.cpp, line 498. We create the file dialog with helper class like this: KFileDialog::getOpenFileNames(...). All we need to do there is simply create new KFileDialog(..) and then retrieve the okButton, like this:
>
> KFileDialog *selectFile = new KOpenDialog(..);
> selectFile->okButton()->setText(i18n("Send"));
> selectFile->exec();
>
> ...and then you'll have get the file name out of it, see http://api.kde.org/4.12-api/kdelibs-apidocs/kio/html/classKFileDialog.html for documentation.
>
> mayank jha wrote:
> But, that would be a hack, I added it to leave scope for later customization.
As discussed on the bug report and IRC, it's not a hack, that method is there exactly for this purpose, it's meant to be used for that :)
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116520/#review51718
-----------------------------------------------------------
On March 2, 2014, 8:46 p.m., mayank jha wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116520/
> -----------------------------------------------------------
>
> (Updated March 2, 2014, 8:46 p.m.)
>
>
> Review request for Telepathy.
>
>
> Bugs: 331533
> http://bugs.kde.org/show_bug.cgi?id=331533
>
>
> Repository: ktp-send-file
>
>
> Description
> -------
>
> Creates a new widget which renames the "Open" button to "Send".
>
>
> Diffs
> -----
>
> sendfiledialog.cpp PRE-CREATION
> main.cpp a35c4e1
> sendfiledialog.h PRE-CREATION
> CMakeLists.txt 04ded76
>
> Diff: https://git.reviewboard.kde.org/r/116520/diff/
>
>
> Testing
> -------
>
> Runs fine!
>
>
> Thanks,
>
> mayank jha
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20140302/f0d9e821/attachment.html>
More information about the KDE-Telepathy
mailing list