diff -Nru nux-4.0.5+14.04.20140226/configure.ac nux-4.0.6+14.04.20140311.1/configure.ac --- nux-4.0.5+14.04.20140226/configure.ac 2014-02-26 16:47:14.000000000 +0000 +++ nux-4.0.6+14.04.20140311.1/configure.ac 2014-03-11 18:21:51.000000000 +0000 @@ -15,7 +15,7 @@ # m4_define([nux_major_version], [4]) m4_define([nux_minor_version], [0]) -m4_define([nux_micro_version], [5]) +m4_define([nux_micro_version], [6]) m4_define([nux_api_version], [4.0]) # Increase the number (to the current date) everytime you propose a branch that breaks the API or ABI @@ -23,7 +23,7 @@ # e.g.: december 5th, 2011 is: 20111205 # To make more than one API change in a day, add a number to the date. Like 20111205.xx -m4_define([nux_abi_version], [20131203.0]) +m4_define([nux_abi_version], [20140307.0]) m4_define([nux_version], [nux_major_version.nux_minor_version.nux_micro_version]) diff -Nru nux-4.0.5+14.04.20140226/debian/changelog nux-4.0.6+14.04.20140311.1/debian/changelog --- nux-4.0.5+14.04.20140226/debian/changelog 2014-03-12 01:31:13.000000000 +0000 +++ nux-4.0.6+14.04.20140311.1/debian/changelog 2014-03-12 01:31:13.000000000 +0000 @@ -1,3 +1,20 @@ +nux (4.0.6+14.04.20140311.1-0ubuntu1) trusty; urgency=low + + [ Stephen M. Webb ] + * ABI bump 20140307.0 + + [ Andrea Azzarone ] + * Emit nux::Layout::ViewAdded when a layout is added too. In future + would be nice to rename the signal name in AreaAdded. We need for + a11y reasons. + + [ Marco Trevisan (TreviƱo) ] + * TextEntry: add setter/getter to make the cursor visible only on key + focus When the toggle is false, the text entry cursor is shown only + if the area is key-focused. + + -- Ubuntu daily release Tue, 11 Mar 2014 18:22:02 +0000 + nux (4.0.5+14.04.20140226-0ubuntu1) trusty; urgency=low [ Chris Townsend ] diff -Nru nux-4.0.5+14.04.20140226/Nux/Layout.cpp nux-4.0.6+14.04.20140311.1/Nux/Layout.cpp --- nux-4.0.5+14.04.20140226/Nux/Layout.cpp 2014-02-26 16:47:14.000000000 +0000 +++ nux-4.0.6+14.04.20140311.1/Nux/Layout.cpp 2014-03-11 18:21:43.000000000 +0000 @@ -252,6 +252,7 @@ _layout_element_list.insert(pos, layout); } + ViewAdded.emit(this, layout); } //! Add an object to the layout. diff -Nru nux-4.0.5+14.04.20140226/Nux/LinearLayout.cpp nux-4.0.6+14.04.20140311.1/Nux/LinearLayout.cpp --- nux-4.0.5+14.04.20140226/Nux/LinearLayout.cpp 2014-02-26 16:47:14.000000000 +0000 +++ nux-4.0.6+14.04.20140311.1/Nux/LinearLayout.cpp 2014-03-11 18:21:43.000000000 +0000 @@ -95,6 +95,7 @@ _layout_element_list.insert(pos, layout); } + ViewAdded.emit(this, layout); } //! Add an object to the layout. diff -Nru nux-4.0.5+14.04.20140226/Nux/TextEntry.cpp nux-4.0.6+14.04.20140311.1/Nux/TextEntry.cpp --- nux-4.0.5+14.04.20140226/Nux/TextEntry.cpp 2014-02-26 16:47:14.000000000 +0000 +++ nux-4.0.6+14.04.20140311.1/Nux/TextEntry.cpp 2014-03-11 18:21:31.000000000 +0000 @@ -179,6 +179,7 @@ , key_nav_mode_(false) , lose_key_focus_on_key_nav_direction_up_(true) , lose_key_focus_on_key_nav_direction_down_(true) + , cursor_visible_on_key_focus_only_(false) { cairo_font_options_set_antialias(font_options_, CAIRO_ANTIALIAS_SUBPIXEL); cairo_font_options_set_hint_style(font_options_, CAIRO_HINT_STYLE_FULL); @@ -914,6 +915,13 @@ cursor_visible_ = false; // hide cursor when losing focus selection_changed_ = true; cursor_moved_ = true; + + if (cursor_visible_on_key_focus_only_ && cursor_blink_timer_) + { + g_source_remove(cursor_blink_timer_); + cursor_blink_timer_ = 0; + } + // Don't adjust scroll. QueueRefresh(true, false); } @@ -1144,6 +1152,9 @@ void TextEntry::QueueCursorBlink() { + if (cursor_visible_on_key_focus_only_ && !focused_) + return; + if (!cursor_blink_timer_) cursor_blink_timer_ = g_timeout_add(kCursorBlinkTimeout, (GSourceFunc)&CursorBlinkCallback, @@ -2517,6 +2528,41 @@ return lose_key_focus_on_key_nav_direction_down_; } + void TextEntry::SetToggleCursorVisibilityOnKeyFocus(bool b) + { + if (cursor_visible_on_key_focus_only_ == b) + return; + + cursor_visible_on_key_focus_only_ = b; + + if (cursor_visible_on_key_focus_only_) + { + if (!focused_) + { + if (cursor_blink_timer_) + { + g_source_remove(cursor_blink_timer_); + cursor_blink_timer_ = 0; + } + + cursor_visible_ = false; + QueueDraw(); + } + } + else + { + if (!focused_) + { + QueueCursorBlink(); + } + } + } + + bool TextEntry::GetToggleCursorVisibilityOnKeyFocus() const + { + return cursor_visible_on_key_focus_only_; + } + bool TextEntry::IsInTextInputMode() const { return text_input_mode_; diff -Nru nux-4.0.5+14.04.20140226/Nux/TextEntry.h nux-4.0.6+14.04.20140311.1/Nux/TextEntry.h --- nux-4.0.5+14.04.20140226/Nux/TextEntry.h 2014-02-26 16:47:14.000000000 +0000 +++ nux-4.0.6+14.04.20140311.1/Nux/TextEntry.h 2014-03-11 18:21:31.000000000 +0000 @@ -173,6 +173,8 @@ void MoveCursorToLineStart(); void MoveCursorToLineEnd(); + void SetToggleCursorVisibilityOnKeyFocus(bool b); + bool GetToggleCursorVisibilityOnKeyFocus() const; /*! When the text entry is in single line mode, the keyboard arrow up/down may be used @@ -511,6 +513,7 @@ bool lose_key_focus_on_key_nav_direction_up_; bool lose_key_focus_on_key_nav_direction_down_; + bool cursor_visible_on_key_focus_only_; std::vector composition_list_;