From cd783acee0c911fcda488278dbaaba6e946dcc1c Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 4 Oct 2010 21:36:26 +0200 Subject: [PATCH] Don't use GTK_WIDGET_SET_FLAGS in browser and panel --- midori/midori-browser.c | 6 ++---- midori/midori-panel.c | 2 +- midori/sokoke.h | 2 ++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 8f81ff9a..69be36eb 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -1586,10 +1586,8 @@ _midori_browser_add_tab (MidoriBrowser* browser, KatzeItem* item; guint n; - GTK_WIDGET_SET_FLAGS (view, GTK_CAN_FOCUS); - + gtk_widget_set_can_focus (view, TRUE); tab_label = midori_view_get_proxy_tab_label (MIDORI_VIEW (view)); - item = midori_view_get_proxy_item (MIDORI_VIEW (view)); g_object_ref (item); katze_array_add_item (browser->proxy_array, item); @@ -5928,7 +5926,7 @@ midori_browser_init (MidoriBrowser* browser) scrolled = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - GTK_WIDGET_SET_FLAGS (scrolled, GTK_CAN_FOCUS); + gtk_widget_set_can_focus (scrolled, TRUE); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_ETCHED_IN); gtk_box_pack_start (GTK_BOX (browser->inspector), scrolled, TRUE, TRUE, 0); diff --git a/midori/midori-panel.c b/midori/midori-panel.c index 07ecfff1..ed4227b6 100644 --- a/midori/midori-panel.c +++ b/midori/midori-panel.c @@ -733,7 +733,7 @@ midori_panel_append_page (MidoriPanel* panel, gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - GTK_WIDGET_SET_FLAGS (scrolled, GTK_CAN_FOCUS); + gtk_widget_set_can_focus (scrolled, TRUE); gtk_widget_show (scrolled); gobject_class = G_OBJECT_GET_CLASS (viewable); if (GTK_WIDGET_CLASS (gobject_class)->set_scroll_adjustments_signal) diff --git a/midori/sokoke.h b/midori/sokoke.h index 105aed0c..29a9cfb3 100644 --- a/midori/sokoke.h +++ b/midori/sokoke.h @@ -50,6 +50,8 @@ #define gtk_widget_has_focus(widget) GTK_WIDGET_HAS_FOCUS (widget) #define gtk_widget_get_visible(widget) GTK_WIDGET_VISIBLE (widget) #define gtk_widget_get_sensitive(widget) GTK_WIDGET_IS_SENSITIVE (widget) + #define gtk_widget_set_can_focus(widget,flag) \ + GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS) #endif #if !GTK_CHECK_VERSION (2, 20, 0)