Summary: | changes to google searchprovider cannot be saved | ||
---|---|---|---|
Product: | [Unmaintained] kcontrol | Reporter: | mcamen |
Component: | kcmkurifilt | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bonne, jfunk, kjelderg, open.michel.brabants, padyx, volkerarmin |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | ikws.diff |
Description
mcamen
2004-07-16 23:31:52 UTC
I very much disagree. If you change your query settings, it shouldn't fallback to default just because you change languages. Yes, I also noticed this and agree that we have to find another fix. With the current code a 'de' user has no way to change the gg: shotcut. *** Bug 89497 has been marked as a duplicate of this bug. *** Coolo: except isn't the [de] version inside the global file preferred? The bug reports seem to indicate so. *** Bug 94380 has been marked as a duplicate of this bug. *** *** Bug 104187 has been marked as a duplicate of this bug. *** *** Bug 104278 has been marked as a duplicate of this bug. *** I found a simple answer to this problem. When a searchprovider is modified, it should have the locale saved as well... For example if google is currently google.co.uk (the default for en_GB) and you want to change it to google.com.au, then simply make the change using Konquerors settings window then modify one line of the file ~/.kde/share/services/searchproviders/google.desktop to read Query[en_GB]=http://www.google.com.au/search?q=\\{@}&ie=UTF-8&oe=UTF-8 instead of Query=http://www.google.com.au/search?q=\\{@}&ie=UTF-8&oe=UTF-8 Now Konqueror will use your modified settings as default. I found a simple answer to this problem. When a searchprovider is modified, it should have the locale saved as well... For example if google is currently google.co.uk (the default for en_GB) and you want to change it to google.com.au, then simply make the change using Konquerors settings window then modify one line of the file ~/.kde/share/services/searchproviders/google.desktop to read Query[en_GB]=http://www.google.com.au/search?q=\\{@}&ie=UTF-8&oe=UTF-8 instead of Query=http://www.google.com.au/search?q=\\{@}&ie=UTF-8&oe=UTF-8 Now Konqueror will use your modified settings as default. *** Bug 109782 has been marked as a duplicate of this bug. *** This bug still exists in KDE 3.4.2/FreeBSD 5.4 ports. Since British English is used as the default language in more countries than just the UK (Australia and New Zealand at least, and probably other Commonwealth countries, too.) would it not make more sense to select regional settings, such as which google to use, on the configured country rather than the configured language? There is, after all, a setting in the control centre where you specify your country. *** Bug 114039 has been marked as a duplicate of this bug. *** Can someone please try the following patch and let me know if it works fine for them ? I cannot test this myself since I have no language other than the default installed. Thanks... Created an attachment (id=12921) ikws.diff *** Bug 110371 has been marked as a duplicate of this bug. *** Hi, I had to remove my ~/.kde* stuff (survived from 3.2 up to 3.4.2 but had to go after my switch from x86 to x86_64 because of kwin crashes), and since then, setting wpe to en.wikipedia works ... I don't know, why, but it works Sorry for the noise. The patch requires that we use our current *.ini like configuration backend (because of the hardcoded [ ]). IMHO that doesn't matter. But it also breaks Kiosk mode, e.g. Query[$i]=foobar becomes Query[de]=foobar instead of Query[de][$i]=foobar Or am I missing something? On Sunday 09 October 2005 12:15, mcamen@mcamen.de wrote: > The patch requires that we use our current *.ini like configuration backend > (because of the hardcoded [ ]). IMHO that doesn't matter. Since there is no other way to do this thought KConfig itself, there is no choice so it does not matter... > But it also breaks Kiosk mode, e.g. > Query[$i]=foobar > becomes > Query[de]=foobar > instead of > Query[de][$i]=foobar > > Or am I missing something? Yes, you are. Unless you have write permission to kde install directory, the newly generated desktop files are saved in your $KDEHOME directory. They then simply mask the global .desktop file with the same name. Basically it uses KConfig merge feature against itself. Anyways, AFAIK kiosk mode applies to the global files and forces KConfig to ignore local settings if things are set immutable. Hence, the local changes will simply be ignored... SVN commit 469260 by adawit: - David is right. Make internet keywords case-insensitive. Fixes bug# 106559 - Changes to internet keywords cannot be saved if language is not the default. Fix for bug # 85352 BUG: 106559 CCBUG: 85352 M +7 -2 ikwsopts.cpp M +6 -3 kuriikwsfiltereng.cpp --- branches/KDE/3.5/kdebase/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp #469259:469260 @@ -28,7 +28,7 @@ #include <qwhatsthis.h> #include <kdebug.h> - +#include <kglobal.h> #include <dcopref.h> #include <kapplication.h> #include <kcombobox.h> @@ -262,7 +262,12 @@ service.writeEntry("Type", "Service"); service.writeEntry("ServiceTypes", "SearchProvider"); service.writeEntry("Name", provider->name()); - service.writeEntry("Query", provider->query()); + + QString queryText = QString::fromLatin1("Query"); + if (KGlobal::locale()->language() != KGlobal::locale()->defaultLanguage()) + queryText += "[" + KGlobal::locale()->language() + "]"; + + service.writeEntry(queryText, provider->query()); service.writeEntry("Keys", provider->keys()); service.writeEntry("Charset", provider->charset()); --- branches/KDE/3.5/kdebase/kcontrol/ebrowsing/plugins/ikws/kuriikwsfiltereng.cpp #469259:469260 @@ -67,14 +67,16 @@ int pos = search.find(m_cKeywordDelimiter); QString key; - if ( pos > -1 ) + if (pos > -1) key = search.left(pos); - else if ( m_cKeywordDelimiter == ' ' && !search.isEmpty() ) + else if (m_cKeywordDelimiter == ' ' && !search.isEmpty()) key = search; if (!key.isEmpty() && !KProtocolInfo::isKnownProtocol( key )) { - SearchProvider *provider = SearchProvider::findByKey(key); + // Make web shortcut keywords case-insensitive, i.e. + // kde == KDE == Kde == kDe == kdE + SearchProvider *provider = SearchProvider::findByKey(key.lower()); if (provider) { @@ -445,6 +447,7 @@ // Migrate from the old format, this block should remain until // we can assume "every" user has upgraded to a KDE version that // contains the sycoca based search provider configuration (malte). + // TODO: Remove in KDE 4 !!! This has been here a sufficient amount of time... { KSimpleConfig oldConfig(kapp->dirs()->saveLocation("config") + QString(name()) + "rc"); oldConfig.setGroup("General"); SVN commit 469299 by adawit: - Fix bug# 85352 the right way! Thanks David. BUG: 85352 M +1 -6 ikwsopts.cpp --- branches/KDE/3.5/kdebase/kcontrol/ebrowsing/plugins/ikws/ikwsopts.cpp #469298:469299 @@ -262,12 +262,7 @@ service.writeEntry("Type", "Service"); service.writeEntry("ServiceTypes", "SearchProvider"); service.writeEntry("Name", provider->name()); - - QString queryText = QString::fromLatin1("Query"); - if (KGlobal::locale()->language() != KGlobal::locale()->defaultLanguage()) - queryText += "[" + KGlobal::locale()->language() + "]"; - - service.writeEntry(queryText, provider->query()); + service.writeEntry("Query", provider->query(), true, false, true); service.writeEntry("Keys", provider->keys()); service.writeEntry("Charset", provider->charset()); |