Adding a patch from Tommi Komulainen to pass the correct timestamp and button to...
[hildon] / src / hildon-date-editor.c
index 5213810..7c5b146 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
@@ -84,7 +84,7 @@
 
 #define                                         DEFAULT_MIN_YEAR 1970
 
-#define                                         DEFAULT_MAX_YEAR 3000
+#define                                         DEFAULT_MAX_YEAR 2037
 
 static GtkContainerClass*                       parent_class;
 
@@ -449,12 +449,14 @@ hildon_date_editor_init                         (HildonDateEditor *editor)
     priv->m_entry = gtk_entry_new ();
     priv->y_entry = gtk_entry_new ();
 
+#ifdef MAEMO_GTK
     g_object_set (G_OBJECT(priv->d_entry), "hildon-input-mode", 
             HILDON_GTK_INPUT_MODE_NUMERIC, NULL);
     g_object_set (G_OBJECT(priv->m_entry), "hildon-input-mode", 
             HILDON_GTK_INPUT_MODE_NUMERIC, NULL);
     g_object_set (G_OBJECT(priv->y_entry), "hildon-input-mode", 
             HILDON_GTK_INPUT_MODE_NUMERIC, NULL);
+#endif
 
     /* set entry look */
     gtk_entry_set_width_chars (GTK_ENTRY (priv->d_entry), DAY_ENTRY_WIDTH);
@@ -581,8 +583,6 @@ hildon_date_editor_set_property                 (GObject *object,
 
         case PROP_MIN_YEAR:
             val = g_value_get_uint (value);
-            g_return_if_fail (val > priv->max_year);
-            priv->min_year = val;
             /* Clamp current year */
             if (hildon_date_editor_get_year (editor) < priv->min_year)
                 hildon_date_editor_set_year (editor, priv->min_year);
@@ -590,7 +590,6 @@ hildon_date_editor_set_property                 (GObject *object,
 
         case PROP_MAX_YEAR:
             val = g_value_get_uint (value);
-            g_return_if_fail (val < priv->min_year);
             priv->max_year = val;
             /* Clamp current year */
             if (hildon_date_editor_get_year (editor) > priv->max_year)