projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated translations from genete.
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
gtkmm
/
widget_time.cpp
diff --git
a/synfig-studio/trunk/src/gtkmm/widget_time.cpp
b/synfig-studio/trunk/src/gtkmm/widget_time.cpp
index
d7afb84
..
105249f
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/widget_time.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/widget_time.cpp
@@
-2,10
+2,11
@@
/*! \file widget_time.cpp
** \brief Template File
**
/*! \file widget_time.cpp
** \brief Template File
**
-** $Id
: widget_time.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp
$
+** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2008 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-34,6
+35,8
@@
#include "widget_time.h"
#include "app.h"
#include "widget_time.h"
#include "app.h"
+#include "general.h"
+
#endif
/* === U S I N G =========================================================== */
#endif
/* === U S I N G =========================================================== */
@@
-45,10
+48,6
@@
using namespace studio;
/* === M A C R O S ========================================================= */
/* === M A C R O S ========================================================= */
-#if ! defined(_)
-#define _(x) (x)
-#endif
-
/* === G L O B A L S ======================================================= */
/* === P R O C E D U R E S ================================================= */
/* === G L O B A L S ======================================================= */
/* === P R O C E D U R E S ================================================= */
@@
-121,13
+120,13
@@
Widget_Time::on_event(GdkEvent* event)
switch(event->type)
{
case GDK_SCROLL:
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()();
}
{
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();
{
time_+=scroll_amount;
refresh_text();
@@
-135,6
+134,12
@@
Widget_Time::on_event(GdkEvent* event)
}
return true;
break;
}
return true;
break;
+ case GDK_BUTTON_PRESS:
+ case GDK_2BUTTON_PRESS:
+ case GDK_3BUTTON_PRESS:
+ if (!has_focus())
+ grab_focus();
+ break;
default:
break;
}
default:
break;
}
@@
-153,6
+158,9
@@
Widget_Time::on_focus_out_event(GdkEventFocus* event)
bool
Widget_Time::on_focus_in_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);
}
return Gtk::Entry::on_focus_in_event(event);
}