diff options
author | Chris Toshok <toshok@ximian.com> | 2003-01-26 19:07:40 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2003-01-26 19:07:40 +0800 |
commit | 0d05436f60454febcc50829f8150429976f8eaa4 (patch) | |
tree | f0a7d5a9c1ddb878bb5119e193f2afbb299c756b /addressbook/printing | |
parent | 3129c1cfe22db0c52b7ecd8ecc7023d58f6cf066 (diff) | |
download | gsoc2013-evolution-0d05436f60454febcc50829f8150429976f8eaa4.tar.gz gsoc2013-evolution-0d05436f60454febcc50829f8150429976f8eaa4.tar.zst gsoc2013-evolution-0d05436f60454febcc50829f8150429976f8eaa4.zip |
begin the new page after showing the last one. (complete_sequence):
2003-01-26 Chris Toshok <toshok@ximian.com>
* printing/e-contact-print.c (e_contact_start_new_page): begin the
new page after showing the last one.
(complete_sequence): beginpage before we start printing.
(e_contact_print_response): GtkDialog-ify this.
(e_contact_print_dialog_new): "clicked" -> "response".
(e_contact_print_card_dialog_new): same.
(e_contact_print_card_list_dialog_new): same.
svn path=/trunk/; revision=19633
Diffstat (limited to 'addressbook/printing')
-rw-r--r-- | addressbook/printing/e-contact-print.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index 299297f31a..c0f97fbf5d 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -395,6 +395,8 @@ e_contact_start_new_page(EContactPrintContext *ctxt) e_contact_print_letter_tab(ctxt); gnome_print_showpage(ctxt->pc); + gnome_print_beginpage (ctxt->pc, NULL); + ctxt->first_char_on_page = ctxt->last_char_on_page + 1; } @@ -534,6 +536,8 @@ complete_sequence(EBookView *book_view, EBookViewStatus status, EContactPrintCon ctxt->first_char_on_page = 'A' - 1; + gnome_print_beginpage (ctxt->pc, NULL); + for(; cards; cards = cards->next) { ECard *card = cards->data; ECardSimple *simple = e_card_simple_new(card); @@ -1002,7 +1006,7 @@ e_contact_print_close(GnomeDialog *dialog, gpointer data) } static void -e_contact_print_button(GnomeDialog *dialog, gint button, gpointer data) +e_contact_print_response(GtkWidget *dialog, gint response_id, gpointer data) { EContactPrintContext *ctxt = g_new(EContactPrintContext, 1); EContactPrintStyle *style = g_new(EContactPrintStyle, 1); @@ -1022,7 +1026,7 @@ e_contact_print_button(GnomeDialog *dialog, gint button, gpointer data) } else { card = g_object_get_data(G_OBJECT(dialog), "card"); } - switch( button ) { + switch( response_id ) { case GNOME_PRINT_DIALOG_RESPONSE_PRINT: config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG(dialog)); master = gnome_print_job_new( config ); @@ -1061,7 +1065,7 @@ e_contact_print_button(GnomeDialog *dialog, gint button, gpointer data) ctxt->cards = g_list_append(NULL, card); complete_sequence(NULL, E_BOOK_VIEW_STATUS_SUCCESS, ctxt); } - gnome_dialog_close(dialog); + gtk_widget_destroy (dialog); break; case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW: config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG(dialog)); @@ -1109,7 +1113,7 @@ e_contact_print_button(GnomeDialog *dialog, gint button, gpointer data) else g_object_unref(card); g_free(query); - gnome_dialog_close(dialog); + gtk_widget_destroy (dialog); g_free(style); g_free(ctxt); break; @@ -1131,7 +1135,7 @@ e_contact_print_dialog_new(EBook *book, char *query) g_object_set_data(G_OBJECT(dialog), "book", book); g_object_set_data(G_OBJECT(dialog), "query", g_strdup(query)); g_signal_connect(dialog, - "clicked", G_CALLBACK(e_contact_print_button), NULL); + "response", G_CALLBACK(e_contact_print_response), NULL); g_signal_connect(dialog, "close", G_CALLBACK(e_contact_print_close), NULL); return dialog; @@ -1193,7 +1197,7 @@ e_contact_print_card_dialog_new(ECard *card) g_object_set_data(G_OBJECT(dialog), "card", card); g_object_set_data(G_OBJECT(dialog), "uses_book", (void *) 0); g_signal_connect(dialog, - "clicked", G_CALLBACK(e_contact_print_button), NULL); + "response", G_CALLBACK(e_contact_print_response), NULL); g_signal_connect(dialog, "close", G_CALLBACK(e_contact_print_close), NULL); return dialog; @@ -1215,7 +1219,7 @@ e_contact_print_card_list_dialog_new(GList *list) g_object_set_data(G_OBJECT(dialog), "card", card); g_object_set_data(G_OBJECT(dialog), "uses_book", (void *) 0); g_signal_connect(dialog, - "clicked", G_CALLBACK(e_contact_print_button), NULL); + "response", G_CALLBACK(e_contact_print_response), NULL); g_signal_connect(dialog, "close", G_CALLBACK(e_contact_print_close), NULL); return dialog; |