ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / gn / gnome-control-center / paths.patch
blob41dd5979aa4bc1efeb61d4f9209da11675f450f9
1 diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
2 index f6c84e3d2..cd897f8f5 100644
3 --- a/panels/color/cc-color-panel.c
4 +++ b/panels/color/cc-color-panel.c
5 @@ -614,7 +614,7 @@ gcm_prefs_calibrate_cb (CcColorPanel *self)
7 /* run with modal set */
8 argv = g_ptr_array_new_with_free_func (g_free);
9 - g_ptr_array_add (argv, g_strdup ("gcm-calibrate"));
10 + g_ptr_array_add (argv, g_build_filename ("@gcm@", "bin", "gcm-calibrate", NULL));
11 g_ptr_array_add (argv, g_strdup ("--device"));
12 g_ptr_array_add (argv, g_strdup (cd_device_get_id (self->current_device)));
13 g_ptr_array_add (argv, g_strdup ("--parent-window"));
14 @@ -989,7 +989,7 @@ gcm_prefs_profile_view (CcColorPanel *self, CdProfile *profile)
16 /* open up gcm-viewer as a info pane */
17 argv = g_ptr_array_new_with_free_func (g_free);
18 - g_ptr_array_add (argv, g_strdup ("gcm-viewer"));
19 + g_ptr_array_add (argv, g_build_filename ("@gcm@", "bin", "gcm-viewer", NULL));
20 g_ptr_array_add (argv, g_strdup ("--profile"));
21 g_ptr_array_add (argv, g_strdup (cd_profile_get_id (profile)));
22 g_ptr_array_add (argv, g_strdup ("--parent-window"));
23 @@ -1221,15 +1221,12 @@ gcm_prefs_device_clicked (CcColorPanel *self, CdDevice *device)
24 static void
25 gcm_prefs_profile_clicked (CcColorPanel *self, CdProfile *profile, CdDevice *device)
27 - g_autofree gchar *s = NULL;
29 /* get profile */
30 g_debug ("selected profile = %s",
31 cd_profile_get_filename (profile));
33 /* allow getting profile info */
34 - if (cd_profile_get_filename (profile) != NULL &&
35 - (s = g_find_program_in_path ("gcm-viewer")) != NULL)
36 + if (cd_profile_get_filename (profile) != NULL)
37 gtk_widget_set_sensitive (self->toolbutton_profile_view, TRUE);
38 else
39 gtk_widget_set_sensitive (self->toolbutton_profile_view, FALSE);
40 diff --git a/panels/system/datetime/tz.h b/panels/system/datetime/tz.h
41 index feef16580..4b88ef7b1 100644
42 --- a/panels/system/datetime/tz.h
43 +++ b/panels/system/datetime/tz.h
44 @@ -27,11 +27,7 @@
46 G_BEGIN_DECLS
48 -#ifndef __sun
49 -# define TZ_DATA_FILE "/usr/share/zoneinfo/zone.tab"
50 -#else
51 -# define TZ_DATA_FILE "/usr/share/lib/zoneinfo/tab/zone_sun.tab"
52 -#endif
53 +#define TZ_DATA_FILE "@tzdata@/share/zoneinfo/zone.tab"
55 typedef struct _TzDB TzDB;
56 typedef struct _TzLocation TzLocation;
57 diff --git a/panels/network/connection-editor/net-connection-editor.c b/panels/network/connection-editor/net-connection-editor.c
58 index ec5a905a5..689fdbebe 100644
59 --- a/panels/network/connection-editor/net-connection-editor.c
60 +++ b/panels/network/connection-editor/net-connection-editor.c
61 @@ -377,7 +377,7 @@ net_connection_editor_do_fallback (NetConnectionEditor *self, const gchar *type)
62 GPid child_pid;
64 builder = g_strv_builder_new ();
65 - g_strv_builder_add (builder, "nm-connection-editor");
66 + g_strv_builder_add (builder, "@networkmanagerapplet@/bin/nm-connection-editor");
68 if (self->is_new_connection) {
69 g_autofree gchar *type_str = NULL;
70 diff --git a/panels/network/net-device-mobile.c b/panels/network/net-device-mobile.c
71 index 166670224..36f720d36 100644
72 --- a/panels/network/net-device-mobile.c
73 +++ b/panels/network/net-device-mobile.c
74 @@ -521,7 +521,7 @@ options_button_clicked_cb (NetDeviceMobile *self)
76 connection = net_device_get_find_connection (self->client, self->device);
77 uuid = nm_connection_get_uuid (connection);
78 - cmdline = g_strdup_printf ("nm-connection-editor --edit %s", uuid);
79 + cmdline = g_strdup_printf ("@networkmanagerapplet@/bin/nm-connection-editor --edit %s", uuid);
80 g_debug ("Launching '%s'\n", cmdline);
81 if (!g_spawn_command_line_async (cmdline, &error))
82 g_warning ("Failed to launch nm-connection-editor: %s", error->message);
83 @@ -810,7 +810,7 @@ net_device_mobile_init (NetDeviceMobile *self)
85 self->cancellable = g_cancellable_new ();
87 - path = g_find_program_in_path ("nm-connection-editor");
88 + path = g_find_program_in_path ("@networkmanagerapplet@/bin/nm-connection-editor");
89 gtk_widget_set_visible (GTK_WIDGET (self->options_button), path != NULL);
92 diff --git a/panels/printers/pp-host.c b/panels/printers/pp-host.c
93 index a31a606e3..ed5133d29 100644
94 --- a/panels/printers/pp-host.c
95 +++ b/panels/printers/pp-host.c
96 @@ -256,7 +256,7 @@ _pp_host_get_snmp_devices_thread (GTask *task,
97 devices = g_ptr_array_new_with_free_func (g_object_unref);
99 argv = g_new0 (gchar *, 3);
100 - argv[0] = g_strdup ("/usr/lib/cups/backend/snmp");
101 + argv[0] = g_strdup ("@cups@/lib/cups/backend/snmp");
102 argv[1] = g_strdup (priv->hostname);
104 /* Use SNMP to get printer's informations */
105 diff --git a/panels/system/users/run-passwd.c b/panels/system/users/run-passwd.c
106 index edbc99830..1e1d90141 100644
107 --- a/panels/system/users/run-passwd.c
108 +++ b/panels/system/users/run-passwd.c
109 @@ -152,7 +152,7 @@ spawn_passwd (PasswdHandler *passwd_handler, GError **error)
110 gchar **envp;
111 gint my_stdin, my_stdout;
113 - argv[0] = "/usr/bin/passwd"; /* Is it safe to rely on a hard-coded path? */
114 + argv[0] = "/run/wrappers/bin/passwd"; /* Is it safe to rely on a hard-coded path? */
115 argv[1] = NULL;
117 envp = g_get_environ ();
118 diff --git a/panels/system/users/user-utils.c b/panels/system/users/user-utils.c
119 index 5b7bc1f02..13ffe6ca8 100644
120 --- a/panels/system/users/user-utils.c
121 +++ b/panels/system/users/user-utils.c
122 @@ -215,7 +215,7 @@ is_valid_username_async (const gchar *username,
123 * future, so it would be nice to have some official way for this
124 * instead of relying on the current "--login" implementation.
126 - argv[0] = "/usr/sbin/usermod";
127 + argv[0] = "@shadow@/bin/usermod";
128 argv[1] = "--login";
129 argv[2] = data->username;
130 argv[3] = "--";
131 diff --git a/tests/datetime/test-endianess.c b/tests/datetime/test-endianess.c
132 index 9cb92007a..84d2f0fa3 100644
133 --- a/tests/datetime/test-endianess.c
134 +++ b/tests/datetime/test-endianess.c
135 @@ -26,7 +26,7 @@ test_endianess (void)
136 g_autoptr(GDir) dir = NULL;
137 const char *name;
139 - dir = g_dir_open ("/usr/share/i18n/locales/", 0, NULL);
140 + dir = g_dir_open ("@glibc@/share/i18n/locales/", 0, NULL);
141 if (dir == NULL) {
142 /* Try with /usr/share/locale/
143 * https://bugzilla.gnome.org/show_bug.cgi?id=646780 */