Writings Photos Code Contact Resume Me
Fun

Katoob, the baby has a new father.

Submitted by msameer on Mon, 12/05/2008 - 9:31pm.

This post has a bit of my history and emotions. It can be skipped!

The summary is: Katoob has a new maintainer.

...


Automatically insert a statement in each function in C++

Submitted by msameer on Fri, 08/02/2008 - 4:16pm.

And I thought I'll never do such things again ?
I wanted to insert a debugging statement at the beginning of each function.

for i in *.cc *.c; do sed -i -e 's/\([a-zA-Z0-9 _*:~]*([^).]*) *{\)/\1 \nprintf("%s\\n", __PRETTY_FUNCTION__); /g' $i; done

It can probably be used to insert anything too.

It's dirty but it worked for me. Just keep a backup or make sure the latest code is in any RCS just in case.

It only failed with a function that was commented using C++ style comments "//".
I didn't try it with class methods defined inside header files


Katoob 0.5.9 is out

Submitted by msameer on Fri, 11/01/2008 - 1:59am.

This is a recommended update.

tarball, md5sum and gpg signed md5sum file
ChangeLog:


hildon input method and new languages...

Submitted by msameer on Fri, 14/12/2007 - 7:25pm.

I noticed this because of my work on him-arabic.

If your plugin provides a language other than the 16 "known" languages, It will be displayed as " ()".

Ideally, The fix should be somewhere else but not all of the components are open so even if I can fix it, I won't be able to publish patches or packages.

It seems that the source provided with the SDK is a bit outdated so I had to grab the latest trunk: https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-input-method/

And here's a patch. It'll return the language code if it fails to get the language description. (I know it's a bit hackish :|):

diff -Naur him.orig/src/hildon-im-languages.c him/src/hildon-im-languages.c
--- him.orig/src/hildon-im-languages.c  2007-12-14 19:09:29.000000000 +0200
+++ him/src/hildon-im-languages.c       2007-12-14 19:12:31.000000000 +0200
@@ -82,7 +82,18 @@
   }
   if (translate_function)
   {
-    return (*translate_function) (lang);
+    gchar *res = (*translate_function) (lang);
+    if (!res) {
+      return res;
+    }
+    else if (!strcmp(res, " ()")) {
+      g_free(res);
+      res = g_strdup(lang);
+      return res;
+    }
+    else {
+      return res;
+    }
   } else
   {
     gchar path [sizeof(GCONF_TRANSLATION_STATIC_PATH) + MAX_LANG_LENGTH];

Apply, build the packages and install hildon-input-method_1.99.33-2_armel.deb and libhildon-im-ui3_1.99.33-2_armel.deb

I hope it will be fixed otherwise I'll be providing packages soon. I know I promised to provide a lot of things (-:

Have a nice weekend.


My Arabic related TODO list for maemo

Submitted by msameer on Tue, 04/12/2007 - 7:45pm.

This is my Arabic related TODO list for maemo. It's my personal one not the Nokia employee one :-)

* katoob should be fully functional (I'm learning here). Actually I did more work today and I guess it's fine.
* Package and publish some Arabic fonts (I know there's one provided by the browser team).
* See what can be done regarding input (Low priority. Sorry to say that I don't like the HIM plugin interface).
* Check arabeyes.org apps. Is there anything useful and needs "porting" ?
* glibc/x11 Arabic locale ?
* Any suggestions ?

I'll not translate the UI for 3 reasons:
* I'm not of a translator.
* The license you agree to while downloading the OS image prevents me from doing that.
* Because we are using logical IDs in the code, we will f*** up the UI unless all of the strings are translated.


Waiting for the tickets...

Submitted by msameer on Tue, 17/07/2007 - 3:36pm.

Helsinki: 24.08.2007 17:40
Cairo: 25.08.2007 02:00

Cairo: 09.09.2007 06.35
Helsinki: 09.09.2007 16.15

I hate CDG Airport...


Cartoon Videos.

Submitted by msameer on Tue, 01/05/2007 - 6:42pm.

انا مش فاكر انا جبتهم منين بس يالله:

دول المقدمه بس على فكره

السنافر: http://youtube.com/watch?v=MPGNgUlPWHI

Under:

katoob 0.5.7 is out...

Submitted by msameer on Tue, 03/04/2007 - 7:23pm.

ChangeLog: A bug that could crash the application when OK or Apply is clicked in the preferences dialog under UTF-8 locales was fixed. A lot of small features and enhancements were made as well as some code cleanups. GtkSourceView is now used instead of gtksourceviewmm.

Tarball, md5sum and GPG signed md5sum


DPL Elections 2007

Submitted by msameer on Sun, 01/04/2007 - 9:55pm.

- - -=-=-=-=-=- Don't Delete Anything Between These Lines =-=-=-=-=-=-=-=-
e0acebd2-71f1-4df8-ae4d-50355ad7aa81
[ 8 ] Choice 1: Wouter Verhelst
[ 9 ] Choice 2: Aigars Mahinovs
[ 6 ] Choice 3: Gustavo Franco
[ 1 ] Choice 4: Sam Hocevar
[ 1 ] Choice 5: Steve McIntyre
[ 5 ] Choice 6: Raphaël Hertzog
[ 7 ] Choice 7: Anthony Towns
[ 9 ] Choice 8: Simon Richter
[ 2 ] Choice 9: None Of The Above
- - -=-=-=-=-=- Don't Delete Anything Between These Lines =-=-=-=-=-=-=-=-


Of scratchbox, stupidity and empty cpu transparency list!

Submitted by msameer on Tue, 20/03/2007 - 1:41pm.

OK. Here we go:

To select a devkit when you are setting up a scratchbox target via sb-menu, the target MUST NOT BE in the list for it to be selected (Pressing Enter should remove it from the list for it to be active!!!).

And I had to spend days wondering why is the cpu-transparency list empty even though the cputransp devkit is there in the devkits selection menu!

/me is really pissed off.