[nemo] patch to fix create launcher
leigh123linux
leigh123linux at fedoraproject.org
Mon Jul 22 23:52:30 UTC 2013
commit 7a7d26dfd8b8dacbdf65afe905859df848502c2b
Author: leigh123linux <leigh123linux at googlemail.com>
Date: Tue Jul 23 00:52:21 2013 +0100
patch to fix create launcher
create_launcher.patch | 162 +++++++++++++++++++++++++++++++++++++++++++++++++
nemo.spec | 7 ++-
2 files changed, 168 insertions(+), 1 deletions(-)
---
diff --git a/create_launcher.patch b/create_launcher.patch
new file mode 100644
index 0000000..f1fcbdd
--- /dev/null
+++ b/create_launcher.patch
@@ -0,0 +1,162 @@
+diff --git a/src/nemo-actions.h b/src/nemo-actions.h
+index 5fcd853..02956b9 100644
+--- a/src/nemo-actions.h
++++ b/src/nemo-actions.h
+@@ -122,7 +122,7 @@
+ #define NEMO_ACTION_SCRIPTS "Scripts"
+ #define NEMO_ACTION_ACTIONS "Actions"
+ #define NEMO_ACTION_NEW_LAUNCHER "New Launcher"
+-#define NEMO_ACTION_NEW_LAUNCHER_DESKTOP "New Launcher"
++#define NEMO_ACTION_NEW_LAUNCHER_DESKTOP "New Launcher Desktop"
+ #define NEMO_ACTION_NEW_DOCUMENTS "New Documents"
+ #define NEMO_ACTION_NEW_EMPTY_DOCUMENT "New Empty Document"
+ #define NEMO_ACTION_EMPTY_TRASH_CONDITIONAL "Empty Trash Conditional"
+@@ -146,6 +146,7 @@
+ #define NEMO_ACTION_STATUSBAR_TREEVIEW "Statusbar Treeview"
+ #define NEMO_ACTION_STATUSBAR_SIDEBAR_TOGGLE "Statusbar Sidebar Toggle"
+
++#define NEMO_ACTION_CHANGE_BACKGROUND_DESKTOP "Change Background"
+ #define NEMO_ACTION_ADD_DESKLETS_DESKTOP "Add Desklets"
+
+ #define NEMO_ACTION_FOLLOW_SYMLINK "FollowSymbolicLink"
+diff --git a/src/nemo-desktop-icon-view.c b/src/nemo-desktop-icon-view.c
+index b903c5b..9d22193 100644
+--- a/src/nemo-desktop-icon-view.c
++++ b/src/nemo-desktop-icon-view.c
+@@ -89,6 +89,7 @@ static void font_changed_callback (gpointer
+ G_DEFINE_TYPE (NemoDesktopIconView, nemo_desktop_icon_view, NEMO_TYPE_ICON_VIEW)
+
+ gboolean have_cinnamon_settings;
++gboolean have_launcher_creator;
+ static char *desktop_directory;
+ static time_t desktop_dir_modify_time;
+
+@@ -653,6 +654,7 @@ nemo_desktop_icon_view_init (NemoDesktopIconView *desktop_icon_view)
+ desktop_icon_view);
+
+ have_cinnamon_settings = g_find_program_in_path ("cinnamon-settings") != NULL;
++ have_launcher_creator = g_find_program_in_path ("cinnamon-launcher-creator") != NULL;
+ }
+
+ static void
+@@ -698,9 +700,9 @@ action_new_launcher_callback (GtkAction *action, gpointer data)
+ desktop_directory = nemo_get_desktop_directory ();
+
+ nemo_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (data)),
+- "gnome-desktop-item-edit",
++ "cinnamon-launcher-creator",
+ FALSE,
+- "--create-new", desktop_directory, NULL);
++ desktop_directory, NULL);
+ g_free (desktop_directory);
+
+ }
+@@ -748,12 +750,11 @@ real_update_menus (NemoView *view)
+
+ desktop_view = NEMO_DESKTOP_ICON_VIEW (view);
+
+-
+ /* New Launcher */
+ action = gtk_action_group_get_action (desktop_view->details->desktop_action_group,
+ NEMO_ACTION_NEW_LAUNCHER_DESKTOP);
+ if (action) {
+- gtk_action_set_visible (action, TRUE);
++ gtk_action_set_visible (action, have_launcher_creator);
+ }
+
+ /* Empty Trash */
+@@ -773,18 +774,22 @@ real_update_menus (NemoView *view)
+ action = gtk_action_group_get_action (desktop_view->details->desktop_action_group,
+ NEMO_ACTION_ADD_DESKLETS_DESKTOP);
+ gtk_action_set_visible (action, have_cinnamon_settings);
++ action = gtk_action_group_get_action (desktop_view->details->desktop_action_group,
++ NEMO_ACTION_CHANGE_BACKGROUND_DESKTOP);
++ gtk_action_set_visible (action, have_cinnamon_settings);
++
+ }
+
+ static const GtkActionEntry desktop_view_entries[] = {
+ /* name, stock id */
+- { "New Launcher Desktop", NULL,
++ { NEMO_ACTION_NEW_LAUNCHER_DESKTOP, NULL,
+ /* label, accelerator */
+ N_("Create L_auncher..."), NULL,
+ /* tooltip */
+ N_("Create a new launcher"),
+ G_CALLBACK (action_new_launcher_callback) },
+ /* name, stock id */
+- { "Change Background", NULL,
++ { NEMO_ACTION_CHANGE_BACKGROUND_DESKTOP, NULL,
+ /* label, accelerator */
+ N_("Change Desktop _Background"), NULL,
+ /* tooltip */
+diff --git a/src/nemo-view.c b/src/nemo-view.c
+index ab03b44..f331ec2 100644
+--- a/src/nemo-view.c
++++ b/src/nemo-view.c
+@@ -281,6 +281,7 @@ struct NemoViewDetails
+
+ gboolean has_thunderbird;
+ gboolean has_other_mail;
++ gboolean have_launcher_creator;
+ };
+
+ typedef struct {
+@@ -2103,7 +2104,7 @@ static void
+ action_new_launcher_callback (GtkAction *action,
+ gpointer callback_data)
+ {
+- char *parent_uri;
++ char *parent_uri, *parent_path;
+ NemoView *view;
+ GtkWindow *window;
+
+@@ -2112,14 +2113,16 @@ action_new_launcher_callback (GtkAction *action,
+ view = NEMO_VIEW (callback_data);
+
+ parent_uri = nemo_view_get_backing_uri (view);
++ parent_path = g_filename_from_uri (parent_uri, NULL, NULL);
+
+ window = nemo_view_get_containing_window (view);
+ nemo_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (view)),
+- "gnome-desktop-item-edit",
++ "cinnamon-launcher-creator",
+ FALSE,
+- "--create-new", parent_uri, NULL);
++ parent_path, NULL);
+
+ g_free (parent_uri);
++ g_free (parent_path);
+ }
+
+ static void
+@@ -2709,6 +2712,8 @@ nemo_view_init (NemoView *view)
+ view->details->has_other_mail = g_find_program_in_path ("evolution") != NULL ||
+ g_find_program_in_path ("balsa") != NULL;
+
++ view->details->have_launcher_creator = g_find_program_in_path ("cinnamon-launcher-creator") != NULL;
++
+ if (set_up_scripts_directory_global ()) {
+ scripts_directory = nemo_directory_get_by_uri (scripts_directory_uri);
+ add_directory_to_scripts_directory_list (view, scripts_directory);
+@@ -7859,7 +7864,7 @@ static const GtkActionEntry directory_view_entries[] = {
+ /* label, accelerator */ N_("_Empty Document"), NULL,
+ /* tooltip */ N_("Create a new empty document inside this folder"),
+ G_CALLBACK (action_new_empty_file_callback) },
+- /* name, stock id */ { "New Launcher", NULL,
++ /* name, stock id */ { NEMO_ACTION_NEW_LAUNCHER, NULL,
+ /* label, accelerator */ N_("Create L_auncher..."), NULL,
+ /* tooltip */ N_("Create a new launcher"),
+ G_CALLBACK (action_new_launcher_callback) },
+@@ -9606,6 +9611,11 @@ real_update_menus (NemoView *view)
+ selection_count == 1 &&
+ nemo_file_is_symbolic_link (selection->data));
+
++ action = gtk_action_group_get_action (view->details->dir_action_group,
++ NEMO_ACTION_NEW_LAUNCHER);
++
++ gtk_action_set_visible (action, view->details->have_launcher_creator);
++
+ nemo_file_list_free (selection);
+ }
+
diff --git a/nemo.spec b/nemo.spec
index 588e850..960a46a 100644
--- a/nemo.spec
+++ b/nemo.spec
@@ -1,7 +1,7 @@
Name: nemo
Summary: File manager for Cinnamon
Version: 1.8.4
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+ and LGPLv2+
Group: User Interface/Desktops
URL: https://github.com/linuxmint/nemo
@@ -48,6 +48,7 @@ Requires: nemo-extensions%{?_isa} = %{version}-%{release}
Patch0: remove-desktop-background.patch
Patch1: remove_OpenAsRoot.patch
+Patch2: create_launcher.patch
%description
@@ -90,6 +91,7 @@ Nemo theme fix for Adwaita
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
NOCONFIGURE=1 ./autogen.sh
%build
@@ -192,6 +194,9 @@ fi
%{_datadir}/gir-1.0/*.gir
%changelog
+* Mon Jul 22 2013 Leigh Scott <leigh123linux at googlemail.com> - 1.8.4-2
+- patch to fix create launcher
+
* Wed Jul 10 2013 leigh scott <leigh123linux at googlemail.com> - 1.8.4-1
- Update to version 1.8.4
More information about the scm-commits
mailing list