From 5eb64b8c52e76ed4a313e7a27b3badce109c7c00 Mon Sep 17 00:00:00 2001 From: Will G Date: Thu, 23 May 2013 22:20:41 -0400 Subject: Style changes, added additional assertions to test the setting of a page's background [endlessm/eos-sdk#59] --- endless/eospagemanager.c | 4 ++-- test/test-page-manager.c | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/endless/eospagemanager.c b/endless/eospagemanager.c index f08aa60..b8d7c1e 100644 --- a/endless/eospagemanager.c +++ b/endless/eospagemanager.c @@ -1004,7 +1004,7 @@ eos_page_manager_set_page_custom_toolbox_widget (EosPageManager *self, * * Gets the URI for the background image of @page, which must previously have * been added to the page manager. - * See #EosPageManager:background_uri for more information. + * See #EosPageManager:background for more information. * * Returns: the background of @page, or the %NULL if @page does not have a * background. @@ -1031,7 +1031,7 @@ eos_page_manager_get_page_background (EosPageManager *self, * Changes the background of @page, which must previously have been added to the * page manager. * Setting %NULL removes the background, using the window's default background. - * See #EosPageManager:background_uri for more information. + * See #EosPageManager:background for more information. */ void eos_page_manager_set_page_background (EosPageManager *self, diff --git a/test/test-page-manager.c b/test/test-page-manager.c index 4575259..2bc8dcb 100644 --- a/test/test-page-manager.c +++ b/test/test-page-manager.c @@ -365,13 +365,21 @@ test_pm_page_change_background (PageManagerFixture *fixture, gconstpointer unused) { const gchar *background_get; + const gchar *background_name_1 = "first background name"; + const gchar *background_name_2 = "second background name"; GtkWidget *new_page = gtk_label_new("new"); gtk_container_add (GTK_CONTAINER (fixture->pm), new_page); - eos_page_manager_set_page_background(GTK_CONTAINER (fixture->pm), + eos_page_manager_set_page_background (GTK_CONTAINER (fixture->pm), new_page, - EXPECTED_PAGE_BACKGROUND); + background_name_1); background_get = eos_page_manager_get_page_background (EOS_PAGE_MANAGER (fixture->pm), new_page); - g_assert_cmpstr (background_get, ==, EXPECTED_PAGE_BACKGROUND); + g_assert_cmpstr (background_get, ==, background_name_1); + + eos_page_manager_set_page_background (GTK_CONTAINER (fixture->pm), + new_page, + background_name_2); + background_get = eos_page_manager_get_page_background (EOS_PAGE_MANAGER (fixture->pm), new_page); + g_assert_cmpstr (background_get, ==, background_name_2); } static void -- cgit v1.2.3