[gnome-control-center] printers: Fix canonicalization test
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Fix canonicalization test
- Date: Tue, 18 Aug 2015 09:34:18 +0000 (UTC)
commit a1134fdf51eaccc38eb11f94d2f370c3d038a642
Author: Marek Kasik <mkasik redhat com>
Date: Tue Aug 18 09:55:12 2015 +0200
printers: Fix canonicalization test
Function canonicalize_device_name() has been changed recently,
it takes a GList of strings as its first parameter now.
https://bugzilla.gnome.org/show_bug.cgi?id=753733
panels/printers/test-canonicalization.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/panels/printers/test-canonicalization.c b/panels/printers/test-canonicalization.c
index f2d3acd..1500f68 100644
--- a/panels/printers/test-canonicalization.c
+++ b/panels/printers/test-canonicalization.c
@@ -57,7 +57,7 @@ main (int argc, char **argv)
items = g_strsplit (lines[i], "\t", -1);
if (g_strv_length (items) == 6)
{
- PpPrintDevice *device, *tmp;
+ PpPrintDevice *device;
gchar **already_present_printers;
gchar *canonicalized_name;
GList *devices = NULL;
@@ -65,13 +65,7 @@ main (int argc, char **argv)
already_present_printers = g_strsplit (items[0], " ", -1);
for (j = 0; already_present_printers[j] != NULL; j++)
- {
- tmp = g_object_new (PP_TYPE_PRINT_DEVICE,
- "device-original-name", already_present_printers[j],
- NULL);
-
- devices = g_list_append (devices, tmp);
- }
+ devices = g_list_append (devices, g_strdup (already_present_printers[j]));
device = g_object_new (PP_TYPE_PRINT_DEVICE,
"device-id", items[1],
@@ -96,7 +90,7 @@ main (int argc, char **argv)
g_free (canonicalized_name);
g_object_unref (device);
- g_list_free_full (devices, (GDestroyNotify) g_object_unref);
+ g_list_free_full (devices, (GDestroyNotify) g_free);
g_strfreev (already_present_printers);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]