[vte] widget: Remove sealed char_{a,de}scent from public struct



commit 6cfcf7c287ce8e2baecb9ecf51226561ee403c13
Author: Christian Persch <chpe gnome org>
Date:   Mon May 2 20:55:42 2011 +0200

    widget: Remove sealed char_{a,de}scent from public struct
    
    Conflicts:
        src/vte.c

 src/vte-private.h |    2 ++
 src/vte.c         |   12 ++++++------
 src/vte.h         |    1 -
 3 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/vte-private.h b/src/vte-private.h
index be5c219..c598317 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -351,6 +351,8 @@ struct _VteTerminalPrivate {
        PangoFontDescription *fontdesc;
        VteTerminalAntiAlias fontantialias;
        gboolean fontdirty;
+        glong char_ascent;
+        glong char_descent;
 
        /* Data used when rendering the text which reflects server resources
         * and data, which should be dropped when unrealizing and (re)created
diff --git a/src/vte.c b/src/vte.c
index 5550ff6..f3c7753 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -7559,13 +7559,13 @@ vte_terminal_apply_metrics(VteTerminal *terminal,
                resize = cresize = TRUE;
                terminal->char_height = height;
        }
-       if (ascent != terminal->char_ascent) {
+       if (ascent != terminal->pvt->char_ascent) {
                resize = TRUE;
-               terminal->char_ascent = ascent;
+               terminal->pvt->char_ascent = ascent;
        }
-       if (descent != terminal->char_descent) {
+       if (descent != terminal->pvt->char_descent) {
                resize = TRUE;
-               terminal->char_descent = descent;
+               terminal->pvt->char_descent = descent;
        }
        terminal->pvt->line_thickness = line_thickness = MAX (MIN ((height - ascent) / 2, height / 14), 1);
        terminal->pvt->underline_position = MIN (ascent + line_thickness, height - line_thickness);
@@ -8282,8 +8282,8 @@ vte_terminal_init(VteTerminal *terminal)
        /* Set up dummy metrics, value != 0 to avoid division by 0 */
        terminal->char_width = 1;
        terminal->char_height = 1;
-       terminal->char_ascent = 1;
-       terminal->char_descent = 1;
+       terminal->pvt->char_ascent = 1;
+       terminal->pvt->char_descent = 1;
        terminal->pvt->line_thickness = 1;
        terminal->pvt->underline_position = 1;
        terminal->pvt->strikethrough_position = 1;
diff --git a/src/vte.h b/src/vte.h
index ad9017d..20538a5 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -65,7 +65,6 @@ struct _VteTerminal {
 
        /* Metric and sizing data. */
        glong _VTE_SEAL(char_width), _VTE_SEAL(char_height);    /* dimensions of character cells */
-       glong _VTE_SEAL(char_ascent), _VTE_SEAL(char_descent); /* important font metrics */
        glong _VTE_SEAL(row_count), _VTE_SEAL(column_count);    /* dimensions of the window */
 
        /* Titles. */


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