[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/03: Support GTK+ less than 3.20.

noreply at xfce.org noreply at xfce.org
Mon Aug 22 18:02:43 CEST 2016


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

gottcode pushed a commit to annotated tag v2.0.1
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 0f383e0f7064ee22e69aae2159d29dd3e2eac74e
Author: Graeme Gott <graeme at gottcode.org>
Date:   Mon Aug 22 07:11:41 2016 -0400

    Support GTK+ less than 3.20.
---
 panel-plugin/plugin.cpp         | 4 ++++
 panel-plugin/section-button.cpp | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/panel-plugin/plugin.cpp b/panel-plugin/plugin.cpp
index 45f3a67..ff49837 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -152,7 +152,11 @@ Plugin::Plugin(XfcePanelPlugin* plugin) :
 	m_button = xfce_panel_create_toggle_button();
 	gtk_widget_set_name(m_button, "whiskermenu-button");
 	gtk_button_set_relief(GTK_BUTTON(m_button), GTK_RELIEF_NONE);
+#if GTK_CHECK_VERSION(3,20,0)
 	gtk_widget_set_focus_on_click(GTK_WIDGET(m_button), false);
+#else
+	gtk_button_set_focus_on_click(GTK_BUTTON(m_button), false);
+#endif
 	g_signal_connect_slot(m_button, "toggled", &Plugin::button_toggled, this);
 	gtk_widget_show(m_button);
 
diff --git a/panel-plugin/section-button.cpp b/panel-plugin/section-button.cpp
index e6949bd..f8d96d9 100644
--- a/panel-plugin/section-button.cpp
+++ b/panel-plugin/section-button.cpp
@@ -51,7 +51,11 @@ SectionButton::SectionButton(const gchar* icon, const gchar* text) :
 	m_button = GTK_RADIO_BUTTON(gtk_radio_button_new(NULL));
 	gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(m_button), false);
 	gtk_button_set_relief(GTK_BUTTON(m_button), GTK_RELIEF_NONE);
+#if GTK_CHECK_VERSION(3,20,0)
 	gtk_widget_set_focus_on_click(GTK_WIDGET(m_button), false);
+#else
+	gtk_button_set_focus_on_click(GTK_BUTTON(m_button), false);
+#endif
 	g_signal_connect(m_button, "enter-notify-event", G_CALLBACK(on_enter_notify_event), GTK_TOGGLE_BUTTON(m_button));
 
 	GtkBox* box = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4));

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


More information about the Xfce4-commits mailing list