[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 443/473: Make launchers executable when they are added to desktop. Closes #100
noreply at xfce.org
noreply at xfce.org
Tue Feb 17 00:00:13 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 b0aba04a967123f5d880c43d6e07571115545ce0
Author: Graeme Gott <graeme at gottcode.org>
Date: Wed Jan 7 05:40:35 2015 -0500
Make launchers executable when they are added to desktop. Closes #100
---
panel-plugin/page.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/panel-plugin/page.cpp b/panel-plugin/page.cpp
index 893ff68..b80367b 100644
--- a/panel-plugin/page.cpp
+++ b/panel-plugin/page.cpp
@@ -26,6 +26,8 @@
#include <libxfce4ui/libxfce4ui.h>
+#include <glib/gstdio.h>
+
using namespace WhiskerMenu;
//-----------------------------------------------------------------------------
@@ -303,7 +305,14 @@ void Page::add_selected_to_desktop()
// Copy launcher to desktop folder
GError* error = NULL;
- if (!g_file_copy(source_file, destination_file, G_FILE_COPY_NONE, NULL, NULL, NULL, &error))
+ if (g_file_copy(source_file, destination_file, G_FILE_COPY_NONE, NULL, NULL, NULL, &error))
+ {
+ // Make launcher executable
+ gchar* path = g_file_get_path(destination_file);
+ g_chmod(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+ g_free(path);
+ }
+ else
{
xfce_dialog_show_error(NULL, error, _("Unable to add launcher to desktop."));
g_error_free(error);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list