Debian Bug report logs - #570977
Please provide way to customize default favorites list for new users

version graph

Package: kdebase-workspace-bin; Maintainer for kdebase-workspace-bin is Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>; Source for kdebase-workspace-bin is src:kde-workspace.

Reported by: Petter Reinholdtsen <pere@hungry.com>

Date: Mon, 22 Feb 2010 15:45:02 UTC

Severity: wishlist

Tags: patch

Found in version kdebase-workspace/4:4.3.4-3

Done: Sune Vuorela <Sune@vuorela.dk>

Bug is archived. No further changes may be made.

Forwarded to https://bugs.kde.org/show_bug.cgi?id=231797

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>:
Bug#570977; Package kdebase-workspace-bin. (Mon, 22 Feb 2010 15:45:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
New Bug report received and forwarded. Copy sent to Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>. (Mon, 22 Feb 2010 15:45:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: submit@bugs.debian.org
Subject: Please provide way to customize default favorites list for new users
Date: Mon, 22 Feb 2010 16:41:34 +0100
Package:  kdebase-workspace-bin
Version:  4:4.3.4-3
User:     debian-edu@lists.debian.org
UserTags: debian-edu

In Debian Edu, we want to change the list of applications showing up
in the default favorites list for new users.  One way to do this is to
create a file kickoffrc, but this only allow us to replace the current
list, not only append to the current list.  Looking at the source, I
trace the default list to this function ion
plasma/applets/kickoff/core/favoritesmodel.cpp:

    static QList<QString> defaultFavorites()
    {
        QList<QString> applications;
        applications << "konqbrowser" << "kmail" << "systemsettings" << "dolphin";

        QList<QString> desktopFiles;

        foreach (const QString& application, applications) {
            KService::Ptr service = KService::serviceByStorageId("kde4-" + application + "
.desktop");
            if (service) {
                desktopFiles << service->entryPath();
            }
        }

        return desktopFiles;
    }

The list of default entries are hardcoded in the source, as far as I
can see, to konqueror, kmail, system settings and the dolphin file
browser.  Can this code be changed to allow us to add some entries to
a directory that will show in in the default favorites list?

With KDE 3, we could do something similar for the KDE panel list by
adding a replacement share/apps/kicker/default-apps.  It would be
great if a similar or better feature is made available for KDE 4.


Happy hacking,
-- 
Petter Reinholdtsen




Severity set to 'wishlist' from 'normal' Request was from Eckhart Wörner <ewoerner@kde.org> to control@bugs.debian.org. (Mon, 22 Mar 2010 16:03:08 GMT) Full text and rfc822 format available.

Set Bug forwarded-to-address to 'https://bugs.kde.org/show_bug.cgi?id=231797'. Request was from Eckhart Wörner <ewoerner@kde.org> to control@bugs.debian.org. (Mon, 22 Mar 2010 16:03:09 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Petter Reinholdtsen <pere@hungry.com> to control@bugs.debian.org. (Mon, 05 Apr 2010 06:12:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>:
Bug#570977; Package kdebase-workspace-bin. (Mon, 05 Apr 2010 06:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>. (Mon, 05 Apr 2010 06:27:03 GMT) Full text and rfc822 format available.

Message #16 received at 570977@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: 570977@bugs.debian.org
Subject: Re: Bug#570977: Please provide way to customize default favorites list for new users
Date: Mon, 5 Apr 2010 08:10:35 +0200
tags 570977 + patch
thanks

Here is a draft patch based on the code in KDE 3
(/kdebase/kicker/kicker/core/containerarea.cpp).  I would very much
like input on the code used to locate the config file.  Is kickoff the
correct name for this system?  Is the file name default-favorites
good?  What about its location?  I believe it will put it under
/usr/share/apps/kickoff/default-favorites or
/usr/share/kde4/apps/kickoff/default-favorites, but have not verified
this.

diff -ur kdebase-workspace-4.3.4/plasma/applets/kickoff/core/favoritesmodel.cpp kdebase-workspace-4.3.4-pere/plasma/applets/kickoff/core/favoritesmodel.cpp
--- kdebase-workspace-4.3.4/plasma/applets/kickoff/core/favoritesmodel.cpp	2009-05-14 19:26:34.000000000 +0200
+++ kdebase-workspace-4.3.4-pere/plasma/applets/kickoff/core/favoritesmodel.cpp	2010-04-05 08:02:46.000000000 +0200
@@ -31,6 +31,7 @@
 #include <KService>
 #include <kdebug.h>
 #include <KUrl>
+#include <KStandardDirs>
 
 using namespace Kickoff;
 
@@ -105,7 +106,26 @@
     static QList<QString> defaultFavorites()
     {
         QList<QString> applications;
-        applications << "konqbrowser" << "kmail" << "systemsettings" << "dolphin";
+
+	// XXX Is this the KDE 4 way of finding the path?
+	// XXX Is this a good location for the default-favorites file?
+	QFile f(KStandardDirs::locate("data", "kickoff/default-favorites"));
+	if (f.open(IO_ReadOnly))
+	{
+	    QTextStream is(&f);
+
+	    while (!is.eof())
+	        applications << is.readLine();
+
+	    f.close();
+	}
+	else
+	{
+	    applications << "konqbrowser"
+			 << "kmail"
+			 << "systemsettings"
+			 << "dolphin";
+	}
 
         QList<QString> desktopFiles;
 

Happy hacking,
-- 
Petter Reinholdtsen




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>:
Bug#570977; Package kdebase-workspace-bin. (Mon, 05 Apr 2010 10:27:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sune Vuorela <Sune@vuorela.dk>:
Extra info received and forwarded to list. Copy sent to Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>. (Mon, 05 Apr 2010 10:27:05 GMT) Full text and rfc822 format available.

Message #21 received at 570977@bugs.debian.org (full text, mbox):

From: Sune Vuorela <Sune@vuorela.dk>
To: Petter Reinholdtsen <pere@hungry.com>, 570977@bugs.debian.org
Subject: Re: Bug#570977: Please provide way to customize default favorites list for new users
Date: Mon, 5 Apr 2010 11:41:35 +0200
On Monday 05 April 2010 08:10:35 Petter Reinholdtsen wrote:
> tags 570977 + patch
> thanks
> 
> Here is a draft patch based on the code in KDE 3
> (/kdebase/kicker/kicker/core/containerarea.cpp).  I would very much
> like input on the code used to locate the config file.  Is kickoff the
> correct name for this system? 

kickoff is the codename for the 'moderen' K menu.

> Is the file name default-favorites
> good?  What about its location?  I believe it will put it under
> /usr/share/apps/kickoff/default-favorites or
> /usr/share/kde4/apps/kickoff/default-favorites, but have not verified
> this.

I'm considering wether this should be treated as a possible configuration file 
and not as a data file.

In general, you can ask kstandarddirs where it looks for things with the kde4-
config command
kde4-config --path data
kde4-config --path config

All of these has more than one directory in its output, and the directories 
are looked up from left to right until the file is found.


I will also ask the relevant upstreamers to look over this patch.

-- 
Do you know how can I overclock the controller of the Ultra hard disk?

You must disable a directory for getting access over a graphic TCP connection.




Reply sent to Sune Vuorela <Sune@vuorela.dk>:
You have taken responsibility. (Fri, 21 May 2010 22:00:06 GMT) Full text and rfc822 format available.

Notification sent to Petter Reinholdtsen <pere@hungry.com>:
Bug acknowledged by developer. (Fri, 21 May 2010 22:00:06 GMT) Full text and rfc822 format available.

Message #26 received at 570977-done@bugs.debian.org (full text, mbox):

From: Sune Vuorela <Sune@vuorela.dk>
To: 570977-done@bugs.debian.org
Subject: Please provide way to customize default favorites list for new users
Date: Fri, 21 May 2010 23:41:14 +0200
This can already be done by providing a default kickoffrc file in a KDEDIR 
listed.

for kickoffrc:

[Favorites]
FavoriteURLs=/usr/share/applications/kde4/konqbrowser.desktop,/usr/share/applications/kde4/systemsettings.desktop,/usr/share/applications/arora.desktop

/Sune

-- 
Genius, I'm not able to uninstall on the printer over the BIOS, how does it 
work?

You either never need to remove a icon, or should digit on the head, so that 
then from Internet Explorer 6000 and from the preferences inside Word you 
can't cancel a DirectGL cache for receiving a analogic space bar to the secret 
code.




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 19 Jun 2010 07:37:11 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 18:23:52 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.