diff options
Diffstat (limited to 'kicker')
-rw-r--r-- | kicker/configure.in.in | 2 | ||||
-rw-r--r-- | kicker/kicker/ui/k_new_mnu.cpp | 53 | ||||
-rw-r--r-- | kicker/kicker/ui/k_new_mnu.h | 8 |
3 files changed, 15 insertions, 48 deletions
diff --git a/kicker/configure.in.in b/kicker/configure.in.in index 31a9d2345..facaa892e 100644 --- a/kicker/configure.in.in +++ b/kicker/configure.in.in @@ -35,7 +35,7 @@ fi if test -z "$GLIB_LIBADD"; then AC_MSG_RESULT(not installed) - DO_NOT_COMPILE="$DO_NOT_COMPILE kerry gmcop" + DO_NOT_COMPILE="$DO_NOT_COMPILE gmcop" fi AC_SUBST(GLIB_CFLAGS) diff --git a/kicker/kicker/ui/k_new_mnu.cpp b/kicker/kicker/ui/k_new_mnu.cpp index b1357caf1..7ccb447b4 100644 --- a/kicker/kicker/ui/k_new_mnu.cpp +++ b/kicker/kicker/ui/k_new_mnu.cpp @@ -338,18 +338,10 @@ KMenu::KMenu() m_searchInternet->setPixmap(0,icon); setTabOrder(m_kcommand, m_searchResultsWidget); - m_kerryInstalled = !TDEStandardDirs::findExe(TQString::fromLatin1("kerry")).isEmpty(); m_isShowing = false; - if (!m_kerryInstalled) { - m_searchIndex = 0; - m_searchActions->setMaximumHeight(5+m_searchInternet->height()); - } - else { - m_searchIndex = new TQListViewItem(m_searchActions, i18n("Search Index")); - m_searchIndex->setPixmap(0,SmallIcon("kerry")); - m_searchActions->setMaximumHeight(5+m_searchIndex->height()*2); - } + m_searchActions->setMaximumHeight(5+m_searchInternet->height()); + connect(m_searchActions, TQT_SIGNAL(clicked(TQListViewItem*)), TQT_SLOT(searchActionClicked(TQListViewItem*))); connect(m_searchActions, TQT_SIGNAL(returnPressed(TQListViewItem*)), TQT_SLOT(searchActionClicked(TQListViewItem*))); connect(m_searchActions, TQT_SIGNAL(spacePressed(TQListViewItem*)), TQT_SLOT(searchActionClicked(TQListViewItem*))); @@ -2646,10 +2638,7 @@ void KMenu::updateCategoryTitles() max *= 2; if ( categorised_hit_total [i] > max ) { - if (m_kerryInstalled) - sep->setLink( i18n( "top %1 of %2" ).arg( max ).arg( categorised_hit_total [i] ), TQString( "kerry:/%1" ).arg( i ) ); - else - sep->setText( 0, i18n( "%1 (top %2 of %3)" ).arg( i18n(categories [i].utf8()) ).arg( max ).arg( categorised_hit_total [i] ) ); + sep->setText( 0, i18n( "%1 (top %2 of %3)" ).arg( i18n(categories [i].utf8()) ).arg( max ).arg( categorised_hit_total [i] ) ); } else { sep->setLink( TQString() ); @@ -2787,14 +2776,6 @@ void KMenu::slotStartURL(const TQString& u) KMessageBox::error( this, TQString( "kicker:/restart_windows is not yet implemented " ) ); } #endif - else if ( u.startsWith("kerry:/")) - { - TQByteArray data; - TQDataStream arg(data, IO_WriteOnly); - arg << m_kcommand->currentText() << kerry_categories[u.mid(7).toInt()]; - if (ensureServiceRunning("kerry")) - kapp->dcopClient()->send("kerry","search","search(TQString,TQString)", data); - } else { addToHistory(); if (u.startsWith("kaddressbook:/")) { @@ -3369,27 +3350,17 @@ void KMenu::searchActionClicked(TQListViewItem* item) accept(); addToHistory(); - if (item==m_searchIndex) { - TQByteArray data; - TQDataStream arg(data, IO_WriteOnly); - arg << m_kcommand->currentText(); - - if (ensureServiceRunning("kerry")) - kapp->dcopClient()->send("kerry","search","search(TQString)", data); + KURIFilterData data; + TQStringList list; + data.setData( m_kcommand->currentText() ); + list << "kurisearchfilter" << "kuriikwsfilter"; + + if( !KURIFilter::self()->filterURI(data, list) ) { + KDesktopFile file("searchproviders/google.desktop", true, "services"); + data.setData(file.readEntry("Query").replace("\\{@}", m_kcommand->currentText())); } - else { - KURIFilterData data; - TQStringList list; - data.setData( m_kcommand->currentText() ); - list << "kurisearchfilter" << "kuriikwsfilter"; - - if( !KURIFilter::self()->filterURI(data, list) ) { - KDesktopFile file("searchproviders/google.desktop", true, "services"); - data.setData(file.readEntry("Query").replace("\\{@}", m_kcommand->currentText())); - } - (void) new KRun( data.uri(), parentWidget()); - } + (void) new KRun( data.uri(), parentWidget()); } void KMenu::addToHistory() diff --git a/kicker/kicker/ui/k_new_mnu.h b/kicker/kicker/ui/k_new_mnu.h index 49982d96f..acb80342b 100644 --- a/kicker/kicker/ui/k_new_mnu.h +++ b/kicker/kicker/ui/k_new_mnu.h @@ -83,10 +83,6 @@ static TQString categories[14] = {I18N_NOOP("Actions"), I18N_NOOP("Applications" I18N_NOOP("Pictures"), I18N_NOOP("Videos"), I18N_NOOP("Documentation"), I18N_NOOP("Others")}; -static TQString kerry_categories[14] = {"contacts", "applications", "webpages", "everything", "conversations", - "everything", "media", "webpages", "conversations", "webpages", "images", - "media", "everything", "everything"}; - enum MenuOrientation { BottomUp, TopDown, UnDetermined }; enum OverflowCategoryState { None, Filling, NotNeeded }; @@ -282,7 +278,7 @@ private: TQStringList m_finalFilters; KURIFilterData* m_filterData; TQPtrList<HitMenuItem> m_current_menu_items; - TQListViewItem *m_searchIndex, *m_searchInternet; + TQListViewItem *m_searchInternet; bool checkUriInMenu(const KURL &uri); @@ -338,7 +334,7 @@ private: bool m_toolTipsEnabled; int m_media_id; - bool m_recentDirty, m_browserDirty, m_kerryInstalled, m_isShowing; + bool m_recentDirty, m_browserDirty, m_isShowing; KickoffSearch::Plugin* m_search_plugin; TQObject* m_search_plugin_interface; |