75 Commits

Author SHA1 Message Date
Thierry
3d930e5bd8 Add build locale. 2018-09-04 17:51:20 +02:00
Thierry
b71fc67032 Added translation mechanism, and added French translation. 2018-09-04 17:51:20 +02:00
Matthieu Gautier
6097c0fe99 Implement search in page actions.
- Create a TOCSideBar (name TOC because it will also show TOC)
- Remove `FindNextAction` and `FindPreviousAction`. They are handle
  directly by a button in the sidebar.
2018-09-04 17:27:58 +02:00
Matthieu Gautier
67f2d1f067 Implement zoom action. 2018-09-03 16:12:25 +02:00
Matthieu Gautier
089a1753eb [About message] Add a link to report bugs in the about message.
Fix #23
2.0-alpha2
2018-08-21 17:32:39 +02:00
Matthieu Gautier
19c991f8a9 [About message] fix typos 2018-08-21 17:32:04 +02:00
Matthieu Gautier
502154ac3d Hide donateAction. 2.0-alpha 2018-08-03 17:28:56 +02:00
Matthieu Gautier
ae155063a5 Add missing ; at end of Categories. 2018-08-03 14:21:03 +02:00
Matthieu Gautier
1554b90a2e Hide ReopenClosedTabAction and SettingAction.
We will not implement them for the alpha.
2018-08-03 14:20:47 +02:00
Matthieu Gautier
48aa87fb48 Display the kiwix version in the about dialog. 2018-08-02 19:26:54 +02:00
Matthieu Gautier
5824083382 Connect the AboutAction.
Show the about dialog when action is triggered.
2018-08-02 17:59:38 +02:00
Matthieu Gautier
76214e6f53 Add an about dialog. 2018-08-02 17:57:31 +02:00
Matthieu Gautier
96b23c5c1e Connect the toggleFullScreen action.
The topwidget now use the application's action instead of having
two different action.
2018-08-02 17:24:32 +02:00
Matthieu Gautier
dfc0a454ab Convert filepath to utf8.
Let's move to http://utf8everywhere.org/
2018-07-31 20:09:54 +02:00
Matthieu Gautier
07e80eefa5 Open external links in the system browser. 2018-07-27 18:33:59 +02:00
Matthieu Gautier
7900c1a4e1 Fix some crash when no tab is opened. 2018-07-26 14:50:32 +02:00
Matthieu Gautier
f8c6f18c0a Connect RandomArticleAction. 2018-07-26 14:49:33 +02:00
Matthieu Gautier
15f1492d96 Connect PrintAction.
This display a dialog to select the printer and its options.
The dialog is awful because it reuses the application stylesheet
but it works.
2018-07-26 13:47:05 +02:00
Matthieu Gautier
d2e32dbf79 We should use the zimId as host in search.
Fix bug instroduced with 7408bb0a
2018-07-26 10:41:05 +02:00
Matthieu Gautier
7fa49479a9 Correctly check the index with -1 not 1.
If `index == -1`, it means there is no more tab opened.
2018-07-25 17:34:14 +02:00
Matthieu Gautier
2ec1beb103 Connect OpenFileAction. 2018-07-25 17:30:32 +02:00
Matthieu Gautier
52f6b03da2 Connect closeTabAction. 2018-07-25 17:19:57 +02:00
Matthieu Gautier
0806faeb99 Connect NewTabAction. 2018-07-25 17:18:11 +02:00
Matthieu Gautier
2743568cef Connect ExitAction 2018-07-25 17:10:36 +02:00
Matthieu Gautier
61e566e318 Fix style of icon size of tabBar 2018-07-25 17:02:53 +02:00
Matthieu Gautier
60405d533a Style the menu. 2018-07-25 17:02:32 +02:00
Matthieu Gautier
6f8b1ab7b4 Add a menu.
All action of the menu are created but none is associated with an action.
Actions needed for the alpha are disabled.
Actions not needed for the alpha are hidden.
2018-07-25 17:02:13 +02:00
Matthieu Gautier
7b7f432f8b Customize the searchBar using the css
- Use a the css to display the icon.
- Update the search.svg icon to be 40px wide.
- No need to have a custom paintEvent method.
2018-07-24 17:28:32 +02:00
Matthieu Gautier
28fff443ed Remove the margin around the centralWidget. 2018-07-24 17:25:11 +02:00
Matthieu Gautier
fea60dca50 Add a custom CSS.
This basic CSS is a first attempt to have our custom style.

We use the "Windows" style as base as it is the closest of our style.
2018-07-24 17:24:51 +02:00
Matthieu Gautier
7408bb0a65 Do not use deprecated kiwix-lib method. 2018-07-23 15:48:48 +02:00
Matthieu Gautier
e35d42bcfd Add a property currentZimId to the TabWidget. 2018-07-23 15:48:47 +02:00
Matthieu Gautier
b3fbeccfbc Add a property zimId in the WebView. 2018-07-23 15:48:08 +02:00
Matthieu Gautier
5e80464128 Method of tabWidget changing a webView work by default on current webView. 2018-07-23 15:48:06 +02:00
Matthieu Gautier
ca309c0701 Implement search suggestion. 2018-07-19 18:43:27 +02:00
Matthieu Gautier
c712a7a760 Rename member variables.
- Move camelCase.
- Use the prefix `m_` and `mp_` for member and pointer member.
2018-07-19 15:56:27 +02:00
Matthieu Gautier
e15e8cf642 Implement Back & Forward in the history. 2018-07-19 15:30:03 +02:00
Matthieu Gautier
5e22b03941 Overload TabWidget' widget and currentWidget to return a WebView. 2018-07-19 15:30:03 +02:00
Matthieu Gautier
24dd0a39d5 Add a close button to the tabs. 2018-07-19 15:30:03 +02:00
Matthieu Gautier
ee2a55bcbf Remove unused reader parameter in TabWidget::openUrl. 2018-07-19 15:30:03 +02:00
Matthieu Gautier
3e46893e2d Rename classes and files.
Mainly remove the `Kiwix` part in the name :
- KiwixSchemeHandler -> UrlSchemeHandler
- KiwixRequestInterceptor -> RequestInterceptor
- KiwixWebView -> WebView
- KTabWidget -> TabWidget
2018-07-19 15:30:03 +02:00
Matthieu Gautier
7b9968daee Move source files in src subdirectory. 2018-07-19 10:48:45 +02:00
Matthieu Gautier
9eb761099f
Merge pull request #17 from kiwix/new_version
Update of kiwix-desktop.
2018-07-18 17:59:46 +02:00
Matthieu Gautier
aaae4e7c4b Add a virtual BlobBuffer destructor.
This is need to be sure that the referenced zim::Blob is actually deleted.
2018-07-18 17:57:59 +02:00
Matthieu Gautier
d1b5624f04 Set the tab's icon to the icon of the zim file.
Properly set the icon of the tab when the favicon of the KiwixWebView
is updated.

By default, the icon of QWebEngineView is updated from the favicon set
in the html. But it sometime it is not set.

So we need to load the icon from the zim file, so we have to react
to urlChanged signal, to load the icon when the url's host (the zim file)
changes.
2018-07-18 17:57:59 +02:00
Matthieu Gautier
cb21a6816e Set the tab's text to the title of the webView.
The `titleChanged` signal is emitted twice:
- At beggining of loading with the Url of the page.
- Once the parsing is done and the `<title></title>` html tag has been
  found.
2018-07-18 17:57:59 +02:00
Matthieu Gautier
81766be447 Allow user to open a link in a new tab.
When a user <Ctrl+LeftClick> or <MiddleClick> on a link, `QWebEngineView`
try to open a new window using the `createWindow` method.

By overloading it, we can create our own tab as we want.
2018-07-18 17:57:59 +02:00
Matthieu Gautier
1287c93368 Overload KiwixApp::instance() to return a KiwixApp*. 2018-07-18 17:57:59 +02:00
Matthieu Gautier
0359cde2d2 Fix typos. 2018-07-18 17:57:59 +02:00
Matthieu Gautier
3c9c0a4d88 Display the system title bar. 2018-07-18 17:57:59 +02:00