[libchamplain] Make ChamplainViewEmbed create ChamplainView for the user
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [libchamplain] Make ChamplainViewEmbed create ChamplainView for the user
- Date: Fri, 12 Jun 2009 01:00:23 -0400 (EDT)
commit b788d50d8c433efdf62add4137003de3d16e7385
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date: Thu May 21 18:32:48 2009 -0400
Make ChamplainViewEmbed create ChamplainView for the user
champlain-gtk/champlain-view-embed.c | 5 +++--
demos/launcher-gtk.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/champlain-gtk/champlain-view-embed.c b/champlain-gtk/champlain-view-embed.c
index e729570..3e20918 100644
--- a/champlain-gtk/champlain-view-embed.c
+++ b/champlain-gtk/champlain-view-embed.c
@@ -158,8 +158,8 @@ champlain_view_embed_init (ChamplainViewEmbed *embed)
ClutterActor *stage;
ChamplainViewEmbedPrivate *priv = CHAMPLAIN_VIEW_EMBED_GET_PRIVATE (embed);
+ embed->priv = priv;
- priv->view = NULL;
priv->clutter_embed = gtk_clutter_embed_new ();
g_signal_connect (priv->clutter_embed,
@@ -182,12 +182,13 @@ champlain_view_embed_init (ChamplainViewEmbed *embed)
priv->cursor_hand_open = gdk_cursor_new(GDK_HAND1);
priv->cursor_hand_closed = gdk_cursor_new(GDK_FLEUR);
+ priv->view = NULL;
+ champlain_view_embed_set_view (embed, champlain_view_new ());
// Setup stage
stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (priv->clutter_embed));
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
gtk_container_add (GTK_CONTAINER (embed), priv->clutter_embed);
- embed->priv = priv;
}
static void
diff --git a/demos/launcher-gtk.c b/demos/launcher-gtk.c
index d34d848..545f96b 100644
--- a/demos/launcher-gtk.c
+++ b/demos/launcher-gtk.c
@@ -208,8 +208,8 @@ main (int argc,
vbox = gtk_vbox_new(FALSE, 10);
widget = champlain_view_embed_new ();
-
view = champlain_view_embed_get_view (CHAMPLAIN_VIEW_EMBED (widget));
+
g_object_set (G_OBJECT (view), "scroll-mode", CHAMPLAIN_SCROLL_MODE_KINETIC,
"zoom-level", 5, NULL);
layer = create_marker_layer (CHAMPLAIN_VIEW (view));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]