[vte] widget: Rename instance members



commit 9769f6ff678173db2b94f8323c9d3e97878bf76b
Author: Christian Persch <chpe gnome org>
Date:   Sun Jan 31 18:53:13 2016 +0100

    widget: Rename instance members
    
    Now that all of VteTerminalPrivate is ported over, remove the #define
    and just rename the member variable.

 src/vteinternal.hh |   45 +++++++++++++---------------------
 src/vteseq.cc      |   68 ++++++++++++++++++++++++---------------------------
 2 files changed, 49 insertions(+), 64 deletions(-)
---
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 7f42c8e..b81f4dd 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -335,24 +335,23 @@ public:
         struct _VteScreen m_normal_screen, m_alternate_screen, *m_screen;
 
         /* Values we save along with the cursor */
-        gboolean reverse_mode; /* reverse mode */
-        gboolean origin_mode;  /* origin mode */
-        gboolean sendrecv_mode;        /* sendrecv mode */
-        gboolean insert_mode;  /* insert mode */
-        gboolean linefeed_mode;        /* linefeed mode */
-        VteCell defaults;      /* default characteristics
-                                   for insertion of any new
-                                   characters */
-        VteCell color_defaults;        /* original defaults
-                                   plus the current
-                                   fore/back */
-        VteCell fill_defaults; /* original defaults
-                                   plus the current
-                                   fore/back with no
-                                   character data */
-        VteCharacterReplacement character_replacements[2];  /* charsets in the G0 and G1 slots */
-        VteCharacterReplacement *character_replacement;     /* pointer to the active one */
-
+        gboolean m_reverse_mode;  /* reverse mode */
+        gboolean m_origin_mode;   /* origin mode */
+        gboolean m_sendrecv_mode; /* sendrecv mode */
+        gboolean m_insert_mode;   /* insert mode */
+        gboolean m_linefeed_mode; /* linefeed mode */
+        VteCell m_defaults;       /* default characteristics
+                                     for insertion of any new
+                                     characters */
+        VteCell m_color_defaults; /* original defaults
+                                     plus the current
+                                     fore/back */
+        VteCell m_fill_defaults;  /* original defaults
+                                     plus the current
+                                     fore/back with no
+                                     character data */
+        VteCharacterReplacement m_character_replacements[2];  /* charsets in the G0 and G1 slots */
+        VteCharacterReplacement *m_character_replacement;     /* pointer to the active one */
 
         /* Word chars */
         char *word_char_exceptions_string;
@@ -1301,9 +1300,7 @@ public:
 #define m_line_thickness line_thickness
 #define m_underline_position underline_position
 #define m_strikethrough_position strikethrough_position
-#define m_character_replacements character_replacements
 #define m_palette palette
-#define m_sendrecv_mode sendrecv_mode
 #define m_scrollback_lines scrollback_lines
 #define m_clipboard clipboard
 #define m_meta_sends_escape meta_sends_escape
@@ -1318,7 +1315,6 @@ public:
 #define m_has_fonts has_fonts
 #define m_cursor_blink_mode cursor_blink_mode
 #define m_cursor_style cursor_style
-#define m_character_replacement character_replacement
 #define m_fontdesc fontdesc
 #define m_search_attrs search_attrs
 #define m_adjustment_changed_pending adjustment_changed_pending
@@ -1342,19 +1338,12 @@ public:
 #define m_search_wrap_around search_wrap_around
 #define m_scrolling_restricted scrolling_restricted
 #define m_selecting_had_delta selecting_had_delta
-#define m_insert_mode insert_mode
-#define m_reverse_mode reverse_mode
-#define m_origin_mode origin_mode
 #define m_selection_origin selection_origin
 #define m_selection_last selection_last
 #define m_bracketed_paste_mode bracketed_paste_mode
-#define m_linefeed_mode linefeed_mode
 #define m_selection_type selection_type
 #define m_adjustment_value_changed_pending adjustment_value_changed_pending
 #define m_accessible_emit accessible_emit
 #define m_scrolling_region scrolling_region
-#define m_color_defaults color_defaults
-#define m_fill_defaults fill_defaults
-#define m_defaults defaults
 
 extern GTimer *process_timer;
diff --git a/src/vteseq.cc b/src/vteseq.cc
index cd820b3..aac0fef 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -628,13 +628,13 @@ vte_sequence_handler_decset_internal(VteTerminalPrivate *that,
                  TRUE,
                  NULL, NULL,},
                /* 5: Reverse video. */
-                {5, PRIV_OFFSET(reverse_mode), 0, 0,
+                {5, PRIV_OFFSET(m_reverse_mode), 0, 0,
                 FALSE,
                 TRUE,
                 NULL, NULL,},
                /* 6: Origin mode: when enabled, cursor positioning is
                 * relative to the scrolling region. */
-                {6, PRIV_OFFSET(origin_mode), 0, 0,
+                {6, PRIV_OFFSET(m_origin_mode), 0, 0,
                 FALSE,
                 TRUE,
                 NULL, NULL,},
@@ -2121,9 +2121,9 @@ vte_sequence_handler_character_attributes (VteTerminalPrivate *that, GValueArray
                                continue;
                        if (G_LIKELY (color != -1)) {
                                if (param0 == 38) {
-                                        that->defaults.attr.fore = color;
+                                        that->m_defaults.attr.fore = color;
                                } else {
-                                        that->defaults.attr.back = color;
+                                        that->m_defaults.attr.back = color;
                                }
                        }
                        continue;
@@ -2138,51 +2138,51 @@ vte_sequence_handler_character_attributes (VteTerminalPrivate *that, GValueArray
                        that->reset_default_attributes();
                        break;
                case 1:
-                        that->defaults.attr.bold = 1;
+                        that->m_defaults.attr.bold = 1;
                        break;
                case 2:
-                        that->defaults.attr.dim = 1;
+                        that->m_defaults.attr.dim = 1;
                        break;
                case 3:
-                        that->defaults.attr.italic = 1;
+                        that->m_defaults.attr.italic = 1;
                        break;
                case 4:
-                        that->defaults.attr.underline = 1;
+                        that->m_defaults.attr.underline = 1;
                        break;
                case 5:
-                        that->defaults.attr.blink = 1;
+                        that->m_defaults.attr.blink = 1;
                        break;
                case 7:
-                        that->defaults.attr.reverse = 1;
+                        that->m_defaults.attr.reverse = 1;
                        break;
                case 8:
-                        that->defaults.attr.invisible = 1;
+                        that->m_defaults.attr.invisible = 1;
                        break;
                case 9:
-                        that->defaults.attr.strikethrough = 1;
+                        that->m_defaults.attr.strikethrough = 1;
                        break;
                case 21: /* Error in old versions of linux console. */
                case 22: /* ECMA 48. */
-                        that->defaults.attr.bold = 0;
-                        that->defaults.attr.dim = 0;
+                        that->m_defaults.attr.bold = 0;
+                        that->m_defaults.attr.dim = 0;
                        break;
                case 23:
-                        that->defaults.attr.italic = 0;
+                        that->m_defaults.attr.italic = 0;
                        break;
                case 24:
-                        that->defaults.attr.underline = 0;
+                        that->m_defaults.attr.underline = 0;
                        break;
                case 25:
-                        that->defaults.attr.blink = 0;
+                        that->m_defaults.attr.blink = 0;
                        break;
                case 27:
-                        that->defaults.attr.reverse = 0;
+                        that->m_defaults.attr.reverse = 0;
                        break;
                case 28:
-                        that->defaults.attr.invisible = 0;
+                        that->m_defaults.attr.invisible = 0;
                        break;
                case 29:
-                        that->defaults.attr.strikethrough = 0;
+                        that->m_defaults.attr.strikethrough = 0;
                        break;
                case 30:
                case 31:
@@ -2192,7 +2192,7 @@ vte_sequence_handler_character_attributes (VteTerminalPrivate *that, GValueArray
                case 35:
                case 36:
                case 37:
-                        that->defaults.attr.fore = VTE_LEGACY_COLORS_OFFSET + param - 30;
+                        that->m_defaults.attr.fore = VTE_LEGACY_COLORS_OFFSET + param - 30;
                        break;
                case 38:
                case 48:
@@ -2228,9 +2228,9 @@ vte_sequence_handler_character_attributes (VteTerminalPrivate *that, GValueArray
                                }
                                if (G_LIKELY (color != -1)) {
                                        if (param == 38) {
-                                                that->defaults.attr.fore = color;
+                                                that->m_defaults.attr.fore = color;
                                        } else {
-                                                that->defaults.attr.back = color;
+                                                that->m_defaults.attr.back = color;
                                        }
                                }
                        }
@@ -2238,7 +2238,7 @@ vte_sequence_handler_character_attributes (VteTerminalPrivate *that, GValueArray
                }
                case 39:
                        /* default foreground */
-                        that->defaults.attr.fore = VTE_DEFAULT_FG;
+                        that->m_defaults.attr.fore = VTE_DEFAULT_FG;
                        break;
                case 40:
                case 41:
@@ -2248,12 +2248,12 @@ vte_sequence_handler_character_attributes (VteTerminalPrivate *that, GValueArray
                case 45:
                case 46:
                case 47:
-                        that->defaults.attr.back = VTE_LEGACY_COLORS_OFFSET + param - 40;
+                        that->m_defaults.attr.back = VTE_LEGACY_COLORS_OFFSET + param - 40;
                        break;
             /* case 48: was handled above at 38 to avoid code duplication */
                case 49:
                        /* default background */
-                        that->defaults.attr.back = VTE_DEFAULT_BG;
+                        that->m_defaults.attr.back = VTE_DEFAULT_BG;
                        break;
                case 90:
                case 91:
@@ -2263,7 +2263,7 @@ vte_sequence_handler_character_attributes (VteTerminalPrivate *that, GValueArray
                case 95:
                case 96:
                case 97:
-                        that->defaults.attr.fore = VTE_LEGACY_COLORS_OFFSET + param - 90 + 
VTE_COLOR_BRIGHT_OFFSET;
+                        that->m_defaults.attr.fore = VTE_LEGACY_COLORS_OFFSET + param - 90 + 
VTE_COLOR_BRIGHT_OFFSET;
                        break;
                case 100:
                case 101:
@@ -2273,7 +2273,7 @@ vte_sequence_handler_character_attributes (VteTerminalPrivate *that, GValueArray
                case 105:
                case 106:
                case 107:
-                        that->defaults.attr.back = VTE_LEGACY_COLORS_OFFSET + param - 100 + 
VTE_COLOR_BRIGHT_OFFSET;
+                        that->m_defaults.attr.back = VTE_LEGACY_COLORS_OFFSET + param - 100 + 
VTE_COLOR_BRIGHT_OFFSET;
                        break;
                }
        }
@@ -2282,14 +2282,10 @@ vte_sequence_handler_character_attributes (VteTerminalPrivate *that, GValueArray
                that->reset_default_attributes();
        }
        /* Save the new colors. */
-        that->color_defaults.attr.fore =
-                that->defaults.attr.fore;
-        that->color_defaults.attr.back =
-                that->defaults.attr.back;
-        that->fill_defaults.attr.fore =
-                that->defaults.attr.fore;
-        that->fill_defaults.attr.back =
-                that->defaults.attr.back;
+        that->m_color_defaults.attr.fore = that->m_defaults.attr.fore;
+        that->m_color_defaults.attr.back = that->m_defaults.attr.back;
+        that->m_fill_defaults.attr.fore = that->m_defaults.attr.fore;
+        that->m_fill_defaults.attr.back = that->m_defaults.attr.back;
 }
 
 /* Move the cursor to the given column in the top row, 1-based. */


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