diff options
author | Marius Bakke <marius@gnu.org> | 2022-09-01 23:07:33 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2022-09-01 23:07:33 +0200 |
commit | 0c518f974e64f23846ae51ea2c68b479202fdca9 (patch) | |
tree | f7052c4adfc0d3c77b41652cf4f1e4b2e594d02c /gnu/packages/patches | |
parent | a38889b14d74e31c1b74c55d020445b760516c5d (diff) | |
parent | 4d361a6b5147e3f91573e9d3c8c540a233e7e142 (diff) | |
download | guix-0c518f974e64f23846ae51ea2c68b479202fdca9.tar.gz guix-0c518f974e64f23846ae51ea2c68b479202fdca9.zip |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/cheese-vala-update.patch | 180 | ||||
-rw-r--r-- | gnu/packages/patches/glade-gls-set-script-name.patch | 32 | ||||
-rw-r--r-- | gnu/packages/patches/glade-test-widget-null-icon.patch | 30 |
3 files changed, 0 insertions, 242 deletions
diff --git a/gnu/packages/patches/cheese-vala-update.patch b/gnu/packages/patches/cheese-vala-update.patch deleted file mode 100644 index cb18952ce4..0000000000 --- a/gnu/packages/patches/cheese-vala-update.patch +++ /dev/null @@ -1,180 +0,0 @@ -Taken from upstream: -https://gitlab.gnome.org/GNOME/cheese/-/commit/7cf6268e54620bbbe5e6e61800c50fb0cb4bea57.patch. - -From 7cf6268e54620bbbe5e6e61800c50fb0cb4bea57 Mon Sep 17 00:00:00 2001 From: -=?UTF-8?q?Corentin=20No=C3=ABl?= <corentin@elementary.io> Date: Fri, 16 Oct -2020 19:56:26 +0200 Subject: [PATCH] Change GLib.PtrArray into -GLib.GenericArray - -This is the vala-friendly way of handling GPtrArray. -Fix several memory leaks on the go and unnecessary reference increase. ---- - src/cheese-preferences.vala | 26 ++++++++++++-------------- - src/cheese-window.vala | 22 +++++++++++----------- - src/vapi/cheese-common.vapi | 2 +- - 3 files changed, 24 insertions(+), 26 deletions(-) - -diff --git a/src/cheese-preferences.vala b/src/cheese-preferences.vala -index f56af7e0..80a92431 100644 ---- a/src/cheese-preferences.vala -+++ b/src/cheese-preferences.vala -@@ -100,7 +100,7 @@ public PreferencesDialog (Cheese.Camera camera) - */ - private void initialize_camera_devices () - { -- unowned GLib.PtrArray devices = camera.get_camera_devices (); -+ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices (); - camera_model = new Gtk.ListStore (2, typeof (string), typeof (Cheese.CameraDevice)); - - source_combo.model = camera_model; -@@ -357,13 +357,13 @@ public PreferencesDialog (Cheese.Camera camera) - */ - private void on_camera_update_num_camera_devices () - { -- unowned GLib.PtrArray devices = camera.get_camera_devices (); -- Cheese.CameraDevice dev; -+ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices (); -+ unowned Cheese.CameraDevice dev; - - // Add (if) / Remove (else) a camera device. -- if (devices.len > camera_model.iter_n_children (null)) -+ if (devices.length > camera_model.iter_n_children (null)) - { -- dev = (Cheese.CameraDevice) devices.index (devices.len - 1); -+ dev = devices.get (devices.length - 1); - add_camera_device(dev); - } - else -@@ -382,12 +382,11 @@ public PreferencesDialog (Cheese.Camera camera) - bool device_removed = false; - devices.foreach ((device) => - { -- var old_device = (Cheese.CameraDevice) device; - Cheese.CameraDevice new_device; - camera_model.get (iter, 1, out new_device, -1); - - // Found the device that was removed. -- if (old_device != new_device) -+ if (device != new_device) - { - remove_camera_device (iter, new_device, active_device); - device_removed = true; -@@ -418,17 +417,16 @@ public PreferencesDialog (Cheese.Camera camera) - * - * @param device a Cheese.CameraDevice to add to the device combo box model - */ -- private void add_camera_device (void *device) -+ private void add_camera_device (Cheese.CameraDevice device) - { - TreeIter iter; -- Cheese.CameraDevice dev = (Cheese.CameraDevice) device; - - camera_model.append (out iter); - camera_model.set (iter, -- 0, dev.get_name (), -- 1, dev); -+ 0, device.get_name (), -+ 1, device); - -- if (camera.get_selected_device () == dev) -+ if (camera.get_selected_device () == device) - source_combo.set_active_iter (iter); - - if (camera_model.iter_n_children (null) > 1) -@@ -445,12 +443,12 @@ public PreferencesDialog (Cheese.Camera camera) - private void remove_camera_device (TreeIter iter, Cheese.CameraDevice device_node, - Cheese.CameraDevice active_device_node) - { -- unowned GLib.PtrArray devices = camera.get_camera_devices (); -+ GLib.GenericArray<unowned Cheese.CameraDevice> devices = camera.get_camera_devices (); - - // Check if the camera that we want to remove, is the active one - if (device_node == active_device_node) - { -- if (devices.len > 0) -+ if (devices.length > 0) - set_new_available_camera_device (iter); - else - this.hide (); -diff --git a/src/cheese-window.vala b/src/cheese-window.vala -index ff069808..cc119b68 100644 ---- a/src/cheese-window.vala -+++ b/src/cheese-window.vala -@@ -1216,9 +1216,9 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow - */ - public void on_switch_camera_clicked () - { -- Cheese.CameraDevice selected; -- Cheese.CameraDevice next = null; -- GLib.PtrArray cameras; -+ unowned Cheese.CameraDevice selected; -+ unowned Cheese.CameraDevice next = null; -+ GLib.GenericArray<unowned Cheese.CameraDevice> cameras; - uint i; - - if (camera == null) -@@ -1235,9 +1235,9 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow - - cameras = camera.get_camera_devices (); - -- for (i = 0; i < cameras.len; i++) -+ for (i = 0; i < cameras.length; i++) - { -- next = (Cheese.CameraDevice )cameras.index (i); -+ next = cameras.get (i); - - if (next == selected) - { -@@ -1245,13 +1245,13 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow - } - } - -- if (i + 1 < cameras.len) -+ if (i + 1 < cameras.length) - { -- next = (Cheese.CameraDevice )cameras.index (i + 1); -+ next = cameras.get (i + 1); - } - else - { -- next = (Cheese.CameraDevice )cameras.index (0); -+ next = cameras.get (0); - } - - if (next == selected) -@@ -1269,8 +1269,8 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow - */ - public void set_switch_camera_button_state () - { -- Cheese.CameraDevice selected; -- GLib.PtrArray cameras; -+ unowned Cheese.CameraDevice selected; -+ GLib.GenericArray<unowned Cheese.CameraDevice> cameras; - - if (camera == null) - { -@@ -1288,7 +1288,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow - - cameras = camera.get_camera_devices (); - -- if (cameras.len > 1) -+ if (cameras.length > 1) - { - switch_camera_button.set_visible (true); - return; -diff --git a/src/vapi/cheese-common.vapi b/src/vapi/cheese-common.vapi -index 6517cdfc..e4ae7ad3 100644 ---- a/src/vapi/cheese-common.vapi -+++ b/src/vapi/cheese-common.vapi -@@ -35,7 +35,7 @@ namespace Cheese - [CCode (has_construct_function = false)] - public Camera (Clutter.Actor video_texture, string camera_device_node, int x_resolution, int y_resolution); - public bool get_balance_property_range (string property, double min, double max, double def); -- public unowned GLib.PtrArray get_camera_devices (); -+ public GLib.GenericArray<unowned Cheese.CameraDevice> get_camera_devices (); - public unowned Cheese.VideoFormat get_current_video_format (); - public int get_num_camera_devices (); - public unowned Cheese.CameraDevice get_selected_device (); --- -GitLab - diff --git a/gnu/packages/patches/glade-gls-set-script-name.patch b/gnu/packages/patches/glade-gls-set-script-name.patch deleted file mode 100644 index 61fbdf3914..0000000000 --- a/gnu/packages/patches/glade-gls-set-script-name.patch +++ /dev/null @@ -1,32 +0,0 @@ -Taken from upstream: -https://gitlab.gnome.org/GNOME/glade/-/commit/eb0429d318c017b57b9e59de1d5b3f142a0f455e. - -From 6cf1d3e11d4f8035f33c3003d33f6465896025a5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net> -Date: Tue, 18 May 2021 19:54:50 +0200 -Subject: [PATCH] plugins: Define an invalid but non-null file path as script - path - -This is following the gjs applications behaviors, setting a valid string -as the script path that will be shown in JS stack traces, even though -won't load a real file through g_file_new_for_commandline_arg() ---- - plugins/gjs/glade-gjs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/plugins/gjs/glade-gjs.c b/plugins/gjs/glade-gjs.c -index e1779665..aeae9906 100644 ---- a/plugins/gjs/glade-gjs.c -+++ b/plugins/gjs/glade-gjs.c -@@ -93,7 +93,7 @@ glade_gjs_init (const gchar *name) - - /* Importing the module will create all the GTypes so that glade can use them at runtime */ - retval = gjs_context_eval (gjs_context_get_current (), -- import_sentence, -1, NULL, -+ import_sentence, -1, "<glade-gjs>", - &exit_status, - &error); - if (!retval && error) --- -GitLab - diff --git a/gnu/packages/patches/glade-test-widget-null-icon.patch b/gnu/packages/patches/glade-test-widget-null-icon.patch deleted file mode 100644 index 75668a2f68..0000000000 --- a/gnu/packages/patches/glade-test-widget-null-icon.patch +++ /dev/null @@ -1,30 +0,0 @@ -Taken from upstream: -https://gitlab.gnome.org/GNOME/glade/-/commit/6cf1d3e11d4f8035f33c3003d33f6465896025a5. - -From eb0429d318c017b57b9e59de1d5b3f142a0f455e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net> -Date: Wed, 19 May 2021 00:10:29 +0200 -Subject: [PATCH] tests: Do not create a file icon when no filename is provided - -This would fail otherwise as GFileIcon requires a GFile parameter on -construction. ---- - tests/create-widgets.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tests/create-widgets.c b/tests/create-widgets.c -index 2094059d..db8311f8 100644 ---- a/tests/create-widgets.c -+++ b/tests/create-widgets.c -@@ -106,6 +106,8 @@ main (int argc, - if (G_TYPE_IS_INSTANTIATABLE (adaptor_type) && !G_TYPE_IS_ABSTRACT (adaptor_type) && - /* FIXME: can not create a themed icon without a name */ - !g_type_is_a (adaptor_type, G_TYPE_THEMED_ICON) && -+ /* FIXME: can not create a file icon without a file name */ -+ !g_type_is_a (adaptor_type, G_TYPE_FILE_ICON) && - /* FIXME: GtkPopoverMenu gives a few warnings */ - !g_type_is_a (adaptor_type, GTK_TYPE_POPOVER_MENU) && - /* FIXME: GtkFileChooserNative is hard to test here */ --- -GitLab - |