[Xfce4-commits] <midori:master> Don't use GTK_WIDGET_SET_FLAGS in browser and panel

Christian Dywan noreply at xfce.org
Tue Oct 5 00:14:01 CEST 2010


Updating branch refs/heads/master
         to cd783acee0c911fcda488278dbaaba6e946dcc1c (commit)
       from c539fab8ee8d55db385485a94af27dd98cf04494 (commit)

commit cd783acee0c911fcda488278dbaaba6e946dcc1c
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Oct 4 21:36:26 2010 +0200

    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 8f81ff9..69be36e 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 07ecfff..ed4227b 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 105aed0..29a9cfb 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)



More information about the Xfce4-commits mailing list