summaryrefslogtreecommitdiff
path: root/test/endless/test-window.c
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/test-window.c
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/test-window.c')
-rw-r--r--test/endless/test-window.c73
1 files changed, 0 insertions, 73 deletions
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);
}