X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fentry.cpp;h=b113b2040de556001b5a3e28e631761860eb0909;hb=762a689d799075c0a10e1633bf95d53de80b4572;hp=19bbaf9dc693f685a875ef962dcb03ac3a42340c;hpb=9f38197854e699a6093a906ab43f4238f3cd2388;p=libs%2Fgltk.git diff --git a/source/entry.cpp b/source/entry.cpp index 19bbaf9..b113b20 100644 --- a/source/entry.cpp +++ b/source/entry.cpp @@ -343,11 +343,11 @@ void Entry::on_style_change() if(!style) { - text_part = 0; + text_part = nullptr; return; } - text_part = style->get_part("text"); + text_part = style->find_part("text"); if(multiline) check_view_range(); @@ -446,7 +446,7 @@ void Entry::erase_selection(bool emit_change) void Entry::check_cursor_blink() { - const Part *cursor_part = style->get_part("cursor"); + const Part *cursor_part = style->find_part("cursor"); bool has_blink = (cursor_part && cursor_part->get_graphic(ACTIVE|FOCUS)!=cursor_part->get_graphic(NORMAL|FOCUS)); cursor_blink = (state&FOCUS); @@ -468,7 +468,7 @@ void Entry::check_view_range() if(!multiline || !text_part) return; - visible_rows = text.get_visible_lines(*text_part, geom, 0); + visible_rows = text.get_visible_lines(*text_part, geom, nullptr); unsigned row, col; text.offset_to_coords(edit_pos, row, col);