You are using an obsolete web browser, or you have the page styles (CSS) disabled. You'll be able to access this site, but only a visually simplified version.

Lancleot Part applet is dead…

… long live the Plasma Shelf!

Plasma Shelf IconThere were two main problems with the Lancelot Part applet.

The first was the name. The name, although it does represent what the applet is technically, it doesn’t really say what the applet is meant for and what it does.

So, it is problematic when you see it in the applet browser, and it isn’t any better to see it when you drag and drop a folder onto the desktop and get the options to show it in the “Folder View” or “Lancelot Part”.

Configuration

The second problem was that a lot of users thought that Lancelot Part does nothing (aka doesn’t work) because when you add it by using the widgets browser, it is just an empty applet. (nobody really bothers reading the instructions these days).

Now, you can use the configuration dialogue to choose what you want to be shown in the applet.

Ideas

I’m currently having some problems wording a couple of things and I would appreciate any help you can give.

The first problem is what to put as a description for the Shelf applet. “Generic list which can hold various types of items” sounds really bad :)

The second is the title for the section of the configuration dialogue shown in the image above – the section below “show the search box” option where you can choose which /sublists/data models/ to show in the applet.

Internals

The ‘internal’ name of the applet (as seen in plasma*rc files) hasn’t changed to keep the back-compatibility without the need for hooks in the configuration system to tell plasma about the rename. The other thing I had to watch out while redoing a few things was to keep the old applet configuration structure intact. Surprisingly, I managed it somehow.

The applet’s source code is still located in kdeplasma-addons/applets/lancelot/parts but it will be moved to kdeplasma-addons/applets/shelf soon enough.

Tokamak 4: Plasma is too fancy

If anybody tells you that KDE SC 4 is too fancy and not configurable enough, just show them this:



A product of a temporary idle mind – ASCII theme for Plasma

edit: It’s is creating a wallpaper to fit this…

Tokamak 4: Activities

This one will be short, I don’t really have the will for writing – it is half past midnight here.

The activities infrastructure is mostly finished – now only polishing is left to be done.

The new organization goes like this:

The core activity-related features are placed into a kded module which doesn’t depend on anything but Qt and the core kde libraries. The class for writing the clients of this service (any program that wants to be able to react to activity changes etc.) will be in kdelibs. The API is minimal and very easy to use – it took me only a couple of minutes to patch KWrite to be able to use activities.

The second part is the revamped Nepomuk Activities service (I already blogged about it – the changes made at T4 were mainly related to make it fit the new arhitecture). If it is running, the above class passes all the info to it. Running the service enables the access to extra meta-data regarding documents and activities.

The third, and last part is the manager class which will be in kdebase/workspace (most probably) because it is only intended to be used by kwin and plasma. Normal programs shouldn’t use it.

The next step is the UI – kwin and plasma

Cheerio.

Nepomuk/Plasma Activities

Unfortunately, the activities service didn’t make it into 4.4 because there wasn’t enough time for it to pass on from kdereview into kdebase. This means that it was returned to playground for further processing. :)

The service has grown a bit and now it exposes a few more methods like linking activities to other nepomuk resources (documents, places…).

KIO

Since the service is not really useful by itself (from the user’s point of view), it will need some kind of UI. The main UI will be Plasma and the ZUI replacement which will be one of the Tokamak4’s main topics.

For the time being, I made a KIO slave shown in the picture above. It lists the defined activities and the resources linked to it. At the moment, the resources are limited to Applications, Documents, Places and Contacts (I’ve just realized that those are the same sections that are in Lancelot – completely by accident).

The data shown in the picture is a garbage data I put into nepomuk for the sake of testing (no sane person would put Thumbs.db in the work-related documents. :)

Improved KDE build scripts

For quite some time now (seems like forever) I’ve used a bit modified scripts from Techbase: Increased Productivity in KDE4 with Scripts to build KDE.

I don’t know why, but I’ve never even tried kdesvn-build script, so the things I’ll write here are maybe (probably) already present in it.

So, if you don’t use kdesvn-build, and have your system set up like it is explained in the above link, keep reading.

Important: I’m using ZSH, so the scripts here maybe need changing in order to be usable in BASH.

Environment

First of all, we need to add some global, environment variables. You should put this in the script for setting KDE4 variables (for example in .my-setup)

The first variable will be used by the build logging system. You should define it near the definitions of KDE_SRC and KDE_BUILD variables.


# build and src folders
# you might want to change these!
export KDE_BUILD=$KDE4ROOT/build
export KDE_SRC=$KDE4ROOT/src
export KDE_LOG=$KDE4ROOT/log

After this, we are making a variable that holds all the dirs to be included in the automatic build system.

# all build dirs
KDE_BUILD_DIRS=""

pushd $KDE_SRC > /dev/null
	for dir in                  \
		KDE/support         \
		KDE/libs            \
		KDE/pimlibs         \
		KDE/base            \
		KDE/plasmoids       \
		KDE/pim             \
		KDE/accessibility   \
		KDE/artwork         \
		KDE/bindings        \
		KDE/graphics        \
		KDE/multimedia      \
		KDE/network         \
		KDE/sdk             \
		KDE/utils           \
                                    \
		extragear/*         \
		other/*             \
		playground/*        \
	;
	do
		KDE_BUILD_DIRS="$KDE_BUILD_DIRS $dir";
	done

popd > /dev/null

export KDE_BUILD_DIRS

SVN/GIT Updates

Now, we can create two very easy functions for fetching the updates:

function updatesource {
    if [ -n "$1" ]; then
        cd $1;
    fi
    if [ -d .svn ]; then echo "Updating directory: $PWD (svn)"; svn up; fi
    if [ -d .git ]; then echo "Updating directory: $PWD (git)"; git pull; fi
}

function kdeup {
	# clearing update logs
	rm -fr $KDE_LOG/update.log
	rm -fr $KDE_LOG/*.update

	cd $KDE_SRC
	for dir in `echo $KDE_BUILD_DIRS`; do
		updatesource $KDE_SRC/$dir || echo "$dir (see $log_file) update failed" >> $KDE_LOG/update.log
	done
}

Notice that it reports errors in $KDE_LOG/update.log file.

Building

Now we define kdemake command which will build all the directories we specified in $KDE_BUILD_DIRS. Like kdeup, it logs the process. The main log is $KDE_LOG/build.log and each built directory has its own build log (the output of cmake + make).

function kdemake {
	# clearing all logs
	rm -fr $KDE_LOG/build.log
	rm -fr $KDE_LOG/*.build

	cd $KDE_SRC
	for dir in `echo $KDE_BUILD_DIRS`; do
		cd $KDE_SRC/$dir;
		echo "Building $dir";

		log_file=`echo $dir | sed 's/\//_/g'`;
		log_file="$KDE_LOG/$log_file.build";
		echo "Building $dir > $log_file" > $log_file;

		echo "Building $dir" >> $KDE_LOG/build.log
		( ( cmakekde || echo "FAILED: see $log_file" >> $KDE_LOG/build.log ) 2> /dev/stdout | tee -a $log_file )
	done
}

Debug builds

Sometimes you want to have a certain module build with debugging symbols – just replace the default cmakekde function with this one. It checks for the .debug file and if it exists, it builds that module with dbg symbols included.

function cmakekde {
	if test -n "$1"; then
		# srcFolder is defined via command line argument
		srcFolder="$1"
	else
		# get srcFolder for current dir
		srcFolder=`pwd | sed -e s,$KDE_BUILD,$KDE_SRC,`
	fi
	# we are in the src folder, change to build directory
	# Alternatively, we could just use makeobj in the commands below...
	current=`pwd`
	if [ "$srcFolder" = "$current" ]; then
		cb
	fi
	# to enable tests, add -DKDE4_BUILD_TESTS=TRUE to the next line.
	# you can also change "debugfull" to "debug" to save disk space.
        # added "nice make..." to allow the user to work on the box while
        # compiling
        # Note: To speed up compiling, change 'make -j2' to 'make -jx',
        #   where x is your number of processors +1

	if test -e ".debug"; then
		echo "debug yes" && \
		cmake "$srcFolder" -GKDevelop3 -DCMAKE_INSTALL_PREFIX=$KDEDIR \
			-DCMAKE_BUILD_TYPE=debugfull \
			&& nice make -j3 && make install
	elif test -e ".debug-release"; then
		echo "debug yes [release-debug]" && \
		cmake "$srcFolder" -GKDevelop3 -DCMAKE_INSTALL_PREFIX=$KDEDIR \
			-DCMAKE_BUILD_TYPE=RelWithDebInfo \
			&& nice make -j3 && make install
	else
		echo "debug no" && \
		cmake "$srcFolder" -GKDevelop3 -DCMAKE_INSTALL_PREFIX=$KDEDIR \
			-DCMAKE_BUILD_TYPE=release \
			&& nice make -j3 && make install
	fi
}

Checking logs

So, updating KDE is now a matter of calling kdeup and kdemake. The next thing to do is to create a watching mechanism (to put it in the command watch plasmoid for example).

The first script is outputting what is currently being built – something like this:

/opt/kde4trunk/log/KDE_support.build : [ 49%] Built target phonon

The code for this bash script is:

#!/bin/bash
WHATFILE=`ls -t1 /opt/kde4trunk/log/*.build | head -n 1`
WHAT=`grep '%' $WHATFILE | tail -n 1`
echo $WHATFILE ":" $WHAT

That’s all for today.

Blog problems

I have had some problems with the server, and I truly hope that they are over now. Had to reinstall WordPress without any plugins (bye bye openID, …).

Now, it is a bit bare install and I miss a few things here and there, but at least it works…

Sorry for this…

Edit: Most plugins reactivated.

Tokamak 3: My summary

First of all, let me just say that Tokamak 3 experience was more fun than riding on a carrousel under the influence of LSD (or so I heard) and more strange than some of the episodes of the Monty Python’s Flying Circus (which was, by the way, quoted many times – mostly by Aaron and me).

All kudos go to Mario, the father of our big Takamak family, and all in all a swell guy. We taught the Brazilians (Ana and Artur) what snow is, and I think they will remember it for a long time :D :P

Ok, enough about the fun parts. You were/are able to read about many things that were done during T3, so I’ll not bother you with the others’ work. I’m just going to write an update to the last post.

KRunner + Kickoff

Kickoff in trunk now uses KRunner as its search engine. There are a few bugs and a few concerns about functionality that will be resolved soon.

At the moment, all runners in KRunner are active in Kickoff as well, but that will change since we’ll need to make a whitelist of approved runners to avoid Kickoff crashing the plasma-desktop process on an error in KRunner. This means that Kickoff’s search will be less powerful than the KRunner and Lancelot, but that’s the price of running in the plasma-desktop process.

Plasma + Nepomuk

The service for activities runs well and is located in the playground, and so is the testing client.
The current work is to completely integrate it into Plasma which has proven to be more complicated than I expected at first. The thing that makes it hard is the need of libplasma to stay API and ABI compatible. The Plasma::Context class has been introduced some time ago, but it did nothing and some methods defined in it weren’t sufficiently granular.

At first I tried to implement everything with no API changes, but I’ve hit a wall very soon and had to deprecate a few methods, and introduce a new class named GlobalContext. It seems to work, so I’ve now switched on to implement the handlers in the plasma-desktop. I hope to have it working till the end of the week so that I could post it all for an API review.

Favourite applications

I was hoping to have more time to talk to Ruphy about making a library for handling the usage data and favourite applications handling (to be used in Raptor and Lancelot… and possibly in other menus) but Ruphy could stay for only a few days. I’ll have to start the discussion about this on plasma-devel when I finish the activity stuff and when I look the relevant parts of Raptor’s code.

Photos…

Photos will come later… hopefully from other guys and gals aswell (torrent comes to mind)

Tokamak 3: Plasma+Nepomuk activities, Kickoff+Krunner…

I’m aware that I could write more often from Tokamak 3, but I’m too lazy. I’m now recompiling KDE, so I have the time.

First, the most important things – we are having a great time, both fun and productive, and I just can’t wait to see all the ideas mentioned here implemented.

I’m gonna mention only the things I’ll be doing soon (and that I’m doing right now).

Plasma + Nepomuk activities

So, you know, the plasma activities? Those don’t make so much sense at the moment, but the idea is to make the whole environment aware of them. And to make the rest of the environment able to control and manage them.

I’ve already written a Nepomuk service that manages activities, and a library that gives the applications access to this service without the need to deal with d-bus and nepomuk. The library is almost finished – the only thing left to do is some pretty way to deal with the /offline/ mode (when the nepomuk is disabled).

The next step is to connect/synchronize the plasma’s activities to this service. Mind that this is only the beginning – the future will bring applications that will be able to adapt to the running activity… (and it will bring a nice and fancy interface for all of that)

Imagine Kickoff, Lancelot, Raptor with favourite applications that depend on the task you’re dealing with at that moment… the file dialog’s and dolphin’s places…

Kickoff + KRunner

The second thing that should have a large impact is something nobody really expected me to do – to replace the current search mechanism in Kickoff (yes, the KICKOFF!!!) with KRunner, just like Lancelot does.

It really is weird that I should improve a /competing/ program, but Sebas asked to do it, so… why not. (he, he, even with that Kickoff will suck compared to Lancelot and Raptor ;) )

OK, enough for tonight, see you later…

KOffice needs you, and we need KOffice!

As you know, I’m not a KOffice developer, I’ve just read something disturbing that shows its importance:

http://blogs.sun.com/GullFOSS/entry/prototyping_a_new_ui_july

So I’m urging every soon-to-be KDE developer to seriously consider contributing to KOffice.

A new wallpaper

I know you’re not used to wallpaper-related posts from me, but I too have to express myself artistically sometimes. Unlike when I’m expressing my musical talents, that you’re not able to benefit from, when I decide to make some /visual/ art, you are.

I’ve received a couple of requests to post the wallpaper seen in the Lancelot 1.7 screencast, and I decided to comply.

Next Page »