]> Pileus Git - ~andy/gtk/commitdiff
Don't define variables in the middle of a block. (#522067)
authorJens Granseuer <jensgr@gmx.net>
Wed, 12 Mar 2008 18:37:39 +0000 (18:37 +0000)
committerJens Granseuer <jensg@src.gnome.org>
Wed, 12 Mar 2008 18:37:39 +0000 (18:37 +0000)
2008-03-12  Jens Granseuer  <jensgr@gmx.net>

* modules/printbackends/cups/gtkprintbackendcups.c:
(cups_printer_prepare_for_print): Don't define variables in the
middle of a block. (#522067)

svn path=/trunk/; revision=19789

ChangeLog
modules/printbackends/cups/gtkprintbackendcups.c

index f0e1ff37a3832d2b1e481603141b6ac1ceb13bc5..bf9abb9e16970ea371a9d3bea5698f90c652e2a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-12  Jens Granseuer  <jensgr@gmx.net>
+
+       * modules/printbackends/cups/gtkprintbackendcups.c:
+       (cups_printer_prepare_for_print): Don't define variables in the
+       middle of a block. (#522067)
+
 2008-03-12  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkprintunixdialog.c: Add an overwrite confirmation 
 2008-03-12  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkprintunixdialog.c: Add an overwrite confirmation 
index 72c5871a092eb1acd27be40d909be51551bbaee8..113388a142e1e9716d865b19ca68b1d8acf699ac 100644 (file)
@@ -2982,10 +2982,11 @@ cups_printer_prepare_for_print (GtkPrinter       *printer,
     {
       char width[G_ASCII_DTOSTR_BUF_SIZE];
       char height[G_ASCII_DTOSTR_BUF_SIZE];
     {
       char width[G_ASCII_DTOSTR_BUF_SIZE];
       char height[G_ASCII_DTOSTR_BUF_SIZE];
+      char *custom_name;
 
       g_ascii_formatd (width, sizeof (width), "%.2f", gtk_paper_size_get_width (paper_size, GTK_UNIT_POINTS));
       g_ascii_formatd (height, sizeof (height), "%.2f", gtk_paper_size_get_height (paper_size, GTK_UNIT_POINTS));
 
       g_ascii_formatd (width, sizeof (width), "%.2f", gtk_paper_size_get_width (paper_size, GTK_UNIT_POINTS));
       g_ascii_formatd (height, sizeof (height), "%.2f", gtk_paper_size_get_height (paper_size, GTK_UNIT_POINTS));
-      char *custom_name = g_strdup_printf (("Custom.%sx%s"), width, height);
+      custom_name = g_strdup_printf (("Custom.%sx%s"), width, height);
       gtk_print_settings_set (settings, "cups-PageSize", custom_name);
       g_free (custom_name);
     }
       gtk_print_settings_set (settings, "cups-PageSize", custom_name);
       g_free (custom_name);
     }