-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented Save Page #1134
Implemented Save Page #1134
Conversation
aff6cfe
to
1f9c641
Compare
src/webview.cpp
Outdated
{ | ||
QString fileName = QFileDialog::getSaveFileName( | ||
app->getMainWindow(), gt("save-file-as-window-title"), | ||
suggestedPath, gt("pdf-files-filter") + " (*.pdf)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the gt
for the filter text needed? I didn't see one for our .zim filters but I added it just in case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me it seems mandatory, otherwise how would you get a translated message?! Or I get it wrong?! @veloman-yunkan
1f9c641
to
8b94432
Compare
Actually, we should hold off until #1132 is merged as we have to test how that works with this save page. I am also seeing some places of improvement for this PR. |
8b94432
to
c23025d
Compare
@ShaopengLin I will review this PR, can you please rebase and fix the conflict? |
c23025d
to
60c5e0e
Compare
@kelson42 done |
|
Edit: Okay I believe I misunderstood the proposed change. You meant if the article name IS AC/DC, we would like to sanitize it to AC_DC.
|
e3762e7
to
76d5477
Compare
@kelson42 Done.
The video/contents that can be saved are these ones opened directly as a video file in the tab: For the ones embedded inside an HTML web page, we would not be able to identify those as they are indeed web pages: These videos can just be downloaded using the provided download button: |
@ShaopengLin Please update me on each point I have given. In general this is very important to be very clear about what is done and why. The reviewer has a limited amount of time and therefore the goal is to implement PR so the reviewer has just to approve it without having to ask questions and obviously ask for changes. Here I have no clue if you have fixed the "bad" shortcut, why it was bad in a first place |
|
76d5477
to
dbec9ce
Compare
dbec9ce
to
8862b10
Compare
I have rebased as we are approaching the time to make the code review and the PR is already quite old. |
@veloman-yunkan @ShaopengLin I would recommend to move the string slugification method to libkiwix |
@ShaopengLin Looks good to me finally. Could you please add as well the the contextual menu like on a Web Browser? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I would be fine with moving slugification to libkiwix. Note this doesn't guarantee the file name is 100% valid in Windows. They have a lot of rules extra rules. |
886c7ae
to
a504ee7
Compare
@kelson42 Do you want me to just PR from fork to libkiwix, or create a branch like we do here? If the latter I will need to be a collaborator. |
Sorry, you should just have received an invitation to be member of the team and have write permission. |
Blocked by kiwix/libkiwix#1105 |
a504ee7
to
97de27c
Compare
97de27c
to
81f1dd5
Compare
@kelson42 @veloman-yunkan Ready for review. Updated change from kiwix/libkiwix#1105. |
@ShaopengLin I want to test it, but would be very nice if you could rebase it (once again). |
81f1dd5
to
1d3deb4
Compare
@kelson42 Done. |
1a6f621
to
3392531
Compare
src/kprofile.cpp
Outdated
QString extension = | ||
isSavePageDownload ? ".pdf" : "." + defaultFileName.section('.', -1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't the extension now be derived only from defaultFileName
(due to page()->save(suggestedFileName + ".pdf");
in this commit? If yes, you can also get rid of the isSavePageDownload
variable and put download->isSavePageDownload()
in the only remaining point of usage directly.
3392531
to
27ee036
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it were not for the pagr typo I might have approved. But since we are going to go through another iteration I chose not to silence the perfectionist side of me :)
27ee036
to
0465442
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit that dropped category translations was lost. Was that a mistake?
Sorry, I confused this PR with #1175 :)
0465442
to
cf71bcb
Compare
Retrieval function now includes parsing of path. Prepares future change.
Page saved as either pdf or file based on content
Document folder is default.
Convert reserved chars to '_' before parsing
cf71bcb
to
7fcd6b5
Compare
Fix #77
Changes: