Removing the bug-fixed entries that were actually resolved as WONTFIX. Removing a...
[hildon] / src / hildon-date-editor.c
index caac2dd..c9ace76 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
@@ -25,7 +25,7 @@
 /**
  * SECTION:hildon-date-editor
  * @short_description: A widget which queries a date from user or opens
- * a HildonCalendarPopup
+ * a HildonCalendarPopup.
  * @see_also: #HildonCalendarPopup, #HildonTimeEditor
  * 
  * HildonDateEditor is a widget with three entry fields (day, month,
@@ -52,6 +52,7 @@
 #include                                        "hildon-date-editor.h"
 #include                                        <glib.h>
 #include                                        <gtk/gtk.h>
+#include                                        <gtk/gtkenums.h>
 #include                                        <gdk/gdkkeysyms.h>
 #include                                        <time.h>
 #include                                        <stdlib.h>
@@ -59,7 +60,6 @@
 #include                                        <string.h>
 #include                                        "hildon-calendar-popup.h"
 #include                                        "hildon-defines.h"
-#include                                        "hildon-input-mode-hint.h"
 #include                                        "hildon-private.h"
 #include                                        "hildon-marshalers.h"
 #include                                        "hildon-enum-types.h"
@@ -259,8 +259,8 @@ hildon_date_editor_class_init                   (HildonDateEditorClass *editor_c
             g_param_spec_uint ("year",
                 "Current year",
                 "Current year",
-                1, 2100,
-                2005,
+                1, 10000,
+                2007,
                 G_PARAM_READABLE | G_PARAM_WRITABLE));
 
     /**
@@ -298,7 +298,7 @@ hildon_date_editor_class_init                   (HildonDateEditorClass *editor_c
             g_param_spec_uint ("min-year",
                 "Minimum valid year",
                 "Minimum valid year",
-                1, 3000,
+                1, 10000,
                 DEFAULT_MIN_YEAR,
                 G_PARAM_READWRITE));
 
@@ -311,7 +311,7 @@ hildon_date_editor_class_init                   (HildonDateEditorClass *editor_c
             g_param_spec_uint ("max-year",
                 "Maximum valid year",
                 "Maximum valid year",
-                1, 3000,
+                1, 10000,
                 DEFAULT_MAX_YEAR,
                 G_PARAM_READWRITE));
 }
@@ -325,7 +325,7 @@ real_set_calendar_icon_state                    (HildonDateEditorPrivate *priv,
     g_assert (priv);
 
     gtk_image_set_from_icon_name (GTK_IMAGE (priv->calendar_icon),
-            pressed ? "qgn_widg_datedit_pr" : "qgn_widg_datedit", HILDON_ICON_SIZE_WIDG);
+            pressed ? "qgn_widg_datedit_pr" : "qgn_widg_datedit", HILDON_ICON_SIZE_SMALL);
 
     priv->calendar_icon_pressed = pressed;
 }
@@ -449,12 +449,14 @@ hildon_date_editor_init                         (HildonDateEditor *editor)
     priv->m_entry = gtk_entry_new ();
     priv->y_entry = gtk_entry_new ();
 
-    g_object_set (G_OBJECT(priv->d_entry), "input-mode", 
-            HILDON_INPUT_MODE_HINT_NUMERIC, NULL);
-    g_object_set (G_OBJECT(priv->m_entry), "input-mode", 
-            HILDON_INPUT_MODE_HINT_NUMERIC, NULL);
-    g_object_set (G_OBJECT(priv->y_entry), "input-mode", 
-            HILDON_INPUT_MODE_HINT_NUMERIC, NULL);
+#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)