[kde-doc-english] [kde-runtime] kurifilter-plugins/ikws: - Replaced all references of 'search' with 'web shortcuts' since web shortcuts
Dawit Alemayehu
adawit at kde.org
Fri May 11 20:34:52 UTC 2012
Git commit d7d9a5f97de9e4e078edccb5b36bad192d4aede2 by Dawit Alemayehu.
Committed on 09/05/2012 at 21:59.
Pushed by adawit into branch 'master'.
- Replaced all references of 'search' with 'web shortcuts' since web shortcuts
are not only for doing search.
- Replaced all the WhatsThis help text with equivalent ToolTip text.
Note that this change only renames related config options, variables and GUI text.
In the future eveything, including file and class names, should be renamed to
reflect the current functionality of this plugin.
BUG: 196778
FIXED-IN: 4.9.0
GUI:
M +1 -1 kurifilter-plugins/ikws/ikwsopts.cpp
M +35 -39 kurifilter-plugins/ikws/ikwsopts_ui.ui
M +7 -0 kurifilter-plugins/ikws/kuriikwsfilter.upd
M +14 -14 kurifilter-plugins/ikws/kuriikwsfiltereng.cpp
M +4 -4 kurifilter-plugins/ikws/kuriikwsfiltereng.h
M +6 -6 kurifilter-plugins/ikws/searchproviderdlg.cpp
M +11 -14 kurifilter-plugins/ikws/searchproviderdlg_ui.ui
http://commits.kde.org/kde-runtime/d7d9a5f97de9e4e078edccb5b36bad192d4aede2
diff --git a/kurifilter-plugins/ikws/ikwsopts.cpp b/kurifilter-plugins/ikws/ikwsopts.cpp
index aa10b7d..309ad3f 100644
--- a/kurifilter-plugins/ikws/ikwsopts.cpp
+++ b/kurifilter-plugins/ikws/ikwsopts.cpp
@@ -104,7 +104,7 @@ QVariant ProvidersModel::data(const QModelIndex& index, int role) const
{
if (index.column() == Preferred)
return i18n("<qt>Check this box to select the highlighted web shortcut "
- "as preferred.<p/><br/>Preferred web shortcuts are used in "
+ "as preferred.<br/><br/>Preferred web shortcuts are used in "
"places where only a few select shortcuts can be shown "
"at one time.</qt>");
}
diff --git a/kurifilter-plugins/ikws/ikwsopts_ui.ui b/kurifilter-plugins/ikws/ikwsopts_ui.ui
index fcf4aca..2b6b2e8 100644
--- a/kurifilter-plugins/ikws/ikwsopts_ui.ui
+++ b/kurifilter-plugins/ikws/ikwsopts_ui.ui
@@ -13,10 +13,8 @@
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="cbEnableShortcuts">
- <property name="whatsThis">
- <string><qt>
-Enable shortcuts that allow you to quickly search for information on the web. For example, entering the shortcut <b>gg:KDE</b> will result in a search for the word <b>KDE</b> on the Google(TM) search engine.
-</qt></string>
+ <property name="toolTip">
+ <string><html><head/><body><p>Enable or disable web shortcuts. </p><p>Web shortcuts allow you to quickly access or search for information located online or on your hard drive. </p><p>KDE comes with many predefined Web shortcuts. One such Web shortcut is the Google (TM) search shortcut. To use it, you simply type the keyword 'gg' followed by the keyword delimiter and the search term, e.g. <span style=" font-weight:600;">gg:KDE</span>.</p></body></html></string>
</property>
<property name="text">
<string>&Enable Web shortcuts</string>
@@ -43,12 +41,34 @@ Enable shortcuts that allow you to quickly search for information on the web. Fo
</property>
</widget>
</item>
- <item row="2" column="1" rowspan="2">
+ <item row="3" column="0">
+ <widget class="QTreeView" name="lvSearchProviders">
+ <property name="rootIsDecorated">
+ <bool>false</bool>
+ </property>
+ <property name="uniformRowHeights">
+ <bool>true</bool>
+ </property>
+ <property name="itemsExpandable">
+ <bool>false</bool>
+ </property>
+ <property name="sortingEnabled">
+ <bool>true</bool>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="headerHidden">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="pbNew">
- <property name="whatsThis">
- <string>Add a search provider.</string>
+ <property name="toolTip">
+ <string>Add a new Web shortcut</string>
</property>
<property name="text">
<string>&New...</string>
@@ -60,8 +80,8 @@ Enable shortcuts that allow you to quickly search for information on the web. Fo
<property name="enabled">
<bool>false</bool>
</property>
- <property name="whatsThis">
- <string>Modify a search provider.</string>
+ <property name="toolTip">
+ <string>Modify the highlighted Web shortcut</string>
</property>
<property name="text">
<string>Chan&ge...</string>
@@ -73,8 +93,8 @@ Enable shortcuts that allow you to quickly search for information on the web. Fo
<property name="enabled">
<bool>false</bool>
</property>
- <property name="whatsThis">
- <string>Delete the selected search provider.</string>
+ <property name="toolTip">
+ <string>Delete the highlighted Web shortcut</string>
</property>
<property name="text">
<string>De&lete</string>
@@ -96,28 +116,6 @@ Enable shortcuts that allow you to quickly search for information on the web. Fo
</item>
</layout>
</item>
- <item row="3" column="0">
- <widget class="QTreeView" name="lvSearchProviders">
- <property name="rootIsDecorated">
- <bool>false</bool>
- </property>
- <property name="uniformRowHeights">
- <bool>true</bool>
- </property>
- <property name="itemsExpandable">
- <bool>false</bool>
- </property>
- <property name="sortingEnabled">
- <bool>true</bool>
- </property>
- <property name="allColumnsShowFocus">
- <bool>true</bool>
- </property>
- <property name="headerHidden">
- <bool>false</bool>
- </property>
- </widget>
- </item>
<item row="4" column="0">
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
@@ -140,7 +138,7 @@ Select the search engine to use for input boxes that provide automatic lookup se
</qt></string>
</property>
<property name="text">
- <string>Default &search engine:</string>
+ <string>Default Web &shortcut:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
@@ -165,9 +163,7 @@ Select the search engine to use for input boxes that provide automatic lookup se
</size>
</property>
<property name="whatsThis">
- <string><qt>
-Select the search engine to use for input boxes that provide automatic lookup services when you type in normal words and phrases instead of a URL. To disable this feature select <b>None</b> from the list.
-</qt></string>
+ <string><html><head/><body><p>Select a default web shortcut. </p><p>This allows applications to automatically convert the typed word or pharse to web shortcut queries when they cannot be filtered into a proper URL. </p><p>To disable this functionality select <span style=" font-weight:600;">None</span> from the list. </p></body></html></string>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
@@ -204,8 +200,8 @@ Select the search engine to use for input boxes that provide automatic lookup se
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="whatsThis">
- <string>Choose the delimiter that separates the keyword from the phrase or word to be searched.</string>
+ <property name="toolTip">
+ <string>Choose a delimiter to mark the Web shortcut keyword.</string>
</property>
<item>
<property name="text">
diff --git a/kurifilter-plugins/ikws/kuriikwsfilter.upd b/kurifilter-plugins/ikws/kuriikwsfilter.upd
index 9b61b3e..0874ce2 100644
--- a/kurifilter-plugins/ikws/kuriikwsfilter.upd
+++ b/kurifilter-plugins/ikws/kuriikwsfilter.upd
@@ -5,3 +5,10 @@ Key=SearchEngineShortcutsEnabled,EnableWebShortcuts
Key=InternetKeywordsSearchFallback,DefaultSearchEngine
RemoveKey=InternetKeywordsEnabled
RemoveKey=InternetKeywordsSelectedEngine
+
+Id=pre-kde4.9
+File=kuriikwsfilterrc
+Group=General
+Key=DefaultSearchEngine,DefaultWebShortcut
+Key=FavoriteSearchEngines,PreferredWebShortcuts
+Key=UseSelectedProvidersOnly,UsePreferredWebShortcutsOnly
\ No newline at end of file
diff --git a/kurifilter-plugins/ikws/kuriikwsfiltereng.cpp b/kurifilter-plugins/ikws/kuriikwsfiltereng.cpp
index 7f264d8..ccc854e 100644
--- a/kurifilter-plugins/ikws/kuriikwsfiltereng.cpp
+++ b/kurifilter-plugins/ikws/kuriikwsfiltereng.cpp
@@ -33,7 +33,7 @@
#include <QtCore/QTextCodec>
-#define PDVAR(n,v) kDebug(7023) << n << " = '" << v << "'\n"
+#define PDVAR(n,v) kDebug(7023) << n << " = '" << v << "'"
/**
* IMPORTANT: If you change anything here, please run the regression test
@@ -68,7 +68,7 @@ SearchProvider* KURISearchFilterEngine::webShortcutQuery(const QString& typedStr
provider = SearchProvider::findByKey(key);
if (provider)
{
- if (!m_bUseOnlySelectedShortcuts || m_favoriteEngines.contains(provider->desktopEntryName()))
+ if (!m_bUseOnlyPreferredWebShortcuts || m_preferredWebShortcuts.contains(provider->desktopEntryName()))
searchTerm = typedString.mid(pos+1);
else
{
@@ -83,10 +83,10 @@ SearchProvider* KURISearchFilterEngine::webShortcutQuery(const QString& typedStr
}
-SearchProvider* KURISearchFilterEngine::autoWebSearchQuery(const QString& typedString, const QString &defaultEngine) const
+SearchProvider* KURISearchFilterEngine::autoWebSearchQuery(const QString& typedString, const QString &defaultShortcut) const
{
SearchProvider *provider = 0;
- const QString defaultSearchProvider = (m_defaultSearchEngine.isEmpty() ? defaultEngine : m_defaultSearchEngine);
+ const QString defaultSearchProvider = (m_defaultWebShortcut.isEmpty() ? defaultShortcut : m_defaultWebShortcut);
if (m_bWebShortcutsEnabled && !defaultSearchProvider.isEmpty())
{
@@ -112,12 +112,12 @@ char KURISearchFilterEngine::keywordDelimiter() const
QString KURISearchFilterEngine::defaultSearchEngine() const
{
- return m_defaultSearchEngine;
+ return m_defaultWebShortcut;
}
QStringList KURISearchFilterEngine::favoriteEngineList() const
{
- return m_favoriteEngines;
+ return m_preferredWebShortcuts;
}
KURISearchFilterEngine* KURISearchFilterEngine::self()
@@ -424,19 +424,19 @@ void KURISearchFilterEngine::loadConfig()
m_cKeywordDelimiter = QString(group.readEntry("KeywordDelimiter", ":")).at(0).toLatin1();
m_bWebShortcutsEnabled = group.readEntry("EnableWebShortcuts", true);
- m_defaultSearchEngine = group.readEntry("DefaultSearchEngine");
- m_bUseOnlySelectedShortcuts = group.readEntry("UseSelectedProvidersOnly", false);
+ m_defaultWebShortcut = group.readEntry("DefaultWebShortcut");
+ m_bUseOnlyPreferredWebShortcuts = group.readEntry("UsePreferredWebShortcutsOnly", false);
- QStringList defaultFavoriteSearchEngines;
- if (!group.hasKey("FavoriteSearchEngines"))
- defaultFavoriteSearchEngines = DEFAULT_PREFERRED_SEARCH_PROVIDERS;
- m_favoriteEngines = group.readEntry("FavoriteSearchEngines", defaultFavoriteSearchEngines);
+ QStringList defaultPreferredShortcuts;
+ if (!group.hasKey("PreferredWebShortcuts"))
+ defaultPreferredShortcuts = DEFAULT_PREFERRED_SEARCH_PROVIDERS;
+ m_preferredWebShortcuts = group.readEntry("PreferredWebShortcuts", defaultPreferredShortcuts);
// Use either a white space or a : as the keyword delimiter...
if (strchr (" :", m_cKeywordDelimiter) == 0)
m_cKeywordDelimiter = ':';
- kDebug(7023) << "Keyword Delimiter: " << m_cKeywordDelimiter << endl;
- kDebug(7023) << "Default Search Engine: " << m_defaultSearchEngine << endl;
kDebug(7023) << "Web Shortcuts Enabled: " << m_bWebShortcutsEnabled << endl;
+ kDebug(7023) << "Default Shortcut: " << m_defaultWebShortcut << endl;
+ kDebug(7023) << "Keyword Delimiter: " << m_cKeywordDelimiter << endl;
}
diff --git a/kurifilter-plugins/ikws/kuriikwsfiltereng.h b/kurifilter-plugins/ikws/kuriikwsfiltereng.h
index 8ba31ae..7c43c03 100644
--- a/kurifilter-plugins/ikws/kuriikwsfiltereng.h
+++ b/kurifilter-plugins/ikws/kuriikwsfiltereng.h
@@ -45,7 +45,7 @@ public:
QString defaultSearchEngine() const;
QStringList favoriteEngineList() const;
SearchProvider* webShortcutQuery (const QString& typedString, QString& searchTerm) const;
- SearchProvider* autoWebSearchQuery (const QString& typedString, const QString& defaultEngine = QString()) const;
+ SearchProvider* autoWebSearchQuery (const QString& typedString, const QString& defaultShortcut = QString()) const;
QString formatResult (const QString& url, const QString& cset1, const QString& cset2,
const QString& query, bool isMalformed) const;
@@ -65,10 +65,10 @@ private:
QString substituteQuery (const QString& url, SubstMap &map,
const QString& userquery, QTextCodec *codec) const;
- QString m_defaultSearchEngine;
- QStringList m_favoriteEngines;
+ QString m_defaultWebShortcut;
+ QStringList m_preferredWebShortcuts;
bool m_bWebShortcutsEnabled;
- bool m_bUseOnlySelectedShortcuts;
+ bool m_bUseOnlyPreferredWebShortcuts;
char m_cKeywordDelimiter;
};
diff --git a/kurifilter-plugins/ikws/searchproviderdlg.cpp b/kurifilter-plugins/ikws/searchproviderdlg.cpp
index 431c0ff..2bb2852 100644
--- a/kurifilter-plugins/ikws/searchproviderdlg.cpp
+++ b/kurifilter-plugins/ikws/searchproviderdlg.cpp
@@ -48,7 +48,7 @@ SearchProviderDialog::SearchProviderDialog(SearchProvider *provider, QList<Searc
m_dlg.cbCharset->addItems(charsets);
if (m_provider)
{
- setPlainCaption(i18n("Modify Search Provider"));
+ setPlainCaption(i18n("Modify Web Shortcut"));
m_dlg.leName->setText(m_provider->name());
m_dlg.leQuery->setText(m_provider->query());
m_dlg.leShortcut->setText(m_provider->keys().join(","));
@@ -58,7 +58,7 @@ SearchProviderDialog::SearchProviderDialog(SearchProvider *provider, QList<Searc
}
else
{
- setPlainCaption(i18n("New Search Provider"));
+ setPlainCaption(i18n("New Web Shortcut"));
m_dlg.leName->setFocus();
enableButton(Ok, false);
}
@@ -124,9 +124,9 @@ void SearchProviderDialog::slotButtonClicked(int button) {
if (button == KDialog::Ok) {
if ((m_dlg.leQuery->text().indexOf("\\{") == -1)
&& KMessageBox::warningContinueCancel(0,
- i18n("The URI does not contain a \\{...} placeholder for the user query.\n"
- "This means that the same page is always going to be visited, "
- "regardless of what the user types."),
+ i18n("The Shortcut URL does not contain a \\{...} placeholder for the user query.\n"
+ "This means that the same page is always going to be visited, "
+ "regardless of the text typed in with the shortcut."),
QString(), KGuiItem(i18n("Keep It"))) == KMessageBox::Cancel) {
return;
}
@@ -139,7 +139,7 @@ void SearchProviderDialog::slotButtonClicked(int button) {
QStringList keys = m_dlg.leShortcut->text().trimmed().toLower().split(',', QString::SkipEmptyParts);
keys.removeDuplicates();// #169801. Remove duplicates...
const QString charset = (m_dlg.cbCharset->currentIndex() ? m_dlg.cbCharset->currentText().trimmed() : QString());
-
+
m_provider->setDirty((name != m_provider->name() || query != m_provider->query() ||
keys != m_provider->keys() || charset != m_provider->charset()));
m_provider->setName(name);
diff --git a/kurifilter-plugins/ikws/searchproviderdlg_ui.ui b/kurifilter-plugins/ikws/searchproviderdlg_ui.ui
index b18974b..d75ac5b 100644
--- a/kurifilter-plugins/ikws/searchproviderdlg_ui.ui
+++ b/kurifilter-plugins/ikws/searchproviderdlg_ui.ui
@@ -7,20 +7,17 @@
<x>0</x>
<y>0</y>
<width>449</width>
- <height>207</height>
+ <height>143</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
- <property name="margin">
- <number>0</number>
- </property>
<item row="0" column="0">
<widget class="QLabel" name="lbName">
<property name="whatsThis">
<string>Enter the human-readable name of the search provider here.</string>
</property>
<property name="text">
- <string>Search &provider name:</string>
+ <string>Shortcut &name:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
@@ -33,10 +30,10 @@
<item row="0" column="1">
<widget class="KLineEdit" name="leName">
<property name="toolTip">
- <string>Enter the human-readable name of the search provider here.</string>
+ <string><html><head/><body><p>Enter the human-readable name of the web shortcut here.</p></body></html></string>
</property>
<property name="whatsThis">
- <string>Enter the human-readable name of the search provider here.</string>
+ <string><html><head/><body><p>Enter the human-readable name of the web shortcut here.</p></body></html></string>
</property>
</widget>
</item>
@@ -49,7 +46,7 @@ Recommended is \{@}, since it removes all query variables (name=value) from the
</qt></string>
</property>
<property name="text">
- <string>Search &URI:</string>
+ <string>Shortcut &URL:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -86,7 +83,7 @@ The shortcuts entered here can be used as a pseudo-URI scheme in KDE. For exampl
</qt></string>
</property>
<property name="text">
- <string>UR&I shortcuts:</string>
+ <string>&Shortcuts:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -153,15 +150,15 @@ The shortcuts entered here can be used as a pseudo-URI scheme in KDE. For exampl
</widget>
<customwidgets>
<customwidget>
- <class>KLineEdit</class>
- <extends>QLineEdit</extends>
- <header>klineedit.h</header>
- </customwidget>
- <customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
<header>kcombobox.h</header>
</customwidget>
+ <customwidget>
+ <class>KLineEdit</class>
+ <extends>QLineEdit</extends>
+ <header>klineedit.h</header>
+ </customwidget>
</customwidgets>
<includes>
<include location="local">klineedit.h</include>
More information about the kde-doc-english
mailing list