aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tasks-control.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2005-01-22 02:15:42 +0800
committerJP Rosevear <jpr@src.gnome.org>2005-01-22 02:15:42 +0800
commitdad5fd71fa54ddb1fb293a2448e3e0e4895cbacf (patch)
treeee3e3748a4885289c37c2d977949fa3c9f7b5334 /calendar/gui/tasks-control.c
parent37a44d001d5cbaab7936ceac77f5c69afd3a3246 (diff)
downloadgsoc2013-evolution-dad5fd71fa54ddb1fb293a2448e3e0e4895cbacf.tar
gsoc2013-evolution-dad5fd71fa54ddb1fb293a2448e3e0e4895cbacf.tar.gz
gsoc2013-evolution-dad5fd71fa54ddb1fb293a2448e3e0e4895cbacf.tar.bz2
gsoc2013-evolution-dad5fd71fa54ddb1fb293a2448e3e0e4895cbacf.tar.lz
gsoc2013-evolution-dad5fd71fa54ddb1fb293a2448e3e0e4895cbacf.tar.xz
gsoc2013-evolution-dad5fd71fa54ddb1fb293a2448e3e0e4895cbacf.tar.zst
gsoc2013-evolution-dad5fd71fa54ddb1fb293a2448e3e0e4895cbacf.zip
Fixes #46404
2005-01-21 JP Rosevear <jpr@novell.com> Fixes #46404 * gui/tasks-control.c (tasks_control_print_cmd): just call print tasks, we don't do the dialog here * gui/print.h: update protos * gui/print.c (print_calendar): use e_print routines for config and dialog and make copies and range settings properly available (print_comp): ditto (print_table): bring up dialog here so that printing for calendar list view works correctly * gui/calendar-commands.c (print): pass extra params to print table svn path=/trunk/; revision=28490
Diffstat (limited to 'calendar/gui/tasks-control.c')
-rw-r--r--calendar/gui/tasks-control.c43
1 files changed, 3 insertions, 40 deletions
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index 36b8f0f07e..e3f3358e9f 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -44,6 +44,7 @@
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-ui-util.h>
#include <e-util/e-dialog-utils.h>
+#include <e-util/e-print.h>
#include "dialogs/cal-prefs-dialog.h"
#include "calendar-config.h"
#include "calendar-commands.h"
@@ -91,9 +92,6 @@ static void tasks_control_print_preview_cmd (BonoboUIComponent *uic,
const char *path);
-static GnomePrintConfig *print_config = NULL;
-
-
BonoboControl *
tasks_control_new (void)
{
@@ -407,7 +405,7 @@ print_tasks (ETasks *tasks, gboolean preview)
cal_table = e_tasks_get_calendar_table (tasks);
etable = e_calendar_table_get_table (E_CALENDAR_TABLE (cal_table));
- print_table (etable, _("Tasks"), preview);
+ print_table (etable, _("Print Tasks"), _("Tasks"), preview);
}
/* File/Print callback */
@@ -417,45 +415,10 @@ tasks_control_print_cmd (BonoboUIComponent *uic,
const char *path)
{
ETasks *tasks;
- GtkWidget *gpd;
- gboolean preview = FALSE;
- GnomePrintJob *gpm;
- ECalendarTable *cal_table;
- ETable *etable;
tasks = E_TASKS (data);
- if (!print_config)
- print_config = gnome_print_config_default ();
-
- gpm = gnome_print_job_new (print_config);
-
- gpd = gnome_print_dialog_new (gpm, _("Print Tasks"), GNOME_PRINT_DIALOG_COPIES);
- gtk_dialog_set_default_response (GTK_DIALOG (gpd), GNOME_PRINT_DIALOG_RESPONSE_PRINT);
-
- /* Run dialog */
- switch (gtk_dialog_run (GTK_DIALOG (gpd))) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- break;
-
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- preview = TRUE;
- break;
-
- case -1:
- return;
-
- default:
- gtk_widget_destroy (gpd);
- return;
- }
-
- cal_table = e_tasks_get_calendar_table (tasks);
- etable = e_calendar_table_get_table (E_CALENDAR_TABLE (cal_table));
-
- gtk_widget_destroy (gpd);
-
- print_tasks (tasks, preview);
+ print_tasks (tasks, FALSE);
}
static void