summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2013-09-19 18:36:25 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2013-09-19 18:36:25 +0100
commit7a36cfb0e33f96545b39946216fd1a8c17921fd7 (patch)
tree8d3b13f4d23d4ede72d4ff535c1c0d4a35360053
parent2c8f2c033972da05773007ce13f6100bbd05b7fb (diff)
Set the scrolled window scroll policy in tests/flexy-grid
This allows testing the FlexyGrid widget in a scrollable widget. [endlessm/eos-sdk#1015]
-rw-r--r--test/flexy-grid.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/flexy-grid.c b/test/flexy-grid.c
index f52f96e..c16aa8a 100644
--- a/test/flexy-grid.c
+++ b/test/flexy-grid.c
@@ -64,18 +64,21 @@ main (int argc, char *argv[])
gtk_init (NULL, NULL);
GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
gtk_widget_show (window);
GtkWidget *scroll = gtk_scrolled_window_new (NULL, NULL);
gtk_container_add (GTK_CONTAINER (window), scroll);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
+ GTK_POLICY_NEVER,
+ GTK_POLICY_AUTOMATIC);
gtk_widget_show (scroll);
GtkWidget *grid = eos_flexy_grid_new ();
g_signal_connect (grid, "cell-selected", G_CALLBACK (on_cell_selected), NULL);
g_signal_connect (grid, "cell-activated", G_CALLBACK (on_cell_activated), NULL);
gtk_container_add (GTK_CONTAINER (scroll), grid);
- gtk_widget_set_size_request (grid, 800, -1);
gtk_widget_show (grid);
for (guint i; i < 8; i++)