[Xfce4-commits] [xfce/xfce4-panel] 01/02: Fix typecasting to GTK_WIDGET

noreply at xfce.org noreply at xfce.org
Sat Apr 15 23:50:59 CEST 2017


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository xfce/xfce4-panel.

commit ed233c7e29ce5b8545cd3fde518a01cf1420ae8b
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sat Apr 15 23:23:10 2017 +0200

    Fix typecasting to GTK_WIDGET
---
 libxfce4panel/xfce-arrow-button.c      | 5 +++--
 libxfce4panel/xfce-panel-convenience.c | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libxfce4panel/xfce-arrow-button.c b/libxfce4panel/xfce-arrow-button.c
index 03e8e14..7d17a57 100644
--- a/libxfce4panel/xfce-arrow-button.c
+++ b/libxfce4panel/xfce-arrow-button.c
@@ -201,9 +201,8 @@ xfce_arrow_button_init (XfceArrowButton *button)
   gtk_widget_set_has_window (GTK_WIDGET (button), FALSE);
   gtk_widget_set_can_default (GTK_WIDGET (button), FALSE);
   gtk_widget_set_can_focus (GTK_WIDGET (button), FALSE);
-  gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
-
 #if GTK_CHECK_VERSION (3, 0, 0)
+  gtk_widget_set_focus_on_click (GTK_WIDGET (button), FALSE);
   /* Make sure themes like Adwaita, which set excessive padding, don't cause the
      launcher buttons to overlap when panels have a fairly normal size */
   context = gtk_widget_get_style_context (GTK_WIDGET (button));
@@ -212,6 +211,8 @@ xfce_arrow_button_init (XfceArrowButton *button)
   gtk_style_context_add_provider (context,
                                   GTK_STYLE_PROVIDER (provider),
                                   GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+#else
+  gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
 #endif
 }
 
diff --git a/libxfce4panel/xfce-panel-convenience.c b/libxfce4panel/xfce-panel-convenience.c
index d2a078e..c22c00f 100644
--- a/libxfce4panel/xfce-panel-convenience.c
+++ b/libxfce4panel/xfce-panel-convenience.c
@@ -65,7 +65,7 @@ xfce_panel_create_button (void)
   gtk_widget_set_can_focus (GTK_WIDGET (button), FALSE);
   gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
 #if GTK_CHECK_VERSION (3, 0, 0)
-  gtk_widget_set_focus_on_click (GTK_BUTTON (button), FALSE);
+  gtk_widget_set_focus_on_click (GTK_WIDGET (button), FALSE);
 #else
   gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
 #endif
@@ -109,7 +109,7 @@ xfce_panel_create_toggle_button (void)
   gtk_widget_set_can_focus (GTK_WIDGET (button), FALSE);
   gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
 #if GTK_CHECK_VERSION (3, 0, 0)
-  gtk_widget_set_focus_on_click (GTK_BUTTON (button), FALSE);
+  gtk_widget_set_focus_on_click (GTK_WIDGET (button), FALSE);
 #else
   gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
 #endif

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list