Despite the horrible audio clipping at the start and occasional clipping throughout (it decided to not see my USB mic for some reason today and nothing i did could convince it otherwise), the "hey, it's my living room!" recording lair and it being the first hour long show I've done ("Dammit, look into the camera!!!") ... show one is in the can. We peaked at 225 viewers during the live recording, and we'll see how many people watch it over the coming week.
You can watch it (and future episodes) here on my "Seigo on KDE" channel; you need to scroll down to the Video Clips section to watch the recorded show. The show notes that accompany the show are here and include links to the screenshots and other files referenced.
Apologies in advance for all the non-free software .. If there was a good, live-streaming site with a decent interface I'd hop to it in a heartbeat. Maximizing impact while minimizing the impact on my time is critical.
Where are all the FOSS web dev projects? identi.ca is a nice start and Slashdot is the long time standard bearer, but we just don't see many online services that use FOSS frameworks ...
Update: There is now a torrent of the show available, thanks to Serenity on irc.
Add your blog
If you are a KDE contributor you can have your blog on Planet KDE. Blog content should be mostly KDE themed, English language and not liable to offend. If you have a general blog you may want to set up a tag and subscribe the feed for that tag only to Planet KDE.
To have your blog added file a bug in Bugzilla listing your name, svn account (if you have one), IRC nick (if you have one), RSS or Atom feed and what you do in KDE. Attach a photo of your face for hackergotchi.
Alternatively, Planet KDE is kept in KDE's SVN. If you have an account you can add or edit your own feed:
- svn checkout svn+ssh://
@svn.kde.org/home/kde/trunk/www/sites/planet/ - Put your hackergotchi in website/hackergotchi/. A hackergotchi should be a photo of your face smaller than 80x80 pixels with a transparent background. svn add the file.
- At the end of the planetkde/config file add your details (the name in brackets is your IRC nick):
- svn commit
If you want to add a Twitter microblog to the Microblogging sidebar add define_microblog true and follow your name with [twitter]. Currently only Twitter is known to work, please contact Jonathan Riddell before adding non-Twitter microblogs to check it works.
Planet KDE Guidelines
Planet KDE is one of the public faces of the KDE project and is read by millions of users and potential contributors. The content aggregated at Planet KDE is the opinions of its authors, but the sum of that content gives an impression of the project. Please keep in mind the following guidelines for your blog content and read the [http://www.kde.org/code-of-conduct/ KDE Code of Conduct]. The KDE project reserves the right to remove an inappropriate blog from the Planet. If that happens multiple times, the Community Working Group can be asked to consider what needs to happen to get your blog aggregated again.
If you are unsure or have queries about what is appropriate contact the KDE Community Working Group.
Blogs should be KDE themed
The majority of content in your blog should be about KDE and your work on KDE. Blog posts about personal subjects are also encouraged since Planet KDE is a chance to learn more about the developers behind KDE. However blog feeds should not be entirely personal, if in doubt set up a tag for Planet KDE and subscribe the feed from that tag so you can control what gets posted.
Posts should be constructive
Posts can be positive and promote KDE, they can be constructive and lay out issues which need to be addressed, but blog feeds should not contain useless, destructive and negative material. Constructive criticism is welcome and the occasional rant is understandable, but a feed where every post is critical and negative is unsuitable. This helps to keep KDE overall a happy project.
You must be a KDE contributor
Only have your blog on Planet KDE if you actively contribute to KDE, for example through code, user support, documentation etc.
Do not inflame
KDE covers a wide variety of people and cultures. Profanities, prejudice, lewd comments and content likely to offend are to be avoided. Do not make personal attacks or attacks against other projects on your blog.
For further guidance on good practice see the KDE Code of Conduct.
People Aggregated
Microblogging from KDE
November 15, 2008
Aaron Seigo (aseigo)
i took my curtain call
John Layt
Back again...
Well, it's been a while since I blogged properly, but life has been incredibly busy and complicated these last few months. On the personal side, I've restarted uni doing some archaeology courses, had my parents visiting from NZ for 6 weeks, worked some silly hours, done some travelling around Europe and the UK, and utterly failed to find somewhere permanent to live. On the hacking side, I've had 2 laptops die on me, my web host lock me out, a dead slow net connection, and just a general lack of time to do the stuff I want.
However, there's finally some light at the end of the tunnel time wise, I've fixed my website, and I've splashed out to buy myself a new laptop. My 5-year old Dell had reached the stage where anything slightly taxing like surfing the net or reading e-mails would send the fan into overdrive, compiling a 1-line change to kdelibs would take 5 hours, one of the memory modules died completely, and the case cracks were threatening to separate the screen from the body. It's taken a while to find a replacement that met my requirements during which I made do first with an eee 701, then when it died with an eee 901, but finally after evaluating the new Sony Vaio Z, I settled on the brand-new Aluminium Macbook.
I've had the Mac for a few weeks now, and while it is a beautiful piece of kit, there are some annoying features.
Pros:
* Aluminium body feels wonderfully solid and unlikely to break
* Backlit keyboard
* Huge touchpad
* Mag power cord
* Faaaasssttttt :-)
Cons:
* No manual CD eject button
* No Insert/Delete/Page Up/Page Down/Print Screen/Hash keys, and a tiny enter key
* The screen is way too glossy and has narrow viewing angles
* USB ports too close together
* Lack of expansion slots
Right now, I've just finished upgrading to a 500Gb HDD on which I am installing the ultimate Hackintosh system, triple-booting OS X, Windows XP, and OpenSuse 11.1 beta 5. I plan to compile KDE trunk in all three installs as I get time, so if there's something you want tested cross-platform I may be able to oblige.
I've a backlog of subjects I want to blog about, so I'll be boring you on a regular basis over the next few days :-)
Orville Bennett (illogic-al)
For Kieran: The Home Made Pan Cakes recipe :-)
Are you locked out of your home waiting for help to arrive?
Are you drunk and need that little pick-me-up to keep you going lucidly through the night?
Have you guessed the answer to a question involving UTC time?
Well have we got something for you!
Ingredients
Organic WHOLE Milk (Premium Selection)
3 eggs (Cage free fowl only folks)
I can't believe it's not butter spray (original)
Flavoring of choice (i prefer Coconut but Orange/Lime is good too)
Organic Cane sugar (Florida crystals)
Unbleached Bread Flour (King Arthur Flour)
Salt (Morton iodized)
Ladel a.k.a Soup spoon or Deep Spoon)
Pour "a good amount" of milk into a "decent sized" bowl.
Add sugar to taste (i.e. when it's sweet enough for you).
Add "around a tablespoon of" salt.
Add flavoring and mix well. Bonus points for adding real lemon/orange juice or coconut water if you have it available. Knowing a thing or two about coconuts though, you'll probably have to boil it off to get it concentrated enough.
Whisk the three eggs vigorously (using a fork in a deep bowl works well).
Add flour to the milk (forgot that didn't you?) until it is of "the right consistency".
Add the eggs and then mix in one direction until the whole thing is consistent.
Pour in some "I can't believe it's not butter spray", and mix again.
Place two non-stick frying pans on the fire at "a decent temperature" (for faster cooking, and the ultimate "I'm teh awesome chef experience").
Using your ladel, pour the mix into the frying pan and then, in a gentle circular motion, swirl the mix slowly around, thinning it out.
Once the tips of the pan cakes have browned, flip over and wait for the other side. If after the first pancake you find that it's too sweet/not sweet enough, too thick/not thick enough, adjust, mix and pour again.
You'll notice you don't have the exact instructions. Half the fun is filling in the blanks. srsly. tastesdanggood!
Enjoy and thank Mrs. Nilla Bennett to be when you see her!
Boudewijn Rempt (boud)
Loading old Krita files
Oh the shame! It so happens that I have only two running versions of Krita: 1.6, to compare trunk with, and trunk. Now, as I said earlier, I happen to be working on loading and saving, and I suddenly thought that it would be way cool to be able to test loading Krita images saved from older versions.
But I don't have those versions, and I don't have images saved with those versions either... So: todays plea for help is "anyone who has Krita images, preferably with more than one layer, saved with Krita version 1.4 and 1.5, please, please contact me -- then I can test whether Krita trunk can still load old images."
Albert Astals Cid (TSDgeos)
Don't buy a Labtec Standard Keyboard Plus
So my keyboard broke, the current one lasted for about two years, not bad.
As i'm quite special about the layout of keyboards i ended up buying a Labtec Standard Keyboard Plus, that is basically a cheap keyboard with the standard layout, but after having used it for less than 24 hours i've to say, DO NOT BUY it.
The keyboard has probably been tested by the slowest typer on earth, if i try to write KDE i always end up with KE or KD, the keyboard is unable to detect fast keypresses of SHIFT + D + E and that happens with a lot of combinations. What a shame, so let's see how i can explain that to the clerk of the shop to get my money back.
Cornelius Schumacher
Releasing software is almost fun
I'm developing and maintaining a small application called Plutimikation for my daughters. It's a math learning game for children. Today I did a release of the current state as Plutimikation 0.2. It's the second release. The first release was four years ago. It's interesting how tools and infrastructure have evolved since then. Today releasing software is almost fun.
Four years ago I hosted the code in a private Subversion repository and manually built a package for SuSE Linux 9.1, which was the current SUSE version back then.
Today I host the code on Github, and the openSUSE Build Service builds packages for openSUSE 10.2, 10.3, 11.0 and Factory and for SLED. It's amazing how much more easy it has become to develop free software openly and distribute it to the world.
There are some small pieces still missing, though. Getting the source code from github to the build service still involves some manual work. I would prefer to just type in the URL of the git repository in the build service and let the rest be handled automatically. It's just a little bit of code, which is missing here and it could be added easily as the build service is free software. Would be a nice project for a cold winter evening.
The other missing bit is the distribution of the software. SUSE has the fabulous one-click-install mechanism, but apparently it requires some work to create a one-click button I could put on the homepage for Plutimikation. I see no reason why the build service couldn't provide the HTML for such a button automatically. This would probably mean dynamic creation of the ymp file which is used by the one-click-install mechanism and a suitable graphics. Another nice project for cold evenings.
So even, if for perfection there are still some bits and pieces missing, the tool chain for maintaining and releasing software has become incredibly great.
One thing hasn't changed in the four years. I'm still using the KDE 3 platform for Plutimikation. It provides everything what's needed to develop this kind of small application in no time, including stuff like translations. There is not much to be wished for here. That really tells about the quality of the KDE platform.
But the next version of Plutimikation will use KDE 4, so it also gets all the beauty, portability and functionality goodness which other apps already enjoy for a while. I'm looking forward to Plutimikation 0.3.
Egon Willighagen
Help! Unsolved problems with maximized Kubuntu Intrepid windows
After quite happily having upgraded to Intrepid on two machines (a laptop and a desktop), I started upgrading a second laptop. By now, I had apt-p2p installed on my first laptop, and with the help of Cameron hacked apt-p2p to allow my laptop use the apt-p2p installation of my already migrated laptop. The download went rather smoothly. Anyway, that's not important to my problem.
The problem I encountered with my second laptop, after fixing the ATI-driver problem (I had to replace to old ATI drivers with the new opensource driver package to get X11 working again), was that all windows automatically maximized:
When I minimize the window, it does, but does not have any decoration:
There is little to find with Google, except for this closed thread on ubuntuforums. I followed hints.
I removed my .kde folder, made sure I was using kwin, checked window size settings (but it even maximizes dialogs!), and Riddel was kind enough to make some suggestions, which unfortunately did not help either. Worse, I rebooted my already migrated laptop, and now I have the problem on both laptops :(
So, at least the problem is not hardware related. Also, the most recent updated laptop showed the problem with both KDE 4.1.2 and 4.1.3, so that does not seem to be the problem either. A reboot triggered the problem of my first migrated laptop, which was last booted 4 days ago. So, it seems to have to do with a package I installed upon the upgrade of the second machine, and which I installed in the last 4 days... does aptitude keep a log by now?
The problem is rather annoying, and makes the desktop quite unusable... I don't want to reinstall Intrepid from scratch... I filed a bug report with some extra details. so, if you have any suggestion, any, I am likely going to try it. Any suggestion on how to debug the problem is also most welcome...
Update: problem could be fixed with: aptitude remove devilspie. Thanx to all who replied!
Boudewijn Rempt (boud)
Deform brush
It's really, really, really a pity KOffice is in feature freeze: just after the freeze went into effect, Lukas Tvrdy, the Summer of Code student who created the sumi-e brush engine (which simulates brush hairs), created another way cool brush engine: the deform brush, apparently inspired by the Gimp's iWarp filter. (Is that really with a small i and capital W?). This means that you can paint deformation on you canvas, and that's just so must fun!
For instance, quickly throw down a couple of semi-transparent radial gradients, and then use the star tool to paint star-shaped deformation onto the canvas:
In other news, there are people out there in the real world using Krita, which is always gratifying: Creating Storyboards.
And thirdly, I've done a lot of work on our brush engines lately, but right now I'm first going to finish our saving and loading code. I feel I have to, having read Cyrille's latest blog entry! (But in a good, gung-ho, way)
Richard Johnson (nixternal)
I will never bet again - day 1 with GNOME
Well, I lost a bet this week and the result was I had to use GNOME for 1 month. I could easily cheat, but I wanted to go through with it and see what I have “supposedly been missing.” Well after day 1, I have to admit that after listening to Jorge talk about the Dust theme, I have a somewhat pretty lookin’ desktop.
So, I went ahead and installed Empathy to chat with my buds, Gnome-Do because everyone ooh’s and ahh’s over it, and Gwibber, so I can tweet in style. I tried using the Gnome-Do Twitter plugin, but it didn’t work at all for me. Well it worked a little, as in I could see others tweets, but it didn’t like mine at all. Always said it had some sort of authorization error.
I am impressed with the quality of GNOME these days and I have to take my hat off to all of those involved. GNOME still is not for me, and probably never will be, but it is fun from time-to-time to check out the competition. I have GNOME on my home desktop, but the rest of my machines are either KDE 4 (4.1.3 Kubuntu and Trunk with Debian), and WMII (umph!).
Matt Rogers (mattr)
new MSN plugin for Kopete
I’ve just imported the new MSN plugin (now called WLM for Windows Live Messenger) into trunk for KDE 4.2. This new plugin provides support for MSNP15 and in general lays the groundwork for way more stuff to be added to Kopete’s MSN plugin. The new plugin uses a library called libmsn which you can get from SourceForge
Thanks go to Tiago Salem Herrmann, Gustavo Boiko, and Roman Jarosz for doing
all the heavy lifting.
Now go install libmsn, update your trunk checkouts, and start testing! ![]()
Ariya Hidayat
Flickify!
As Harry entered the room, he saw Ron hopelessly fighting with his magic tablet. Ron was desperately trying to look for something using the tablet. Harry pulled his wand and then "Flickify!"
The Qt Everywhere mantra means that Qt will be available in more and more platform, including of course mobile devices. For example, the recently announced Qt S60 means that 80 million devices can become the target market for Qt application developers.
In another front, touch screen seems to be the future direction. Nokia 5800 XpressMusic (better known as Tube) starts the new generation of S60 devices with touch screen. As introduced by Apple on iPhone, navigating a long list in a device with touch screen is best done using flickable list. The scrolling effect is also often known as kinetic scrolling.
Though up to now Qt does not offer an official mean to flick-enable your list, apparently it can be done without too much effort. Heck, you do not even need to modify your code. Flick Charm, my latest graphics example exactly demonstrates the idea. The trick is to use an event filter to hijack the mouse events and then to scroll the widget properly. This simple charm apparently works on any QAbstractScrollArea subclasses, including all the ItemViews and of course QGraphicsView as well as QWebView. Check out the following screencast for the proof:
(Screencast is also available for direct watch at blip.tv or YouTube).
Mark Kretschmann (markey)
A-Team
In 2003, a crack developer squad was sent to prison by a military court for a hack they didn't commit. They promptly escaped from a maximum security stockade to the Amarok Underground HQ. Today, still wanted by the government, they survive as coders of fortune.
If you have a problem, if no-one else can help, and if you can find them, maybe you can hire the AMAROK-TEAM!
November 14, 2008
Alexander Neundorf
How to get the CMake version you need
KDE svn trunk requires [http://www.cmake.org CMake] 2.6.2 since last week. Version 2.6.2 has been released just a few weeks ago, so maybe there are not yet packages for all distros.
So how do you get CMake 2.6.2 ?
Of course you can get the sources (from cvs or as source package from http://www.cmake.org/files/ ) and build it yourself.
But you can also get away with less work and just use the binary CMake packages provided by [http://www.kitware.com Kitware]. You think they won't work on your Linux distribution ? I can tell you, they most probably will. At least I haven't found an x86 Linux box yet where they don't work.
So, here's how you can do it
$ cd $ wget http://www.cmake.org/files/v2.6/cmake-2.6.2-Linux-i386.tar.gz $ tar -zxvf cmake-2.6.2-Linux-i386.tar.gz
And now you are already ready to use it:
$ cd src/my_project $ mkdir build $ cd build $ ~/cmake-2.6.2-Linux-i386/bin/cmake ..
Btw., this way it is also very easy to have multiple different versions of CMake on your system. In http://www.cmake.org/files/ you can still get CMake 2.4.x, 2.2.x and back until the ancient version 1.2.
Just download the packages (as shown above) and install them into separate directories e.g. in your HOME or at some other place.
Alex
Aaron Seigo (aseigo)
my glowing heart .. er .. panel
I was talking with Thomas Zander on irc last night about the Plasma desktop shell and how it's shaping up. I was going on about how happy I am that we're able to ship the thinnest default panel we've been able to thus far in a KDE release: KDE 3 had a 46px default, 4.0 had a 48px default, 4.1 had a more reasonable 38px default ... and 4.2 will have a much slimmer 35px default. Personally I prefer really, really thin panels but for the default we're constrained by things like the size of systemtray icons and making it look nice with them. (I have some thoughts about how we can mitigate this in 4.3 with a variable height panel ... but that's not for 4.2.)
Still, being able to shave 11 pixels off the KDE3 default and 3 more pixels off of 4.1 (which shed a few pounds already) is great. Thomas noted, however, that he has wide panels and hides them. Fair enough, that's one of the beautiful things about autohiding panels.
He noted, however, that Plasma only unhides the panel when you move the mouse in the space the panel actually exists. So, for example, if you have a panel taking up 50% of the right side of the screen and it is vertically centered, the top and bottom quarter of the screen won't untrigger a hide.
Whereas Kicker would just unhide everything on a screen edge when you came in contact with it, Plasma tries to respect people's choice of panel size. I often have a small panel in the top left of my screen for quick launch the handful of apps I use-and-close throughout the day; I really don't need it popping out when my mouse reaches for the left side of a maximized window. So Plasma's size sensitivity is a nice improvement (and it does it without polling the mouse.. woo!).
Thomas said it'd be neat if the panel 'glowed' when off screen. I thought about it for all of about 2 seconds before running off to implement it. It was just too cool of an idea to not do it right now. Excitability: 1, Sleep: 0.
I figured that if I made the input only window Plasma uses to trigger unhiding a bit bigger, say 30 px larger than necessary on all sides, and painted a small glow where the panel was when the mouse entered that input only window ... it would look to the user like the panel "sensed" the mouse was near and announced its existence. This would give Thomas a hint as to where his panel actually was without having to hunt too much: just get near it and then follow the glow. Since input-only windows don't paint to screen nor capture events (unless they go out of their way to do so), this wouldn't otherwise interfere with the user interacting with other windows. It should be completely seamless.
How hard could it be, right?
I had a proof of concept up and running in less than five minutes. I spent another hour or so on various details before going to bed (somewhere around 03:00 *sigh*) and then implemented the painting of the glow today (SVG makes this stuff sooo easy) and committed.
The only caveat is that the glow painting looks horrible without window compositing. So even though all the mechanics work perfectly without composite, there is no glow when there is no window compositor due to aesthetics. If we come up with an aesthetically pleasing solution for the non-composited scenario, turning it on is a matter of deleting a couple lines of code.
So, the end result (other than me losing an hour more sleep last night) is that if you have composite and you have a hidden panel, it will glow as your mouse nears. Think of it as your panel saying, "Oh! Hello! I was wondering when you'd return!" =)
Nikolaj Hald Nielsen
"If we have 2 or 3 good services at launch I will be happy"
With Amarok 2.0.0 rc1 right around the corner, now is a good time to reflect on where Amarok 2 comes from and where it is going. So I felt like writing a bit about the journey of the idea of "services" in Amarok 2, as that has been my main focus, even though I have managed to get my hands dirty all over the place it seems!
Just over 2 years ago, Amarok 1.4.4 was released with a cool new feature, which also happens to be my first contribution to Amarok, the integrated Magnatune.com store. ( Here is a cool page that Magnatune did to document some of the responses ). The overall response to this was quite good, and Magnatune started selling quite a few albums through Amarok, and eventually ended up hiring me, and I still work for them.
Something else started happening as well. People saw the integrated Magnatune store and started asking if there was any chance that their favorite store could get a similar integration. Most of the Amarokers agreed that this could be cool, but there were several obstacles. For one, the way the original Magnatune store required a huge amount of custom code to do simple stuff like adding tracks to the playlist ( and as many will likely know ) the metadata representation of these are not perfect. Also, The Magnatune store had its very own tab on the left side of Amarok, and it was clear that we could not just add an arbitrary number of these as we started to add more stores. Finally, the Magnatune store in the 1.4.x series of Amarok is tied very closely to the rest of Amarok, meaning that it cannot easily be removed, and that people are more or less forced to load part of this code, whether they use the store or not. Luckily for me, after a time, something big happened in Amarok-land, the 1.4.x series was put on maintenance mode and the work on Amarok 2 was started. Since I was only responsible for porting over the Magnatune store and had almost no other code in Amarok, I decided that this would be a good time to try to tackle some of the issues mentioned above, and prepare Amarok for further stores or other services to be integrated.
To make a long story short, we now, after a year and a half of work, have a framework in place that allows services to be implemented as plugins and loaded/unloaded on demand, a service browser to show them in and overall much better integration into Amarok overall, basically solving all the issues that needed to be solved before we could add more services.
My original plan was to port at least the Magnatune store to this new framework, and as the title of this post shows, when I started this work, I would be very happy to have 2 or 3 working services to show up when 2.0.0 was launched. As the image on the left shows, this is not quite what happened.
This image shows the services that are currently available, either included with Amarok 2 itself, or via download from kde-apps.org ( easily installable from within Amarok 2 using the "Get Hot New Stuff" system ). Some of these services are coded using the C++ framework, and some are scripts that run on top of the "Scriptable Service" framework, which is itself an extension of the underlying service framework. I have done a number of them myself, but more and more services are added or maintained by others. There are 13 of them. This is way more than I had ever hoped we would have available anytime soon, and really shows off the power of the framework well. Especially the scripted service framework, that lets people relatively easily add content from an online source ( although in a somewhat limited way compared to a full C++ plugin ) has received a lot of interest lately, and these scripts seem to be pouring in at the moment.
Looking at the picture of all these services, one does start to appreciate how useful it is to be able to only load the services that are interesting to you, and not having to have them all in the list all the time! ![]()
So what will the future bring? For starters, I have realized that I might need to extend the API used by service scripts a bit, since these seem to really be taking off in a big way, and requests for new features are already coming in ( and some have already been implemented ). Beyond that, I know of quite a few services that are being worked on, or are in the planing phase, both scripts and very advanced full plugins, so as with the rest of Amarok 2, this is not the end result, it is merely the beginning, and cool things will happen over the next many years, as we fully realize the potential of the new codebase!
Dominik Haumann
Kate Internals: The Undo/Redo System
The Kate Editor Component (also called KatePart) has its own undo/redo system. It did not change much since KDE2 and basically it is very simple. Meanwhile there are classes for undo/redo support in Qt as well. In fact both systems are very similar. Let's focus on KatePart's system for now.
Text Operations
First we have to take a look at what actions need to be saved. In KatePart this basically comes down to
- insert text or line
- remove text or line
- selection changes
- (and a few others like wrapping a line)
- the content is 'x'
- the type is 'insert text'
KateUndo Items
In KatePart, an undo item is represented by the class KateUndo:
class KateUndo {
public:
KateUndo (KateUndoGroup::UndoType type, uint line,
uint col, uint len, const QString &text);
~KateUndo ();
bool merge(KateUndo* u);
void undo (KateDocument *doc);
void redo (KateDocument *doc);
inline KateUndoGroup::UndoType type() const;
inline uint line () const;
inline uint col () const;
inline uint len() const;
inline const QString& text() const { return m_text; }
};
Item Merging
Note the function KateUndo::merge(KateUndo* u); This functions merges two undo items of the same type if possible. For instance, typing 'hello world' inserts one undo item for every character, i.e. 11 undo items of type 'insert text'. Kate merges those 11 items into only 1 item with the string 'hello world'. Merging leads to less KateUndo items (less memory) and faster undo/redo replaying.
Item Grouping
What's still missing is the possibility to group several undo items together. Imagine you have selected the text 'hello world' and paste the text 'cheers' from the clipboard. What happens is this
- remove selected text
- insert text from clipboard
Every KateUndo item belongs to one KateUndoGroup. A KateUndoGroup can have an arbitrary count of KateUndo items. In the example above we want to group 'remove selected text' and 'insert text' together. Grouping can be explicitely done in the code as follows (simplified version):class KateUndoGroup
{
public:
explicit KateUndoGroup (KateDocument *doc);
~KateUndoGroup ();
void undo ();
void redo ();
enum UndoType { ... };
void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &text);
void setUndoSelection (const KTextEditor::Range &selection);
void setRedoSelection (const KTextEditor::Range &selection);
void setUndoCursor(const KTextEditor::Cursor &cursor);
void setRedoCursor(const KTextEditor::Cursor &cursor);
bool merge(KateUndoGroup* newGroup,bool complex);
void safePoint (bool safePoint=true);
};
void KateDocument::paste ( KateView* view, QClipboard::Mode mode )
{
QString s = QApplication::clipboard()->text(mode);
editStart();
view->removeSelectedText();
insertText(pos, s, view->blockSelectionMode());
editEnd();
}
Grouping: editStart()/editEnd()
The call of editStart() tells the document that an edit operation is running. All text operations are added to the current KateUndoGroup, until editEnd() is called. editStart() and editEnd() do reference counting, i.e. editStart() can be called nested as long as for each call of editStart() there is (finally) a call of editEnd().
Grouping: Cursors and Selections
Undoing the paste-action above should restore the selection if there was one previously. Redo (i.e. paste again) should remove the selection again. So there are two different types of selections: one before the undo group, and one after. That's why each undo group has the functions setUndoSelection() and setRedoSelection(). The same applies for the cursor position: We have to store two different cursor positions, one for undo and one for redo.
For instance, imagine we removed the text 'world'. Undo (i.e. insert 'hello') should set the cursor position to the end of 'hello'. Redo (i.e. remove 'hello') should set the cursor position to the start of it.
Luckily a programmer does not have to set the undo/redo cursor positions and text selections manually. undoStart() is called the first time editStart() is called. The closing editEnd() finally calls undoEnd(). So undoStart() sets the undo cursor position and undo text selection, while undoEnd() sets the redo cursor position and redo text selection.
Group Merging
The careful reader might have noticed KateUndoGroup::merge(). So merging of two groups is also supported. Whether text operations should be merged into an existing undo group can be controlled with KateDocument::setUndoDontMerge(). Pasting text for example set's this flag.
Undo and Redo
Every document in KatePart has two lists: An undo list, and a redo list. Suppose we have 10 KateUndoGroups in the undo list and the user invokes undo 4 times. Then the undo list only contains 6 items and the redo list 4. Now it is also possible to redo. However, typing text clears the redo list.
Document Modified Flag
KateDocument::updateModifed() is called to update the modified flag of a file. This update also relies on the current active undo group. Saving the file saves a pointer to the current undo group, and later we simply can check whether the current undo group is the active one. Pretty simple mechanism. However, there right now seems to be a bug you can reproduce as follows:
- save doc [not modified]
- type a character [modified]
- undo [not modified]
- type a character [modified]
- undo [still modified]
Ian Geiser (geiseri)
Introducing Flo
Well I have been mumbling for a few weeks now about this "Flo" project and so far I have gotten a ton of encouraging feedback. For those of you who don't know what Flo is, here is a gentle introduction.
Flo is a multi-platform mind mapping program. I have been interested in mind mapping for some years and have written an application that can help express mindmaps and translate them into various document formats. Mind mapping for those of you who don't know about it is a way of brainstorming. One of the main ideas of Flo is to take these brainstorms and create outlines and various documents. Mind maps can be used for everything from project planning to designing software test cases. Pretty much anything that can be expressed in an outline can translate into a mind map quite painlessly. The main advantage of a mind map is that it is easier to reorder and reorganize ideas in a visual fashion before applying them to something more rigid like an outline.
Flo on Ubuntu Linux

Flo on Windows XP

Flo on MacOS X

So here is the theory of operation. I have organized ideas into three types. The main thesis of the mind map, ideas that support the main thesis and general supporting ideas. Most of the time there is only one main thesis, but nothing prohibits having multiple ones. The main purpose for these classifications of ideas is for the document export of outlines. Each idea has an index, this is mainly autolayout and for export of the mind map to other formats, but can be helpful for organization of the mind map. To add a new idea one can select a parent idea and press the "+" button. To remove an idea select it and press the "-" button. These actions are also available via a right click context menu when you select a shape. If you right click on the canvas you can pan across the view and if you use your mouse wheel on the canvas you can change the zoom level. If you wish to reorganize the map's ideas you can change the parents of child ideas very easily. First select the new parent, then click the "Reparent" button on the UI. Lastly drag from the new parent to the child idea you wish to reparent. When you release the mouse it will reparent the idea for you. At this point you can right click on the child and edit its properties to change its index in relation to its new sibling ideas. Once you have created and organized the ideas in your brainstorming session you can export to an outline format to quickly generate your final document.
So now on to the features! Flo has quite a few small features that I have added as I needed them for work. One big problem with me working on it for two years now is that a lot of little undocumented features have slipped in that I have used once or twice and then forgotten. These features need to be debugged a little bit, but in my opinion they are useful still. Here is a taste of what I have so far.
- Adding custom text notes to each idea.
- Ability to add custom pixmap emblems as well as a set of built in vector emblems.
- Document wide meta information to help organize the document better.
- Ability to change the parents of ideas to reorganize the map quickly.
- Cut, Copy and Paste between instances of Flo.
- Undo/Redo support.
- Panning support via the mouse.
- Zoom support via the UI, mouse and keyboard.
- Font embedding to provide common fonts across platforms.
- Spellchecking for all text in the document.
- Automatic layout of the document as well as alignment options.
- Auto save as well as automatic creation of backup files.
- Recent documents support.
- Ability to change font, color and shape on multiple ideas at a time.
- Support for multiple languages in the spell checker (TODO)
- Export Features
- Docbook 4.2 export support that supports graphics.
- ASCII text outline support.
- Wiki outline support for Wikimedia, Trac, Creole 1.0 and Parsewiki
- SVG, PDF and pixmap.
- Rudimentary PDF export of beamer slides.
- ODF outline support with images (Pending Qt 4.5)
- Import Features
- Freemind import with shapes, fonts and colors.
- ASCII text outline import (TODO)
- Creole 1.0 wiki import (TODO)
So as you can see its got a lot of little features that make it usable for every day use at this point. I am finishing up the documentation of the whole application and it should be available in the next few weeks.
Now most importantly how to get Flo! If you are using a Debian based system you can just add the following to your /etc/apt/sources.list file: deb http://apt.geiseri.com/flo/apt/ $YOURDIST contrib Where $YOURDIST is one of the follwing: sid, etch, lenny, feisty, gutsy, hardy, or intrepid. I have amd64 and i386 builds. PowerPC builds are pending on me getting a new hard disc for my system. Jaunty will be available as it is updated. I have a basic spec file present for SuSE and Red Hat based systems, but I have not been able to get automated builds for those dists done. If someone wishes to provide me builds I will more than gladly post them. If you are stuck on windows you can also download an installer here. Mac users are out of luck until I can fix