aboutsummaryrefslogtreecommitdiffstats
path: root/embed/print-dialog.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-06-15 20:01:53 +0800
committerChristian Persch <chpe@src.gnome.org>2003-06-15 20:01:53 +0800
commit5a927d2793acbd7ca212812048e41891cda8a6e9 (patch)
treec1d9fe682c7af65fda89ab591e7e9b729ac0596a /embed/print-dialog.c
parentfa31654eac12411d58ab603924953410c53e1426 (diff)
downloadgsoc2013-epiphany-5a927d2793acbd7ca212812048e41891cda8a6e9.tar
gsoc2013-epiphany-5a927d2793acbd7ca212812048e41891cda8a6e9.tar.gz
gsoc2013-epiphany-5a927d2793acbd7ca212812048e41891cda8a6e9.tar.bz2
gsoc2013-epiphany-5a927d2793acbd7ca212812048e41891cda8a6e9.tar.lz
gsoc2013-epiphany-5a927d2793acbd7ca212812048e41891cda8a6e9.tar.xz
gsoc2013-epiphany-5a927d2793acbd7ca212812048e41891cda8a6e9.tar.zst
gsoc2013-epiphany-5a927d2793acbd7ca212812048e41891cda8a6e9.zip
Convert dialog to metric units and default paper to A4. Fixes #112619
2003-06-15 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/MozillaPrivate.cpp: (MozillaCollatePrintSettings): * embed/ephy-embed.h: * embed/print-dialog.c: (print_dialog_init), (print_free_info), (print_get_info): * data/epiphany.schemas.in: * data/glade/print.glade: Convert dialog to metric units and default paper to A4. Fixes #112619
Diffstat (limited to 'embed/print-dialog.c')
-rwxr-xr-xembed/print-dialog.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/embed/print-dialog.c b/embed/print-dialog.c
index baf636cd0..f69ee8811 100755
--- a/embed/print-dialog.c
+++ b/embed/print-dialog.c
@@ -95,7 +95,7 @@ EphyDialogProperty properties [] =
{ PRINTON_PROP, "printer_radiobutton", CONF_PRINT_PRINTON, PT_NORMAL, NULL },
{ PRINTER_PROP, "printer_entry", CONF_PRINT_PRINTER, PT_NORMAL, NULL },
{ FILE_PROP, "file_entry", CONF_PRINT_FILE, PT_NORMAL, NULL },
- { PAPER_PROP,"letter_radiobutton", CONF_PRINT_PAPER, PT_NORMAL, NULL },
+ { PAPER_PROP,"A4_radiobutton", CONF_PRINT_PAPER, PT_NORMAL, NULL },
{ TOP_PROP, "top_spinbutton", CONF_PRINT_TOP_MARGIN, PT_NORMAL, NULL },
{ BOTTOM_PROP, "bottom_spinbutton", CONF_PRINT_BOTTOM_MARGIN, PT_NORMAL, NULL },
{ LEFT_PROP,"left_spinbutton", CONF_PRINT_LEFT_MARGIN, PT_NORMAL, NULL },
@@ -113,6 +113,13 @@ EphyDialogProperty properties [] =
{ -1, NULL, NULL }
};
+static const
+char *paper_format_enum [] =
+{
+ "A4", "Letter", "Legal", "Executive"
+};
+static guint n_paper_format_enum = G_N_ELEMENTS (paper_format_enum);
+
static guint print_dialog_signals[LAST_SIGNAL] = { 0 };
GType
@@ -179,6 +186,9 @@ print_dialog_init (PrintDialog *dialog)
"print.glade", "print_dialog");
dialog->priv->window = ephy_dialog_get_control (EPHY_DIALOG(dialog), WINDOW_PROP);
+
+ ephy_dialog_add_enum (EPHY_DIALOG (dialog), PAPER_PROP,
+ n_paper_format_enum, paper_format_enum);
icon = gtk_widget_render_icon (dialog->priv->window,
GTK_STOCK_PRINT,
@@ -244,6 +254,7 @@ print_free_info (EmbedPrintInfo *info)
{
g_free (info->printer);
g_free (info->file);
+ g_free (info->paper);
g_free (info->header_left_string);
g_free (info->header_right_string);
g_free (info->footer_left_string);
@@ -303,7 +314,7 @@ print_get_info (EphyDialog *dialog)
info->to_page = g_value_get_float (&to_page);
ephy_dialog_get_value (dialog, PAPER_PROP, &paper);
- info->paper = g_value_get_int (&paper);
+ info->paper = g_strdup (paper_format_enum[g_value_get_int (&paper)]);
ephy_dialog_get_value (dialog, ALL_PAGES_PROP, &pages);
info->pages = g_value_get_int (&pages);