aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog10
-rw-r--r--calendar/gui/calendar-commands.c8
-rw-r--r--calendar/gui/calendar-commands.h3
-rw-r--r--calendar/gui/e-calendar-view.c8
4 files changed, 18 insertions, 11 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 026e2f3ae5..ca17af6e3c 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,15 @@
2007-10-01 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #342283
+
+ * gui/calendar-commands.h: (calendar_command_print): New function.
+ * gui/calendar-commands.c: (calendar_command_print), (file_print_cb),
+ (file_print_preview_cb):
+ * gui/e-calendar-view.c: (on_print):
+ Behaves consistently when printing from File->Print and popup->Print.
+
+2007-10-01 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #230339
* gui/print.c: (print_day_event): Print also location, if present.
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index e4ee6d0b71..6d7f164491 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -87,8 +87,8 @@ file_open_event_cb (BonoboUIComponent *uic, gpointer data, const char *path)
/* Prints the calendar at its current view and time range */
-static void
-print (GnomeCalendar *gcal, GtkPrintOperationAction action)
+void
+calendar_command_print (GnomeCalendar *gcal, GtkPrintOperationAction action)
{
if (gnome_calendar_get_view (gcal) == GNOME_CAL_LIST_VIEW) {
ECalListView *list_view;
@@ -111,7 +111,7 @@ file_print_cb (BonoboUIComponent *uic, gpointer data, const char *path)
{
GnomeCalendar *gcal = GNOME_CALENDAR (data);
- print (gcal, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
+ calendar_command_print (gcal, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
}
static void
@@ -119,7 +119,7 @@ file_print_preview_cb (BonoboUIComponent *uic, gpointer data, const char *path)
{
GnomeCalendar *gcal = GNOME_CALENDAR (data);
- print (gcal, GTK_PRINT_OPERATION_ACTION_PREVIEW);
+ calendar_command_print (gcal, GTK_PRINT_OPERATION_ACTION_PREVIEW);
}
/* Sets a clock cursor for the specified calendar window */
diff --git a/calendar/gui/calendar-commands.h b/calendar/gui/calendar-commands.h
index 730d98707e..ca6bce1fa0 100644
--- a/calendar/gui/calendar-commands.h
+++ b/calendar/gui/calendar-commands.h
@@ -37,4 +37,7 @@ void calendar_control_sensitize_calendar_commands (BonoboControl *control, Gnome
void calendar_goto_today (GnomeCalendar *gcal);
+void calendar_command_print (GnomeCalendar *gcal, GtkPrintOperationAction action);
+
+
#endif /* CALENDAR_COMMANDS_H */
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index b5bf116be3..79b9e5d711 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1204,14 +1204,8 @@ static void
on_print (EPopup *ep, EPopupItem *pitem, void *data)
{
ECalendarView *cal_view = data;
- time_t start, end;
- e_calendar_view_get_visible_time_range (cal_view, &start, &end);
-
- print_calendar (
- cal_view->priv->calendar,
- GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
- start);
+ calendar_command_print (cal_view->priv->calendar, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
}
static void