~mterry/nux/null-ibus-config

« back to all changes in this revision

Viewing changes to Nux/PangoText.cpp

  • Committer: Michael Terry
  • Date: 2012-11-15 23:35:15 UTC
  • mfrom: (686.4.21 trunk)
  • Revision ID: michael.terry@canonical.com-20121115233515-inlh3o9v6euc1ky5
mergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
 
127
127
  }
128
128
 
129
 
  void PangoText::SetText(NString text)
 
129
  void PangoText::SetText(std::string text)
130
130
  {
131
131
    if (_text != text)
132
132
    {
183
183
    pango_layout_set_font_description(layout, desc);
184
184
    pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
185
185
    pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END);
186
 
    pango_layout_set_text(layout, _text.GetTCharPtr(), -1);
 
186
    pango_layout_set_text(layout, _text.c_str(), -1);
187
187
 
188
188
    pangoCtx = pango_layout_get_context(layout); // is not ref'ed
189
189
    pango_cairo_context_set_font_options(pangoCtx, font_options);
232
232
 
233
233
    pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
234
234
    pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END);
235
 
    pango_layout_set_text(layout, _text.GetTCharPtr(), -1);
 
235
    pango_layout_set_text(layout, _text.c_str(), -1);
236
236
 
237
237
    pangoCtx = pango_layout_get_context(layout);
238
238
    pango_cairo_context_set_font_options(pangoCtx, font_options);
256
256
 
257
257
  void PangoText::UpdateTextLayout()
258
258
  {
259
 
    pango_layout_set_text(_pango_layout, _text.GetTCharPtr(), -1);
 
259
    pango_layout_set_text(_pango_layout, _text.c_str(), -1);
260
260
 
261
261
    // reset the glyph string
262
262
    if (_glyph_text)