[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/04: Match types in section button functions.
noreply at xfce.org
noreply at xfce.org
Mon Jan 27 23:14:17 CET 2020
This is an automated email from the git hooks/post-receive script.
g o t t c o d e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit fa8b6b65542807232235682be4051a21549334d3
Author: Graeme Gott <graeme at gottcode.org>
Date: Mon Jan 27 04:50:41 2020 -0500
Match types in section button functions.
---
panel-plugin/section-button.cpp | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/panel-plugin/section-button.cpp b/panel-plugin/section-button.cpp
index f2e733b..069db7e 100644
--- a/panel-plugin/section-button.cpp
+++ b/panel-plugin/section-button.cpp
@@ -25,8 +25,9 @@ using namespace WhiskerMenu;
//-----------------------------------------------------------------------------
-static gboolean hover_timeout(GtkToggleButton* button)
+static gboolean hover_timeout(gpointer user_data)
{
+ GtkToggleButton* button = GTK_TOGGLE_BUTTON(user_data);
if (gtk_widget_get_state_flags(GTK_WIDGET(button)) & GTK_STATE_FLAG_PRELIGHT)
{
gtk_toggle_button_set_active(button, true);
@@ -34,17 +35,19 @@ static gboolean hover_timeout(GtkToggleButton* button)
return false;
}
-static gboolean on_enter_notify_event(GtkWidget*, GdkEventCrossing*, GtkToggleButton* button)
+static gboolean on_enter_notify_event(GtkWidget* widget, GdkEvent*, gpointer)
{
+ GtkToggleButton* button = GTK_TOGGLE_BUTTON(widget);
if (wm_settings->category_hover_activate && !gtk_toggle_button_get_active(button))
{
- g_timeout_add(150, reinterpret_cast<GSourceFunc>(hover_timeout), button);
+ g_timeout_add(150, hover_timeout, button);
}
return false;
}
-static gboolean on_focus_in_event(GtkWidget* widget, GdkEvent*, GtkToggleButton* button)
+static gboolean on_focus_in_event(GtkWidget* widget, GdkEvent*, gpointer)
{
+ GtkToggleButton* button = GTK_TOGGLE_BUTTON(widget);
if (wm_settings->category_hover_activate && !gtk_toggle_button_get_active(button))
{
gtk_toggle_button_set_active(button, true);
@@ -62,8 +65,8 @@ SectionButton::SectionButton(GIcon* icon, const gchar* text)
gtk_button_set_relief(GTK_BUTTON(m_button), GTK_RELIEF_NONE);
gtk_widget_set_tooltip_text(GTK_WIDGET(m_button), text);
gtk_widget_set_focus_on_click(GTK_WIDGET(m_button), false);
- g_signal_connect(m_button, "enter-notify-event", G_CALLBACK(on_enter_notify_event), GTK_TOGGLE_BUTTON(m_button));
- g_signal_connect(m_button, "focus-in-event", G_CALLBACK(on_focus_in_event), GTK_TOGGLE_BUTTON(m_button));
+ g_signal_connect(m_button, "enter-notify-event", G_CALLBACK(on_enter_notify_event), m_button);
+ g_signal_connect(m_button, "focus-in-event", G_CALLBACK(on_focus_in_event), m_button);
m_box = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4));
gtk_container_add(GTK_CONTAINER(m_button), GTK_WIDGET(m_box));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list