summaryrefslogtreecommitdiff
path: root/test/endless
diff options
context:
space:
mode:
authorMatt Watson <mattdangerw@gmail.com>2014-05-07 16:35:26 -0700
committerMatt Watson <mattdangerw@gmail.com>2014-05-12 00:21:28 -0700
commitf8985bd6313c7bba1c29a2ce3b40a021d2db0b84 (patch)
tree183e053e39a3c7989b3b4ae2b15735c704129eb9 /test/endless
parentf03c35bc78c8c743196588160f07bba516fb6149 (diff)
Remove the main area widget
This has been totally unused in all our applications and has been having sizing problem with height for width and width for height request. We had grand plans for this, but since its unclear if there's a future in which this widget is used think it makes sense to remove [endlessm/eos-sdk#985]
Diffstat (limited to 'test/endless')
-rw-r--r--test/endless/test-page-manager.c115
-rw-r--r--test/endless/test-window.c73
2 files changed, 0 insertions, 188 deletions
diff --git a/test/endless/test-page-manager.c b/test/endless/test-page-manager.c
index a39fb3f..3eadd67 100644
--- a/test/endless/test-page-manager.c
+++ b/test/endless/test-page-manager.c
@@ -38,7 +38,6 @@ typedef struct
GtkWidget *page1;
GtkWidget *page2;
GtkWidget *page3;
- GtkWidget *toolbox2;
} PageManagerFixture;
static void
@@ -49,7 +48,6 @@ pm_fixture_setup (PageManagerFixture *fixture,
fixture->page1 = gtk_label_new ("1");
fixture->page2 = gtk_label_new ("2");
fixture->page3 = gtk_label_new ("3");
- fixture->toolbox2 = gtk_label_new ("toolbox2");
gtk_container_add_with_properties (GTK_CONTAINER (fixture->pm),
fixture->page1,
"name", PAGE1_NAME,
@@ -60,7 +58,6 @@ pm_fixture_setup (PageManagerFixture *fixture,
gtk_container_add_with_properties (GTK_CONTAINER (fixture->pm),
fixture->page2,
"name", PAGE2_NAME,
- "custom-toolbox-widget", fixture->toolbox2,
"background-uri", PAGE2_PROP_STRING,
"background-size", PAGE2_PROP_STRING,
"background-position", PAGE2_PROP_STRING,
@@ -68,7 +65,6 @@ pm_fixture_setup (PageManagerFixture *fixture,
gtk_container_add_with_properties (GTK_CONTAINER (fixture->pm),
fixture->page3,
"name", PAGE3_NAME,
- "page-actions", TRUE,
"background-uri", PAGE3_PROP_STRING,
"background-size", PAGE3_PROP_STRING,
"background-position", PAGE3_PROP_STRING,
@@ -195,47 +191,6 @@ test_pm_child_prop_name (PageManagerFixture *fixture,
}
static void
-test_pm_get_set_page_actions (PageManagerFixture *fixture,
- gconstpointer unused)
-{
- gboolean actions;
- actions = eos_page_manager_get_page_actions (EOS_PAGE_MANAGER (fixture->pm),
- fixture->page1);
- g_assert (actions == FALSE);
- actions = eos_page_manager_get_page_actions (EOS_PAGE_MANAGER (fixture->pm),
- fixture->page3);
- g_assert (actions == TRUE);
- eos_page_manager_set_page_actions (EOS_PAGE_MANAGER (fixture->pm),
- fixture->page3,
- FALSE);
- actions = eos_page_manager_get_page_actions (EOS_PAGE_MANAGER (fixture->pm),
- fixture->page3);
- g_assert (actions == FALSE);
-}
-
-static void
-test_pm_child_prop_page_actions (PageManagerFixture *fixture,
- gconstpointer unused)
-{
- gboolean actions;
- gtk_container_child_get (GTK_CONTAINER (fixture->pm), fixture->page1,
- "page-actions", &actions,
- NULL);
- g_assert (actions == FALSE);
- gtk_container_child_get (GTK_CONTAINER (fixture->pm), fixture->page3,
- "page-actions", &actions,
- NULL);
- g_assert (actions == TRUE);
- gtk_container_child_set (GTK_CONTAINER (fixture->pm), fixture->page3,
- "page-actions", FALSE,
- NULL);
- gtk_container_child_get (GTK_CONTAINER (fixture->pm), fixture->page3,
- "page-actions", &actions,
- NULL);
- g_assert (actions == FALSE);
-}
-
-static void
test_pm_get_set_background_repeats (PageManagerFixture *fixture,
gconstpointer unused)
{
@@ -277,68 +232,6 @@ test_pm_child_prop_background_repeats (PageManagerFixture *fixture,
}
static void
-test_pm_get_set_page_custom_toolbox (PageManagerFixture *fixture,
- gconstpointer unused)
-{
- GtkWidget *new_tb = gtk_label_new ("Another toolbox");
- GtkWidget *tb;
-
- tb = eos_page_manager_get_page_custom_toolbox_widget (EOS_PAGE_MANAGER (fixture->pm),
- fixture->page1);
- g_assert (tb == NULL);
- tb = eos_page_manager_get_page_custom_toolbox_widget (EOS_PAGE_MANAGER (fixture->pm),
- fixture->page2);
- g_assert (tb == fixture->toolbox2);
-
- eos_page_manager_set_page_custom_toolbox_widget (EOS_PAGE_MANAGER (fixture->pm),
- fixture->page1,
- new_tb);
- eos_page_manager_set_page_custom_toolbox_widget (EOS_PAGE_MANAGER (fixture->pm),
- fixture->page2,
- new_tb);
-
- tb = eos_page_manager_get_page_custom_toolbox_widget (EOS_PAGE_MANAGER (fixture->pm),
- fixture->page1);
- g_assert (tb == new_tb);
- tb = eos_page_manager_get_page_custom_toolbox_widget (EOS_PAGE_MANAGER (fixture->pm),
- fixture->page2);
- g_assert (tb == new_tb);
-}
-
-static void
-test_pm_child_prop_custom_toolbox (PageManagerFixture *fixture,
- gconstpointer unused)
-{
- GtkWidget *new_tb = gtk_label_new ("Another toolbox");
- GtkWidget *tb;
-
- gtk_container_child_get (GTK_CONTAINER (fixture->pm), fixture->page1,
- "custom-toolbox-widget", &tb,
- NULL);
- g_assert (tb == NULL);
- gtk_container_child_get (GTK_CONTAINER (fixture->pm), fixture->page2,
- "custom-toolbox-widget", &tb,
- NULL);
- g_assert (tb == fixture->toolbox2);
-
- gtk_container_child_set (GTK_CONTAINER (fixture->pm), fixture->page1,
- "custom-toolbox-widget", new_tb,
- NULL);
- gtk_container_child_set (GTK_CONTAINER (fixture->pm), fixture->page2,
- "custom-toolbox-widget", new_tb,
- NULL);
-
- gtk_container_child_get (GTK_CONTAINER (fixture->pm), fixture->page1,
- "custom-toolbox-widget", &tb,
- NULL);
- g_assert (tb == new_tb);
- gtk_container_child_get (GTK_CONTAINER (fixture->pm), fixture->page2,
- "custom-toolbox-widget", &tb,
- NULL);
- g_assert (tb == new_tb);
-}
-
-static void
test_pm_child_prop_string (PageManagerFixture *fixture,
gconstpointer data)
{
@@ -702,14 +595,6 @@ add_page_manager_tests (void)
test_pm_get_set_page_name);
ADD_PAGE_MANAGER_TEST ("/page-manager/child-prop-name",
test_pm_child_prop_name);
- ADD_PAGE_MANAGER_TEST ("/page-manager/get-set-page-actions",
- test_pm_get_set_page_actions);
- ADD_PAGE_MANAGER_TEST ("/page-manager/child-prop-page-actions",
- test_pm_child_prop_page_actions);
- ADD_PAGE_MANAGER_TEST ("/page-manager/get-set-page-custom-toolbox",
- test_pm_get_set_page_custom_toolbox);
- ADD_PAGE_MANAGER_TEST ("/page-manager/child-prop-custom-toolbox",
- test_pm_child_prop_custom_toolbox);
ADD_PAGE_MANAGER_TEST ("/page-manager/page-no-name", test_pm_page_no_name);
ADD_PAGE_MANAGER_TEST ("/page-manager/set-page-no-name",
test_pm_set_page_no_name);
diff --git a/test/endless/test-window.c b/test/endless/test-window.c
index 3e648d3..a6fc28a 100644
--- a/test/endless/test-window.c
+++ b/test/endless/test-window.c
@@ -4,7 +4,6 @@
#include <gtk/gtk.h>
#include <endless/endless.h>
#include "endless/eostopbar-private.h"
-#include "endless/eosmainarea-private.h"
#include "run-tests.h"
@@ -53,17 +52,6 @@ test_has_top_bar (GApplication *app)
}
static void
-test_has_main_area (GApplication *app)
-{
- GtkWidget *win = eos_window_new (EOS_APPLICATION (app));
- GtkWidget *main_area = container_find_descendant_with_type (GTK_CONTAINER (win), EOS_TYPE_MAIN_AREA);
- g_assert (main_area != NULL);
- g_assert (EOS_IS_MAIN_AREA (main_area));
-
- gtk_widget_destroy (win);
-}
-
-static void
test_has_default_page_manager (GApplication *app)
{
GtkWidget *win = eos_window_new (EOS_APPLICATION (app));
@@ -169,64 +157,6 @@ test_prop_page_manager (GApplication *app)
}
static void
-test_main_area_widgets_visibility (GApplication *app)
-{
- GtkWidget *win = eos_window_new (EOS_APPLICATION (app));
- EosPageManager *pm = eos_window_get_page_manager (EOS_WINDOW (win));
- GtkWidget *main_area = container_find_descendant_with_type (GTK_CONTAINER (win), EOS_TYPE_MAIN_AREA);
-
- GtkWidget *page0 = gtk_label_new ("no-no");
- GtkWidget *page1 = gtk_label_new ("yes-no");
- GtkWidget *page2 = gtk_label_new ("no-yes");
- GtkWidget *page3 = gtk_label_new ("yes-yes");
-
- GtkWidget *toolbox1 = gtk_label_new ("toolbox1");
- GtkWidget *toolbox3 = gtk_label_new ("toolbox3");
-
- gtk_container_add (GTK_CONTAINER (pm), page0);
- gtk_container_add_with_properties (GTK_CONTAINER (pm), page1,
- "custom-toolbox-widget", toolbox1,
- NULL);
- gtk_container_add_with_properties (GTK_CONTAINER (pm), page2,
- "page-actions", TRUE,
- NULL);
- gtk_container_add_with_properties (GTK_CONTAINER (pm), page3,
- "custom-toolbox-widget", toolbox3,
- "page-actions", TRUE,
- NULL);
-
- GtkWidget *tb;
- gboolean actions;
- EosMainArea *ma = EOS_MAIN_AREA (main_area);
-
- eos_page_manager_set_visible_page (pm, page0);
- tb = eos_main_area_get_toolbox (ma);
- actions = eos_main_area_get_actions (ma);
- g_assert (tb == NULL);
- g_assert (actions == FALSE);
-
- eos_page_manager_set_visible_page (pm, page1);
- tb = eos_main_area_get_toolbox (ma);
- actions = eos_main_area_get_actions (ma);
- g_assert (tb == toolbox1);
- g_assert (actions == FALSE);
-
- eos_page_manager_set_visible_page (pm, page2);
- tb = eos_main_area_get_toolbox (ma);
- actions = eos_main_area_get_actions (ma);
- g_assert (tb == NULL);
- g_assert (actions == TRUE);
-
- eos_page_manager_set_visible_page (pm, page3);
- tb = eos_main_area_get_toolbox (ma);
- actions = eos_main_area_get_actions (ma);
- g_assert (tb == toolbox3);
- g_assert (actions == TRUE);
-
- gtk_widget_destroy (win);
-}
-
-static void
test_internal_widget_visibility (GApplication *app) {
GtkWidget *win = eos_window_new (EOS_APPLICATION (app));
EosPageManager *pm = eos_window_get_page_manager (EOS_WINDOW (win));
@@ -252,7 +182,6 @@ add_window_tests (void)
ADD_APP_WINDOW_TEST ("/window/application-not-null",
test_application_not_null);
ADD_APP_WINDOW_TEST ("/window/has-top-bar", test_has_top_bar);
- ADD_APP_WINDOW_TEST ("/window/has-main-area", test_has_main_area);
ADD_APP_WINDOW_TEST ("/window/has-default-page-manager",
test_has_default_page_manager);
ADD_APP_WINDOW_TEST ("/window/get-set-page-manager",
@@ -266,8 +195,6 @@ add_window_tests (void)
ADD_APP_WINDOW_TEST ("/window/get-set-font-scaling-min-font-size",
test_get_set_font_scaling_min_font_size);
ADD_APP_WINDOW_TEST ("/window/prop-page-manager", test_prop_page_manager);
- ADD_APP_WINDOW_TEST ("/window/main-area-widgets-visibility",
- test_main_area_widgets_visibility);
ADD_APP_WINDOW_TEST ("/window/internal-widget-visibility",
test_internal_widget_visibility);
}