New features include:
- Macros — press a key, and have ljKlient type in your favourite HTML code without hassle! Even better, if you define it right (more on that later), it’ll even include the selected text wherever you want, and position the cursor similarly too.
- A completely reworked music data formatting system (which, admittedly is still very much in the works) — if you now query for music, it will drop the parts which weren’t available. So if there’s no information about the Album in the currently played track, no worries: you’ll only have one “—” there, and likely won’t have to edit the input.
- A sidebar with a quickly accessible Friendlist, to accommodate the Drag&Drop feature of said list. It still needs some cleanup and I’ll have to make it refresh if the big list (which (and only which) will be used — eventually — for friend adding, editing and removal) happens to get updated. In short, it works and looks fine. If you really can’t stand it, start ljklient with ‘--nosidebar’ for now.
- Apropos of ‘--nosidebar’, which is a quite confusing name for the option, as it’s about the sidebar friendlist, we now can edit past events — the history calendar and list (latter to display the items on a certain day) are on the second tab of the sidebar. Past event editing appears to work fine, although it’s something I rarely do, therefore it wasn’t as rigorously tested as other things, so please be cautious. Needless to say, your pastevents get drafted too, so there’s plenty opportunity of getting them back somehow. You can’t delete events yet.
- Really really serious reworking of ljKlient’s internals, the code is now much cleaner, much more Qt4-ish, and most importantly, we don’t crash on exit. That’s a good thing, right?
- Apropos of exit: we have a systray icon now. Doubleclick it to show or hide the editor or the login window (whichever is appropriate at the time — only one of them can be seen, ever, afterall), right click it to get a menu to quit the application. Clicking X on the editor or the login window only hides the window, Minimize minimises it to task bar. This behaviour is in accordance with the way many other applications work, including Kopete, KMail, X-Lite, Skype, and so on.
- On past events. Please make sure you Refresh after changing the journal with the combobox… It’s more than likely that you get an error from LJ if you don’t do that and submit a post, but if you are an administrator of a community you MAY overwrite something with your post if they happen to share the same ID. Please make sure you don’t fiddle with the journal thingy while you have an entry loaded (will disable it later when in Past Edit mode — to post things to a dozen journals it should be sufficient to load the Last Sent draft (see File menu), and change the journal there.)
- We also seem to have a config file now. It’s in an INI-like format, which is extremely cool because it’s ridiculously readable for humans — but unfortunately Python loves to rearrange items in there, so don’t rely on finding something at the same line where you left it earlier. This also means I can’t quite provide an example one full of helpful comments, as those will get clobbered too.
- And last but not least, we have a Qt4 interface now too, so people can get PyQt4 and enjoy ljKlient that way too — it is a work in progress though, and doesn’t have most of the KDE3 frontend’s features.
As mentioned, we have a config file. It is located in
INI style files are really simple. They’re divided into sections, which have options in them. Kinda like this:
[Section 1] option1 = value1 option2 = value2 [Section 2] option1 = value3 option3 = value4
Think of sections like folders, and options like files in folders. Files which have a single value in them, be it a string or a number.
The macro format used by ljKlient is also very simple. First of all, we work in two sections: Macros, and Macro shortcuts. Every option is a number in these sections, and their values is the macro, or the macro shortcut. I’ll give you an example
[Macros] 1 = <p>$^</p> 2 = <strong>$^</strong> 3 = <em>$^</em> 4 = <lj-cut text="^">$</lj-cut> 5 = $ ^ 6 = <a href="^">$</a> [Macro shortcuts] 1 = Ctrl+P 2 = Ctrl+B 3 = Ctrl+I 4 = Ctrl+K 5 = Ctrl+Space 6 = Ctrl+M
You’ll notice that the numbers are the same in the two sections. This means that option “3” is the macro “<em>$^</em>”, with the shortcut “Ctrl+I” assigned to it. Simple, huh?
The macros in the example seem to be HTML code bits — just what are the
^ things then? Well, the
$ character looks like an S (I’ll never understand what it has to do with the name Dollar, maybe I should wiki it up), which means Selection. The
$ thing will simply get replaced by whatever text you had selected before activating the macro. I don’t know what it does on multiple
$s, feel free to figure it out yourself.
^ is sometimes also called a “caret” — and this is where your cursor will be positioned after the macro has run. This really needs to be in the code only once. I think it will position to the first
^ and leave the rest alone, but I’m not particularly sure right now (I wrote the macro code in August, and haven’t touched it ever since, because it seems to just work without any problems at all).
All clear? Good. Now get downloading :)
PS: to try the Qt4 GUI, create a GUI section with the guitype = Qt4 option-value pair defined.