Commit bacae284 authored by Jody Goldberg's avatar Jody Goldberg

Some print dialog improvements from Jon Hellan.

parent a8a9b912
1999-10-06 Jody Goldberg <jgoldberg@home.com>
From : Jon K Hellan <Jon.K.Hellan@item.ntnu.no>
* src/dialogs/dialog-printer.c (gnumeric_printer_dialog_run):
toplevel: New parameter - app window.
Set initial focus.
Make <Enter> in entry fields invoke default button.
Specify the app as the parent.
* src/dialogs/dialog-printer.h (gnumeric_printer_dialog_run):
Change signature
* src/print.c (sheet_print):
gnumeric_printer_dialog_run has new signature
1999-10-05 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_destroy_contents) : Mark freed segments with
......
1999-10-06 Jody Goldberg <jgoldberg@home.com>
From : Jon K Hellan <Jon.K.Hellan@item.ntnu.no>
* src/dialogs/dialog-printer.c (gnumeric_printer_dialog_run):
toplevel: New parameter - app window.
Set initial focus.
Make <Enter> in entry fields invoke default button.
Specify the app as the parent.
* src/dialogs/dialog-printer.h (gnumeric_printer_dialog_run):
Change signature
* src/print.c (sheet_print):
gnumeric_printer_dialog_run has new signature
1999-10-05 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_destroy_contents) : Mark freed segments with
......
......@@ -151,23 +151,35 @@ gnumeric_printer_dialog_new (PrintRange default_range)
/**
* gnumeric_printer_dialog_run:
* @range: pointer to the default range
* @workbook: The workbook calling the routine.
*
* A convenience function.
*
* Return value: the selected range in *range.
**/
GnomePrinter *
gnumeric_printer_dialog_run (PrintRange *range)
gnumeric_printer_dialog_run (PrintRange *range, Workbook *wb)
{
int bn;
GnumericPrinterDialog *pd;
GnomePrinterWidget *pw;
GnomePrinter *printer;
GtkWidget *printer_dialog;
printer_dialog = gnumeric_printer_dialog_new (*range);
pd = GNUMERIC_PRINTER_DIALOG (printer_dialog);
pw = pd->gnome_printer_widget;
/* The printer menu is better, but gnome_printer_dialog does
not expose it */
gtk_widget_grab_focus (GTK_WIDGET(pw->r1));
gnome_dialog_editable_enters(GNOME_DIALOG(pd),
GTK_EDITABLE(pw->entry_command));
gnome_dialog_editable_enters(GNOME_DIALOG(pd),
GTK_EDITABLE(pw->entry_filename));
gtk_window_set_modal (GTK_WINDOW (printer_dialog), TRUE);
gnome_dialog_set_parent (GNOME_DIALOG (printer_dialog), GTK_WINDOW(wb->toplevel));
bn = gnome_dialog_run (GNOME_DIALOG (printer_dialog));
if (bn < 0)
......
......@@ -22,6 +22,7 @@ typedef struct {
GtkType gnumeric_printer_dialog_get_type (void);
GtkWidget *gnumeric_printer_dialog_new (PrintRange default_range);
PrintRange gnumeric_printer_dialog_get_range (GnumericPrinterDialog *pd);
GnomePrinter *gnumeric_printer_dialog_run (PrintRange *range);
GnomePrinter *gnumeric_printer_dialog_run (PrintRange *range,
Workbook *wb);
#endif /* GNUMERIC_DIALOG_PRINT_H */
......@@ -588,7 +588,8 @@ sheet_print (Sheet *sheet, gboolean preview,
g_return_if_fail (sheet != NULL);
if (!preview) {
if (!(printer = gnumeric_printer_dialog_run (&default_range)))
if (!(printer = gnumeric_printer_dialog_run
(&default_range, sheet->workbook)))
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment