I'm trying to make my pygtk application behave the way openoffice calc does, regarding the decimal point. This means that when receiving a KP_Decimal key (the dot in the keypad) I want my entries to show whatever the decimal point is in the current locale (dot or comma, appropriately).
I've searched for a long while now, and I haven't been able to find how to do this. I can capture the key_press_event in the Gtk.Entry, and check for a KP_Decimal, and I can get the current locale setting for decimal point; but I don't know how to transform the dot to comma if needed.
I want this change to be global to the app, and not specific to certain entries, so it'd be better if it could be done through something more general, like input methods. I've been reading about them as well, and I couldn't find a way to use them how I want either.