when trying to send a file, a file chooser dialog comes up to select the file to send the confirmation button will say 'Open' rather than for example 'Send' Reproducible: Always
Quick investigation shows we're using KFileDialog::getOpenFileNames(...) and that does not provide any option to change the buttons or at least their captions. Possible way is to create the dialog ourselves and set custom text on KFileDialog::okButton(). String freeze however makes this 0.9 material. Also JJ.
I plan to add a new file say, SendFIleDialog.cpp which inherits the KFileDialog class, and has a custom method called, getSendFileUrls(), which has the button renamed as "Send". Does this sound good ? Should I go ahead with this ?
@mayank. Sounds good.
Created attachment 85375 [details] Creates a new widget which renames the "Open" button to "Send" It creates a new widget inheriting the current KFileDialog class.
Is this not, a part of ktp-send-file instead of ktp-common-internals ?
I will put it in kTp/Widgets once it is approved.
Can you put sendfile.h/cpp in a patch somewhere. Ideally reviewboard.
https://git.reviewboard.kde.org/r/116520/
As stated on the review, all you need to do is mentioned in comment #1. No new class is needed for this.
but that would be a hack, if I am not wrong ? On Mon, Mar 3, 2014 at 1:43 AM, Martin Klapetek <mklapetek@kde.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=331533 > > --- Comment #9 from Martin Klapetek <mklapetek@kde.org> --- > As stated on the review, all you need to do is mentioned in comment #1. No > new > class is needed for this. > > -- > You are receiving this mail because: > You are on the CC list for the bug. >
It would not, that method is specifically there for this purpose. Citing the docs: "Returns a pointer to the OK-Button in the filedialog. You may use it e.g. to set a custom text to it." See http://api.kde.org/4.12-api/kdelibs-apidocs/kio/html/classKFileDialog.html#afe0157d8f50eabfe38cbf8066b7d6efe
Yes, I read it. But since that would not leave any scope of modifying the KFileDialog later, Also as you mentioned that we need to make the file dialog ourselves, so I chose making a new class instead. On Mon, Mar 3, 2014 at 2:22 AM, Martin Klapetek <mklapetek@kde.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=331533 > > --- Comment #11 from Martin Klapetek <mklapetek@kde.org> --- > It would not, that method is specifically there for this purpose. Citing > the > docs: > > "Returns a pointer to the OK-Button in the filedialog. You may use it e.g. > to > set a custom text to it." > > See > > > http://api.kde.org/4.12-api/kdelibs-apidocs/kio/html/classKFileDialog.html#afe0157d8f50eabfe38cbf8066b7d6efe > > -- > You are receiving this mail because: > You are on the CC list for the bug. >
> But since that would not leave any scope of modifying the KFileDialog later What do you mean? We don't need the dialog later, we need it only that one time and it should be deleted afterwards. > Also as you mentioned that we need to make the file > dialog ourselves Yes, using "new KFileDialog(..)" instead of using the static helper methods giving you the file name directly :) We actually do not create the dialog right now, it all happens behind the scenes for us. > so I chose making a new class instead. There's no use for a whole class reimplementing things when all you need to do is change one line; you would just move that one line inside the class (all the instantiating would be there just like with normal KFileDialog). So it adds code (more maintainance) for very very little gain. (also when replying to bugs, can you please either comment via the web interface or remove all of the previous mail, it makes the bug report too noisy).
changes, implemented.
Git commit dd42fafe15fe3cf2d2685899a28b7e2899b269dd by David Edmundson, on behalf of mayank jha. Committed on 13/03/2014 at 10:25. Pushed by davidedmundson into branch 'master'. Renames the label of the File Dialog Button from "Open" to "Send" Modifies the label of FileDialog button from "Open" button to "Send". REVIEW: 116520 M +8 -1 main.cpp http://commits.kde.org/telepathy-send-file/dd42fafe15fe3cf2d2685899a28b7e2899b269dd
Git commit 9170e58d9ad8b0a66aae31556e1e468a2555a801 by Martin Klapetek, on behalf of mayank jha. Committed on 18/03/2014 at 15:30. Pushed by mklapetek into branch 'master'. Renames the "Open" button of KFileDialog to "Send" REVIEW: 116556 M +8 -4 contact-list-widget.cpp http://commits.kde.org/telepathy-contact-list/9170e58d9ad8b0a66aae31556e1e468a2555a801