View Single Post
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#97
Another small batch of commits for today. A quick count of object files makes me think that I'm about 22 *.c files done out of 62

I've been giving some thought to HildonGtkInputMode. Without injecting properties using something like GtkModule I don't think we can remain 100% compatibile with Maemo. I'm wondering if we could do something along the lines of adding some of the functions from Maemo's GTK (eg hildon_gtk_entry_get/set_input_mode) into libhildon instead, replacing the functions so that they call mapping them to GtkInputHint and GtkInputPurpose. Something like:

Code:
hildon_gtk_entry_set_input_mode(entry, mode)
{
Do checks for invalid modes (ie multiline in singleline entry) eg.
mode &= ~HILDON_GTK_INPUT_MODE_MULTILINE;
gtk_entry_set_input_purpose(entry , hildon_gtk_get_input_purpose(mode));
  gtk_entry_set_input_hints(entry , hildon_gtk_get_input_hints(mode));
}

hildon_gtk_get_input_purpose(mode)
{
if mode is HILDON_GTK_INPUT_MODE_NUMERIC
  return HILDON_GTK_INPUT_MODE_DIGITS
etc.
}

hildon_gtk_get_input_hints(mode)
{
if mode contains HILDON_GTK_INPUT_MODE_AUTOCAP
 then add GTK_INPUT_HINT_UPPERCASE_SENTENCES to return
if mode contains HILDON_GTK_INPUT_MODE_DICTIONARY
 then add GTK_INPUT_HINT_WORD_COMPLETION to return
etc
}
The problem comes with modes that don't have equivalents, such as HILDON_GTK_INPUT_MODE_HEXA.
 

The Following 10 Users Say Thank You to Android_808 For This Useful Post: