[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Conditionally use xfce_dialog_show_help_with_version

noreply at xfce.org noreply at xfce.org
Fri Sep 12 19:16:41 CEST 2014


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

eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit 0ea4b967127dfea6b2a7ca433e07b8b317bf71b9
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Thu Sep 11 20:50:26 2014 +0300

    Conditionally use xfce_dialog_show_help_with_version
    
    Only build in the new xfce_dialog_show_help_with_version function
    if the system has libxfce4ui 4.11.1, otherwise use the old help
    function in order to still support systems with Xfce 4.10.
---
 configure.ac.in                                           |    2 +-
 panel-plugins/power-manager-plugin/power-manager-button.c |    4 ++++
 settings/xfpm-settings.c                                  |    6 +++++-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 86d5331..bf67d7f 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -64,7 +64,7 @@ m4_define([dbus_minimum_version], [1.1])
 m4_define([dbus_glib_minimum_version], [0.84])
 
 m4_define([xfconf_minimum_version], [4.10.0])
-m4_define([libxfce4ui_minimum_version],[4.11.1])
+m4_define([libxfce4ui_minimum_version],[4.10.0])
 m4_define([libxfce4util_minimum_version],[4.10.0])
 m4_define([libxfce4panel_minimum_version],[4.10.0])
 m4_define([lxdepanel_new_minimum_version],[0.7.0])
diff --git a/panel-plugins/power-manager-plugin/power-manager-button.c b/panel-plugins/power-manager-plugin/power-manager-button.c
index 6087701..95bc687 100644
--- a/panel-plugins/power-manager-plugin/power-manager-button.c
+++ b/panel-plugins/power-manager-plugin/power-manager-button.c
@@ -894,7 +894,11 @@ power_manager_button_free_data_cb (XfcePanelPlugin *plugin, PowerManagerButton *
 static void
 help_cb (GtkMenuItem *menuitem, gpointer user_data)
 {
+#if LIBXFCE4UI_CHECK_VERSION(4, 11, 1)
     xfce_dialog_show_help_with_version (NULL, "xfce4-power-manager", "start", NULL, XFPM_VERSION_SHORT);
+#else
+    xfce_dialog_show_help (NULL, "xfce4-power-manager", "start", NULL);
+#endif
 }
 
 void
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 23ffb85..d736cd4 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -1997,7 +1997,11 @@ static void dialog_response_cb (GtkDialog *dialog, gint response, XfconfChannel
     switch(response)
     {
 	case GTK_RESPONSE_HELP:
-	    xfce_dialog_show_help_with_version (GTK_WINDOW (dialog), "xfce4-power-manager", "start", NULL, XFPM_VERSION_SHORT);
+#if LIBXFCE4UI_CHECK_VERSION(4, 11, 1)
+	    xfce_dialog_show_help_with_version (NULL, "xfce4-power-manager", "start", NULL, XFPM_VERSION_SHORT);
+#else
+	    xfce_dialog_show_help (NULL, "xfce4-power-manager", "start", NULL);
+#endif
 	    break;
 	default:
 	    settings_quit (GTK_WIDGET (dialog), channel);

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


More information about the Xfce4-commits mailing list