aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-05-16 05:58:07 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-05-16 05:58:07 +0800
commit522e7942df3fe517168895421812e67158c53090 (patch)
tree5ac6c324813d2f29e35b9b04d6a33f54a4f884b3 /my-evolution
parent7e7b7f49e818d97bbbfe55ec62f835fd6628939c (diff)
downloadgsoc2013-evolution-522e7942df3fe517168895421812e67158c53090.tar
gsoc2013-evolution-522e7942df3fe517168895421812e67158c53090.tar.gz
gsoc2013-evolution-522e7942df3fe517168895421812e67158c53090.tar.bz2
gsoc2013-evolution-522e7942df3fe517168895421812e67158c53090.tar.lz
gsoc2013-evolution-522e7942df3fe517168895421812e67158c53090.tar.xz
gsoc2013-evolution-522e7942df3fe517168895421812e67158c53090.tar.zst
gsoc2013-evolution-522e7942df3fe517168895421812e67158c53090.zip
(do_summary_print): Remove preview arg. Also, make
it destroy the dialog after a button has been clicked. (e_summary_set_control): Add casts to avoid compiler warnings. svn path=/trunk/; revision=21199
Diffstat (limited to 'my-evolution')
-rw-r--r--my-evolution/ChangeLog6
-rw-r--r--my-evolution/e-summary.c54
2 files changed, 33 insertions, 27 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index ad37211d60..ce97fa86c3 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,9 @@
+2003-05-15 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-summary.c (do_summary_print): Remove preview arg. Also, make
+ it destroy the dialog after a button has been clicked.
+ (e_summary_set_control): Add casts to avoid compiler warnings.
+
2003-05-14 JP Rosevear <jpr@ximian.com>
* e-summary.h: fix up protos
diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c
index 958be90c8c..8b57599513 100644
--- a/my-evolution/e-summary.c
+++ b/my-evolution/e-summary.c
@@ -593,60 +593,60 @@ e_summary_set_control (ESummary *summary, BonoboControl *control)
g_return_if_fail (IS_E_SUMMARY (summary));
if (summary->priv->control)
- g_object_remove_weak_pointer (G_OBJECT (summary->priv->control), &summary->priv->control);
+ g_object_remove_weak_pointer (G_OBJECT (summary->priv->control), (void **) &summary->priv->control);
summary->priv->control = control;
if (summary->priv->control)
- g_object_add_weak_pointer (G_OBJECT (summary->priv->control), &summary->priv->control);
+ g_object_add_weak_pointer (G_OBJECT (summary->priv->control), (void **) &summary->priv->control);
}
static void
-do_summary_print (ESummary *summary,
- gboolean preview)
+do_summary_print (ESummary *summary)
{
GnomePrintContext *print_context;
GnomePrintJob *print_master;
GtkWidget *gpd;
GnomePrintConfig *config = NULL;
+ GtkWidget *preview_widget;
+ gboolean preview = FALSE;
- if (! preview) {
- gpd = gnome_print_dialog_new (NULL, _("Print Summary"), GNOME_PRINT_DIALOG_COPIES);
+ gpd = gnome_print_dialog_new (NULL, _("Print Summary"), GNOME_PRINT_DIALOG_COPIES);
- switch (gtk_dialog_run (GTK_DIALOG (gpd))) {
- case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
- break;
-
- case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
- preview = TRUE;
- break;
+ switch (gtk_dialog_run (GTK_DIALOG (gpd))) {
+ case GNOME_PRINT_DIALOG_RESPONSE_PRINT:
+ preview = FALSE;
+ break;
- default:
- gtk_widget_destroy (gpd);
- return;
- }
+ case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
+ preview = TRUE;
+ break;
- config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (gpd));
+ default:
+ if (preview_widget != NULL)
+ gtk_widget_destroy (preview_widget);
+ gtk_widget_destroy (gpd);
+ return;
}
+ config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (gpd));
+
print_master = gnome_print_job_new (config);
print_context = gnome_print_job_get_context (print_master);
gtk_html_print (GTK_HTML (summary->priv->html), print_context);
gnome_print_job_close (print_master);
- if (preview) {
- GtkWidget *preview;
+ gtk_widget_destroy (gpd);
- preview = gnome_print_job_preview_new (print_master, _("Print Preview"));
- gtk_widget_show (preview);
+ if (preview) {
+ preview_widget = gnome_print_job_preview_new (print_master, _("Print Preview"));
+ gtk_widget_show (preview_widget);
} else {
int result = gnome_print_job_print (print_master);
- if (result == -1) {
- e_notice (summary, GTK_MESSAGE_ERROR,
- _("Printing of Summary failed"));
- }
+ if (result == -1)
+ e_notice (gpd, GTK_MESSAGE_ERROR, _("Printing of Summary failed"));
}
g_object_unref (print_master);
@@ -659,7 +659,7 @@ e_summary_print (BonoboUIComponent *component,
{
ESummary *summary = userdata;
- do_summary_print (summary, FALSE);
+ do_summary_print (summary);
}
void