[gedit/wip/printing-improvements: 1/3] print-preview: rename paper_w -> paper_width and paper_h -> paper_height



commit de5bc3480d2fa84fc33c50e947ecbf0b19a9dc39
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Jun 27 11:31:47 2015 +0200

    print-preview: rename paper_w -> paper_width and paper_h -> paper_height
    
    To have clearer code.

 gedit/gedit-print-preview.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gedit/gedit-print-preview.c b/gedit/gedit-print-preview.c
index b54d5d9..d7b157e 100644
--- a/gedit/gedit-print-preview.c
+++ b/gedit/gedit-print-preview.c
@@ -50,8 +50,8 @@ struct _GeditPrintPreview
        GtkWidget *layout;
 
        /* real size of the page in inches */
-       double paper_w;
-       double paper_h;
+       double paper_width;
+       double paper_height;
        double dpi;
 
        double scale;
@@ -146,13 +146,13 @@ set_rows_and_cols (GeditPrintPreview *preview,
 static double
 get_paper_width (GeditPrintPreview *preview)
 {
-       return preview->paper_w * preview->dpi;
+       return preview->paper_width * preview->dpi;
 }
 
 static double
 get_paper_height (GeditPrintPreview *preview)
 {
-       return preview->paper_h * preview->dpi;
+       return preview->paper_height * preview->dpi;
 }
 
 #define PAGE_PAD 12
@@ -845,8 +845,8 @@ gedit_print_preview_init (GeditPrintPreview *preview)
        gtk_widget_grab_focus (GTK_WIDGET (preview->layout));
 
        preview->cur_page = 0;
-       preview->paper_w = 0;
-       preview->paper_h = 0;
+       preview->paper_width = 0;
+       preview->paper_height = 0;
        preview->dpi = PRINTER_DPI;
        preview->scale = 1.0;
        preview->rows = 1;
@@ -1037,8 +1037,8 @@ static void
 update_paper_size (GeditPrintPreview *preview,
                   GtkPageSetup      *page_setup)
 {
-       preview->paper_w = gtk_page_setup_get_paper_width (page_setup, GTK_UNIT_INCH);
-       preview->paper_h = gtk_page_setup_get_paper_height (page_setup, GTK_UNIT_INCH);
+       preview->paper_width = gtk_page_setup_get_paper_width (page_setup, GTK_UNIT_INCH);
+       preview->paper_height = gtk_page_setup_get_paper_height (page_setup, GTK_UNIT_INCH);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]