2007-01-18 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+ * debian/changelog: Adding missing.
+
+ * src/hildon-banner.c: Modyfying to allow creation with null window.
+
+ * tests/check-hildon-calendar-popup.c:
+ * tests/check-hildon-color-button.c:
+ * tests/check-hildon-note.c: Fixing the unit tests.
+
+2007-01-18 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+
* ChangeLog-hildon-lgpl: Moving to ChangeLog.1.
* ChangeLog.2: Creating from the ChangeLog. Will hold all changelogs
--- /dev/null
+hildon (0.9.9-1) unstable; urgency=low
+
+ * Unreleased.
+
+ -- Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com> Wed, 01 Jan 2007 12:00:00 +0300
+
{
HildonBanner *banner;
- g_return_if_fail (GTK_IS_WIDGET(widget));
g_return_if_fail (icon_name == NULL || icon_name[0] != 0);
g_return_if_fail (text != NULL);
{
HildonBanner *banner;
- g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (icon_name == NULL || icon_name[0] != 0);
g_return_if_fail (markup != NULL);
GtkWidget *image_widget;
const gchar *filename;
- g_return_val_if_fail (GTK_IS_WIDGET(widget), NULL);
g_return_val_if_fail (animation_name == NULL || animation_name[0] != 0, NULL);
g_return_val_if_fail (text != NULL, NULL);
HildonBanner *banner;
HildonBannerPrivate *priv;
- g_return_val_if_fail (GTK_IS_WIDGET(widget), NULL);
g_return_val_if_fail (bar == NULL || GTK_IS_PROGRESS_BAR (bar), NULL);
g_return_val_if_fail (text != NULL, NULL);
g_value_init(&value, G_TYPE_UINT);
- /* Test 1: Test above maximum year limit */
- max_year = 2050;
- g_value_set_uint (&value, max_year);
- g_object_set_property (G_OBJECT (calendar), "max-year", &value);
- year = max_year + 1;
- month = 3;
- day = 30;
- hildon_calendar_popup_set_date(calendar, year, month, day);
- hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
- fail_if(max_year != ret_year,
- "hildon-calendar-popup: Set date to %u/%u/%u, with maximum year set to %u, but get date returned year = %u != %u",
- year, month, day, max_year, ret_year, max_year);
-
- /* Test 2: Test under minimum year limit */
+ /* Test 1: Test under minimum year limit */
min_year = 2000;
g_value_set_uint (&value, min_year);
g_object_set_property (G_OBJECT (calendar), "min-year", &value);
"hildon-calendar-popup: Set date to %u/%u/%u, with minimum year set to %u, but get date returned year = %u != %u",
year, month, day, min_year, ret_year, min_year);
- /* Test 3: Test above maximum month limit */
+ /* Test 2: Test above maximum month limit */
valid_year = 2006;
valid_month = 10;
valid_day = 5;
valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
- /* Test 4: Test under minimum month limit */
+ /* Test 3: Test under minimum month limit */
valid_year = 2006;
valid_month = 2;
valid_day = 15;
valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
- /* Test 5: Test above maximum day limit */
+ /* Test 4: Test above maximum day limit */
/* 31 */
valid_year = 2005;
"hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
- /* Test6: Test day minimum limit */
+ /* Test5: Test day minimum limit */
valid_year = 2005;
valid_month = 2;
valid_day = 15;
"hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
- /* Test7: Test above maximum allowed date */
+ /* Test6: Test above maximum allowed date */
max_year = 2050;
g_value_set_uint (&value, max_year);
g_object_set_property (G_OBJECT (calendar), "max-year", &value);
"hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, with maximum year set to %u, but get date returned %u/%u/%u instead of %u/%u/%u",
valid_year, valid_month, valid_day, year, month, day, max_year, ret_year, ret_month, ret_day, max_year, month, day);
- /* Test8: Test minimum allowed date */
+ /* Test7: Test minimum allowed date */
min_year = 2000;
g_value_set_uint (&value, min_year);
g_object_set_property (G_OBJECT (calendar), "min-year", &value);
"hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, with minimum year set to %u, but get date returned %u/%u/%u instead of %u/%u/%u",
valid_year, valid_month, valid_day, year, month, day, min_year, ret_year, ret_month, ret_day, min_year, month, day);
- /* Test9: Set and get date with NULL calendar objects */
+ /* Test8: Set and get date with NULL calendar objects */
hildon_calendar_popup_set_date(NULL, 2006, 10, 15);
hildon_calendar_popup_get_date(NULL, &year, &month, &day);
}
gdk_color_free(b_color);
/* Test 4: Get color from GtkHBox object. */
+ ret_color->red = 99;
+ ret_color->green = 99;
+ ret_color->blue = 99;
hildon_color_button_get_color((HildonColorButton *) (aux_object), ret_color);
- if (ret_color != NULL)
+ if (ret_color->red != 99 ||
+ ret_color->green != 99 ||
+ ret_color->blue != 99)
{
gtk_widget_destroy(aux_object);
- fail ("hildon-color-button: get_color must not return any object");
+ fail ("hildon-color-button: get_color must not modify the color when launched on invalid widget");
}
gtk_widget_destroy(aux_object);
/* Test 2: create new confirmation note with description set to "NULL" */
invalid_note = HILDON_NOTE(hildon_note_new_confirmation(n_window,NULL));
- fail_if(!HILDON_IS_NOTE(invalid_note),
- "hildon-note: Creation failed with hildon_note_new_confirmation");
-
- g_object_get_property(G_OBJECT (invalid_note),"description",&value);
- ret_description = g_value_get_string (&value);
- fail_if( ret_description != NULL,
- "hildon-note: Empty description was not set properly on creation. Returned description: %s",
- ret_description);
-
- g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
- note_type = g_value_get_int(&enum_value);
- fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
- "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
-
- gtk_widget_destroy (GTK_WIDGET (invalid_note));
- note=NULL;
+ fail_if(HILDON_IS_NOTE(invalid_note),
+ "hildon-note: Creation succeeded with hildon_note_new_confirmation with NULL description");
g_value_unset(&value);
g_value_unset(&enum_value);
/* Test 2: create new information note with description set to "NULL" */
invalid_note = HILDON_NOTE(hildon_note_new_information(n_window,NULL));
- fail_if(!HILDON_IS_NOTE(invalid_note),
- "hildon-note: Creation failed with hildon_note_new_information");
-
- g_object_get_property(G_OBJECT (invalid_note),"description",&value);
- ret_description = g_value_get_string (&value);
- fail_if( ret_description != NULL,
- "hildon-note: Empty description was not set properly on creation. Returned description: %s",
- ret_description);
-
- g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
- note_type = g_value_get_int(&enum_value);
- fail_if( note_type != HILDON_NOTE_INFORMATION_THEME_TYPE,
- "hildon-note: Type was not set property on creation (HILDON_NOTE_INFORMATION_THEME_TYPE)",note_type);
-
- gtk_widget_destroy (GTK_WIDGET (invalid_note));
- note=NULL;
+ fail_if(HILDON_IS_NOTE(invalid_note),
+ "hildon-note: Creation succeeded with hildon_note_new_information where msg == NULL");
g_value_unset(&value);
g_value_unset(&enum_value);
/* Test 2: create new confirmation note with description set to "NULL" */
invalid_note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,NULL,"qgn_list_cp_calibration"));
- fail_if(!HILDON_IS_NOTE(invalid_note),
- "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
-
- g_object_get_property(G_OBJECT (invalid_note),"description",&value);
- ret_description = g_value_get_string (&value);
- fail_if( ret_description!=NULL,
- "hildon-note: Description \"\" was not set properly on creation. Returned description: %s",
- ret_description);
-
- g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
- note_type = g_value_get_int(&enum_value);
- fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
- "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
-
- g_object_get_property(G_OBJECT (invalid_note),"icon",&icon_name_value);
- ret_icon_name = g_value_get_string (&icon_name_value);
- fail_if( strcmp ("qgn_list_cp_calibration",ret_icon_name) != 0,
- "hildon-note: Icon name qgn_list_cp_calibration was not set properly on creation. Returned icon name: %s",
- ret_icon_name);
-
- gtk_widget_destroy (GTK_WIDGET (invalid_note));
- note=NULL;
+ fail_if(HILDON_IS_NOTE(invalid_note),
+ "hildon-note: Creation succeeded with hildon_note_new_confirmation_with_icon_name with message == NULL");
g_value_unset(&icon_name_value);
g_value_unset(&value);
/* Test 1: create new confirmation note with description set to NULL */
description = NULL;
note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,NULL));
- fail_if(!HILDON_IS_NOTE(note),
- "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
-
- g_object_get_property(G_OBJECT (note),"description",&value);
- ret_description = g_value_get_string (&value);
- fail_if( ret_description != NULL,
- "hildon-note: NULL description was not set properly on creation",
- description,ret_description);
-
- g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
- note_type = g_value_get_int(&enum_value);
- fail_if( note_type != HILDON_NOTE_PROGRESSBAR_TYPE,
- "hildon-note: Type was not set property on creation (HILDON_NOTE_PROGRESSBAR_TYPE)",note_type);
-
- gtk_widget_destroy (GTK_WIDGET (note));
- note=NULL;
-
+ fail_if(HILDON_IS_NOTE(note),
+ "hildon-note: Creation succeeded with hildon_note_new_cancel_with_progress_bar where msg == NULL");
/* Test 2: create new confirmation note with window set to NULL */
description = "";