[libchamplain/wrap: 4/14] launcher-gtk: Add horizontal wrap toggle button
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain/wrap: 4/14] launcher-gtk: Add horizontal wrap toggle button
- Date: Sun, 13 Apr 2014 16:03:35 +0000 (UTC)
commit 1995f16ea28258b76c21eee88766102bb0d3f3f6
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Fri Apr 11 13:15:45 2014 +0200
launcher-gtk: Add horizontal wrap toggle button
https://bugzilla.gnome.org/show_bug.cgi?id=577597
demos/launcher-gtk.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/demos/launcher-gtk.c b/demos/launcher-gtk.c
index 80fbdcd..5d30f60 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;
@@ -356,6 +367,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]