[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 04/05: Update URL to point to goodies website.

noreply at xfce.org noreply at xfce.org
Sat Feb 21 01:02:07 CET 2015


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

gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 1502c721387f38940ae70658979bed2c531add79
Author: Graeme Gott <graeme at gottcode.org>
Date:   Fri Feb 20 18:38:25 2015 -0500

    Update URL to point to goodies website.
---
 panel-plugin/configuration-dialog.cpp |   37 ++++++++++++++++++++++++---------
 panel-plugin/plugin.cpp               |    2 +-
 panel-plugin/plugin.h                 |    2 ++
 3 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/panel-plugin/configuration-dialog.cpp b/panel-plugin/configuration-dialog.cpp
index d8ffab2..176c0c3 100644
--- a/panel-plugin/configuration-dialog.cpp
+++ b/panel-plugin/configuration-dialog.cpp
@@ -67,7 +67,12 @@ ConfigurationDialog::ConfigurationDialog(Plugin* plugin) :
 	{
 		window = GTK_WINDOW(toplevel);
 	}
-	m_window = xfce_titled_dialog_new_with_buttons(_("Whisker Menu"), window, GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
+	m_window = xfce_titled_dialog_new_with_buttons(_("Whisker Menu"),
+			window,
+			GTK_DIALOG_NO_SEPARATOR,
+			GTK_STOCK_HELP, GTK_RESPONSE_HELP,
+			GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+			NULL);
 	gtk_window_set_icon_name(GTK_WINDOW(m_window), GTK_STOCK_PROPERTIES);
 	gtk_window_set_position(GTK_WINDOW(m_window), GTK_WIN_POS_CENTER);
 	g_signal_connect_slot(m_window, "response", &ConfigurationDialog::response, this);
@@ -452,19 +457,31 @@ void ConfigurationDialog::remove_action(GtkButton* button)
 
 void ConfigurationDialog::response(GtkDialog*, int response_id)
 {
-	if ((m_plugin->get_button_style() == Plugin::ShowText) && m_plugin->get_button_title().empty())
+	if (response_id == GTK_RESPONSE_HELP)
 	{
-		m_plugin->set_button_title(Plugin::get_button_title_default());
-	}
+		bool result = g_spawn_command_line_async("exo-open --launch WebBrowser " PLUGIN_WEBSITE, NULL);
 
-	for (int i = 0; i < Settings::CountCommands; ++i)
-	{
-		wm_settings->command[i]->check();
+		if (G_UNLIKELY(result == false))
+		{
+			g_warning(_("Unable to open the following url: %s"), PLUGIN_WEBSITE);
+		}
 	}
-
-	if (response_id == GTK_RESPONSE_CLOSE)
+	else
 	{
-		gtk_widget_destroy(m_window);
+		if ((m_plugin->get_button_style() == Plugin::ShowText) && m_plugin->get_button_title().empty())
+		{
+			m_plugin->set_button_title(Plugin::get_button_title_default());
+		}
+
+		for (int i = 0; i < Settings::CountCommands; ++i)
+		{
+			wm_settings->command[i]->check();
+		}
+
+		if (response_id == GTK_RESPONSE_CLOSE)
+		{
+			gtk_widget_destroy(m_window);
+		}
 	}
 }
 
diff --git a/panel-plugin/plugin.cpp b/panel-plugin/plugin.cpp
index 2b40561..71918e3 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -397,7 +397,7 @@ void Plugin::show_about()
 		"program-name", PACKAGE_NAME,
 		"translator-credits", _("translator-credits"),
 		"version", PACKAGE_VERSION,
-		"website", "http://gottcode.org/xfce4-whiskermenu-plugin/",
+		"website", PLUGIN_WEBSITE,
 		NULL);
 }
 
diff --git a/panel-plugin/plugin.h b/panel-plugin/plugin.h
index bc1308f..7611fc9 100644
--- a/panel-plugin/plugin.h
+++ b/panel-plugin/plugin.h
@@ -18,6 +18,8 @@
 #ifndef WHISKERMENU_PLUGIN_H
 #define WHISKERMENU_PLUGIN_H
 
+#define PLUGIN_WEBSITE "http://goodies.xfce.org/projects/panel-plugins/xfce4-whiskermenu-plugin"
+
 #include <string>
 
 #include <gtk/gtk.h>

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


More information about the Xfce4-commits mailing list