Fix build errors in ui/gtk3 with vala-0.15.1 and gtk3-3.3.14
authorfujiwarat <takao.fujiwara1@gmail.com>
Thu, 1 Mar 2012 03:09:07 +0000 (12:09 +0900)
committerfujiwarat <takao.fujiwara1@gmail.com>
Thu, 1 Mar 2012 03:09:07 +0000 (12:09 +0900)
TEST=Linux desktop

Review URL: https://codereview.appspot.com/5704053

ui/gtk3/candidatepanel.vala
ui/gtk3/handle.vala

index d02c06d..614ccea 100644 (file)
@@ -80,7 +80,8 @@ public class CandidatePanel : Gtk.HBox{
     }
 
     public void set_cursor_location(int x, int y, int width, int height) {
-        Gdk.Rectangle location = { x, y, width, height };
+        Gdk.Rectangle location = Gdk.Rectangle(){
+            x = x, y = y, width = width, height = height };
         if (m_cursor_location == location)
             return;
         m_cursor_location = location;
index 6738415..9492cb0 100644 (file)
@@ -50,7 +50,8 @@ class Handle : Gtk.EventBox {
     public override bool button_press_event(Gdk.EventButton event) {
         if (event.button != 1)
             return false;
-        m_workarea = {0, 0, int.MAX, int.MAX};
+        m_workarea = Gdk.Rectangle(){
+            x = 0, y = 0, width = int.MAX, height = int.MAX};
         do {
             Gdk.Window root = Gdk.get_default_root_window();
             Gdk.Atom property = Gdk.Atom.intern("_NET_CURRENT_DESKTOP", false);
@@ -153,7 +154,7 @@ class Handle : Gtk.EventBox {
             Gtk.StyleContext context = get_style_context();
             Gtk.Allocation allocation;
             get_allocation(out allocation);
-            Gtk.render_handle(context, cr,
+            context.render_handle(cr,
                 allocation.x, allocation.y + (allocation.height - 40) / 2, allocation.width, 40.0);
         }
         return false;