1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 17:42:10 +01:00
Commit Graph

2645 Commits

Author SHA1 Message Date
David Rosca
1f9599aac7 Add DownloadsButton to navigation toolbar
It is visible only when there are items in download manager and shows
number of active downloads in badge text.
2018-01-11 19:48:43 +01:00
David Rosca
0e41fd0785 AbstractButtonInterface: Add support for hiding tool button 2018-01-11 19:48:06 +01:00
David Rosca
238a06874d AbstractButtonInterface: Allow delayed hide of popup 2018-01-11 19:48:01 +01:00
David Rosca
1595587945 ThemeManager: Set proper icon size for QListWidget 2018-01-11 19:46:56 +01:00
David Rosca
df632c7ced NavigationBar: Only reload layout when settings changes 2018-01-11 19:46:51 +01:00
David Rosca
e33174100e NavigationBar: Bring back exit fullscreen button
This time it is configurable and hidden by default.
2018-01-11 19:46:44 +01:00
David Rosca
50d1bb6d96 ComboTabBar: Add possibility to change base color from stylesheets 2018-01-11 19:46:33 +01:00
David Rosca
49ebfa3f5d TabBar: Don't hide add tab button when moving tabs 2018-01-11 19:46:06 +01:00
David Rosca
68ed91c909 ComboTabBar: Block moving tabs outside of tabbar 2018-01-11 19:46:03 +01:00
David Rosca
26a2b55c24 ComboTabBar: Don't call QTabBar paintEvent implementation during drag
Implement udpating geometry of moving tab.
2018-01-11 19:45:58 +01:00
David Rosca
8ea8b56f27 ComboTabBar: Add draggedTabRect method 2018-01-11 19:45:46 +01:00
David Rosca
84c4f0ff4d TabBar: Don't show context menu when dragging tab
Otherwise it breaks tabbar state.
2018-01-11 19:45:41 +01:00
David Rosca
78383c007e TabBar: Always send mouse events to ComboTabBar
It needs every event to correctly update dragInProgress property.
2018-01-11 19:45:36 +01:00
David Rosca
4e988ac8f2 ComboTabBar: Fixes in drawing tabs with drag offset
m_dragInProgress is now only true when dragging tab, not during
the tab sliding to target position animation.
2018-01-11 19:45:32 +01:00
David Rosca
6a48f4d862 TabBar: Disable greying out not restored tabs
It doesn't really work with some themes and there doesn't seem
to be easy way to make the text always clearly visible.
2018-01-11 19:45:27 +01:00
David Rosca
7adda247dc NavigationBar: Make sure search bar doesn't have null size in splitter 2018-01-11 19:45:23 +01:00
David Rosca
670e06cbc6 Change back "Sidebars" -> "Sidebar" 2018-01-11 19:44:59 +01:00
David Rosca
4c7eaf0f9f ComboTabBar: Add support for tabPadding property
Workarounds bug where tabs have zero padding when styled using style
sheets.
2018-01-11 19:44:50 +01:00
David Rosca
e617f3f6ec ComboTabBar: Fix drop indicator position on last tab 2018-01-11 19:44:45 +01:00
David Rosca
679a5f0136 ComboTabBar: Also use our TabBarHelper drawing code when drag is in progress 2018-01-11 19:44:40 +01:00
David Rosca
5dfe6d862c NavigationBar: Clear current webview for all tool buttons
Fixes another crash similar to #2537
2018-01-11 19:44:35 +01:00
David Rosca
4dd67cfce6 LocationCompleter: Set BrowserWindow as transient parent 2018-01-11 19:44:30 +01:00
David Rosca
47ee7bfbca TabWidget: Set outside-tabbar property to both add tab buttons
It is now possible to exclusively distinguish both buttons.
2018-01-11 19:43:38 +01:00
David Rosca
7e8b2a103b ComboTabBar: Draw tab as only one in tabbar in tabPixmap 2018-01-11 19:43:33 +01:00
David Rosca
848a61440c TabWidget: Hide closed tabs button when there are no closed tabs 2018-01-11 19:42:46 +01:00
David Rosca
6806fa5405 AbstractButtonInterface: Use WebView property instead of WebPage
WebView of a tab will not change while WebPage may.

This also fixes crash when WebPage of WebView is changed. It can happen
eg. when opening new tab from page with target=_blank.

Closes #2537
2018-01-11 19:42:38 +01:00
David Rosca
f87c6897a0 WebPage: Always build nonblock js dialogs support
Can be enabled with QUPZILLA_ENABLE_JS_NONBLOCK_DIALOGS environment variable.
2018-01-11 19:41:49 +01:00
David Rosca
642d835d55 WebPage: Disable writing JavaScript warnings on stderr
Can be enabled with QUPZILLA_ENABLE_JS_OUTPUT environment variable.
2018-01-11 19:40:43 +01:00
David Rosca
ad3780e8df MainApplication: Sync settings after writing isRunning value
Fixes correctly detecting crashes during session restore.
2018-01-11 19:40:38 +01:00
David Rosca
e41b0edf0a Make qupzilla:restore working also with disabled JavaScript
Instead of temporarily enabling JavaScript, make the page functional
without it.
2018-01-11 19:40:31 +01:00
David Rosca
7ebd4039f8 AdBlock: Clear blocked requests for url when webpage is deleted 2018-01-11 19:38:37 +01:00
David Rosca
2f8c12ff1c WebTab: Fix tab with empty url but not empty history treating as invalid
Fixes possibility to lose tabs on session restore when closing window
right after it started to restore session (right after it was opened).
2018-01-11 19:38:23 +01:00
David Rosca
a45dbdc883 AdBlock: Track blocked requests on page
AdBlock icon now indicates number of blocked requests in badge text.
2018-01-11 19:38:14 +01:00
David Rosca
ba2ea9cb09 AbstractButtonInterface: Rename badgeLabelText -> badgeText 2018-01-11 19:36:54 +01:00
David Rosca
15a2afb4b6 NavigationBar: Add support for badge text in tool buttons 2018-01-11 19:36:49 +01:00
David Rosca
8827b1fb90 NetworkUrlInterceptor: Also guard adding/removing other interceptors 2018-01-11 19:36:44 +01:00
David Rosca
ee02d7716a AdBlockIcon: Remove unused popupBlocked 2018-01-11 19:36:39 +01:00
David Rosca
ff1171abf0 AdBlock: Make it as self-contained as possible
It could be easy now to turn it into real loadable plugin.
2018-01-11 19:36:32 +01:00
David Rosca
401e600821 AdBlock: Remove action from Tools menu 2018-01-11 19:34:52 +01:00
David Rosca
9c17277dd5 NetworkUrlInterceptor: Add proper locking 2018-01-11 19:34:45 +01:00
David Rosca
394221c5c0 AdBlockManager: Disable blocking on view-source scheme 2018-01-11 19:33:51 +01:00
David Rosca
0ff1ebc584 Fix build 2018-01-11 19:33:22 +01:00
David Rosca
3d171275d2 AdBlockIcon: Indicate AdBlock state on current page with icon state
Icon is inactive when AdBlock is disabled or can't run on current page.
2018-01-11 19:33:17 +01:00
David Rosca
74f45f6028 NavigationBarToolButton: Add support for inactive state 2018-01-11 19:33:13 +01:00
David Rosca
7f00b51fea Preferences: Remove last Navigation Toolbar option
It is now configurable directly from navigation toolbar.
2018-01-11 19:33:06 +01:00
David Rosca
2d698edd21 BrowserWindow: Fix crash when restoring geometry of fullscreen window 2018-01-11 19:32:59 +01:00
David Rosca
4a4d5b72ad Add NavigationBarConfigDialog
Allows to change layout of navigation bar and hide/show search bar.
2018-01-11 19:32:54 +01:00
David Rosca
4c494ebfb0 ComboTabBar: Improve drop indicator drawing
Code was taken and modified from KFilePlacesView
2018-01-11 19:31:41 +01:00
David Rosca
546e777c7c NavigationContainer: Also add bottom margin with tabs on top 2018-01-11 19:31:33 +01:00
David Rosca
8cbaa19dd1 Use correct margins from style in NavigationBar and BookmarksToolbar 2018-01-11 19:31:17 +01:00
David Rosca
09d2a2017d ButtonWithMenu: Don't show menu on right click 2018-01-11 19:31:00 +01:00
David Rosca
c5b59d1011 ToolButton: Disable showing button menu on right click by default 2018-01-11 19:30:05 +01:00
David Rosca
23279f6e10 GreaseMonkey: Move icon from statusbar to navigationbar as tool button 2018-01-11 19:29:35 +01:00
David Rosca
0cbbd197ca AdBlockIcon: Move from statusbar to navigationbar as tool button 2018-01-11 19:29:09 +01:00
David Rosca
6824ea17f2 NavigationBar: Add support for adding additional tool buttons 2018-01-11 19:28:32 +01:00
David Rosca
c0ac5ce0a2 BrowserWindow: Use QActionGroup for encoding menu 2018-01-11 19:26:06 +01:00
David Rosca
8eeba9e1df SideBarManager: Use QActionGroup for sidebars menu 2018-01-11 19:26:00 +01:00
David Rosca
0b8a693bca NavigationBar: Add Tools button
It now contains toolbars and sidebars menus and configure
action that doesn't work yet.
2018-01-11 19:25:54 +01:00
David Rosca
65d1493f0a Fix closing tabs - regression from last commits
Closes #2534
2018-01-11 19:25:48 +01:00
David Rosca
d380d54ef8 NavigationBar: Add support for loading layout from config
There is no ui to configure it for now.
2018-01-11 19:25:41 +01:00
David Rosca
2e7a77a6b4 NavigationBar: Remove exit fullscreen button 2018-01-11 19:24:58 +01:00
David Rosca
54282af88f ClosedWindowsManager: Only save last 3 windows in session file
Prevents growing session file indefinitely.
2018-01-11 19:24:07 +01:00
David Rosca
d1d99e3b71 PopupWindow: Add margins around locationbar and line between webview 2018-01-11 19:24:00 +01:00
David Rosca
fa4fba5f49 BrowserWindow: Add tabCount() method 2018-01-11 19:23:43 +01:00
David Rosca
5cc41d219e Always open new window when restoring session after crash
Also remove special handling for qupzilla:restore tabs.
2018-01-11 19:23:36 +01:00
David Rosca
679268dbd1 ClosedTabsManager: Move check for saving restore tab from TabWidget 2018-01-11 19:22:43 +01:00
David Rosca
3f60c554ee ClosedWindowsManager: Save closed windows into session file 2018-01-11 19:21:59 +01:00
David Rosca
0b6c555c62 Only show restore page when crashing during session restore
If app crashes during one minute after restoring crashed session,
show the restore page with options to the user next time instead
of showing restore page after every crash.
2018-01-11 19:21:54 +01:00
David Rosca
c85d33e92a MainApplication: Completely remove isRestoring state
Restoring session should not be any different from simply opening
regular session.
2018-01-11 19:21:47 +01:00
David Rosca
f2002892aa Save previous crashed session that were not restored to session file
Closes #2331
2018-01-11 19:21:17 +01:00
David Rosca
d1becc23e9 And fix build on all platforms ... 2018-01-11 19:20:30 +01:00
David Rosca
e512cc7433 Fix build on Windows - export ExternalJsObject 2018-01-11 19:20:25 +01:00
David Rosca
139a8dc8f1 LocationCompleter: Only allow to delete bookmarks and history items 2018-01-11 19:20:16 +01:00
David Rosca
89aa7259f9 LocationCompleter: Only update original text when first item is selected
Fixes issue where search/visit item would be incorrectly updated after
deleting item from completions.
2018-01-11 19:19:28 +01:00
David Rosca
c97d077f67 TabBar: Make updatePinnedTabCloseButton private
It is no longer needed to call it after changing tab pinned state.
2018-01-11 19:19:04 +01:00
David Rosca
8a6547b39c Use window._qupzilla_external property to check if web channel is connected
Instead of checking for window.external as that is now defined with
at least QtWebEngine 5.10.
2018-01-11 19:15:02 +01:00
David Rosca
6a5b7d30e3 ExternalJsObject: Add support for registering extra objects
Extra objects will be available as window.external.extra.objectName
2018-01-11 19:11:02 +01:00
David Rosca
87527762f8 IconProvider: Use encodeUrl also when searching for existing icon
As suggested by @srazi
2018-01-11 19:10:14 +01:00
David Rosca
482f446712 RestoreManager: Make RestoreData into a struct with stream operators
This makes it possible to extend it while keeping backwards compatibility.
2018-01-11 19:09:44 +01:00
David Rosca
150c576661 Bookmarks: Don't try to write to file if open failed 2018-01-11 19:09:25 +01:00
David Rosca
0141a2e621 SessionManager: Fix fallback to default session if session file is invalid
Creating available sessions metadata is now also faster as it doesn't
need to parse the entire session file, only check for validity.

See #2331
2018-01-11 19:08:18 +01:00
Luís Pereira
0096801556 Don't call non-const member functions on temporaries
They can detach if the container is shared. Even if they are not shared,
using const method when possible is good practice.

Differential Revision: https://phabricator.kde.org/D9730
2018-01-11 19:05:56 +01:00
l10n daemon script
362740bbfd SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-01-04 04:51:59 +01:00
David Rosca
ee62ad0215 Use correct web settings in private browsing mode
Closes #2427
2018-01-02 22:59:17 +01:00
David Rosca
4e0e4b0d35 ClosedWindowsManager: Fix crash when saving window without any tabs 2018-01-02 22:57:34 +01:00
David Rosca
5013053811 TabBar: Reject drags from other app instances 2018-01-02 22:57:26 +01:00
David Rosca
a8763bee06 SessionManager: Use relative paths for session files in settings
See #2331
2018-01-02 22:57:19 +01:00
David Rosca
da3e16d7c4 Preferences: Enable "Don't load tabs until selected" also for Select session 2018-01-02 22:57:11 +01:00
David Rosca
72c6a73e29 MainApplication: Fix opening session with SelectSession after launch action 2018-01-02 22:56:49 +01:00
David Rosca
1aa4b41151 BrowserWindow: Save sidebar for each window
Allows to have different sidebar on each window.
2018-01-02 22:56:41 +01:00
David Rosca
1de32182c1 BrowserWindow: Don't restore first app window from postLaunch slot
Instead restore it immediately after creation from MainApplication
as all other window types.
2018-01-02 22:55:58 +01:00
David Rosca
6b08e17dcd BrowserWindow: Save ui state separately for each window 2018-01-02 22:55:50 +01:00
David Rosca
423e06c7d6 BrowserWindow: Always save/restore window geometry 2018-01-02 22:55:19 +01:00
David Rosca
ed39aefdad Change structure of session file + also save window geometry
Bump session file version to 4.

Added support for old version to RestoreManager to prevent losing
old saved sessions.
2018-01-02 22:55:09 +01:00
David Rosca
25b1583770 Fix merge issues 2018-01-02 15:22:35 +01:00
David Rosca
a578314e8e MainMenu: Remove all aboutToHide menu handling
Instead create conflicting shortcuts with Qt::WidgetShortcut context.
2018-01-02 15:15:20 +01:00
David Rosca
f80d827e59 QzTools: Use correct screen for widget in centerWidgetOnScreen
BUG: 384543
2018-01-02 15:03:50 +01:00
David Rosca
7b6b69c35f TabBar: Fix dropping text/url to tabs 2018-01-02 15:03:27 +01:00
David Rosca
ef06ed567a Add ClosedWindowsManager allowing to restore closed windows
Closes #2306
2018-01-02 15:03:11 +01:00
David Rosca
b3bd08c5e4 BrowserWindow: Add SavedWindow struct and use it for saving/restoring 2018-01-02 15:01:16 +01:00
David Rosca
16fcae4202 ClosedTabsManager: Rewrite to use WebTab::SavedTab 2018-01-02 14:59:06 +01:00
David Rosca
200e602d01 DownloadManager: Add app name to download finished notification
BUG: 386376
2018-01-01 18:11:01 +01:00
David Rosca
8749c05854 WebView: Search using default engine instead of active in actions
BUG: 386377
2018-01-01 18:09:39 +01:00
David Rosca
90153e280e Fix build 2018-01-01 17:10:44 +01:00
David Rosca
f3b7be2b5e LocationBar: Fix correctly loading "localhost" instead of launching search
Closes #2028
2018-01-01 17:02:12 +01:00
David Rosca
f0488c33c3 WebTab: Correctly remove itself from TabWidget 2018-01-01 17:01:48 +01:00
David Rosca
8817493c68 Tabs: Allow to detach tab from window with only one tab
Window will be closed after detaching this tab.
2018-01-01 17:01:41 +01:00
David Rosca
3eac8bd161 TabContextMenu: Remove detach tab action
Tabs can now be detached with drag&drop
2018-01-01 17:01:19 +01:00
David Rosca
38bfd49d4f TabBar: Change mimetype to falkon 2018-01-01 17:00:42 +01:00
David Rosca
fb652ff6cd Tabs: Make the code work better with zero tabs 2018-01-01 16:59:52 +01:00
David Rosca
4b33364516 Update copyright year to 2018 2018-01-01 16:59:46 +01:00
David Rosca
21ca9adf6b TabBar: Add support for drag&drop tabs to other windows
Also it is possible to detach tab by dragging it outside of tabbar.

BUG: 386672
2018-01-01 16:58:47 +01:00
David Rosca
fe396e64ff ComboTabBar: Add tabPixmap method to render single tab 2018-01-01 16:58:16 +01:00
David Rosca
08c0b480c1 ComboTabBar: Fix clearing drop marker when moving from main to pinned tabbar 2018-01-01 16:58:09 +01:00
David Rosca
f5ad4424aa TabWidget: Add insertView method for WebTab 2018-01-01 16:58:02 +01:00
David Rosca
0e25eb2e92 SuperMenu: Remove session manager actions in private mode 2018-01-01 16:57:09 +01:00
David Rosca
c679fdf397 TabBar: Add support for droping text/url inside tabbar to insert new tab 2018-01-01 16:57:03 +01:00
David Rosca
246adbfb0b ComboTabBar: Add support for drawing drop indicator
It's just a solid line now, should be improved later.
2018-01-01 16:56:58 +01:00
David Rosca
4fb73f3840 ComboTabBar: Fix edge case in tabAt
Right corner of pinned tabbar would incorrectly return tabs from main tabbar.
Also make it work on close button.
2018-01-01 16:56:52 +01:00
David Rosca
8100020b41 TabBar: Support dropping text on tabs
It will be searched for using default search engine
2018-01-01 16:56:47 +01:00
David Rosca
c7d58017d2 AddTabButton: Remove handling of drop events
It is handeld by the TabBar itself.
2018-01-01 16:56:39 +01:00
David Rosca
ca04e9d967 TabBar: Support adding new tabs with text drop data
Urls are loaded directly and text is searched for using default search
engine.
2018-01-01 16:56:32 +01:00
David Rosca
373df431a7 TabWidget: Switch to newly created tab when duplicating tab 2018-01-01 16:56:26 +01:00
David Rosca
b6dd2a829d LocationCompleter: Fix showing old suggestions for one char search string
When typing a search string and then deleting it up to last character,
old suggestions for 2-character search string would be displayed.
2018-01-01 16:56:03 +01:00
David Rosca
eb92250003 LocationCompleter: Enable suggestions from 2 and more characters 2018-01-01 16:55:57 +01:00
Laurent Cimon
635cb1085c Add an option to disable search suggestions from the address bar.
Differential Revision: https://phabricator.kde.org/D9539
2017-12-31 16:44:02 +01:00
David Rosca
925e3496d9 LocationCompleterModel: Don't set tab position to view/search item 2017-12-30 18:06:26 +01:00
David Rosca
56b28bfa1f WebTab: Make sure to not call slotRestore multiple times
It can happen when switching sessions and results in current tab
being empty tab.
2017-12-30 18:06:19 +01:00
David Rosca
3aa629ceac BrowserWindow: Make sure window is shown before restoring session
Same reasoning as 639ecf3626dc5fa667acb17fa35bc398bdaf4712
2017-12-30 18:06:14 +01:00
David Rosca
5ecf3d8b98 Remove leftover references to no longer used pinnedtabs.dat file 2017-12-30 18:06:06 +01:00
David Rosca
397e2f714e Set default button for all CheckBoxDialogs
Default button is now focused instead of checkbox.
2017-12-30 18:05:47 +01:00
David Rosca
01b66a0f48 WebInspector: Set focus back to webview when inspector closes 2017-12-30 18:04:59 +01:00
David Rosca
a5e35bac75 WebInspector: Fix showing close button with Qt 5.10
It's not tested with Qt 5.9 but it should work there too.
2017-12-30 18:04:51 +01:00
David Rosca
53f6ef91ac Temporarily enable JavaScript when loading qupzilla:restore page 2017-12-30 18:04:43 +01:00
David Rosca
736e3121bc BrowserWindow: Show window before creating web views
Otherwise QWebEngineView first creates its underlying view with very
small size which then gets resized to correct size on first show event.

Also remove all calls to setUpdatesEnabled on window during session restore,
it doesn't seem to have any effect anymore.
2017-12-30 18:04:11 +01:00
David Rosca
c906e0d168 SpeedDial: Show warning message when JavaScript is disabled 2017-12-30 18:04:05 +01:00
David Rosca
7cd86e144b WebInspector: Don't show inspector actions when JavaScript is disabled
WebInspector doesn't work without JavaScript.
2017-12-30 18:03:58 +01:00
David Rosca
1ea0c570c4 SqlDatabase: Remove exec and execAsync methods 2017-12-23 18:34:46 +01:00
l10n daemon script
7faf9e2e8d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-12-21 04:50:47 +01:00
David Rosca
edce3dd0d0 Preferences: Show dots instead of chars in proxy password input
Closes #2526
2017-12-19 15:15:19 +01:00
David Rosca
82fe9d33c9 Preferences: Fix default proxy type
Closes #2527
2017-12-19 15:09:24 +01:00
David Rosca
c1c168aae9 Create every QSqlQuery with correct database for current thread
Queries are now always executed on correct database instance.
Databases are also stored in thread local storage instead of in hash
table with mutex.

Closes #2498
2017-12-18 13:06:42 +01:00
David Rosca
fba7b3d9fc Fix saving window state when closing app with Ctrl+Q shortcut
Closes #2444
2017-12-05 13:51:29 +01:00
David Rosca
8c99f22240 AdBlockTreeWidget: Fix restoring item font and color for normal rules 2017-12-03 19:10:56 +01:00
David Rosca
7463c692f7 AdBlockRule: Add support for "font" option
Closes #2445
2017-12-03 19:10:50 +01:00
David Rosca
d8b3a071bc UserAgentDialog: Update available user agent strings
Also match Chrome version in Chrome user agent with QtWebEngine version.

Closes #2475
2017-12-03 19:10:43 +01:00
David Rosca
ee5a11ae72 Fix initial focus when opening new browser window
Web page is now correctly focused when opening browser window
or opening/restoring sessions.

This is still not absolutely reliable solution as it uses delay
to change focus to webview, because QWebEngineView doesn't accept
focus until after it is initialized.
2017-12-03 19:10:34 +01:00
David Rosca
b03c5f3cb0 MainApplication: Don't call processEvents when restoring session
It seems to help with QtWebEngine crashes during session restore
2017-12-03 19:10:18 +01:00
David Rosca
687f797f27 Fix switching focus when loading url with BrowserWindow::loadAddress
Also accept key events when handled

Closes #2504
2017-12-03 19:10:10 +01:00
David Rosca
ca2b5f22be SearchToolbar: Don't set shortcuts from UI file
Fixes build with Qt 5.10

Closes #2515
2017-12-03 19:10:01 +01:00