evolution r36035 - in trunk/calendar: . gui
- From: tobiasmue svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36035 - in trunk/calendar: . gui
- Date: Fri, 22 Aug 2008 09:14:30 +0000 (UTC)
Author: tobiasmue
Date: Fri Aug 22 09:14:29 2008
New Revision: 36035
URL: http://svn.gnome.org/viewvc/evolution?rev=36035&view=rev
Log:
Make it show "Tasks" for printing tasks list and "Calendar" for printing
a calendar. Patch by Rouslan Solomakhin <rouslan solomakhin net>.
Fixes bug 547822.
Modified:
trunk/calendar/ChangeLog
trunk/calendar/gui/print.c
Modified: trunk/calendar/gui/print.c
==============================================================================
--- trunk/calendar/gui/print.c (original)
+++ trunk/calendar/gui/print.c Fri Aug 22 09:14:29 2008
@@ -2744,11 +2744,16 @@
pango_font_description_free (desc);
}
+struct print_opts {
+ EPrintable *printable;
+ gchar *print_header;
+};
+
static void
print_table_draw_page (GtkPrintOperation *operation,
GtkPrintContext *context,
gint page_nr,
- EPrintable *printable)
+ struct print_opts *opts)
{
GtkPageSetup *setup;
gdouble width;
@@ -2759,13 +2764,15 @@
do {
/* TODO Allow the user to customize the title. */
- print_title (context, _("Upcoming Appointments"), width);
+ print_title (context, opts->print_header, width);
- if (e_printable_data_left (printable))
+ if (e_printable_data_left (opts->printable))
e_printable_print_page (
- printable, context, width, 24, TRUE);
+ opts->printable, context, width, 24, TRUE);
+
+ } while (e_printable_data_left (opts->printable));
- } while (e_printable_data_left (printable));
+ free(opts);
}
void
@@ -2774,6 +2781,7 @@
{
GtkPrintOperation *operation;
EPrintable *printable;
+ struct print_opts *opts;
printable = e_table_get_printable (table);
g_object_ref_sink (printable);
@@ -2782,9 +2790,13 @@
operation = e_print_operation_new ();
gtk_print_operation_set_n_pages (operation, 1);
+ opts = malloc(sizeof(struct print_opts));
+ opts->printable = printable;
+ opts->print_header = print_header;
+
g_signal_connect (
operation, "draw_page",
- G_CALLBACK (print_table_draw_page), printable);
+ G_CALLBACK (print_table_draw_page), opts);
gtk_print_operation_run (operation, action, NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]