[longomatch] Rename Seconds to TotalSeconds in Time
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Rename Seconds to TotalSeconds in Time
- Date: Tue, 28 Oct 2014 09:55:22 +0000 (UTC)
commit 60315f2a016c28f782f3b297853ca5c30a9152ef
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sun Oct 26 12:44:20 2014 +0100
Rename Seconds to TotalSeconds in Time
LongoMatch.Core/Store/DashboardButton.cs | 4 ++--
LongoMatch.Core/Store/Templates/Dashboard.cs | 4 ++--
LongoMatch.Drawing/CanvasObjects/CategoryObject.cs | 2 +-
LongoMatch.Drawing/CanvasObjects/TimerObject.cs | 2 +-
LongoMatch.Drawing/Widgets/PlaysTimeline.cs | 2 +-
LongoMatch.Drawing/Widgets/TimersTimeline.cs | 2 +-
LongoMatch.Drawing/Widgets/Timerule.cs | 2 +-
LongoMatch.GUI/Gui/Component/CategoryProperties.cs | 10 +++++-----
LongoMatch.GUI/Gui/Component/ProjectPeriods.cs | 2 +-
LongoMatch.GUI/Gui/Component/Timeline.cs | 2 +-
LongoMatch.GUI/Gui/Menu/PeriodsMenu.cs | 4 ++--
LongoMatch.GUI/Gui/Menu/PlaysMenu.cs | 4 ++--
LongoMatch.Multimedia/Utils/GstDiscoverer.cs | 2 +-
13 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/LongoMatch.Core/Store/DashboardButton.cs b/LongoMatch.Core/Store/DashboardButton.cs
index 9804671..502e498 100644
--- a/LongoMatch.Core/Store/DashboardButton.cs
+++ b/LongoMatch.Core/Store/DashboardButton.cs
@@ -102,8 +102,8 @@ namespace LongoMatch.Core.Store
{
public TimedDashboardButton () {
TagMode = TagMode.Predefined;
- Start = new Time {Seconds = 10};
- Stop = new Time {Seconds = 10};
+ Start = new Time {TotalSeconds = 10};
+ Stop = new Time {TotalSeconds = 10};
}
public TagMode TagMode {
diff --git a/LongoMatch.Core/Store/Templates/Dashboard.cs b/LongoMatch.Core/Store/Templates/Dashboard.cs
index 66959b6..d6c4a62 100644
--- a/LongoMatch.Core/Store/Templates/Dashboard.cs
+++ b/LongoMatch.Core/Store/Templates/Dashboard.cs
@@ -181,8 +181,8 @@ namespace LongoMatch.Core.Store.Templates
button = new AnalysisEventButton {
EventType = evtype,
- Start = new Time{Seconds = 10},
- Stop = new Time {Seconds = 10},
+ Start = new Time{TotalSeconds = 10},
+ Stop = new Time {TotalSeconds = 10},
HotKey = h,
/* Leave the first row for the timers and score */
Position = new Point (10 + (index % 7) * (CAT_WIDTH + 10),
diff --git a/LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
b/LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
index f73c310..a397a78 100644
--- a/LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
@@ -88,7 +88,7 @@ namespace LongoMatch.Drawing.CanvasObjects
return currentTime;
}
set {
- bool secsChanged = currentTime.Seconds != value.Seconds;
+ bool secsChanged = currentTime.TotalSeconds != value.TotalSeconds;
currentTime = value;
if (Start != null) {
if (currentTime < Start) {
diff --git a/LongoMatch.Drawing/CanvasObjects/TimerObject.cs b/LongoMatch.Drawing/CanvasObjects/TimerObject.cs
index 4faf150..fd30e2a 100644
--- a/LongoMatch.Drawing/CanvasObjects/TimerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/TimerObject.cs
@@ -61,7 +61,7 @@ namespace LongoMatch.Drawing.CanvasObjects
}
}
if (value != null && currentTime != null &&
- currentTime.Seconds != value.Seconds) {
+ currentTime.TotalSeconds != value.TotalSeconds) {
update = true;
}
currentTime = value;
diff --git a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
index f8e55b1..329fc20 100644
--- a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
@@ -163,7 +163,7 @@ namespace LongoMatch.Drawing.Widgets
void Update ()
{
- double width = duration.Seconds / SecondsPerPixel;
+ double width = duration.TotalSeconds / SecondsPerPixel;
widget.Width = width + 10;
foreach (TimelineObject tl in Objects) {
tl.Width = width + 10;
diff --git a/LongoMatch.Drawing/Widgets/TimersTimeline.cs b/LongoMatch.Drawing/Widgets/TimersTimeline.cs
index 80949ae..09bda17 100644
--- a/LongoMatch.Drawing/Widgets/TimersTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/TimersTimeline.cs
@@ -71,7 +71,7 @@ namespace LongoMatch.Drawing.Widgets
if (duration == null)
return;
- width = duration.Seconds / SecondsPerPixel;
+ width = duration.TotalSeconds / SecondsPerPixel;
widget.Width = width + 10;
foreach (TimelineObject tl in timers.Values) {
tl.Width = width + 10;
diff --git a/LongoMatch.Drawing/Widgets/Timerule.cs b/LongoMatch.Drawing/Widgets/Timerule.cs
index 421a480..2348f76 100644
--- a/LongoMatch.Drawing/Widgets/Timerule.cs
+++ b/LongoMatch.Drawing/Widgets/Timerule.cs
@@ -145,7 +145,7 @@ namespace LongoMatch.Drawing.Widgets
tk.DrawLine (new Point (pos, height),
new Point (pos, height - BIG_LINE_HEIGHT));
tk.DrawText (new Point (pos - TEXT_WIDTH / 2, 0), TEXT_WIDTH, height -
BIG_LINE_HEIGHT - 4,
- new Time { Seconds = (int) (i * SecondsPerPixel)
}.ToSecondsString ());
+ new Time { TotalSeconds = (int) (i * SecondsPerPixel)
}.ToSecondsString ());
}
start = (startX - (startX % (TIME_SPACING / 10))) + (TIME_SPACING / 10);
diff --git a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
index ecc7d1d..d2007b5 100644
--- a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
@@ -203,8 +203,8 @@ namespace LongoMatch.Gui.Component
if (timedButton != null) {
lastLeadTime = timedButton.Start;
tagmodecombobox.Active = (int)timedButton.TagMode;
- leadtimebutton.Value = timedButton.Start.Seconds;
- lagtimebutton.Value = timedButton.Stop.Seconds;
+ leadtimebutton.Value = timedButton.Start.TotalSeconds;
+ lagtimebutton.Value = timedButton.Stop.TotalSeconds;
}
if (eventButton != null) {
SetPositionCombo (fieldcombobox, eventButton.EventType.TagFieldPosition,
@@ -297,7 +297,7 @@ namespace LongoMatch.Gui.Component
timedButton.TagMode = (TagMode)tagmodecombobox.Active;
if (timedButton.TagMode == TagMode.Predefined) {
lagtimebutton.Sensitive = true;
- leadtimebutton.Value = lastLeadTime.Seconds;
+ leadtimebutton.Value = lastLeadTime.TotalSeconds;
} else {
lagtimebutton.Sensitive = false;
lastLeadTime = timedButton.Start;
@@ -325,7 +325,7 @@ namespace LongoMatch.Gui.Component
if (ignore)
return;
- timedButton.Start = new Time { Seconds=(int)leadtimebutton.Value };
+ timedButton.Start = new Time { TotalSeconds=(int)leadtimebutton.Value };
Edited = true;
}
@@ -334,7 +334,7 @@ namespace LongoMatch.Gui.Component
if (ignore)
return;
- timedButton.Stop = new Time { Seconds=(int)lagtimebutton.Value };
+ timedButton.Stop = new Time { TotalSeconds=(int)lagtimebutton.Value };
Edited = true;
}
diff --git a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
index 11def2c..9ff2662 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
@@ -100,7 +100,7 @@ namespace LongoMatch.Gui.Component
void SetZoom ()
{
if (duration != null) {
- double spp = (double)duration.Seconds / drawingarea1.Allocation.Width;
+ double spp = (double)duration.TotalSeconds / drawingarea1.Allocation.Width;
int secondsPerPixel = (int)Math.Ceiling (spp);
timerule.SecondsPerPixel = secondsPerPixel;
timersTimeline.SecondsPerPixel = secondsPerPixel;
diff --git a/LongoMatch.GUI/Gui/Component/Timeline.cs b/LongoMatch.GUI/Gui/Component/Timeline.cs
index ce41e91..76b1238 100644
--- a/LongoMatch.GUI/Gui/Component/Timeline.cs
+++ b/LongoMatch.GUI/Gui/Component/Timeline.cs
@@ -180,7 +180,7 @@ namespace LongoMatch.Gui.Component
void HandleFocusClicked (object sender, EventArgs e)
{
- double pos = CurrentTime.Seconds / secondsPerPixel;
+ double pos = CurrentTime.TotalSeconds / secondsPerPixel;
double maxPos = timelinearea.Allocation.Width - scrolledwindow1.Allocation.Width;
pos = Math.Min (pos, maxPos);
diff --git a/LongoMatch.GUI/Gui/Menu/PeriodsMenu.cs b/LongoMatch.GUI/Gui/Menu/PeriodsMenu.cs
index 52f9947..03a2935 100644
--- a/LongoMatch.GUI/Gui/Menu/PeriodsMenu.cs
+++ b/LongoMatch.GUI/Gui/Menu/PeriodsMenu.cs
@@ -59,8 +59,8 @@ namespace LongoMatch.Gui.Menus
Period p = new Period {Name = periodname};
p.Nodes.Add (new TimeNode {
Name = periodname,
- Start = new Time {Seconds = time.Seconds - 10},
- Stop = new Time {Seconds = time.Seconds + 10}});
+ Start = new Time {TotalSeconds = time.TotalSeconds - 10},
+ Stop = new Time {TotalSeconds = time.TotalSeconds + 10}});
project.Periods.Add (p);
if (timertimeline != null) {
timertimeline.AddTimer (p);
diff --git a/LongoMatch.GUI/Gui/Menu/PlaysMenu.cs b/LongoMatch.GUI/Gui/Menu/PlaysMenu.cs
index cbb6a42..74efd21 100644
--- a/LongoMatch.GUI/Gui/Menu/PlaysMenu.cs
+++ b/LongoMatch.GUI/Gui/Menu/PlaysMenu.cs
@@ -225,8 +225,8 @@ namespace LongoMatch.Gui.Menus
{
Config.EventsBroker.EmitNewTag (eventType,
eventTime: time,
- start: time - new Time {Seconds = 10},
- stop: time + new Time {Seconds = 10});
+ start: time - new Time {TotalSeconds = 10},
+ stop: time + new Time {TotalSeconds = 10});
}
void EmitRenderPlaylist (List<TimelineEvent> plays)
diff --git a/LongoMatch.Multimedia/Utils/GstDiscoverer.cs b/LongoMatch.Multimedia/Utils/GstDiscoverer.cs
index de20db2..d03b9e3 100644
--- a/LongoMatch.Multimedia/Utils/GstDiscoverer.cs
+++ b/LongoMatch.Multimedia/Utils/GstDiscoverer.cs
@@ -76,7 +76,7 @@ namespace LongoMatch.Video.Utils
factory = new MultimediaFactory ();
thumbnailer = factory.GetFramesCapturer ();
thumbnailer.Open (filePath);
- preview = thumbnailer.GetFrame (new Time { Seconds = 2 }, false,
+ preview = thumbnailer.GetFrame (new Time { TotalSeconds = 2 }, false,
THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_HEIGHT);
thumbnailer.Dispose ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]