Tuesday, August 08, 2006

Tracking the money in FOSS way

In last 23 years the only time I ever tracked my expenses was when my sister-in-law was with me last year. When she moved to Australia, the habit died eventually.

Due to some recent developments in my financial life, I have been thinking of starting it again. But I am too lazy to write down everything. So finally I decided to give GnuCash a shot (my fingers work faster on keyboard than with a pen).

Yesterday I installed it by compiling from source as latest version was not available in repositories.
I must say that I am pretty impressed with it in whatever time I spent using it from yesterday. Things like various account types, different expenses categories, interlinking of transactions, scheduled transactions make it damn easy to manage/track personal finances. Not only this, the UI is as easy to use as it can be.

I have never seen or used MS Money. But I am sure it can not be better and cheaper than GnuCash (free). Why would someone want to spend money ($20 at least) on MS money to track money when one can do it for free.

Unfortunately (for some of my friends), this software is available only for GNU/Linux systems.
But isn't it one more good reason to use GNU/Linux.

Monday, August 07, 2006

URL handler for GtkAboutDialog

I have been doing some coding for gnusim8085 for some time. Yesterday Sridhar asked me if there was a way for the website link in 'About' dialog to be clickable. I was already looking for something that would accomplish it.

Although there is an API gtk_about_dialog_set_url_hook() which will hook a function with the dialog for handling of urls, I didn't have idea what the function should look like. I have devhelp installed on my machine and API reference of GTK+. But it was missing sample code for this particular thing.
Finally I hunted down the solution by downloading gedit source. Turned out that I just needed to call another gnome function. I am giving it here for all those who may need it.

1. Declare and define a function in the file which defines the major part of UI of your application.


-- interface.h --
void activate_url (GtkAboutDialog *about, const gchar *url, gpointer data);

-- interface.c --
void
activate_url (GtkAboutDialog *about, const gchar *url, gpointer data)
{
gnome_url_show_on_screen (url, NULL, NULL);
}

2. Hook up the above mentioned function for url handling in dialogs.

-- main.c --

int main (int argc, char *argv[]) {
..
..

/* hook up url handler */
gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
..
..
}