diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-11-28 02:55:36 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-11-28 02:55:36 +0800 |
commit | e1f429b0103a0df2ff8dd9d94d406c5bc34e2eca (patch) | |
tree | e66e5ef060b6f47218fa6377a6f5684ee1541449 /calendar | |
parent | 6395ec0243694ee6677e65c4d5fef0731d7c7e86 (diff) | |
download | gsoc2013-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')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 44 |
2 files changed, 51 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 6a97fbfa9b..5e70bb78e5 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2006-11-28 Srinivasa Ragavan <sragavan@novell.com> + + Added support to print/preview from Calendar Editor. + + * gui/dialogs/comp-editor.c: (menu_file_print_cb), + (menu_file_print_preview_cb): + 2006-11-28 Daniel Gryniewicz <dang@gentoo.org> ** Fix for bug #349966 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), |