diff --git a/src/lib/navigation/completer/locationcompleter.cpp b/src/lib/navigation/completer/locationcompleter.cpp index 91ca8dcc9..8cf201f02 100644 --- a/src/lib/navigation/completer/locationcompleter.cpp +++ b/src/lib/navigation/completer/locationcompleter.cpp @@ -1,6 +1,6 @@ /* ============================================================ * QupZilla - WebKit based browser -* Copyright (C) 2010-2013 David Rosca +* Copyright (C) 2010-2014 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ #include "locationcompleterview.h" #include "locationcompleterdelegate.h" #include "locationbar.h" +#include "qzsettings.h" LocationCompleterView* LocationCompleter::s_view = 0; LocationCompleterModel* LocationCompleter::s_model = 0; @@ -46,7 +47,7 @@ void LocationCompleter::setLocationBar(LocationBar* locationBar) QString LocationCompleter::domainCompletion() const { - return m_completedDomain; + return qzSettings->useInlineCompletion ? m_completedDomain : QString(); } bool LocationCompleter::showingMostVisited() const @@ -73,9 +74,12 @@ void LocationCompleter::closePopup() void LocationCompleter::complete(const QString &string) { - m_completedDomain = createDomainCompletionString(string); m_showingMostVisited = string.isEmpty(); + if (qzSettings->useInlineCompletion) { + m_completedDomain = createDomainCompletionString(string); + } + s_model->refreshCompletions(string); showPopup(); } diff --git a/src/lib/other/qzsettings.cpp b/src/lib/other/qzsettings.cpp index 6c4c24df1..62b95a711 100644 --- a/src/lib/other/qzsettings.cpp +++ b/src/lib/other/qzsettings.cpp @@ -1,6 +1,6 @@ /* ============================================================ * QupZilla - WebKit based browser -* Copyright (C) 2010-2013 David Rosca +* Copyright (C) 2010-2014 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,6 +34,7 @@ void QzSettings::loadSettings() showLocationSuggestions = settings.value("showSuggestions", 0).toInt(); showSwitchTab = settings.value("showSwitchTab", true).toBool(); alwaysShowGoIcon = settings.value("alwaysShowGoIcon", false).toBool(); + useInlineCompletion = settings.value("useInlineCompletion", true).toBool(); settings.endGroup(); settings.beginGroup("SearchEngines"); diff --git a/src/lib/other/qzsettings.h b/src/lib/other/qzsettings.h index ff0953ee4..ae27aec49 100644 --- a/src/lib/other/qzsettings.h +++ b/src/lib/other/qzsettings.h @@ -1,6 +1,6 @@ /* ============================================================ * QupZilla - WebKit based browser -* Copyright (C) 2010-2013 David Rosca +* Copyright (C) 2010-2014 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,6 +39,7 @@ public: int showLocationSuggestions; bool showSwitchTab; bool alwaysShowGoIcon; + bool useInlineCompletion; // SearchEngines bool showSearchSuggestions; diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index 9aeb52ca6..10b6dc470 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -1,6 +1,6 @@ /* ============================================================ * QupZilla - WebKit based browser -* Copyright (C) 2010-2013 David Rosca +* Copyright (C) 2010-2014 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -242,6 +242,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) //AddressBar settings.beginGroup("AddressBar"); ui->addressbarCompletion->setCurrentIndex(settings.value("showSuggestions", 0).toInt()); + ui->useInlineCompletion->setChecked(settings.value("useInlineCompletion", true).toBool()); ui->completionShowSwitchTab->setChecked(settings.value("showSwitchTab", true).toBool()); ui->alwaysShowGoIcon->setChecked(settings.value("alwaysShowGoIcon", false).toBool()); ui->selectAllOnFocus->setChecked(settings.value("SelectAllTextOnDoubleClick", true).toBool()); @@ -997,6 +998,7 @@ void Preferences::saveSettings() //AddressBar settings.beginGroup("AddressBar"); settings.setValue("showSuggestions", ui->addressbarCompletion->currentIndex()); + settings.setValue("useInlineCompletion", ui->useInlineCompletion->isChecked()); settings.setValue("alwaysShowGoIcon", ui->alwaysShowGoIcon->isChecked()); settings.setValue("showSwitchTab", ui->completionShowSwitchTab->isChecked()); settings.setValue("SelectAllTextOnDoubleClick", ui->selectAllOnFocus->isChecked()); diff --git a/src/lib/preferences/preferences.ui b/src/lib/preferences/preferences.ui index 9fd00355c..91aacadd7 100644 --- a/src/lib/preferences/preferences.ui +++ b/src/lib/preferences/preferences.ui @@ -833,6 +833,13 @@ + + + + Enable inline suggestions + + + diff --git a/src/lib/webview/webview.cpp b/src/lib/webview/webview.cpp index 8552538f2..ee4b7b45d 100644 --- a/src/lib/webview/webview.cpp +++ b/src/lib/webview/webview.cpp @@ -909,7 +909,7 @@ void WebView::createPageContextMenu(QMenu* menu, const QPoint &pos) action->setIcon(qIconProvider->standardIcon(QStyle::SP_ArrowForward)); action->setEnabled(history()->canGoForward()); - if (url() != QUrl("qupzilla:speeddial")){ + if (url() != QUrl("qupzilla:speeddial")) { menu->addAction(m_actionReload); menu->addAction(m_actionStop); diff --git a/translations/empty.ts b/translations/empty.ts index ba554542e..6b802aea4 100644 --- a/translations/empty.ts +++ b/translations/empty.ts @@ -2842,7 +2842,7 @@ Please install latest version of QupZilla. - + QupZilla @@ -2914,7 +2914,7 @@ Please install latest version of QupZilla. - + Note: You cannot delete active profile. @@ -3187,589 +3187,594 @@ Please install latest version of QupZilla. + Enable inline suggestions + + + + Press "Shift" to not switch the tab but load the url in the current tab. - + Propose to switch tab if completed url is already loaded. - + Always show go icon - + Select all text by double clicking in address bar - + Select all text by clicking in address bar - + Search with Default Engine - + Show loading progress in address bar - + Fill - + Bottom - + Top - + Custom color: - + Select color - - - - - + + + + + ... - + Reset - + Web Configuration - + Allow Netscape Plugins (Flash plugin) - + Allow JavaScript - + Allow JAVA - + Allow DNS Prefetch - + Enable XSS Auditing try to detect possible XSS attacks when executing javascript - + Print element background when you are printing page (on printer), it determine whether to also print background (color, image) of html elements - + Include links in focus chain focus also links on page (basically <a> elements) when pressing Tab key - + Animated scrolling - + Enable caret browsing - + Enable spatial navigation - + Zoom text only - + Mouse wheel scrolls - + lines on page - + Default zoom on pages: - + Local Storage - + Maximum - + 50 MB - + 1 - + Maximum pages in cache: - + Allow storing network cache on disk - + Store cache in: - + Allow saving history - + Delete history on close - + Allow local storage of HTML5 web content - + Delete locally stored HTML5 web content on close - + Delete now - + Proxy Configuration - + Proxy Auto-Config (.pac) file - + Reload - + HTTP - + SOCKS5 - - + + Port: - - + + Username: - - + + Password: - + Don't use on: - + Manual configuration - + System proxy configuration - + Do not use proxy - + <b>Exceptions</b> - + Server: - + Use different proxy for https connection - + Use script for automatic configuration: - + <b>Font Families</b> - + Standard - + Fixed - + Serif - + Sans Serif - + Cursive - + Fantasy - + <b>Font Sizes</b> - + Fixed Font Size - + Default Font Size - + Minimum Font Size - + Minimum Logical Font Size - + <b>Shortcuts</b> - + Switch to tabs with Alt + number of tab - + Load speed dials with Ctrl + number of speed dial - + Add .co.uk domain by pressing ALT key in address bar - + <b>Download Location</b> - + Ask everytime for download location - + Use defined location: - + <b>Download Options</b> - + Use native system file dialog (may or may not cause problems with downloading SSL secured content) - + Close download manager when downloading finishes - + <b>External download manager</b> - + Use external download manager - + Executable: - + Arguments: - + Leave blank if unsure - + <b>%d</b> will be replaced with URL to be downloaded - + <b>AutoFill options</b> - + Allow saving passwords from sites - + Send Referer header to servers - + <b>Cookies</b> - + Send Do Not Track header to servers - - + + <b>Other</b> - + Manage CA certificates - + Certificate Manager - + <b>SSL Certificates</b> - + <b>JavaScript</b> - + Manage JavaScript privacy options - + JavaScript options - + Cookies Manager - + Manage Cookies - + <b>HTML5 Permissions</b> - + Manage HTML5 permissions - + HTML5 Permissions - + <b>Notifications</b> - + Use OSD Notifications - + Use Native System Notifications (Linux only) - + Do not use Notifications - + Expiration timeout: - + seconds - + <b>Note: </b>You can change position of OSD Notification by dragging it on the screen. - + StyleSheet automatically loaded with all websites: - + Languages - + <b>Preferred language for web sites</b> - + <b>Change browser identification</b> - + User Agent Manager - + Default @@ -3779,78 +3784,78 @@ Please install latest version of QupZilla. - + OSD Notification - + Drag it on the screen to place it where you want. - + Choose download location... - + Choose stylesheet location... - + Deleted - + Choose executable location... - + Choose cache path... - + New Profile - + Enter the new profile's name: - - + + Error! - + This profile already exists! - + Cannot create profile directory! - + Confirmation - + Are you sure to permanently delete "%1" profile? This action cannot be undone! - + Select Color