My blog has been moved to ariya.ofilabs.com.

Saturday, April 08, 2006

iPod-wannabe

I don't own an iPod or similar player, my music collection is not large and I prefer to listen to radio. But if I need to kill time with music (e.g. during a trip), then I just use Zaurus. With Opie, it can be quite interesting:

It is just the normal Opie Media Player, with the pod skin. No need for iTunes-like or special tool on the desktop side, I just use drag-and-drop within Konqueror.

Consider that the four-way navigation buttons of the Zaurus SL 5500 serve also for the next/previous and increase/decrease volume, this nicely emulates an iPod-like player.

It can survive up to three hours. This is actually quite astonishing since the battery is already quite old. Even if it's new, it's just not up to iPod's. All songs are in CF card, there is no aggressive buffering, MP3/Ogg decoding is done in software (not special DSP chip). So, not so bad.

Friday, April 07, 2006

Z and kioslave

Right after upgrading to the latest Opie (I'm using OpenZaurus), it came to my mind to write this tip. Actually, it's not new and I'm sure many know it already. Just in case you are not aware yet.

Typically people use Qtopia Desktop to sync between the Zaurus and your main machine. I never however managed to make Qtopia Desktop looks good, i.e. using the antialiased font rendering. Beside, it is just much easier to use Kontact (with its Kitchensync) so that your PIM data is integrated with the rest of KDE.

But how to transfer documents? Well, just use the powerful kioslave of KDE. Since Opie is running an FTP server on port 4242 (forget first the security implications), you just need to type:

ftp://root@192.168.129.201:4242/media/cf

in Konqueror, then you will (after got prompted for password and confirmed in the Z side) have access to the Compact Flash card (CF) content. Bookmark this, and you never have to type and memorize that long address again.

Since my digital camera also uses CF, I also don't need to search for that camera USB cable anymore (one less to care for). Just pull the CF from the camera, plug it into the Z, then copy my pictures conveniently. I still hope Krita runs on Z one day :-)

Even more interesting, you can work directly on that folder. For example, when I use Z to jot some notes and save it as a text file in CF, later on I just dock my Z on the cradle, click on my CF-on-Z bookmark, open the text file with KWrite, type some content, then save it again. No hassle.

The power of kioslave has been often demonstrated. In this particular use, it allows me to skip the download-edit-upload or sync-edit-sync steps. Nice, isn't it?

Tuesday, April 04, 2006

Wednesday, March 22, 2006

The Redemption of Mr. Payne

Can't wait for 2007-planned Max Payne? Then keep an eye on Max Payne: Payne & Redemption (see also the interview). The trailer is so far very interesting! :-P

Tuesday, March 21, 2006

Monday, March 20, 2006

K4B

This is the most interesting thing I read today:

Are there any plans to include K3B into KDE 4? Would it change to K4B, or maybe a more user-friendly name?

See if we can persuade Sebastian to rename it to K4B :-)

Wednesday, March 15, 2006

Resize Pop-up List of A Combo Box

You want to be able to resize the pop-up list of a combo box. Normally, this pop-up list has always the same width as the combo box. However, in certain cases the width of the combo box needs to be fixed. But if the pop-up list does not expand itself, then only part of the items on the list is visible as illustrated here:

In this particular situation, the look of the pop-up list will be better if it can be resized independently from the combo box itself.

QComboBox unfortunately does not provide public functions to access its pop-up list. Also, the pop-up list widget itself is not accessible. It is possible to create a subclass of QComboBox and reuse its private members (in header file qcombobox_p.h), but this would have required a quite amount of effort.

By looking at the source of QComboBox, we find out that the pop-up widget is QComboBoxPrivateContainer. It is also constructed as a child widget of the combo box. Using run-time introspection feature of Qt, it is very easy to find this widget and change its size:

void resizeComboBoxPopup(QComboBox* comboBox, int width, int height)
{
  if(!comboBox) return;
  
  // force the construction of QComboBoxViewContainer
  comboBox->view();  

  // iterate to find QComboBoxPrivateContainer
  QWidget* popup = 0;
  QObjectList objects = comboBox->children();
  for(int i = 0; i < objects.size(); ++i)
  {
      QObject* obj = objects.at(i);
      if(obj->inherits("QComboBoxPrivateContainer")) 
          popup = qobject_cast<QWidget*>(obj);
  }
  
  if(popup)
    popup->resize(width, height);
}    

Of course, this cheap trick is only a workaround and only works as long as the implementation of QComboBox does not change too much. It can also be considered as a crime to Qt. So, kids, don't try this at home...

Monday, March 13, 2006

Numeric Entry with Pop-up Slider

Although typically I like slider, sometimes it is not practical to use because of space constraint. When a horizontal slider, for example becomes, narrow and narrower, it is difficult to get a fine tune movement.

The solution that I am still experimenting with is to use a pop-up slider. This is mostly seen in the volume applet, but, hey, let us try it somewhere else:

So by clicking on the down button (forget about the ugly pixmap), a slider will pop-up and let the user adjust the value by moving the slider handle. The slider will automagically disappear if the user clicks anywhere else, just like typical pop-up menu.

I am not really surprised if usability-wise, this kind of pop-up slider is not usable at all. However, if there is interest, I'll put the code online (it's only couple of hundred lines anyway).

Siegfried

Siegfried: every minute is just hilarious.

Friday, March 10, 2006

Wednesday, March 08, 2006

XGL Live

I should have written all my wishes in this blog. Just hours after this, Koroora (Gentoo-based) Live CD for demonstrating XGL is available (thanks for Roman Khimov for pointing it out, thanks also for SlippJigg for mentioning PC LinuxOS).

I quickly downloaded the ISO, burned into a CD, and gave it a try on a GeForce4-armed desktop. It works out of the box. I even showed it to couple of friends and they seem all like it so far. Kudos for the Koroora team!

Now, I still need to make some more copies...

Tuesday, March 07, 2006

The Glass Experience

Using Slackware-based Looking Glass Live CD, it was very interesting to watch the expression of some guys when I booted a fairly modern NVidia-equipped desktop with it. I even still considered burning some more CDs and give them to people that I know.

Now came XLG XGL and AIGL. Wouldn't be beautiful if we have a working Live CD which just can be handed to any average Joe Sixpack? I'm not the only one who is looking for it, and I'm sure there are many. Though there is possibility of using Dapper Flight (I still need to give it a try), a simple ready-to-burn-and-boot ISO file would really please me since I can as well point the URL to others.