summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill G <will@endlessm.com>2013-05-23 22:20:41 -0400
committerWill G <will@endlessm.com>2013-05-23 22:20:41 -0400
commit5eb64b8c52e76ed4a313e7a27b3badce109c7c00 (patch)
treebc5a181fc832ef514a6c1ec9dd378e4364c5cc45
parente896e1ef53b0ae7f9fb9cc6bdb6c5f72042c638a (diff)
Style changes, added additional assertions to test the setting of a page's background
[endlessm/eos-sdk#59]
-rw-r--r--endless/eospagemanager.c4
-rw-r--r--test/test-page-manager.c14
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