[gnome-boxes] searchbar, display-toolbar: Remove redundant vapi workarounds



commit 2bc02b334bb74d4be06d9ccbab7eb3770f885d43
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Feb 20 22:04:20 2014 +0000

    searchbar,display-toolbar: Remove redundant vapi workarounds
    
    Remove a now redundant (and buggy) workaround for GdkEvent vapi and fix
    the regression of searchbar appearing on keyboard events.

 src/display-toolbar.vala |    8 ++------
 src/searchbar.vala       |    2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/display-toolbar.vala b/src/display-toolbar.vala
index 6b74875..263554c 100644
--- a/src/display-toolbar.vala
+++ b/src/display-toolbar.vala
@@ -61,13 +61,9 @@ private class Boxes.DisplayToolbar: Gtk.HeaderBar {
         if (!handle_drag)
             return res;
 
-        // With the current GdkEvent bindings this is the only way to
-        // upcast a GdkEventButton to a GdkEvent (which we need for
-        // the triggerts_context_menu() method call.
-        // TODO: Fix this when vala bindings are corrected
-        Gdk.Event *base_event = (Gdk.Event *)(&event);
+        Gdk.Event base_event = (Gdk.Event) event;
 
-        if (!res && !base_event->triggers_context_menu ()) {
+        if (!res && !base_event.triggers_context_menu ()) {
             button_down = true;
             button_down_button = event.button;
             button_down_x = (int) event.x;
diff --git a/src/searchbar.vala b/src/searchbar.vala
index 22d9075..255a73c 100644
--- a/src/searchbar.vala
+++ b/src/searchbar.vala
@@ -45,6 +45,6 @@ private class Boxes.Searchbar: Gtk.SearchBar {
         if (App.app.ui_state != UIState.COLLECTION)
             return false;
 
-        return handle_event ((Gdk.Event *) (&event));
+        return handle_event ((Gdk.Event) event);
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]