summary refs log tree commit diff
path: root/pkgs/desktops/cinnamon/nemo/fix-nemo-actions-duplicate-menu-items.patch
blob: 3a555774c4504b11170589f361b79fb31892bd99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git a/libnemo-private/nemo-action-manager.c b/libnemo-private/nemo-action-manager.c
index 4dac198..b671421 100644
--- a/libnemo-private/nemo-action-manager.c
+++ b/libnemo-private/nemo-action-manager.c
@@ -146,6 +146,8 @@ set_up_actions_directories (NemoActionManager *action_manager)
     data_dirs = (gchar **) g_get_system_data_dirs ();
 
     for (i = 0; i < g_strv_length (data_dirs); i++) {
+        if (g_strcmp0 (data_dirs[i], "/run/current-system/sw/share") == 0)
+            continue;
         path = g_build_filename (data_dirs[i], "nemo", "actions", NULL);
         uri = g_filename_to_uri (path, NULL, NULL);
 
diff --git a/src/nemo-action-config-widget.c b/src/nemo-action-config-widget.c
index fc4075e..6e1c837 100644
--- a/src/nemo-action-config-widget.c
+++ b/src/nemo-action-config-widget.c
@@ -221,6 +221,8 @@ refresh_widget (NemoActionConfigWidget *widget)
     data_dirs = (gchar **) g_get_system_data_dirs ();
 
     for (i = 0; i < g_strv_length (data_dirs); i++) {
+        if (g_strcmp0 (data_dirs[i], "/run/current-system/sw/share") == 0)
+            continue;
         path = g_build_filename (data_dirs[i], "nemo", "actions", NULL);
         populate_from_directory (widget, path);
         g_clear_pointer (&path, g_free);
@@ -390,6 +392,8 @@ static void setup_dir_monitors (NemoActionConfigWidget *widget)
 
     guint i;
     for (i = 0; i < g_strv_length (data_dirs); i++) {
+        if (g_strcmp0 (data_dirs[i], "/run/current-system/sw/share") == 0)
+            continue;
         gchar *path = g_build_filename (data_dirs[i], "nemo", "actions", NULL);
         try_monitor_path (widget, path);
         g_free (path);
diff --git a/src/nemo-script-config-widget.c b/src/nemo-script-config-widget.c
index 3a2d349..b8a85b4 100644
--- a/src/nemo-script-config-widget.c
+++ b/src/nemo-script-config-widget.c
@@ -288,6 +288,8 @@ static void setup_dir_monitors (NemoScriptConfigWidget *widget)
 
     guint i;
     for (i = 0; i < g_strv_length (data_dirs); i++) {
+        if (g_strcmp0 (data_dirs[i], "/run/current-system/sw/share") == 0)
+            continue;
         gchar *path = g_build_filename (data_dirs[i], "nemo", "actions", NULL);
         try_monitor_path (widget, path);
         g_free (path);