[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 16/20: Match types in callbacks.

noreply at xfce.org noreply at xfce.org
Thu Feb 6 12:03:33 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 c50d2ea45037cd901e98615ae44b13b1bb0d94d3
Author: Graeme Gott <graeme at gottcode.org>
Date:   Mon Feb 3 07:46:43 2020 -0500

    Match types in callbacks.
---
 panel-plugin/configuration-dialog.cpp | 6 +++---
 panel-plugin/plugin.cpp               | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/panel-plugin/configuration-dialog.cpp b/panel-plugin/configuration-dialog.cpp
index 008511a..ba42db9 100644
--- a/panel-plugin/configuration-dialog.cpp
+++ b/panel-plugin/configuration-dialog.cpp
@@ -50,9 +50,9 @@ enum
 
 //-----------------------------------------------------------------------------
 
-static void whiskermenu_config_dialog_delete(ConfigurationDialog* dialog)
+static void configuration_dialog_free(GtkWidget*, gpointer user_data)
 {
-	delete dialog;
+	delete static_cast<ConfigurationDialog*>(user_data);
 }
 
 //-----------------------------------------------------------------------------
@@ -108,7 +108,7 @@ ConfigurationDialog::ConfigurationDialog(Plugin* plugin) :
 	gtk_window_set_icon_name(GTK_WINDOW(m_window), "xfce4-whiskermenu");
 	gtk_window_set_position(GTK_WINDOW(m_window), GTK_WIN_POS_CENTER);
 	g_signal_connect_slot(m_window, "response", &ConfigurationDialog::response, this);
-	g_signal_connect_swapped(m_window, "destroy", G_CALLBACK(whiskermenu_config_dialog_delete), this);
+	g_signal_connect(m_window, "destroy", G_CALLBACK(&configuration_dialog_free), this);
 
 	// Create tabs
 	GtkNotebook* notebook = GTK_NOTEBOOK(gtk_notebook_new());
diff --git a/panel-plugin/plugin.cpp b/panel-plugin/plugin.cpp
index 51d18f5..046acde 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -40,9 +40,9 @@ extern "C" void whiskermenu_construct(XfcePanelPlugin* plugin)
 	new Plugin(plugin);
 }
 
-static void whiskermenu_free(XfcePanelPlugin*, Plugin* whiskermenu)
+static void plugin_free(XfcePanelPlugin*, gpointer user_data)
 {
-	delete whiskermenu;
+	delete static_cast<Plugin*>(user_data);
 }
 
 // Wait for grab; allows modifier as shortcut
@@ -155,7 +155,7 @@ Plugin::Plugin(XfcePanelPlugin* plugin) :
 	xfce_panel_plugin_add_action_widget(plugin, m_button);
 
 	// Connect plugin signals to functions
-	g_signal_connect(plugin, "free-data", G_CALLBACK(whiskermenu_free), this);
+	g_signal_connect(plugin, "free-data", G_CALLBACK(&plugin_free), this);
 	g_signal_connect_slot<XfcePanelPlugin*>(plugin, "configure-plugin", &Plugin::configure, this);
 	g_signal_connect_slot(plugin, "mode-changed", &Plugin::mode_changed, this);
 	g_signal_connect_slot(plugin, "remote-event", &Plugin::remote_event, this);

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


More information about the Xfce4-commits mailing list