warning: Creating default object from empty value in /home3/johnlayt/public_html/modules/taxonomy/ on line 34.
Include on RSS feed to PlanetKDE

Chrissy Chillin' in .cz

A Merry Christmas to one and all from a chilly but sunny Prague where I'm spending Christmas with my sister on a week-long escape from the grey of London.  We may have missed out on it being a white Christmas, but it's a beautiful corner of Europe to be spending time in, especially as it's my sisters first truely 'foreign' country (Australia, the UK and USA don't really count, as strange as they may be :-)  In-between chilling out and stuffing my face, I may even find time to post some photos...

KDE l10n Status Check

In preparation for setting up the locale files with the right working week values, I thought I'd do a quick check on our l10n status against the official ISO standard list and the UN list of recognised entities.  Of the 246 currently on the ISO list, we have locale files for 228  So who are we missing?

  • AQ Antarctica
  • BL Saint Barthelemy
  • BV Bouvet Island
  • GF French Guiana
  • GG Guernsey
  • GS South Georgia and the South Sandwich Islands
  • HM Heard Island and MacDonald Islands
  • IM Isle of Man
  • IO British Indian Ocean Territory
  • JE Jersey
  • MF Saint Martin
  • MP Northern Mariana Islands
  • RE Reunion
  • SJ Svalbard and Jan Mayen
  • SL Sierra Leone
  • TF French Southern Territories
  • UM United States Minor Outlying Islands
  • YT Mayotte

OK, so there's a fair number of UK, US, and French territories in there, and some very remote uninhabited islands that are clearly to be considered as part of their parent country for locale purposes.  Yet they are officially recognised to some extent and many have the various trappings like flags and limited self-governance.  Where to draw the line is tricky, but if you're a KDE user from one of these territories and want to make a case for inclusion, then I'm willing to listen.  Jersey, Gurnsey and the Isle of Man could make good cases, as could the more autonomous French Collectivities.  Anyone claiming to be from Bouvet Island will be ignored as not existing :-)

The notable one here is Sierra Leone which undoubtably should be included.  Another difference is we have an old locale code of TP for East Timor, when the official code is now TL and the official name is now Timor-Leste.  With the feature and string freeze kicking in tomorrow, it's probably a bit late to fix these now, but we'll have to sort it in 4.3.

Weekends Around The World: Calling all i18n Maintainers.

Here's a quote for you from Wikipedia:

"In Muslim-majority countries the legal work week in the Middle East is typically either Saturday through Wednesday (as in Algeria and Saudi Arabia), Saturday through Thursday (as in Iran) or Sunday through Thursday (as in Egypt, Syria, United Arab Emirates).  For most Israelis, the work week begins on Sunday and ends on Thursday or Friday at noon to accommodate the Jewish Sabbath which begins Friday night."

This is something KDE hasn't handled up to now, resulting in calendar widgets that often didn't draw the weekend properly for the users locale.  Another issue was the day of religious worship was tied to the calendar system, which caused issues for users in countries that use the Gregorian calendar but whose day of worship is not Sunday (e.g. Turkey, Israel, etc).

So I've added three new settings to KLocale in 4.2 to address this:

WorkingWeekStartDay - Defults to Monday
WorkingWeekEndDay - Defaults to Friday
WeekDayOfPray - Defaults to Sunday

Those locales that don't use the defaults can now set these values up correctly, and individuals can choose to override the settings for their locale in the Region/Date KCM.  The kdelibs KDateTable widget now obeys these settings when drawing the weekend header and red-letters the day of worship, and I'm working on the kdepim widget too.

I haven't updated any of the actual i18n settings files yet, so this is a call-out to the i18n and l10n people who are better placed than I to know which locales need updating to either commit the updates themselves, or e-mail me with the required details and a definitive reference for me to confirm the details against.  I will try work through the list myself at some stage, but any help is appreciated.

Something we're thinking about for 4.3 is also showing the locales public holidays in the kdelibs calendar widget like the kdepim widget does, but there's a few things to address before that happens.  Part of this will be proper support for astronomically based calendar systems.

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.

* Aluminium body feels wonderfully solid and unlikely to break
* Backlit keyboard
* Huge touchpad
* Mag power cord
* Faaaasssttttt :-)

* 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 :-)

Live from Linux Live Expo

Hello from the Linux Live Expo at Olympia in London, where Team KDE is currently locked in a death-match stuggle with the Gnome  guys for the attention of the few passers-by.  I'd guess the current ratio of Booth-Blokes to punters is about 5 to 1, so any poor soul who so much as glances in our direction is quickly lept upon and dragged to their inevitable fate: having to endur a five-minute demo of Fluffy Bunnies, KDE-on-Mac, and Marble world domination :-)  Trauma counselling is offered afterwards by the Heaven Sent massage angels across the aisle...

Team KDE at Linux Live ExpoTeam KDE at Linux Live Expo

May Day in London - Exercising my democratic right

Strange experience today, I got to vote in an election in my third different country.  I get to vote in New Zealand by right of birth, in Australia by right of citizenship through residency and parentage, and now in the UK local elections through residency.  The weird part was that there was only one polling station that I was allowed to vote at, and because I no longer live near where I'm registered it involved an hour and a half round trip just to exercise my right.  There appeared to be no way for people to vote away from their designated polling station (at least so I was told when I initially turned up at my nearest one), effectively depriving many people of their right to vote.  No wonder the turn-out is so low.  My choice of political colour is not as strong over here as back home, but hopefully my effort to put one more cross in their box helps get them a louder voice.

Quick update and apologies

I must apologise to anyone expecting an e-mail reply from me (sorry Danny!) or code commits to hit trunk.  It's been a hectic 2-3 weeks, between work going nuts, hunting for somewhere new to live, my net connection packing it in, and my openSuse install getting almost totally hosed.  With this weekend being the May Day long weekend, and fingers crossed moving into a new place to live, I hope to find the time to re-install and get everything sorted, then hopefully I can address the backlog of e-mail and finally commit those printing changes.

Easter progress on printng

Well it's Easter, and rather than being somewhere warm or interesting (or both), I'm stuck here in cold and wet London. This is partly due to my own lack of organisation, but also due to some dodgy fraudster types who managed to clone my debit card and withdraw large sums of my cash from an ATM in Tunisia (I haven't even been there!). Ironic really, given the number of banking security projects I've worked on :-) Well the cash has been refunded, I've been waiting two weeks for the replacement card to arrive, and without easy access to cash I'm reluctant to board a plane or train to anywhere, let alone even being able to book anything online. The one consolation is that I've actually been able to watch it snow in London, a rare occurrence.

So what's a geek to do on a miserable long weekend when he's trapped at home? No surprises really :-) I've been busy lately with The Real World with concerts and gigs and parties and work and starting on one of my irregular get-fit-quick kicks and so haven't had much time to spare for the promised work on KDE printing. So this weekend I've mostly devoted myself to sorting it out. It helps too that my landlady is away for the weekend and so hasn't been gently chiding me that a "young" man such as myself really should be outside enjoying myself more instead of being chained to this laptop :-)

I've been slowly reviewing the Qt4.4 printing system over the last few weeks to see what new stuff has made it, what hasn't, and what we still need / can provide in KDE4.1. Below I've detailed a list of what was missing in Qt4.3, where it's at in Qt4.4, and made some decisions on what we can do in KDE4.1, what we need to request for Qt4.5, and what I don't have a clue on. My initial aim is to work on the application side of things (i.e. the print dialog), before moving on to the printer management side.

So here's the first results of my efforts extending QPrintDialog:

Qt 4.4 - Print Dialog - Cups Pages options: KDE specific CUPS Page Options added to QPrintDialogQt 4.4 - Print Dialog - Cups Pages options: KDE specific CUPS Page Options added to QPrintDialog

Yes, that's full support for n-up printing, page borders, banner pages, and page mirroring using CUPS on *nix. The tab is an entirely self-contained private widget added to the QPrintDialog by the KdePrint::createPrintDIalog() method, and not part of the public API. There's quite a bit of polishing to do (pretty icons, layout, etc), but it all works. Suggestions welcome of course :-)

There's two problems here, the first being that Qt doesn't initialise the list of CUPS Options until after the QPrintDialog signals Accepted(), so I can't make the tab dynamically update the settings itself. Instead, the app programmer needs to make a call to KdePrint::setupPrinter() after the QPrintDialog exec() returns, which while not the most elegant of solutions is not too onerous seeing as they already have to call KdePrint::createPrintDialog() to start with.

The second and major problem that is I can't tell at runtime when Qt is using CUPS for printing and when it has had to fall back to LPR. Obviously, we don't want to be showing these CUPS Options if they won't work, but the new Qt QPrinterInfo class unfortunately doesn't tell us if a printer uses CUPS or LPR. We aso need to know the CUPS version so we can add/remove version-dependent features. I also need to know this in FilePrinter. It's the one thing I can see that we _must_ have in Qt4.4, so I'll try requesting Trolltech add it before the RC comes out (not much time left, so fingers crossed).

Next step is to add another tab for the Job Scheduling and user added CUPS Options, then I'll move onto FilePrinter, and look at KStandardActions for Print to E-mail and Print to Fax, before returning to the Printer Management side of things. I see riddell has proposed an alternative python based system, I'll try do a feature compare on them to see if it's a direction worth going.

For those interested, the magic code to add extra CUPS options to QPrinter is as follows, and can be used by any app to set anything they like after calling exec() on the QPrintDialog:

void setCupsOption( QPrinter *printer, const QString option, const QString value )
    QStringList cupsOptions = printer->printEngine()->property(QPrintEngine::PrintEnginePropertyKey(0xfe00)).toStringList();
    if ( cupsOptions.contains( option ) ) {
        cupsOptions.replace( cupsOptions.indexOf( option ) + 1, value );
    } else {
        cupsOptions.append( option );
        cupsOptions.append( value );
    printer->printEngine()->setProperty(QPrintEngine::PrintEnginePropertyKey(0xfe00), QVariant(cupsOptions));

KDEPrint3 vs Qt4.3 vs Qt4.4

 * = available in Qt4.4
 x = not available in Qt4.4, not to be added in KDE4.1
 + = not available in Qt4.4, support to be added in KDE4.1
 ? for unknown or incomplete support

Usability and General improvements:

 * Drag QPrintDialog into the 21st century :-)
 * Applications able to add custom tabs to dialog
 * Selection of Print to File through Printer combo instead of knowing to type .ps/.pdf
 ? Use KFileDialog when selecting destination for Print To File
 ? Printer / Print System Infomation
 x Printer PPD options dialog improved
 x Special / Virtual Printers in Printer selction combo (i.e. fax/e-mail)
 x Persistance of settings

Advanced page range selection:

 x Non-continuous page ranges
 x Current Page
 x Page set All/Odd/Even Pages
 x QList pageList() method

Advanced page manipulation

 * Duplex Long-edge / Short-edge
 * Custom margins
 + N-Up Printing
 + Banner Printing
 x Reverse Landscape / Reverse Portrait
 x Pamphlet printing
 x Poster printing

Advanced Options:

 * API Read access to Cups options selected in dialog preferences
 */+ API/GUI write access to add extra Cups options
 + Job scheduling
 x Apply filters to output file
 x File printing


N-up / Banner / Job scheduling : I'm adding these to KDE4.1 as *nix / CUPS only options.

Use KFileDialog : ThomasZ mentioned this is now possible, need to check with him how.

Advanced Print Range Selection and Reverse Landscape/Portrait: I could add these in KDE4.1 for CUPS only, but the UI and API would just be too awkward, and it's far better to work at having them natively supported cross-platform in Qt 4.5.

Persistance Of Settings : Apps can still manually persist most settings, but KDEPrint made it far less work. Open question, perhaps a couple of KdePrint methods to save/restore all settings.

Printer / Print System Info : Cool new API for this, but could expose more info, primarily we need to know if using CUPS or LPR, and what version of CUPS.

PPD Options Dialog : Works OK, but is not obvious to newbie how you can actually change the settings, and doesn't size properly. One for Qt4.5.

Apply Filters (which gave us pamplet/poster printing): Personally I think pamphlet and poster printing should be supported inside CUPS, but there are other possible uses for filters so the whole issue is an open one. I do see the kprinter utility being resurrected in kdebase or extragear as say KPrintShop using the old KDEPrint engines and dialog as a *nix only solution. Sure, it becomes a 2 step process of Print to PDF then run KPrintShop, but it's better than nothing.

File Printing: I'll be working on improving the interim *nix-only code I wrote for Okular, but it's another open question. I'll be adding support for all options chosen in the dialog, and proper CUPS support, and looking at moving to kdelibs. I really don't see a cross-platform solution any time soon (yes we could use gv, but really...). [Note to self, follow up Alex's suggestion to see how Scribus copes with cross-platform PDF printing]

Add Special / Virtual Printers : I personally see Export to Fax and Export to E-Mail better implemented as KStandardActions selected from the File menu due to being more user discoverable, but that does require every app to decide if they want to add them or not, whereas having it in the print dialog is universal. The actions could launch a reduced functionality QPrintDialog and use the setOutputProgam() method to set the destination program, but I don't think Qt provides the flexability to do this properly (can't block/hide all invalid options, only works for PS output, etc). Instead, in the background a PDF or PS file would be printed and then the file sent to the required program (i.e. as KPrintPreview does). The drawback here is the user will not be able to choose valid options like page ranges, but a simple private dialog could provide this.

P.S. Why does TinyMCE keep stripping the whitespace from my pre marked code and throwing away the code tag??? Apologies if the layout goes nuts again.

Qt 4.4 Print Dialog - Follow Up

Just a quick follow-up to some of the comments in my last blog:

* No, this is not my work, it's all the trolls, so i can't take credit or change anything in it

* Remember, this is still pre-beta code I'm running, so not everything may have been finished or polished yet, such as pretty icons showing what the options do.

* There's a new Print Preview framework, including widgets and dialogs that haven't had time to play with yet.

* The reason there's is so much 'wasted' space in the Copies tab I showed is due to the dialog resizing to fit the KWrite added tabs, as proof here's the 'pure' Qt dialog without any KDE added tabs:

Qt 4.4 - Print Dialog - PureQt 4.4 - Print Dialog - Pure

There were a couple of good points that I'll try pass on:

* Yes, more pretty icons would be good

* Showing the printer status with an icon next to the name in the combo box, or text directly below the combo box would be useful

Speaking of the combo box, I forgot to show another KDE3 inspired improvement with choosing Print to File:

Qt 4.4 - Print Dialog - FileQt 4.4 - Print Dialog - File

I hope we eventually get an API to add our own options in there (Print to Fax, etc).

Next time, I hope to have a proof-of-concept of adding Cups n-up printing.

A quick look at the new Qt 4.4 Print Dialog

I've finally set up a VirtualBox session for KDE 4.1 development with Qt 4.4 installed, so I've been able to have a quick play with the new QPrintDialog, and it's a huge improvement. Hopefully I'm not stealing anyones thunder here, but I thought we should have a quick peek.

First up, a reminder how the old KDE 3 print dialog and current Qt 4.3 dialogs look like :

KDE 3 Print DialogKDE 3 Print Dialog

Qt 4.3 Print DialogQt 4.3 Print Dialog

Now lets see what the default Qt 4.4 dialog looks like:

Qt 4.4 Print Dialog - DefaultQt 4.4 Print Dialog - Default

A lot cleaner and simpler, and obviously picking up the collapsable options button from KDE3. So lets look at the two options tabs the come with Qt 4.4 (so far at any rate).

Qt 4.4 Print Dialog - Copies TabQt 4.4 Print Dialog - Copies Tab

Qt 4.4 Print Dialog - Options TabQt 4.4 Print Dialog - Options Tab

Well, not much there, just the stuff you'll most frequently change (note the new duplex options). The other tabs you see are the KWrite added options, just as in KDE3. You can click on the Properties button to get the more advanced options that are less frequently changed, i.e. the stuff the app developer should normally take care of setting for you:

Qt 4.4 Print Dialog - Page TabQt 4.4 Print Dialog - Page Tab

Qt 4.4 Print Dialog - Advanced TabQt 4.4 Print Dialog - Advanced Tab

So a vast improvement there over the old Qt 4.3 version and catching up to KDE3. I'm not sure if we'll be getting any more options added for 4.4 (Cups n-up, non-continuous page ranges, etc), but it looks like a better base for the trolls to build on in the future, and for us to add features to in the meantime.

I do have a few problems. I still don't like the Advanced options implementation which appears unchanged from Qt 4.3, which I think suffers from a lack of visible clues about how to actually change the settings, but I don't know if that's the final version or not. I also think it is a shame that there doesn't appear to be a way of us adding tabs into the Properties section instead of the Options section. There's also a couple of thngs I'd like to see exposed in the API to make it easier to extend the dialog, but that's probably something for feedback direct to the trolls.

Syndicate content