summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--gtk/gtkprintsettings.c3
-rw-r--r--gtk/gtkprintunixdialog.c5
4 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a367ec332..7d26bd828a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2006-06-30 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkprintsettings.c (gtk_print_settings_get_page_ranges):
+ Documentation updates.
+
+ * gtk/gtkprintunixdialog.c (gtk_print_unix_dialog_set_settings):
+ Don't leak the ranges. (#346237, Carolyn MacLeod)
+
* gtk/gtkprintjob.[hc]: Add a PREVIEW capability to hide
the preview button. (#346113, Christian Persch)
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 3a367ec332..7d26bd828a 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,11 @@
2006-06-30 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkprintsettings.c (gtk_print_settings_get_page_ranges):
+ Documentation updates.
+
+ * gtk/gtkprintunixdialog.c (gtk_print_unix_dialog_set_settings):
+ Don't leak the ranges. (#346237, Carolyn MacLeod)
+
* gtk/gtkprintjob.[hc]: Add a PREVIEW capability to hide
the preview button. (#346113, Christian Persch)
diff --git a/gtk/gtkprintsettings.c b/gtk/gtkprintsettings.c
index d451ec5c6f..d7c62449dd 100644
--- a/gtk/gtkprintsettings.c
+++ b/gtk/gtkprintsettings.c
@@ -1238,7 +1238,8 @@ gtk_print_settings_set_print_pages (GtkPrintSettings *settings,
*
* Gets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.
*
- * Return value: an array of #GtkPageRange<!-- -->s
+ * Return value: an array of #GtkPageRange<!-- -->s. Use g_free()
+ * to free the array when it is no longer needed.
*
* Since: 2.10
*/
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 0a7e03b361..722232eb67 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -2592,7 +2592,10 @@ gtk_print_unix_dialog_set_settings (GtkPrintUnixDialog *dialog,
dialog_set_print_pages (dialog, gtk_print_settings_get_print_pages (settings));
ranges = gtk_print_settings_get_page_ranges (settings, &num_ranges);
if (ranges)
- dialog_set_page_ranges (dialog, ranges, num_ranges);
+ {
+ dialog_set_page_ranges (dialog, ranges, num_ranges);
+ g_free (ranges);
+ }
priv->format_for_printer =
g_strdup (gtk_print_settings_get (settings, "format-for-printer"));