aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-11-28 02:55:36 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-11-28 02:55:36 +0800
commite1f429b0103a0df2ff8dd9d94d406c5bc34e2eca (patch)
treee66e5ef060b6f47218fa6377a6f5684ee1541449 /calendar/gui/dialogs
parent6395ec0243694ee6677e65c4d5fef0731d7c7e86 (diff)
downloadgsoc2013-evolution-e1f429b0103a0df2ff8dd9d94d406c5bc34e2eca.tar
gsoc2013-evolution-e1f429b0103a0df2ff8dd9d94d406c5bc34e2eca.tar.gz
gsoc2013-evolution-e1f429b0103a0df2ff8dd9d94d406c5bc34e2eca.tar.bz2
gsoc2013-evolution-e1f429b0103a0df2ff8dd9d94d406c5bc34e2eca.tar.lz
gsoc2013-evolution-e1f429b0103a0df2ff8dd9d94d406c5bc34e2eca.tar.xz
gsoc2013-evolution-e1f429b0103a0df2ff8dd9d94d406c5bc34e2eca.tar.zst
gsoc2013-evolution-e1f429b0103a0df2ff8dd9d94d406c5bc34e2eca.zip
Srinivasa Ragavan <sragavan@novell.com>
Added support to print/preview from Calendar Editor. svn path=/trunk/; revision=33027
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/comp-editor.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 85af6bd892..71678b3dc3 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -1296,6 +1296,48 @@ menu_file_save_cb (BonoboUIComponent *uic,
}
static void
+menu_file_print_cb (BonoboUIComponent *uic,
+ void *data,
+ const char *path)
+{
+ CompEditor *editor = (CompEditor *) data;
+ CompEditorPrivate *priv = editor->priv;
+ ECalComponent *comp;
+ GList *l;
+ icalcomponent *icalcomp = e_cal_component_get_icalcomponent (priv->comp);
+
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
+
+ for (l = priv->pages; l != NULL; l = l->next)
+ comp_editor_page_fill_component (l->data, comp);
+
+ print_comp (comp, priv->client, FALSE);
+
+ g_object_unref (comp);
+}
+
+static void
+menu_file_print_preview_cb (BonoboUIComponent *uic,
+ void *data,
+ const char *path)
+{
+ CompEditor *editor = (CompEditor *) data;
+ CompEditorPrivate *priv = editor->priv;
+ ECalComponent *comp;
+ GList *l;
+ icalcomponent *icalcomp = e_cal_component_get_icalcomponent (priv->comp);
+
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
+ for (l = priv->pages; l != NULL; l = l->next)
+ comp_editor_page_fill_component (l->data, comp);
+ print_comp (comp, priv->client, TRUE);
+
+ g_object_unref (comp);
+}
+
+static void
menu_file_close_cb (BonoboUIComponent *uic,
void *data,
const char *path)
@@ -1416,6 +1458,8 @@ menu_help_cb (BonoboUIComponent *uic,
static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("FileSave", menu_file_save_cb),
+ BONOBO_UI_VERB ("CalendarPrint", menu_file_print_cb),
+ BONOBO_UI_VERB ("CalendarPrintPreview", menu_file_print_preview_cb),
BONOBO_UI_VERB ("FileClose", menu_file_close_cb),
BONOBO_UI_VERB ("EditCopy", menu_edit_copy_cb),