Revision: 2052 http://geany.svn.sourceforge.net/geany/?rev=2052&view=rev Author: eht16 Date: 2007-11-17 09:03:25 -0800 (Sat, 17 Nov 2007)
Log Message: ----------- Set line width for page header, handle empty filename in page header correctly.
Modified Paths: -------------- trunk/ChangeLog trunk/src/printing.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-17 14:05:52 UTC (rev 2051) +++ trunk/ChangeLog 2007-11-17 17:03:25 UTC (rev 2052) @@ -9,6 +9,8 @@ src/makefile.win32, src/prefs.c, src/prefs.h, src/printing.c, src/printing.h, src/ui_utils.c, src/ui_utils.h: Add native GTK printing support. + * src/printing.c: Set line width for page header, handle empty filename + in page header correctly.
2007-11-14 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/printing.c =================================================================== --- trunk/src/printing.c 2007-11-17 14:05:52 UTC (rev 2051) +++ trunk/src/printing.c 2007-11-17 17:03:25 UTC (rev 2052) @@ -239,11 +239,13 @@ gint ph_height = dinfo->line_height * 3; gchar *data; gchar *datetime; + gchar *tmp_file_name = (doc_list[dinfo->idx].file_name != NULL) ? + doc_list[dinfo->idx].file_name : GEANY_STRING_UNTITLED; gchar *file_name = (printing_prefs.page_header_basename) ? - g_path_get_basename(doc_list[dinfo->idx].file_name) : - g_strdup(doc_list[dinfo->idx].file_name); + g_path_get_basename(tmp_file_name) : g_strdup(tmp_file_name);
// draw the frame + cairo_set_line_width(cr, 0.3); cairo_set_source_rgb(cr, 0, 0, 0); cairo_rectangle(cr, 2, 2, width - 4, ph_height - 4); cairo_stroke(cr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.