2008-09-15 Alberto Garcia <agarcia@igalia.com>
[hildon] / src / hildon-range-editor.c
index a9e66be..0915007 100644 (file)
@@ -8,7 +8,7 @@
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
  * as published by the Free Software Foundation; version 2.1 of
- * the License.
+ * the License, or (at your option) any later version.
  *
  * This library is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
 
 /**
  * SECTION:hildon-range-editor
- * @short_description: A widget is used to ask bounds of a range
+ * @short_description: A widget is used to ask bounds of a range.
  *
  * HidlonRangeEditor allows entering a pair of integers, e.g. the lower
  * and higher bounds of a range. A minimum and maximum can also be set
  * for the bounds.
+ * 
+ * <example>
+ * <programlisting>
+ *      range_editor = hildon_range_editor_new ();
+ *      hildon_range_editor_set_limits (editor, start, end );
+ *      hildon_range_editor_get_range (editor, &amp;start, &amp;end);
+ * </programlisting>
+ * </example>
  */
 
 #ifdef                                          HAVE_CONFIG_H
 #include                                        <config.h>
 #endif
 
-#include                                        "hildon-range-editor.h"
-#include                                        <gtk/gtkbox.h>
-#include                                        <gtk/gtklabel.h>
-#include                                        <gtk/gtksignal.h>
-#include                                        <gtk/gtkentry.h>
-#include                                        <gdk/gdkkeysyms.h>
-#include                                        <glib/gprintf.h>
+#include                                        <libintl.h>
 #include                                        <string.h>
 #include                                        <stdlib.h>
-#include                                        "hildon-input-mode-hint.h"
+#include                                        <glib/gprintf.h>
+#include                                        <gdk/gdkkeysyms.h>
+
+#include                                        "hildon-range-editor.h"
 #include                                        "hildon-banner.h"
-#include                                        <libintl.h>
 #include                                        "hildon-range-editor-private.h"
 
 #define                                         _(string) \
@@ -321,11 +325,13 @@ hildon_range_editor_init                        (HildonRangeEditor *editor)
     g_signal_connect (priv->end_entry, "changed", 
             G_CALLBACK (hildon_range_editor_entry_changed), editor);
 
+#ifdef MAEMO_GTK 
     g_object_set (G_OBJECT (priv->start_entry),
-            "input-mode", HILDON_INPUT_MODE_HINT_NUMERIC, NULL);
+            "hildon-input-mode", HILDON_GTK_INPUT_MODE_NUMERIC, NULL);
 
     g_object_set( G_OBJECT (priv->end_entry),
-            "input-mode", HILDON_INPUT_MODE_HINT_NUMERIC, NULL);
+            "hildon-input-mode", HILDON_GTK_INPUT_MODE_NUMERIC, NULL);
+#endif 
 
     gtk_widget_show (priv->start_entry);
     gtk_widget_show (priv->end_entry);
@@ -538,7 +544,7 @@ hildon_range_editor_entry_focus_in              (GtkEditable *editable,
     return FALSE;
 }
 
-/* Gets and sets the current range. This has two usefull side effects:
+/* Gets and sets the current range. This has two useful side effects:
  * Values are now sorted to the correct order
  * Out of range values are clamped to range */
 static void