X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fwidget_time.cpp;h=2467c70bd5cb6c5618ba20547e8d2625922a8351;hb=b0ac74b597f00a1f222d7627e6ff760feb07bff7;hp=f842ab8c4b907d1285025b12130c450a3be73321;hpb=9d16b540d4311948c2fc91f765d24c2926e2c62b;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/widget_time.cpp b/synfig-studio/trunk/src/gtkmm/widget_time.cpp index f842ab8..2467c70 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_time.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_time.cpp @@ -6,6 +6,8 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** Copyright (c) 2008 Paul Wise ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -119,13 +121,13 @@ Widget_Time::on_event(GdkEvent* event) switch(event->type) { case GDK_SCROLL: - if(event->scroll.direction==GDK_SCROLL_DOWN) + if(event->scroll.direction==GDK_SCROLL_DOWN || event->scroll.direction==GDK_SCROLL_LEFT) { time_-=scroll_amount; refresh_text(); signal_value_changed()(); } - else if(event->scroll.direction==GDK_SCROLL_UP) + else if(event->scroll.direction==GDK_SCROLL_UP || event->scroll.direction==GDK_SCROLL_RIGHT) { time_+=scroll_amount; refresh_text(); @@ -157,6 +159,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); }