[Xfce4-commits] <midori:master> Connect tab switcher to child web view key events

Christian Dywan noreply at xfce.org
Tue Jun 1 22:22:01 CEST 2010


Updating branch refs/heads/master
         to 0aa24037bd9a0142989d6b9c7cbb8cdfbf4c559c (commit)
       from a2e22b4341378e35f149d8dfa1971364b6965385 (commit)

commit 0aa24037bd9a0142989d6b9c7cbb8cdfbf4c559c
Author: André Stösel <Midori-Plugin at PyIT.de>
Date:   Tue Jun 1 22:11:08 2010 +0200

    Connect tab switcher to child web view key events
    
    The parent view will do its best to forward the focus to the
    child web view, so  the tab switcher should listen to it.

 extensions/tab-switcher.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/extensions/tab-switcher.c b/extensions/tab-switcher.c
index add09df..ad77872 100644
--- a/extensions/tab-switcher.c
+++ b/extensions/tab-switcher.c
@@ -248,12 +248,19 @@ tab_selector_browser_add_tab_cb (MidoriBrowser      *browser,
                                  GtkWidget          *view,
                                  MidoriExtension    *extension)
 {
-    g_signal_connect (view, "key_press_event",
+    GtkWidget* web_view;
+    GList* list;
+
+    g_return_if_fail (MIDORI_IS_VIEW (view));
+
+    web_view = midori_view_get_web_view (MIDORI_VIEW(view));
+
+    g_signal_connect (web_view, "key_press_event",
             G_CALLBACK (tab_selector_handle_events), browser);
-    g_signal_connect (view, "key_release_event",
+    g_signal_connect (web_view, "key_release_event",
             G_CALLBACK (tab_selector_handle_events), browser);
 
-    GList *list = g_object_get_data(G_OBJECT(browser), "tab_selector_list");
+    list = g_object_get_data(G_OBJECT(browser), "tab_selector_list");
     list = g_list_append(list, view);
     g_object_set_data(G_OBJECT(browser), "tab_selector_list", list);
 }



More information about the Xfce4-commits mailing list