summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorMarius Stanciu <stanciumarius94@gmail.com>2016-07-27 15:27:21 +0300
committerMarius Stanciu <stanciumarius94@gmail.com>2016-07-27 15:27:21 +0300
commitacaf0c146ed9705d6f8bf8cbe215950ed9b23684 (patch)
treec1e47b068715d5e40fcda3717f00cb2a85444ad7 /demos
parent7cc3ec9d532cfc0d1c187a4c050c1f358cd638fd (diff)
parente731df3a3a53e7018deef89870fde0da2aacaf10 (diff)
downloadlibchamplain-acaf0c146ed9705d6f8bf8cbe215950ed9b23684.tar.gz
Merge commit 'origin/wrap~10'
Diffstat (limited to 'demos')
-rw-r--r--demos/launcher-gtk.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/demos/launcher-gtk.c b/demos/launcher-gtk.c
index dba8dee..950b01f 100644
--- a/demos/launcher-gtk.c
+++ b/demos/launcher-gtk.c
@@ -160,6 +160,17 @@ zoom_out (GtkWidget *widget,
static void
+toggle_wrap (GtkWidget *widget,
+ ChamplainView *view)
+{
+ gboolean wrap;
+
+ wrap = champlain_view_get_horizontal_wrap (view);
+ champlain_view_set_horizontal_wrap (view, !wrap);
+}
+
+
+static void
build_combo_box (GtkComboBox *box)
{
ChamplainMapSourceFactory *factory;
@@ -412,6 +423,12 @@ main (int argc,
g_signal_connect (button, "toggled", G_CALLBACK (toggle_layer), layer);
gtk_container_add (GTK_CONTAINER (bbox), button);
+ button = gtk_toggle_button_new_with_label ("Toggle wrap");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
+ champlain_view_get_horizontal_wrap (view));
+ g_signal_connect (button, "toggled", G_CALLBACK (toggle_wrap), view);
+ gtk_container_add (GTK_CONTAINER (bbox), button);
+
button = gtk_combo_box_new ();
build_combo_box (GTK_COMBO_BOX (button));
gtk_combo_box_set_active (GTK_COMBO_BOX (button), 0);