Version: (using KDE Devel) Compiler: gcc 3.2.2 OS: Linux Kappfinder shows already existing elements. Like I got Gimp link on Graphics menu but whenever I run kappfinder it still shows Gimp to be added to menu. Instead it should check if the element is already existing in the menu and dont show the existing ones.
I do not think this is a wishlist but a normal bug. Kappfinder supposed to find non-existing programs on menu not already existing ones...
Created attachment 1449 [details] Patch against latest cvs Fixes the problem.
Created attachment 1455 [details] Better patch against latest cvs Do not crash when de/select all. Show the right installed application count. Remove some obsolete things..
Can you please review/apply this patch?
Does it work with the new implemented XDG Desktop Menu specification? Isn't it planned to integrate kappfinder into kmenuedit?
Tobias told me he was waiting for Bastian to finish XDG work.
Patches don't look right to me. Will look into it later this week. Apart from that someone (Tobias?) may want to add categories to the .desktop files installed by kappfinder so that they can be installed to the new XDG locations later on.
Patches are done before XDG introduced in KDE.
its a bug, not a wishlist.
Subject: kdebase/kappfinder CVS commit by waba: Don't show already installed applications. (BR57413) CCMAIL: 57413-done@bugs.kde.org M +31 -2 toplevel.cpp 1.17 --- kdebase/kappfinder/toplevel.cpp #1.16:1.17 @@ -30,4 +30,5 @@ #include <kmessagebox.h> #include <kprogress.h> +#include <kservice.h> #include <kservicegroup.h> #include <kstandarddirs.h> @@ -64,7 +65,10 @@ TopLevel::TopLevel( const QString &destD mListView->setMinimumSize( 300, 300 ); mListView->setRootIsDecorated( true ); + mListView->setAllColumnsShowFocus( true ); + mListView->setSelectionMode(QListView::NoSelection); layout->addWidget( mListView ); mProgress = new KProgress( this ); + mProgress->setPercentageVisible( false ); layout->addWidget( mProgress ); @@ -167,4 +171,5 @@ void TopLevel::slotScan() mScanButton->setEnabled( false ); + mProgress->setPercentageVisible( true ); mProgress->setTotalSteps( count ); mProgress->setValue( 0 ); @@ -174,9 +179,29 @@ void TopLevel::slotScan() QStringList::Iterator it; for ( it = mTemplates.begin(); it != mTemplates.end(); ++it ) { - KDesktopFile desktop( *it, true ); - // eye candy mProgress->setProgress( mProgress->progress() + 1 ); + QString desktopName = *it; + int i = desktopName.findRev('/'); + desktopName = desktopName.mid(i+1); + i = desktopName.findRev('.'); + if (i != -1) + desktopName = desktopName.left(i); + + bool found; + found = KService::serviceByDesktopName(desktopName); + if (found) + continue; + + found = KService::serviceByMenuId("kde-"+desktopName+".desktop"); + if (found) + continue; + + found = KService::serviceByMenuId("gnome-"+desktopName+".desktop"); + if (found) + continue; + + KDesktopFile desktop( *it, true ); + // copy over the desktop file, if exists if ( scanDesktopFile( mAppCache, *it, mDestDir ) ) { @@ -223,4 +248,6 @@ void TopLevel::slotScan() // stop scanning mProgress->setValue( 0 ); + mProgress->setPercentageVisible( false ); + mScanButton->setEnabled( true ); @@ -255,4 +282,6 @@ void TopLevel::slotCreate() decorateDirs( mDestDir ); + KService::rebuildKSycoca(this); + QString message( i18n( "%n application was added to the KDE menu system.", "%n applications were added to the KDE menu system.", mAdded ) );