]> git.0d.be Git - empathy.git/commitdiff
Use libchamplain 0.3.3 new Gtk embed API
authorPierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>
Fri, 12 Jun 2009 05:19:26 +0000 (01:19 -0400)
committerXavier Claessens <xclaesse@gmail.com>
Mon, 15 Jun 2009 13:28:36 +0000 (15:28 +0200)
configure.ac
libempathy-gtk/empathy-contact-widget.c
src/empathy-map-view.c

index c921c40cd643feb2f25918291905d55efdbda745..c881e75472c971a14f14cc05292774fc0d4af6cb 100644 (file)
@@ -35,8 +35,8 @@ ENCHANT_REQUIRED=1.2.0
 ISO_CODES_REQUIRED=0.35
 LIBNOTIFY_REQUIRED=0.4.4
 LIBCANBERRA_GTK_REQUIRED=0.4
-LIBCHAMPLAIN_REQUIRED=0.3.0
-LIBCHAMPLAIN_GTK_REQUIRED=0.3.0
+LIBCHAMPLAIN_REQUIRED=0.3.3
+LIBCHAMPLAIN_GTK_REQUIRED=0.3.3
 CLUTTER_GTK_REQUIRED=0.8.2
 GEOCLUE_REQUIRED=0.11
 WEBKIT_REQUIRED=1.1.7
index 6c10153649cb31e1e2547471243388c6dc24207b..12a1393034f3baac6ca219d4be3275d9f0127f41 100644 (file)
@@ -105,7 +105,7 @@ typedef struct
 #if HAVE_LIBCHAMPLAIN
   GtkWidget *viewport_map;
   GtkWidget *map_view_embed;
-  ClutterActor *map_view;
+  ChamplainView *map_view;
 #endif
 
   /* Groups */
@@ -1420,9 +1420,9 @@ contact_widget_location_update (EmpathyContactWidget *information)
       ClutterActor *marker;
       ChamplainLayer *layer;
 
-      information->map_view = champlain_view_new ();
-      information->map_view_embed = champlain_view_embed_new (
-          CHAMPLAIN_VIEW (information->map_view));
+      information->map_view_embed = gtk_champlain_embed_new ();
+      information->map_view = gtk_champlain_embed_get_view (
+          GTK_CHAMPLAIN_EMBED (information->map_view_embed));
 
       gtk_container_add (GTK_CONTAINER (information->viewport_map),
           information->map_view_embed);
@@ -1431,14 +1431,14 @@ contact_widget_location_update (EmpathyContactWidget *information)
           NULL);
 
       layer = champlain_layer_new ();
-      champlain_view_add_layer (CHAMPLAIN_VIEW (information->map_view), layer);
+      champlain_view_add_layer (information->map_view, layer);
 
       marker = champlain_marker_new_with_text (
           empathy_contact_get_name (information->contact), NULL, NULL, NULL);
       champlain_base_marker_set_position (CHAMPLAIN_BASE_MARKER (marker), lat, lon);
       clutter_container_add (CLUTTER_CONTAINER (layer), marker, NULL);
 
-      champlain_view_center_on (CHAMPLAIN_VIEW(information->map_view), lat, lon);
+      champlain_view_center_on (information->map_view, lat, lon);
       gtk_widget_show_all (information->viewport_map);
     }
 #endif
index 05f5291d23d45fa15ed163360cb295a955fc8e12..3a2210fa2dfdcce70a4114ed0989e8b1e8d44620 100644 (file)
@@ -142,14 +142,13 @@ empathy_map_view_show (void)
   window->list_store = list_store;
 
   /* Set up map view */
-  window->map_view = CHAMPLAIN_VIEW (champlain_view_new ());
+  embed = gtk_champlain_embed_new ();
+  window->map_view = gtk_champlain_embed_get_view (GTK_CHAMPLAIN_EMBED (embed));
   g_object_set (G_OBJECT (window->map_view), "zoom-level", 1,
      "scroll-mode", CHAMPLAIN_SCROLL_MODE_KINETIC, NULL);
   champlain_view_center_on (window->map_view, 36, 0);
 
-  embed = champlain_view_embed_new (window->map_view);
-  gtk_container_add (GTK_CONTAINER (sw),
-     GTK_WIDGET (embed));
+  gtk_container_add (GTK_CONTAINER (sw), embed);
   gtk_widget_show_all (embed);
 
   window->layer = g_object_ref (champlain_layer_new ());