From: dooglus Date: Wed, 6 Feb 2008 11:52:16 +0000 (+0000) Subject: Don't expand time fields to their full format (eg. "1s" -> "0h 0m 1s 0f") when they... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=58506e7b3f705e4e17181b5f1fe65f8a09fda867;p=synfig.git Don't expand time fields to their full format (eg. "1s" -> "0h 0m 1s 0f") when they get keyboard focus. export SYNFIG_SHOW_FULL_TIME_ON_FOCUS=1 will restore the old behaviour. git-svn-id: http://svn.voria.com/code@1605 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/widget_time.cpp b/synfig-studio/trunk/src/gtkmm/widget_time.cpp index f842ab8..9458f19 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_time.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_time.cpp @@ -157,6 +157,9 @@ Widget_Time::on_focus_out_event(GdkEventFocus* event) bool Widget_Time::on_focus_in_event(GdkEventFocus* event) { - set_text(time_.get_string(fps_,App::get_time_format()|Time::FORMAT_FULL)); + // if defined, show the full time format "0h 0m 5s 0f" when the time widget gets focus + if (getenv("SYNFIG_SHOW_FULL_TIME_ON_FOCUS")) + set_text(time_.get_string(fps_,App::get_time_format()|Time::FORMAT_FULL)); + return Gtk::Entry::on_focus_in_event(event); }