2009-03-06 Alberto Garcia <agarcia@igalia.com>
[hildon] / src / hildon-time-editor.c
index 114af7c..ff24dd9 100644 (file)
  * minutes and seconds, and pm/am indicator as well as a button which
  * popups a #HildonTimePicker dialog.
  *
+ * <note>
+ *   <para>
+ * #HildonTimeEditor has been deprecated since Hildon 2.2 and should not
+ * be used in newly written code. Use #HildonTimeSelector instead.
+ *   </para>
+ * </note>
+ *
  * <example>
  * <title>HildonTimePicker example</title>
  * <programlisting>
@@ -83,7 +90,7 @@
 
 #define                                         ICON_PRESSED 4
 
-#define                                         ICON_NAME "qgn_widg_timedit"
+#define                                         ICON_NAME "widgets_time_editor"
 
 #define                                         ICON_SIZE "timepicker-size"
 
@@ -693,7 +700,7 @@ hildon_time_editor_get_property                 (GObject *object,
     }
 }
 
-/*
+/**
  * hildon_time_editor_new:
  *
  * This function creates a new time editor. 
@@ -748,15 +755,15 @@ hildon_time_editor_get_time_separators          (GtkLabel *hm_sep_label,
     g_date_set_dmy (&locale_test_date, 1, 2, 1970);
     (void) g_date_strftime (buffer, sizeof (buffer), "%X", &locale_test_date);
 
+    /* Find h-m separator */
+    iter = buffer;
+    while (*iter && g_ascii_isdigit (*iter)) iter++;
+    /* Extract h-m separator*/
+    endp = iter;
+    while (*endp && ! g_ascii_isdigit (*endp)) endp++;
+
     if (hm_sep_label != NULL)
     {
-        /* Find h-m separator */
-        iter = buffer;
-        while (*iter && g_ascii_isdigit (*iter)) iter++;
-
-        /* Extract h-m separator*/
-        endp = iter;
-        while (*endp && ! g_ascii_isdigit (*endp)) endp++;
         separator = g_strndup (iter, endp - iter);
         gtk_label_set_label (hm_sep_label, separator);
         g_free (separator);
@@ -1199,13 +1206,8 @@ hildon_time_editor_get_time                     (HildonTimeEditor *editor,
                                                  guint *minutes, 
                                                  guint *seconds)
 {
-    HildonTimeEditorPrivate *priv;
-
     g_return_if_fail (HILDON_IS_TIME_EDITOR (editor));
 
-    priv = HILDON_TIME_EDITOR_GET_PRIVATE (editor);
-    g_assert (priv);
-
     ticks_to_time (hildon_time_editor_get_ticks (editor), hours, minutes, seconds);
 }