SF.net SVN: geany:[3599] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Tue Feb 24 18:27:21 UTC 2009
Revision: 3599
http://geany.svn.sourceforge.net/geany/?rev=3599&view=rev
Author: eht16
Date: 2009-02-24 18:27:21 +0000 (Tue, 24 Feb 2009)
Log Message:
-----------
Allow an empty value for the date format in the print settings to omit the date/time string in the print header.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/printing.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-02-24 18:27:01 UTC (rev 3598)
+++ trunk/ChangeLog 2009-02-24 18:27:21 UTC (rev 3599)
@@ -20,6 +20,9 @@
not the current one). This should speed up file saving a little bit,
especially with remote files.
Remove now unnecessary calls to tm_workspace_update().
+ * src/printing.c:
+ Allow an empty value for the date format in the print settings to
+ omit the date/time string in the print header.
2009-02-20 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: trunk/src/printing.c
===================================================================
--- trunk/src/printing.c 2009-02-24 18:27:01 UTC (rev 3598)
+++ trunk/src/printing.c 2009-02-24 18:27:21 UTC (rev 3599)
@@ -275,12 +275,15 @@
g_free(data);
datetime = utils_get_date_time(printing_prefs.page_header_datefmt, &(dinfo->print_time));
- data = g_strdup_printf("<b>%s</b>", datetime);
- pango_layout_set_markup(layout, data, -1);
- pango_layout_set_alignment(layout, PANGO_ALIGN_RIGHT);
- cairo_move_to(cr, 2, dinfo->line_height * 1.5);
- pango_cairo_show_layout(cr, layout);
- g_free(data);
+ if (NZV(datetime))
+ {
+ data = g_strdup_printf("<b>%s</b>", datetime);
+ pango_layout_set_markup(layout, data, -1);
+ pango_layout_set_alignment(layout, PANGO_ALIGN_RIGHT);
+ cairo_move_to(cr, 2, dinfo->line_height * 1.5);
+ pango_cairo_show_layout(cr, layout);
+ g_free(data);
+ }
g_free(datetime);
/* reset layout and re-position cairo context */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list