[vte] widget: Move some methods to VteTerminalPrivate



commit 397e0db98913c0f1634f39f2d3174e2800a840cc
Author: Christian Persch <chpe gnome org>
Date:   Sun Dec 6 19:49:38 2015 +0100

    widget: Move some methods to VteTerminalPrivate

 src/vte.cc         |   15 ++++++++-------
 src/vteinternal.hh |    3 +++
 2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 294a76d..b3d3197 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -9009,11 +9009,12 @@ vte_terminal_draw_cells(VteTerminal *terminal,
  * is using "black-on-white" to signify "inverse".  Pick up on that state and
  * fix things.  Do this here, so that if we suddenly get red-on-black, we'll do
  * the right thing. */
-static void
-_vte_terminal_fudge_pango_colors(VteTerminal *terminal, GSList *attributes,
-                                VteCell *cells, gssize n)
+void
+VteTerminalPrivate::fudge_pango_colors(GSList *attributes,
+                                       VteCell *cells,
+                                       gsize n)
 {
-       int i, sumlen = 0;
+       gsize i, sumlen = 0;
        struct _fudge_cell_props{
                gboolean saw_fg, saw_bg;
                vte::color::rgb fg, bg;
@@ -9072,8 +9073,8 @@ _vte_terminal_fudge_pango_colors(VteTerminal *terminal, GSList *attributes,
                                (props[i].bg.red == 0) &&
                                (props[i].bg.green == 0) &&
                                (props[i].bg.blue == 0)) {
-                        cells[i].attr.fore = terminal->pvt->color_defaults.attr.fore;
-                        cells[i].attr.back = terminal->pvt->color_defaults.attr.back;
+                        cells[i].attr.fore = m_color_defaults.attr.fore;
+                        cells[i].attr.back = m_color_defaults.attr.back;
                        cells[i].attr.reverse = TRUE;
                }
        }
@@ -9171,7 +9172,7 @@ VteTerminalPrivate::translate_pango_cells(PangoAttrList *attrs,
                                        apply_pango_attr(attr, cells, n_cells);
                                }
                                attr = (PangoAttribute *)list->data;
-                               _vte_terminal_fudge_pango_colors(m_terminal,
+                               fudge_pango_colors(
                                                                 list,
                                                                 cells +
                                                                 attr->start_index,
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 16a81ed..28d6ce3 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -529,6 +529,9 @@ public:
         void paint_area(GdkRectangle const* area);
         void paint_cursor();
         void paint_im_preedit_string();
+        void fudge_pango_colors(GSList *attributes,
+                                VteCell *cells,
+                                gsize n);
         void apply_pango_attr(PangoAttribute *attr,
                               VteCell *cells,
                               gsize n_cells);


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