[longomatch] Apply more code formatting
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Apply more code formatting
- Date: Tue, 31 Mar 2015 17:36:10 +0000 (UTC)
commit 5251c62a4a340f3a35cd7abd7cc1f37a2e34c915
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Mar 26 19:30:59 2015 +0100
Apply more code formatting
LongoMatch.GUI/Gui/Cairo.cs | 82 ++++----
LongoMatch.GUI/Gui/Component/AnalysisComponent.cs | 4 +-
LongoMatch.GUI/Gui/Component/BackgroundWidget.cs | 28 ++--
LongoMatch.GUI/Gui/Component/CategoryProperties.cs | 14 +-
LongoMatch.GUI/Gui/Component/CodingWidget.cs | 15 +-
LongoMatch.GUI/Gui/Component/CoordinatesTagger.cs | 4 +-
LongoMatch.GUI/Gui/Component/DashboardWidget.cs | 77 ++++----
LongoMatch.GUI/Gui/Component/DatePicker.cs | 2 +-
LongoMatch.GUI/Gui/Component/EventsListWidget.cs | 37 ++--
.../Gui/Component/FakeAnalysisComponent.cs | 5 +-
.../Gui/Component/GameDescriptionHeader.cs | 7 +-
.../Gui/Component/GeneralPreferencesPanel.cs | 39 ++--
.../Gui/Component/LiveAnalysisPreferences.cs | 28 ++--
LongoMatch.GUI/Gui/Component/NotesWidget.cs | 16 +-
LongoMatch.GUI/Gui/Component/PlayListWidget.cs | 32 ++--
.../Gui/Component/PlayersListTreeWidget.cs | 50 +++---
.../Gui/Component/PlaysCoordinatesTagger.cs | 18 +-
.../Gui/Component/PlaysListTreeWidget.cs | 12 +-
.../Gui/Component/PlaysPositionViewer.cs | 19 +-
.../Gui/Component/PlaysSelectionWidget.cs | 6 +-
LongoMatch.GUI/Gui/Component/PluginsPreferences.cs | 12 +-
LongoMatch.GUI/Gui/Component/ProjectListWidget.cs | 24 ++--
LongoMatch.GUI/Gui/Component/ProjectPeriods.cs | 17 ++-
LongoMatch.GUI/Gui/Component/RenderingStateBar.cs | 14 +-
LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs | 17 +-
LongoMatch.GUI/Gui/Component/TeamsComboBox.cs | 26 ++--
LongoMatch.GUI/Gui/Component/Timeline.cs | 13 +-
.../Gui/Component/VideoPreferencesPanel.cs | 24 ++-
LongoMatch.GUI/Gui/Dialog/About.cs | 11 +-
LongoMatch.GUI/Gui/Dialog/BusyDialog.cs | 5 +-
LongoMatch.GUI/Gui/Dialog/CalendarDialog.cs | 8 +-
LongoMatch.GUI/Gui/Dialog/ChooseOptionDialog.cs | 4 +-
LongoMatch.GUI/Gui/Dialog/ChooseProjectDialog.cs | 7 +-
LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs | 77 ++++----
LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs | 10 +-
LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs | 16 +-
LongoMatch.GUI/Gui/Dialog/EntryDialog.cs | 37 ++--
LongoMatch.GUI/Gui/Dialog/EventTypeTagsEditor.cs | 8 +-
.../Gui/Dialog/FramesCaptureProgressDialog.cs | 33 ++--
LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs | 25 ++-
LongoMatch.GUI/Gui/Dialog/PlayEditor.cs | 10 +-
LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs | 52 +++---
LongoMatch.GUI/Gui/Dialog/SnapshotsDialog.cs | 15 +-
LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs | 6 +-
LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs | 13 +-
.../Gui/Dialog/VideoEditionProperties.cs | 21 ++-
LongoMatch.GUI/Gui/MainWindow.cs | 59 ++++--
LongoMatch.GUI/Gui/Menu/PeriodsMenu.cs | 13 +-
LongoMatch.GUI/Gui/Menu/PlaysMenu.cs | 47 +++--
LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs | 55 +++---
LongoMatch.GUI/Gui/Panel/PanelHeader.cs | 18 +-
LongoMatch.GUI/Gui/Panel/PreferencesPanel.cs | 54 +++---
LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs | 35 ++--
LongoMatch.GUI/Gui/Panel/WelcomePanel.cs | 63 ++++---
LongoMatch.GUI/Gui/TransparentDrawingArea.cs | 201 ++++++++++----------
.../Gui/TreeView/CategoriesFilterTreeView.cs | 12 +-
LongoMatch.GUI/Gui/TreeView/FilterBaseView.cs | 91 +++++----
LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs | 6 +-
LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs | 23 ++-
.../Gui/TreeView/PlayersFilterTreeView.cs | 75 ++++----
LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs | 39 ++--
LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs | 30 ++--
.../Gui/TreeView/RenderingJobsTreeView.cs | 53 +++---
63 files changed, 1008 insertions(+), 866 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Cairo.cs b/LongoMatch.GUI/Gui/Cairo.cs
index 8a6beed..175bc73 100644
--- a/LongoMatch.GUI/Gui/Cairo.cs
+++ b/LongoMatch.GUI/Gui/Cairo.cs
@@ -24,65 +24,69 @@ namespace LongoMatch.Core.Common
{
public class CairoUtils
{
- public static void DrawRoundedRectangle(Cairo.Context gr, double x, double y,
- double width, double height, double radius,
- Cairo.Color color, Cairo.Color borderColor)
+ public static void DrawRoundedRectangle (Cairo.Context gr, double x, double y,
+ double width, double height, double radius,
+ Cairo.Color color, Cairo.Color borderColor)
{
- gr.Save();
+ gr.Save ();
- if((radius > height / 2) || (radius > width / 2))
- radius = Math.Min(height / 2, width / 2);
+ if ((radius > height / 2) || (radius > width / 2))
+ radius = Math.Min (height / 2, width / 2);
- gr.MoveTo(x, y + radius);
- gr.Arc(x + radius, y + radius, radius, Math.PI, -Math.PI / 2);
- gr.LineTo(x + width - radius, y);
- gr.Arc(x + width - radius, y + radius, radius, -Math.PI / 2, 0);
- gr.LineTo(x + width, y + height - radius);
- gr.Arc(x + width - radius, y + height - radius, radius, 0, Math.PI / 2);
- gr.LineTo(x + radius, y + height);
- gr.Arc(x + radius, y + height - radius, radius, Math.PI / 2, Math.PI);
- gr.ClosePath();
- gr.Restore();
+ gr.MoveTo (x, y + radius);
+ gr.Arc (x + radius, y + radius, radius, Math.PI, -Math.PI / 2);
+ gr.LineTo (x + width - radius, y);
+ gr.Arc (x + width - radius, y + radius, radius, -Math.PI / 2, 0);
+ gr.LineTo (x + width, y + height - radius);
+ gr.Arc (x + width - radius, y + height - radius, radius, 0, Math.PI / 2);
+ gr.LineTo (x + radius, y + height);
+ gr.Arc (x + radius, y + height - radius, radius, Math.PI / 2, Math.PI);
+ gr.ClosePath ();
+ gr.Restore ();
gr.LineJoin = LineJoin.Round;
gr.Color = borderColor;
- gr.StrokePreserve();
+ gr.StrokePreserve ();
gr.Color = color;
- gr.Fill();
+ gr.Fill ();
}
- public static void DrawLine(Cairo.Context g, double x1, double y1,
- double x2, double y2,
- int width, Cairo.Color color) {
+ public static void DrawLine (Cairo.Context g, double x1, double y1,
+ double x2, double y2,
+ int width, Cairo.Color color)
+ {
g.Color = color;
g.Operator = Operator.Over;
g.LineWidth = width;
- g.MoveTo(x1, y1);
- g.LineTo(x2,y2);
- g.Stroke();
+ g.MoveTo (x1, y1);
+ g.LineTo (x2, y2);
+ g.Stroke ();
}
- public static void DrawTriangle(Cairo.Context g, double x, double y,
- int width, int height, Cairo.Color color) {
+ public static void DrawTriangle (Cairo.Context g, double x, double y,
+ int width, int height, Cairo.Color color)
+ {
g.Color = color;
- g.MoveTo(x, y);
- g.LineTo(x + width/2, y-height);
- g.LineTo(x - width/2, y-height);
- g.ClosePath();
- g.Fill();
- g.Stroke();
+ g.MoveTo (x, y);
+ g.LineTo (x + width / 2, y - height);
+ g.LineTo (x - width / 2, y - height);
+ g.ClosePath ();
+ g.Fill ();
+ g.Stroke ();
}
- public static Cairo.Color RGBToCairoColor(Gdk.Color gdkColor) {
+ public static Cairo.Color RGBToCairoColor (Gdk.Color gdkColor)
+ {
return new Cairo.Color (Misc.ShortToDouble (gdkColor.Red),
- Misc.ShortToDouble (gdkColor.Green),
- Misc.ShortToDouble (gdkColor.Blue));
+ Misc.ShortToDouble (gdkColor.Green),
+ Misc.ShortToDouble (gdkColor.Blue));
}
-
- public static Cairo.Color ColorFromRGB (byte r, byte g, byte b) {
+
+ public static Cairo.Color ColorFromRGB (byte r, byte g, byte b)
+ {
return new Cairo.Color (Misc.ByteToDouble (r),
- Misc.ByteToDouble (g),
- Misc.ByteToDouble (b));
+ Misc.ByteToDouble (g),
+ Misc.ByteToDouble (b));
}
}
}
diff --git a/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
b/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
index d21b1d8..d30bd2e 100644
--- a/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
+++ b/LongoMatch.GUI/Gui/Component/AnalysisComponent.cs
@@ -25,7 +25,7 @@ using LongoMatch.Core.Interfaces;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class AnalysisComponent : Gtk.Bin, IAnalysisWindow
{
static Project openedProject;
@@ -115,7 +115,7 @@ namespace LongoMatch.Gui.Component
{
codingwidget.TagPlayer (player);
}
-
+
public void TagTeam (TeamType team)
{
codingwidget.TagTeam (team);
diff --git a/LongoMatch.GUI/Gui/Component/BackgroundWidget.cs
b/LongoMatch.GUI/Gui/Component/BackgroundWidget.cs
index 12369dc..62d3467 100644
--- a/LongoMatch.GUI/Gui/Component/BackgroundWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/BackgroundWidget.cs
@@ -24,7 +24,7 @@ using Image = LongoMatch.Core.Common.Image;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class BackgroundWidget : Gtk.Bin
{
public BackgroundWidget ()
@@ -32,12 +32,12 @@ namespace LongoMatch.Gui.Component
this.Build ();
drawingarea.ExposeEvent += HandleExposeEvent;
}
-
+
public Pixbuf Background {
get;
set;
}
-
+
void HandleExposeEvent (object o, ExposeEventArgs args)
{
Pixbuf frame;
@@ -52,25 +52,25 @@ namespace LongoMatch.Gui.Component
allocWidth = Allocation.Width;
allocHeight = Allocation.Height;
- frame = new Pixbuf (Colorspace.Rgb, false, 8, this.Allocation.Width,
- this.Allocation.Height);
+ frame = new Pixbuf (Colorspace.Rgb, false, 8, this.Allocation.Width,
+ this.Allocation.Height);
- ratio = Math.Min ((float) allocWidth / (float) width,
- (float) allocHeight / (float) height);
+ ratio = Math.Min ((float)allocWidth / (float)width,
+ (float)allocHeight / (float)height);
- logoX = (int) ((allocWidth / 2) - (width * ratio / 2));
- logoY = (int) ((allocHeight / 2) - (height * ratio / 2));
+ logoX = (int)((allocWidth / 2) - (width * ratio / 2));
+ logoY = (int)((allocHeight / 2) - (height * ratio / 2));
/* Scaling to available space */
Background.Composite (frame, 0, 0, allocWidth, allocHeight,
- logoX, logoY, ratio, ratio,
- InterpType.Bilinear, 255);
+ logoX, logoY, ratio, ratio,
+ InterpType.Bilinear, 255);
/* Drawing our frame */
frame.RenderToDrawable (drawingarea.GdkWindow, Style.BlackGC, 0, 0,
- args.Event.Area.X, args.Event.Area.Y,
- args.Event.Area.Width, args.Event.Area.Height,
- RgbDither.Normal, args.Event.Area.X, args.Event.Area.Y);
+ args.Event.Area.X, args.Event.Area.Y,
+ args.Event.Area.Width, args.Event.Area.Height,
+ RgbDither.Normal, args.Event.Area.X, args.Event.Area.Y);
frame.Dispose ();
return;
}
diff --git a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
index 4bdd995..6f88d99 100644
--- a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
@@ -30,8 +30,8 @@ using LongoMatch.Core.Store.Templates;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class CategoryProperties : Gtk.Bin
{
@@ -209,9 +209,9 @@ namespace LongoMatch.Gui.Component
}
if (eventButton != null) {
SetPositionCombo (fieldcombobox, eventButton.EventType.TagFieldPosition,
- eventButton.EventType.FieldPositionIsDistance);
+ eventButton.EventType.FieldPositionIsDistance);
SetPositionCombo (hfieldcombobox, eventButton.EventType.TagHalfFieldPosition,
- eventButton.EventType.HalfFieldPositionIsDistance);
+ eventButton.EventType.HalfFieldPositionIsDistance);
SetPositionCombo (goalcombobox, eventButton.EventType.TagGoalPosition, false);
sortmethodcombobox.Active = (int)eventButton.EventType.SortMethod;
}
@@ -326,7 +326,7 @@ namespace LongoMatch.Gui.Component
if (ignore)
return;
- timedButton.Start = new Time { TotalSeconds=(int)leadtimebutton.Value };
+ timedButton.Start = new Time { TotalSeconds = (int)leadtimebutton.Value };
Edited = true;
}
@@ -335,7 +335,7 @@ namespace LongoMatch.Gui.Component
if (ignore)
return;
- timedButton.Stop = new Time { TotalSeconds=(int)lagtimebutton.Value };
+ timedButton.Stop = new Time { TotalSeconds = (int)lagtimebutton.Value };
Edited = true;
}
@@ -382,7 +382,7 @@ namespace LongoMatch.Gui.Component
timerButton.Timer.Team = (TeamType)teamcombobox.Active;
Edited = true;
}
-
+
void HandleGroupChanged (object sender, EventArgs e)
{
if (ignore)
diff --git a/LongoMatch.GUI/Gui/Component/CodingWidget.cs b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
index b75c441..7d44b4a 100644
--- a/LongoMatch.GUI/Gui/Component/CodingWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
@@ -29,7 +29,7 @@ using LongoMatch.GUI.Helpers;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class CodingWidget : Gtk.Bin
{
TeamTagger teamtagger;
@@ -78,7 +78,8 @@ namespace LongoMatch.Gui.Component
Config.EventsBroker.EventLoadedEvent += HandlePlayLoaded;
Config.EventsBroker.EventsDeletedEvent += HandleEventsDeletedEvent;
Config.EventsBroker.TimerNodeAddedEvent += HandleTimerNodeAddedEvent;
- Config.EventsBroker.EventEditedEvent += HandleEventEdited;;
+ Config.EventsBroker.EventEditedEvent += HandleEventEdited;
+ ;
LongoMatch.Gui.Helpers.Misc.SetFocus (this, false);
buttonswidget.Mode = TagMode.Free;
@@ -154,7 +155,7 @@ namespace LongoMatch.Gui.Component
{
teamtagger.Select (player);
}
-
+
public void TagTeam (TeamType team)
{
teamtagger.Select (team);
@@ -171,7 +172,7 @@ namespace LongoMatch.Gui.Component
buttonswidget.Mode = TagMode.Predefined;
teamtagger.Project = project;
teamtagger.LoadTeams (project.LocalTeamTemplate, project.VisitorTeamTemplate,
- project.Dashboard.FieldBackground);
+ project.Dashboard.FieldBackground);
teamtagger.CurrentTime = new Time (0);
if (projectType == ProjectType.FileProject) {
timeline.SetProject (project, filter);
@@ -225,7 +226,7 @@ namespace LongoMatch.Gui.Component
void SelectPage (Widget widget)
{
- for (int i=0; i < notebook.NPages; i++) {
+ for (int i = 0; i < notebook.NPages; i++) {
if (notebook.GetNthPage (i) == widget) {
notebook.Page = i;
break;
@@ -363,14 +364,14 @@ namespace LongoMatch.Gui.Component
{
timeline.AddTimerNode (timer, tn);
}
-
+
void HandleEventEdited (TimelineEvent play)
{
if (play is SubstitutionEvent) {
teamtagger.Reload ();
}
}
-
+
void HandleEventsDeletedEvent (List<TimelineEvent> events)
{
if (events.Count (e => e is SubstitutionEvent) != 0) {
diff --git a/LongoMatch.GUI/Gui/Component/CoordinatesTagger.cs
b/LongoMatch.GUI/Gui/Component/CoordinatesTagger.cs
index b41e2b2..4ce5183 100644
--- a/LongoMatch.GUI/Gui/Component/CoordinatesTagger.cs
+++ b/LongoMatch.GUI/Gui/Component/CoordinatesTagger.cs
@@ -23,7 +23,7 @@ using LongoMatch.Drawing.Cairo;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class CoordinatesTagger : Gtk.Bin
{
public CoordinatesTagger ()
@@ -31,7 +31,7 @@ namespace LongoMatch.Gui.Component
this.Build ();
Tagger = new PositionTagger (new WidgetWrapper (drawingarea));
}
-
+
protected override void OnDestroyed ()
{
Tagger.Dispose ();
diff --git a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
index 94b8bf6..26bd7a3 100644
--- a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
@@ -35,8 +35,8 @@ using Image = LongoMatch.Core.Common.Image;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class DashboardWidget : Gtk.Bin
{
public event NewEventHandler NewTagEvent;
@@ -51,9 +51,9 @@ namespace LongoMatch.Gui.Component
bool internalButtons, edited, ignoreChanges;
Project project;
- public DashboardWidget()
+ public DashboardWidget ()
{
- this.Build();
+ this.Build ();
addcatbuttonimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-tag-category",
IconSize.Button);
addtimerbuttonimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-tag-timer",
IconSize.Button);
@@ -102,7 +102,7 @@ namespace LongoMatch.Gui.Component
tagger.CurrentTime = value;
}
}
-
+
public FitMode FitMode {
set {
ignoreChanges = true;
@@ -177,10 +177,10 @@ namespace LongoMatch.Gui.Component
editbutton.Active = value == TagMode.Edit;
if (value == TagMode.Edit) {
editimage.Pixbuf = Helpers.Misc.LoadIcon
("longomatch-dash-edit_active",
- 22,
IconLookupFlags.ForceSvg);
+ 22, IconLookupFlags.ForceSvg);
} else {
editimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-dash-edit",
- 22,
IconLookupFlags.ForceSvg);
+ 22, IconLookupFlags.ForceSvg);
}
LongoMatch.Gui.Helpers.Misc.SetFocus (this, value == TagMode.Edit);
if (project != null) {
@@ -210,24 +210,28 @@ namespace LongoMatch.Gui.Component
{
tagger.Click (button, tag);
}
-
- public void Refresh (DashboardButton b = null) {
+
+ public void Refresh (DashboardButton b = null)
+ {
tagger.Refresh (b);
}
- public void AddButton (string buttontype) {
+ public void AddButton (string buttontype)
+ {
DashboardButton button = null;
if (buttontype == "Card") {
button = new PenaltyCardButton {
- PenaltyCard = new PenaltyCard ("Red", Color.Red,
CardShape.Rectangle)};
+ PenaltyCard = new PenaltyCard ("Red", Color.Red, CardShape.Rectangle)
+ };
} else if (buttontype == "Score") {
button = new ScoreButton {
- Score = new Score ("Score", 1)};
+ Score = new Score ("Score", 1)
+ };
} else if (buttontype == "Timer") {
- button = new TimerButton {Timer = new Timer {Name = "Timer"}};
+ button = new TimerButton { Timer = new Timer { Name = "Timer" } };
} else if (buttontype == "Tag") {
- button = new TagButton {Tag = new Tag ("Tag", "")};
+ button = new TagButton { Tag = new Tag ("Tag", "") };
} else if (buttontype == "Category") {
button = template.AddDefaultItem (template.List.Count);
} else {
@@ -241,24 +245,26 @@ namespace LongoMatch.Gui.Component
edited = true;
Refresh (button);
}
-
- void RemoveButton (DashboardButton button) {
+
+ void RemoveButton (DashboardButton button)
+ {
string msg = Catalog.GetString ("Do you want to delete: ") +
- button.Name + "?";
+ button.Name + "?";
if (Config.GUIToolkit.QuestionMessage (msg, null, this)) {
template.List.Remove (button);
Edited = true;
Refresh ();
}
}
-
- void FillToolbar () {
+
+ void FillToolbar ()
+ {
Toolbar toolbar = new Toolbar ();
toolbar.Orientation = Orientation.Vertical;
toolbar.ToolbarStyle = ToolbarStyle.Icons;
editimage = new Gtk.Image (Helpers.Misc.LoadIcon ("longomatch-dash-edit_active",
- 22, IconLookupFlags.ForceSvg));
+ 22, IconLookupFlags.ForceSvg));
editbutton = new ToggleToolButton ();
editbutton.IconWidget = editimage;
editbutton.Active = true;
@@ -276,7 +282,7 @@ namespace LongoMatch.Gui.Component
toolbar.Add (popupbutton);
toolbar.Add (new SeparatorToolItem ());
- fitbutton = new RadioToolButton ((GLib.SList) null);
+ fitbutton = new RadioToolButton ((GLib.SList)null);
fitbutton.IconName = "longomatch-dash-fit";
fitbutton.Toggled += HandleFitModeToggled;
fitbutton.TooltipText = Catalog.GetString ("Fit dashboard");
@@ -309,7 +315,7 @@ namespace LongoMatch.Gui.Component
}
Edited = true;
}
-
+
void HandlePopupToggled (object sender, EventArgs e)
{
if (ignoreChanges) {
@@ -333,8 +339,8 @@ namespace LongoMatch.Gui.Component
void HandleTaggersSelectedEvent (List<DashboardButton> taggers)
{
if (taggers.Count == 1) {
- selected = taggers[0];
- tagproperties.Tagger = taggers[0];
+ selected = taggers [0];
+ tagproperties.Tagger = taggers [0];
tagproperties.Sensitive = true;
} else {
selected = null;
@@ -342,7 +348,7 @@ namespace LongoMatch.Gui.Component
tagproperties.Sensitive = false;
}
}
-
+
void HandleFieldButtonPressEvent (object o, Gtk.ButtonPressEventArgs args)
{
LongoMatch.Core.Common.Image background;
@@ -354,7 +360,7 @@ namespace LongoMatch.Gui.Component
background = new Image (pix);
background.ScaleInplace (Constants.MAX_BACKGROUND_WIDTH,
- Constants.MAX_BACKGROUND_HEIGHT);
+ Constants.MAX_BACKGROUND_HEIGHT);
if (o == fieldeventbox) {
UpdateBackground (background, 0);
} else if (o == hfieldeventbox) {
@@ -369,14 +375,14 @@ namespace LongoMatch.Gui.Component
{
tagger.CurrentTime = currentTime;
}
-
+
void HandleKeyPressEvent (object o, KeyPressEventArgs args)
{
if (args.Event.Key == Gdk.Key.Delete && selected != null) {
RemoveButton (selected);
}
}
-
+
void HandleShowMenuEvent (DashboardButton taggerbutton, Tag tag)
{
Menu menu;
@@ -388,13 +394,16 @@ namespace LongoMatch.Gui.Component
menu = new Menu ();
delbut = new MenuItem (Catalog.GetString ("Delete"));
- delbut.Activated += (sender, e) => {RemoveButton (taggerbutton);};
+ delbut.Activated += (sender, e) => {
+ RemoveButton (taggerbutton);
+ };
menu.Add (delbut);
menu.ShowAll ();
menu.Popup ();
}
- void HandleAddClicked (object sender, EventArgs e) {
+ void HandleAddClicked (object sender, EventArgs e)
+ {
if (sender == addcardbutton) {
AddButton ("Card");
} else if (sender == addscorebutton) {
@@ -409,13 +418,13 @@ namespace LongoMatch.Gui.Component
return;
}
}
-
+
void HandleNewTagEvent (EventType evntType, List<Player> players, TeamType team, List<Tag>
tags,
Time start, Time stop, Time eventTime, Score score, PenaltyCard card)
{
/* Forward event until we have players integrted in the dashboard layout */
if (NewTagEvent != null) {
- NewTagEvent (evntType , players, team, tags, start, stop, eventTime, score,
card);
+ NewTagEvent (evntType, players, team, tags, start, stop, eventTime, score,
card);
}
//Config.EventsBroker.EmitNewTag (button, players, tags, start, stop);
}
@@ -456,14 +465,14 @@ namespace LongoMatch.Gui.Component
}
}
-
+
void HandlePropertiedEditedEvent (object sender, EventArgs e)
{
if (selected != null) {
tagger.RedrawButton (selected);
}
}
-
+
void HandleApplyClicked (object sender, EventArgs e)
{
try {
diff --git a/LongoMatch.GUI/Gui/Component/DatePicker.cs b/LongoMatch.GUI/Gui/Component/DatePicker.cs
index 0d95b5b..149fa45 100644
--- a/LongoMatch.GUI/Gui/Component/DatePicker.cs
+++ b/LongoMatch.GUI/Gui/Component/DatePicker.cs
@@ -19,7 +19,7 @@ using System;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class DatePicker : Gtk.Bin
{
public event EventHandler ValueChanged;
diff --git a/LongoMatch.GUI/Gui/Component/EventsListWidget.cs
b/LongoMatch.GUI/Gui/Component/EventsListWidget.cs
index ba1f4c5..1cbbb9f 100644
--- a/LongoMatch.GUI/Gui/Component/EventsListWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/EventsListWidget.cs
@@ -23,7 +23,7 @@ using LongoMatch.Gui.Helpers;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class EventsListWidget : Gtk.Bin
{
Project project;
@@ -37,17 +37,17 @@ namespace LongoMatch.Gui.Component
playsList1.HeightRequest = StyleConf.PlayerCapturerControlsHeight;
Config.EventsBroker.TeamTagsChanged += UpdateTeamsModels;
}
-
+
protected override void OnDestroyed ()
{
Config.EventsBroker.TeamTagsChanged -= UpdateTeamsModels;
playsList.Project = null;
- localPlayersList.Clear();
- visitorPlayersList.Clear();
+ localPlayersList.Clear ();
+ visitorPlayersList.Clear ();
playsList1.Destroy ();
base.OnDestroyed ();
}
-
+
public void SetProject (Project project, EventsFilter filter)
{
this.project = project;
@@ -62,24 +62,27 @@ namespace LongoMatch.Gui.Component
SetTabProps (visitorPlayersList, false);
UpdateTeamsModels ();
}
-
- public void AddPlay(TimelineEvent play) {
- playsList.AddPlay(play);
+
+ public void AddPlay (TimelineEvent play)
+ {
+ playsList.AddPlay (play);
localPlayersList.AddEvent (play);
visitorPlayersList.AddEvent (play);
}
-
- public void RemovePlays (List<TimelineEvent> plays) {
- playsList.RemovePlays(plays);
+
+ public void RemovePlays (List<TimelineEvent> plays)
+ {
+ playsList.RemovePlays (plays);
localPlayersList.RemoveEvents (plays);
visitorPlayersList.RemoveEvents (plays);
}
-
- void UpdateTeamsModels() {
+
+ void UpdateTeamsModels ()
+ {
if (project == null)
return;
- localPlayersList.SetTeam(project.LocalTeamTemplate, project.Timeline);
- visitorPlayersList.SetTeam(project.VisitorTeamTemplate, project.Timeline);
+ localPlayersList.SetTeam (project.LocalTeamTemplate, project.Timeline);
+ visitorPlayersList.SetTeam (project.VisitorTeamTemplate, project.Timeline);
}
void SetTabProps (Gtk.Widget widget, bool active)
@@ -100,14 +103,14 @@ namespace LongoMatch.Gui.Component
} else if (widget == localPlayersList) {
if (project.LocalTeamTemplate.Shield != null) {
icon = project.LocalTeamTemplate.Shield.Scale
(StyleConf.NotebookTabIconSize,
-
StyleConf.NotebookTabIconSize).Value;
+ StyleConf.NotebookTabIconSize).Value;
} else {
icon = Misc.LoadIcon ("longomatch-default-shield",
StyleConf.NotebookTabIconSize);
}
} else if (widget == visitorPlayersList) {
if (project.VisitorTeamTemplate.Shield != null) {
icon = project.VisitorTeamTemplate.Shield.Scale
(StyleConf.NotebookTabIconSize,
-
StyleConf.NotebookTabIconSize).Value;
+ StyleConf.NotebookTabIconSize).Value;
} else {
icon = Misc.LoadIcon ("longomatch-default-shield",
StyleConf.NotebookTabIconSize);
}
diff --git a/LongoMatch.GUI/Gui/Component/FakeAnalysisComponent.cs
b/LongoMatch.GUI/Gui/Component/FakeAnalysisComponent.cs
index 6bf4352..a780a47 100644
--- a/LongoMatch.GUI/Gui/Component/FakeAnalysisComponent.cs
+++ b/LongoMatch.GUI/Gui/Component/FakeAnalysisComponent.cs
@@ -24,7 +24,7 @@ using LongoMatch.Core.Store;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class FakeAnalysisComponent : Gtk.Bin, IAnalysisWindow
{
@@ -33,7 +33,9 @@ namespace LongoMatch.Gui.Component
this.Build ();
capturerbin.Mode = CapturerType.Fake;
}
+
#region IAnalysisWindow implementation
+
public void SetProject (Project project, ProjectType projectType, CaptureSettings props,
EventsFilter filter)
{
codingwidget1.SetProject (project, projectType, filter);
@@ -119,6 +121,7 @@ namespace LongoMatch.Gui.Component
return capturerbin;
}
}
+
#endregion
}
}
diff --git a/LongoMatch.GUI/Gui/Component/GameDescriptionHeader.cs
b/LongoMatch.GUI/Gui/Component/GameDescriptionHeader.cs
index 5aa1e2f..72346ec 100644
--- a/LongoMatch.GUI/Gui/Component/GameDescriptionHeader.cs
+++ b/LongoMatch.GUI/Gui/Component/GameDescriptionHeader.cs
@@ -23,7 +23,7 @@ using Misc = LongoMatch.Gui.Helpers.Misc;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class GameDescriptionHeader : Gtk.Bin
{
SizeGroup namesGroup, scoreGroup;
@@ -59,8 +59,9 @@ namespace LongoMatch.Gui.Component
awayscorelabel.Text = value.VisitorGoals.ToString ();
}
}
-
- void SetStyle () {
+
+ void SetStyle ()
+ {
Pango.FontDescription numDesc = Pango.FontDescription.FromString (Config.Style.Font +
" 48px");
Pango.FontDescription nameDesc = Pango.FontDescription.FromString (Config.Style.Font
+ " 30px");
diff --git a/LongoMatch.GUI/Gui/Component/GeneralPreferencesPanel.cs
b/LongoMatch.GUI/Gui/Component/GeneralPreferencesPanel.cs
index ed0ee51..0a705fb 100644
--- a/LongoMatch.GUI/Gui/Component/GeneralPreferencesPanel.cs
+++ b/LongoMatch.GUI/Gui/Component/GeneralPreferencesPanel.cs
@@ -23,48 +23,52 @@ using System.Globalization;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class GeneralPreferencesPanel : Gtk.Bin
{
ListStore langsStore;
ListStore templates;
CheckButton autosavecb;
-
+
public GeneralPreferencesPanel ()
{
this.Build ();
- FillLangs();
+ FillLangs ();
FillTemplates ();
- autosavecb = new CheckButton();
+ autosavecb = new CheckButton ();
table1.Attach (autosavecb, 1, 2, 1, 2,
- AttachOptions.Shrink,
- AttachOptions.Shrink, 0, 0);
+ AttachOptions.Shrink,
+ AttachOptions.Shrink, 0, 0);
autosavecb.CanFocus = false;
- autosavecb.Show();
+ autosavecb.Show ();
autosavecb.Active = Config.AutoSave;
- autosavecb.Toggled += (sender, e) => {Config.AutoSave = autosavecb.Active;};
+ autosavecb.Toggled += (sender, e) => {
+ Config.AutoSave = autosavecb.Active;
+ };
}
-
- void FillLangs () {
+
+ void FillLangs ()
+ {
int index = 0, active = 0;
- langsStore = new ListStore(typeof(string), typeof(CultureInfo));
+ langsStore = new ListStore (typeof(string), typeof(CultureInfo));
langsStore.AppendValues (Catalog.GetString ("Default"), null);
- index ++;
+ index++;
foreach (CultureInfo lang in Gettext.Languages) {
- langsStore.AppendValues(lang.DisplayName, lang);
+ langsStore.AppendValues (lang.DisplayName, lang);
if (lang.Name == Config.Lang)
active = index;
- index ++;
+ index++;
}
langcombobox.Model = langsStore;
langcombobox.Active = active;
langcombobox.Changed += HandleChanged;
}
- void FillTemplates () {
+ void FillTemplates ()
+ {
int i = 0, active = -1;
templates = new ListStore (typeof(string));
@@ -80,7 +84,8 @@ namespace LongoMatch.Gui.Component
templatescombobox.Active = active;
}
templatescombobox.Changed += (sender, e) => {
- Config.DefaultTemplate = templatescombobox.ActiveText;};
+ Config.DefaultTemplate = templatescombobox.ActiveText;
+ };
}
void HandleChanged (object sender, EventArgs e)
@@ -89,7 +94,7 @@ namespace LongoMatch.Gui.Component
CultureInfo info;
langcombobox.GetActiveIter (out iter);
- info = (CultureInfo) langsStore.GetValue (iter, 1);
+ info = (CultureInfo)langsStore.GetValue (iter, 1);
if (info == null) {
Config.Lang = null;
} else {
diff --git a/LongoMatch.GUI/Gui/Component/LiveAnalysisPreferences.cs
b/LongoMatch.GUI/Gui/Component/LiveAnalysisPreferences.cs
index de785af..ece0eb1 100644
--- a/LongoMatch.GUI/Gui/Component/LiveAnalysisPreferences.cs
+++ b/LongoMatch.GUI/Gui/Component/LiveAnalysisPreferences.cs
@@ -24,32 +24,36 @@ using LongoMatch.Core.Common;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class LiveAnalysisPreferences : Gtk.Bin
{
CheckButton rendercb, reviewcb;
-
+
public LiveAnalysisPreferences ()
{
this.Build ();
- rendercb = new CheckButton();
+ rendercb = new CheckButton ();
table1.Attach (rendercb, 1, 2, 0, 1,
- AttachOptions.Shrink,
- AttachOptions.Shrink, 0, 0);
+ AttachOptions.Shrink,
+ AttachOptions.Shrink, 0, 0);
rendercb.CanFocus = false;
- rendercb.Show();
+ rendercb.Show ();
rendercb.Active = Config.AutoRenderPlaysInLive;
- rendercb.Toggled += (sender, e) => {Config.AutoRenderPlaysInLive = rendercb.Active;};
+ rendercb.Toggled += (sender, e) => {
+ Config.AutoRenderPlaysInLive = rendercb.Active;
+ };
- reviewcb = new CheckButton();
+ reviewcb = new CheckButton ();
table1.Attach (reviewcb, 1, 2, 2, 3,
- AttachOptions.Shrink,
- AttachOptions.Shrink, 0, 0);
+ AttachOptions.Shrink,
+ AttachOptions.Shrink, 0, 0);
reviewcb.CanFocus = false;
- reviewcb.Show();
+ reviewcb.Show ();
reviewcb.Active = Config.ReviewPlaysInSameWindow;
- reviewcb.Toggled += (sender, e) => {Config.ReviewPlaysInSameWindow =
reviewcb.Active;};
+ reviewcb.Toggled += (sender, e) => {
+ Config.ReviewPlaysInSameWindow = reviewcb.Active;
+ };
mediafilechooser1.FileChooserMode = FileChooserMode.Directory;
mediafilechooser1.CurrentPath = Config.AutoRenderDir;
diff --git a/LongoMatch.GUI/Gui/Component/NotesWidget.cs b/LongoMatch.GUI/Gui/Component/NotesWidget.cs
index 51e7fb7..793bd12 100644
--- a/LongoMatch.GUI/Gui/Component/NotesWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/NotesWidget.cs
@@ -26,18 +26,18 @@ using LongoMatch.Core.Handlers;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class NotesWidget : Gtk.Bin
{
TextBuffer buf;
TimelineEvent play;
- public NotesWidget()
+ public NotesWidget ()
{
- this.Build();
+ this.Build ();
this.buf = textview1.Buffer;
- buf.Changed += new EventHandler(OnEdition);
+ buf.Changed += new EventHandler (OnEdition);
Config.EventsBroker.EventLoadedEvent += HandlePlayLoaded;
}
@@ -56,11 +56,11 @@ namespace LongoMatch.Gui.Component
string Notes {
set {
- buf.Clear();
- buf.InsertAtCursor(value);
+ buf.Clear ();
+ buf.InsertAtCursor (value);
}
get {
- return buf.GetText(buf.StartIter,buf.EndIter,true);
+ return buf.GetText (buf.StartIter, buf.EndIter, true);
}
}
diff --git a/LongoMatch.GUI/Gui/Component/PlayListWidget.cs b/LongoMatch.GUI/Gui/Component/PlayListWidget.cs
index 0af2d7b..7d61245 100644
--- a/LongoMatch.GUI/Gui/Component/PlayListWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlayListWidget.cs
@@ -28,8 +28,8 @@ using Misc = LongoMatch.Gui.Helpers.Misc;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class PlayListWidget : Gtk.Bin
{
Project project;
@@ -75,21 +75,21 @@ namespace LongoMatch.Gui.Component
void HandleRowActivated (object o, RowActivatedArgs args)
{
- TreeIter iter;
- Playlist playlist;
- IPlaylistElement element;
+ TreeIter iter;
+ Playlist playlist;
+ IPlaylistElement element;
- playlisttreeview1.Model.GetIterFromString (out iter, args.Path.ToString ());
- var el = playlisttreeview1.Model.GetValue (iter, 0);
- if (el is Playlist) {
- playlist = el as Playlist;
- element = playlist.Elements.FirstOrDefault ();
- } else {
- TreeIter parent;
- playlisttreeview1.Model.IterParent (out parent, iter);
- playlist = playlisttreeview1.Model.GetValue (parent, 0) as Playlist;
- element = el as IPlaylistElement;
- }
+ playlisttreeview1.Model.GetIterFromString (out iter, args.Path.ToString ());
+ var el = playlisttreeview1.Model.GetValue (iter, 0);
+ if (el is Playlist) {
+ playlist = el as Playlist;
+ element = playlist.Elements.FirstOrDefault ();
+ } else {
+ TreeIter parent;
+ playlisttreeview1.Model.IterParent (out parent, iter);
+ playlist = playlisttreeview1.Model.GetValue (parent, 0) as Playlist;
+ element = el as IPlaylistElement;
+ }
Config.EventsBroker.EmitPlaylistElementSelected (playlist, element);
}
diff --git a/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
b/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
index 948dd12..fc89278 100644
--- a/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
@@ -30,18 +30,18 @@ namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class PlayersListTreeWidget : Gtk.Bin
{
TreeStore team;
- public PlayersListTreeWidget()
+ public PlayersListTreeWidget ()
{
- this.Build();
+ this.Build ();
playerstreeview.NewRenderingJob += OnNewRenderingJob;
}
-
+
public Project Project {
set;
get;
@@ -54,7 +54,7 @@ namespace LongoMatch.Gui.Component
}
public EventsFilter Filter {
- set{
+ set {
playerstreeview.Filter = value;
}
}
@@ -75,7 +75,7 @@ namespace LongoMatch.Gui.Component
team.IterNext (ref piter);
}
}
-
+
public void RemoveEvents (List<TimelineEvent> events)
{
TreeIter piter;
@@ -96,24 +96,25 @@ namespace LongoMatch.Gui.Component
}
}
- public void SetTeam(Team template, List<TimelineEvent> plays) {
- Dictionary<Player, TreeIter> playersDict = new Dictionary<Player, TreeIter>();
+ public void SetTeam (Team template, List<TimelineEvent> plays)
+ {
+ Dictionary<Player, TreeIter> playersDict = new Dictionary<Player, TreeIter> ();
- Log.Debug("Updating teams models with template:" + template);
- team = new TreeStore(typeof(object));
+ Log.Debug ("Updating teams models with template:" + template);
+ team = new TreeStore (typeof(object));
- foreach(var player in template.List) {
+ foreach (var player in template.List) {
/* Add a root in the tree with the option name */
- var iter = team.AppendValues(player);
- playersDict.Add(player, iter);
- Log.Debug("Adding new player to the model: " + player);
+ var iter = team.AppendValues (player);
+ playersDict.Add (player, iter);
+ Log.Debug ("Adding new player to the model: " + player);
}
foreach (var play in plays) {
foreach (var player in play.Players) {
- if (playersDict.ContainsKey(player)) {
- team.AppendValues(playersDict[player], new object[1] {play});
- Log.Debug("Adding new play to player: " + player);
+ if (playersDict.ContainsKey (player)) {
+ team.AppendValues (playersDict [player], new object[1] { play
});
+ Log.Debug ("Adding new play to player: " + player);
}
}
}
@@ -122,22 +123,23 @@ namespace LongoMatch.Gui.Component
playerstreeview.Project = Project;
}
- public void Clear() {
+ public void Clear ()
+ {
playerstreeview.Model = null;
}
protected virtual void OnNewRenderingJob (object sender, EventArgs args)
{
- Playlist playlist = new Playlist();
- TreePath[] paths = playerstreeview.Selection.GetSelectedRows();
+ Playlist playlist = new Playlist ();
+ TreePath[] paths = playerstreeview.Selection.GetSelectedRows ();
- foreach(var path in paths) {
+ foreach (var path in paths) {
TreeIter iter;
PlaylistPlayElement element;
- playerstreeview.Model.GetIter(out iter, path);
- element = new PlaylistPlayElement (playerstreeview.Model.GetValue(iter, 0) as
TimelineEvent,
- Project.Description.FileSet);
+ playerstreeview.Model.GetIter (out iter, path);
+ element = new PlaylistPlayElement (playerstreeview.Model.GetValue (iter, 0)
as TimelineEvent,
+ Project.Description.FileSet);
playlist.Elements.Add (element);
}
diff --git a/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
b/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
index 113bdfb..dcf82f4 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
@@ -25,7 +25,7 @@ using System.Collections.Generic;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class PlaysCoordinatesTagger : Gtk.Bin
{
@@ -42,12 +42,13 @@ namespace LongoMatch.Gui.Component
goal.Tagger.Accuracy = 20;
}
- public void LoadBackgrounds (Project project) {
+ public void LoadBackgrounds (Project project)
+ {
field.Tagger.Background = project.GetBackground (FieldPositionType.Field);
hfield.Tagger.Background = project.GetBackground (FieldPositionType.HalfField);
goal.Tagger.Background = project.GetBackground (FieldPositionType.Goal);
}
-
+
public void LoadStats (EventTypeStats stats, TeamType team)
{
Visible = false;
@@ -59,7 +60,7 @@ namespace LongoMatch.Gui.Component
hfield.Tagger.ObjectsCanMove = false;
goal.Tagger.ObjectsCanMove = false;
}
-
+
public void LoadStats (PlayerEventTypeStats stats, TeamType team)
{
Visible = false;
@@ -71,8 +72,9 @@ namespace LongoMatch.Gui.Component
hfield.Tagger.ObjectsCanMove = false;
goal.Tagger.ObjectsCanMove = false;
}
-
- public void LoadPlay (TimelineEvent play) {
+
+ public void LoadPlay (TimelineEvent play)
+ {
field.Visible = play.EventType.TagFieldPosition;
hfield.Visible = play.EventType.TagHalfFieldPosition;
goal.Visible = play.EventType.TagGoalPosition;
@@ -85,11 +87,11 @@ namespace LongoMatch.Gui.Component
if (play.HalfFieldPosition != null) {
hfield.Tagger.Points = play.HalfFieldPosition.Points;
}
- if (play.GoalPosition != null ) {
+ if (play.GoalPosition != null) {
goal.Tagger.Points = play.GoalPosition.Points;
}
}
-
+
void UpdateTags (List<Coordinates> coords, CoordinatesTagger tagger)
{
if (coords.Count > 0) {
diff --git a/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
b/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
index 75346ab..4e32b22 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
@@ -27,8 +27,8 @@ using LongoMatch.Gui.Dialog;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class PlaysListTreeWidget : Gtk.Bin
{
@@ -81,11 +81,11 @@ namespace LongoMatch.Gui.Component
if (plays.Contains (play)) {
removeIters.Add (child);
}
- } while(model.IterNext(ref child));
- } while(model.IterNext(ref iter));
+ } while(model.IterNext (ref child));
+ } while(model.IterNext (ref iter));
/* Remove the selected iters now */
- for (int i=0; i < removeIters.Count; i++) {
+ for (int i = 0; i < removeIters.Count; i++) {
iter = removeIters [i];
model.Remove (ref iter);
}
@@ -166,7 +166,7 @@ namespace LongoMatch.Gui.Component
treeview.Model.GetIter (out iter, path);
element = new PlaylistPlayElement (treeview.Model.GetValue (iter, 0) as
TimelineEvent,
- project.Description.FileSet);
+ project.Description.FileSet);
playlist.Elements.Add (element);
}
diff --git a/LongoMatch.GUI/Gui/Component/PlaysPositionViewer.cs
b/LongoMatch.GUI/Gui/Component/PlaysPositionViewer.cs
index 721bb3f..2da2d6d 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysPositionViewer.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysPositionViewer.cs
@@ -23,7 +23,7 @@ using System.Collections.Generic;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class PlaysPositionViewer : Gtk.Bin
{
@@ -42,8 +42,9 @@ namespace LongoMatch.Gui.Component
Config.EventsBroker.EventLoadedEvent += HandlePlayLoaded;
menu = new PlaysMenu ();
}
-
- public void LoadProject (Project project, EventsFilter filter) {
+
+ public void LoadProject (Project project, EventsFilter filter)
+ {
this.project = project;
if (project != null) {
field.Tagger.Project = project;
@@ -60,21 +61,23 @@ namespace LongoMatch.Gui.Component
goal.Tagger.Filter = filter;
}
}
-
- public void AddPlay (TimelineEvent play) {
+
+ public void AddPlay (TimelineEvent play)
+ {
field.Tagger.AddPlay (play);
hfield.Tagger.AddPlay (play);
goal.Tagger.AddPlay (play);
QueueDraw ();
}
-
- public void RemovePlays (List<TimelineEvent> plays) {
+
+ public void RemovePlays (List<TimelineEvent> plays)
+ {
field.Tagger.RemovePlays (plays);
hfield.Tagger.RemovePlays (plays);
goal.Tagger.RemovePlays (plays);
QueueDraw ();
}
-
+
void HandlePlayLoaded (TimelineEvent play)
{
if (play != null) {
diff --git a/LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
b/LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
index fc419c2..ff8337b 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
@@ -26,7 +26,7 @@ using Helpers = LongoMatch.Gui.Helpers;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class PlaysSelectionWidget : Gtk.Bin
{
@@ -60,7 +60,9 @@ namespace LongoMatch.Gui.Component
playlistwidget.Destroy ();
base.OnDestroyed ();
}
+
#region Plubic Methods
+
public void SetProject (Project project, EventsFilter filter)
{
this.project = project;
@@ -79,7 +81,9 @@ namespace LongoMatch.Gui.Component
{
eventslistwidget.RemovePlays (plays);
}
+
#endregion
+
void LoadIcons ()
{
int s = StyleConf.NotebookTabIconSize;
diff --git a/LongoMatch.GUI/Gui/Component/PluginsPreferences.cs
b/LongoMatch.GUI/Gui/Component/PluginsPreferences.cs
index 9504910..e2e5d97 100644
--- a/LongoMatch.GUI/Gui/Component/PluginsPreferences.cs
+++ b/LongoMatch.GUI/Gui/Component/PluginsPreferences.cs
@@ -25,7 +25,7 @@ using System.Collections.Generic;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class PluginsPreferences : Gtk.Bin
{
ListStore pluginsStore;
@@ -33,7 +33,7 @@ namespace LongoMatch.Gui.Component
public PluginsPreferences ()
{
this.Build ();
- pluginsStore = new ListStore (typeof(string), typeof(AddinDescription), typeof
(ILongoMatchPlugin));
+ pluginsStore = new ListStore (typeof(string), typeof(AddinDescription),
typeof(ILongoMatchPlugin));
treeview1.Model = pluginsStore;
treeview1.HeadersVisible = false;
treeview1.AppendColumn ("Text", new CellRendererText (), "text", 0);
@@ -52,7 +52,7 @@ namespace LongoMatch.Gui.Component
if (pluginsStore.GetIterFirst (out first)) {
treeview1.Selection.SelectIter (first);
LoadAddin (pluginsStore.GetValue (first, 1) as AddinDescription,
- pluginsStore.GetValue (first, 2) as List<ConfigurablePlugin>);
+ pluginsStore.GetValue (first, 2) as List<ConfigurablePlugin>);
}
}
@@ -78,7 +78,7 @@ namespace LongoMatch.Gui.Component
foreach (AttributeAndProperty attrprop in plugin.Properties) {
if (attrprop.Property.PropertyType == typeof(Boolean)) {
CheckButton button = new CheckButton
(attrprop.Attribute.description);
- button.Active = (bool) attrprop.Property.GetValue
(plugin, null);
+ button.Active = (bool)attrprop.Property.GetValue
(plugin, null);
button.Clicked += (sender, e) => {
attrprop.Property.SetValue (plugin,
button.Active, null);
};
@@ -91,14 +91,14 @@ namespace LongoMatch.Gui.Component
configframe.Visible = false;
}
}
-
+
void HandleCursorChanged (object sender, EventArgs e)
{
TreeIter iter;
treeview1.Selection.GetSelected (out iter);
LoadAddin (pluginsStore.GetValue (iter, 1) as AddinDescription,
- pluginsStore.GetValue (iter, 2) as List<ConfigurablePlugin>);
+ pluginsStore.GetValue (iter, 2) as List<ConfigurablePlugin>);
}
}
diff --git a/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
b/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
index a083d5a..6072486 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
@@ -30,8 +30,8 @@ using Mono.Unix;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class ProjectListWidget : Gtk.Bin
{
public event ProjectsSelectedHandler ProjectsSelected;
@@ -155,13 +155,13 @@ namespace LongoMatch.Gui.Component
store.SetValue (first, COL_DISPLAY_NAME, FormatDesc (description));
store.SetValue (first, COL_PROJECT_DESCRIPTION, description);
// Also update our internal list
- projects[projects.IndexOf (pd)] = description;
+ projects [projects.IndexOf (pd)] = description;
break;
}
store.IterNext (ref first);
}
}
-
+
public void ClearSearch ()
{
@@ -171,17 +171,17 @@ namespace LongoMatch.Gui.Component
static string FormatDesc (ProjectDescription pdesc)
{
string desc = String.Format ("{0}-{1} ({2}-{3})\n{4}: {5}\n{6}: {7}\n{8}: {9}",
- pdesc.LocalName, pdesc.VisitorName, pdesc.LocalGoals,
- pdesc.VisitorGoals, Catalog.GetString ("Date"),
- pdesc.MatchDate.ToShortDateString (), Catalog.GetString
("Competition"),
- pdesc.Competition, Catalog.GetString ("Season"),
pdesc.Season);
+ pdesc.LocalName, pdesc.VisitorName, pdesc.LocalGoals,
+ pdesc.VisitorGoals, Catalog.GetString ("Date"),
+ pdesc.MatchDate.ToShortDateString (), Catalog.GetString
("Competition"),
+ pdesc.Competition, Catalog.GetString ("Season"), pdesc.Season);
return desc;
}
ListStore CreateStore ()
{
store = new ListStore (typeof(string), typeof(Gdk.Pixbuf), typeof(Gdk.Pixbuf),
- typeof(Gdk.Pixbuf), typeof(ProjectDescription));
+ typeof(Gdk.Pixbuf), typeof(ProjectDescription));
filter = new Gtk.TreeModelFilter (store, null);
filter.VisibleFunc = new Gtk.TreeModelFilterVisibleFunc (FilterTree);
@@ -200,7 +200,7 @@ namespace LongoMatch.Gui.Component
p1 = (ProjectDescription)model.GetValue (a, COL_PROJECT_DESCRIPTION);
p2 = (ProjectDescription)model.GetValue (b, COL_PROJECT_DESCRIPTION);
- return ProjectDescription.Sort (p1, p2, (ProjectSortType) sortcombobox.Active);
+ return ProjectDescription.Sort (p1, p2, (ProjectSortType)sortcombobox.Active);
}
protected virtual void OnFilterentryChanged (object sender, System.EventArgs e)
@@ -240,10 +240,10 @@ namespace LongoMatch.Gui.Component
{
HandleSelectionChanged (iconview.Model, iconview.SelectedItems);
}
-
+
void HandleTreeviewSelectionChanged (object sender, EventArgs e)
{
- HandleSelectionChanged (treeview.Model, treeview.Selection.GetSelectedRows());
+ HandleSelectionChanged (treeview.Model, treeview.Selection.GetSelectedRows ());
}
void HandleItemActivated (object o, ItemActivatedArgs args)
diff --git a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
index 4b3377e..31f2b9b 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
@@ -360,10 +360,12 @@ namespace LongoMatch.Gui.Component
{
if (sender == main_cam_audio_button) {
main_cam_playerbin.Player.Volume = main_cam_audio_button.Active ? 1 : 0;
- main_cam_audio_button_image.Pixbuf = Helpers.Misc.LoadIcon
(main_cam_audio_button.Active ? "longomatch-control-volume-hi" : "longomatch-control-volume-off",
IconSize.Button);
+ main_cam_audio_button_image.Pixbuf = Helpers.Misc.LoadIcon
(main_cam_audio_button.Active ?
+ "longomatch-control-volume-hi" : "longomatch-control-volume-off",
IconSize.Button);
} else if (sender == sec_cam_audio_button) {
sec_cam_playerbin.Player.Volume = sec_cam_audio_button.Active ? 1 : 0;
- sec_cam_audio_button_image.Pixbuf = Helpers.Misc.LoadIcon
(sec_cam_audio_button.Active ? "longomatch-control-volume-hi" : "longomatch-control-volume-off",
IconSize.Button);
+ sec_cam_audio_button_image.Pixbuf = Helpers.Misc.LoadIcon
(sec_cam_audio_button.Active ?
+ "longomatch-control-volume-hi" : "longomatch-control-volume-off",
IconSize.Button);
}
}
@@ -426,7 +428,8 @@ namespace LongoMatch.Gui.Component
HideSecondaryPlayer ();
switch (message) {
case DidacticMessage.Initial:
- sec_cam_didactic_label.Text = Catalog.GetString ("Drag the bars in the
timeline to synchronize secondary video files with the main video");
+ sec_cam_didactic_label.Text = Catalog.GetString ("Drag the bars in the
timeline "
+ + "to synchronize secondary video files with the main video");
break;
case DidacticMessage.CameraOutOfScope:
sec_cam_didactic_label.Text = Catalog.GetString ("Camera out of scope");
@@ -445,7 +448,8 @@ namespace LongoMatch.Gui.Component
if (camera == null) {
return false;
}
- if (camera.TimeNode.Start <= timerule.CurrentTime && timerule.CurrentTime <=
camera.TimeNode.Stop) {
+ if (camera.TimeNode.Start <= timerule.CurrentTime &&
+ timerule.CurrentTime <= camera.TimeNode.Stop) {
return true;
} else {
return false;
@@ -457,7 +461,10 @@ namespace LongoMatch.Gui.Component
CameraObject camera = camerasTimeline.SelectedCamera;
if (camera != null) {
- sec_cam_label.Markup = String.Format ("<b>{0}</b> - <span foreground=\"{1}\"
size=\"smaller\">{2}: {3}</span>", camera.MediaFile.Name, Config.Style.PaletteActive.ToRGBString (false),
Catalog.GetString ("Offset"), camera.MediaFile.Offset.ToMSecondsString ());
+ sec_cam_label.Markup = String.Format (
+ "<b>{0}</b> - <span foreground=\"{1}\" size=\"smaller\">{2}:
{3}</span>",
+ camera.MediaFile.Name, Config.Style.PaletteActive.ToRGBString (false),
+ Catalog.GetString ("Offset"),
camera.MediaFile.Offset.ToMSecondsString ());
}
}
diff --git a/LongoMatch.GUI/Gui/Component/RenderingStateBar.cs
b/LongoMatch.GUI/Gui/Component/RenderingStateBar.cs
index 679469c..c759d78 100644
--- a/LongoMatch.GUI/Gui/Component/RenderingStateBar.cs
+++ b/LongoMatch.GUI/Gui/Component/RenderingStateBar.cs
@@ -20,12 +20,12 @@ using LongoMatch.Core.Interfaces.GUI;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class RenderingStateBar : Gtk.Bin, IRenderingStateBar
{
public event EventHandler Cancel;
public event EventHandler ManageJobs;
-
+
public RenderingStateBar ()
{
this.Build ();
@@ -35,12 +35,12 @@ namespace LongoMatch.Gui.Component
statebutton.Clicked += delegate(object sender, EventArgs e) {
if (ManageJobs != null)
- ManageJobs(this, null);
+ ManageJobs (this, null);
};
cancellbutton.Clicked += delegate(object sender, EventArgs e) {
if (Cancel != null)
- Cancel(this, null);
+ Cancel (this, null);
};
}
@@ -49,19 +49,19 @@ namespace LongoMatch.Gui.Component
Visible = value;
}
}
-
+
public string Text {
set {
statebutton.Label = value;
}
}
-
+
public string ProgressText {
set {
progressbar.Text = value;
}
}
-
+
public double Fraction {
set {
progressbar.Fraction = value;
diff --git a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
index 8dde29b..26e275a 100644
--- a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
+++ b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
@@ -31,7 +31,7 @@ using Misc = LongoMatch.Gui.Helpers.Misc;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class TeamTemplateEditor : Gtk.Bin
{
public event EventHandler TemplateSaved;
@@ -92,8 +92,8 @@ namespace LongoMatch.Gui.Component
teamtagger.LoadTeams (template, null, Config.HHalfFieldBackground);
// Start with disabled widget until something get selected
ClearPlayer ();
- colorbutton1.Color = Misc.ToGdkColor (value.Colors[0]);
- colorbutton2.Color = Misc.ToGdkColor (value.Colors[1]);
+ colorbutton1.Color = Misc.ToGdkColor (value.Colors [0]);
+ colorbutton2.Color = Misc.ToGdkColor (value.Colors [1]);
ignoreChanges = false;
Edited = false;
}
@@ -156,8 +156,9 @@ namespace LongoMatch.Gui.Component
mailentry.Changed += HandleEntryChanged;
bdaydatepicker.ValueChanged += HandleEntryChanged;
- applybutton.Clicked += (s,e) => {
- ParseTactics ();};
+ applybutton.Clicked += (s, e) => {
+ ParseTactics ();
+ };
Edited = false;
}
@@ -334,7 +335,7 @@ namespace LongoMatch.Gui.Component
player = new Image (pix);
player.ScaleInplace (Constants.MAX_PLAYER_ICON_SIZE,
- Constants.MAX_PLAYER_ICON_SIZE);
+ Constants.MAX_PLAYER_ICON_SIZE);
if (player != null && loadedPlayer != null) {
playerimage.Pixbuf = player.Value;
loadedPlayer.Photo = player;
@@ -355,7 +356,7 @@ namespace LongoMatch.Gui.Component
shield = new Image (pix);
if (shield != null) {
shield.ScaleInplace (Constants.MAX_SHIELD_ICON_SIZE,
- Constants.MAX_SHIELD_ICON_SIZE);
+ Constants.MAX_SHIELD_ICON_SIZE);
template.Shield = shield;
shieldimage.Pixbuf = shield.Scale (SHIELD_SIZE, SHIELD_SIZE).Value;
Edited = true;
@@ -369,7 +370,7 @@ namespace LongoMatch.Gui.Component
teamtagger.Substitute (p1, p2, team);
Edited = true;
}
-
+
void HandleColorSet (object sender, EventArgs e)
{
if (ignoreChanges)
diff --git a/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs b/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
index 12f4340..a50266f 100644
--- a/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
+++ b/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
@@ -24,14 +24,14 @@ using Gdk;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public class TeamsComboBox: Gtk.ComboBox
{
ListStore store;
CellRendererPixbuf pixrender;
CellRendererText texrender;
-
+
public TeamsComboBox ()
{
}
@@ -68,7 +68,7 @@ namespace LongoMatch.Gui.Component
SetAttributes (pixrender, "pixbuf", 0);
Model = store;
- }
+ }
public Team ActiveTeam {
get {
@@ -79,21 +79,23 @@ namespace LongoMatch.Gui.Component
}
}
}
-
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public class HomeTeamsComboBox: TeamsComboBox
{
- public HomeTeamsComboBox () {
+ public HomeTeamsComboBox ()
+ {
Direction = TextDirection.Rtl;
}
}
-
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public class AwayTeamsComboBox: TeamsComboBox
{
- public AwayTeamsComboBox () {
+ public AwayTeamsComboBox ()
+ {
Direction = TextDirection.Ltr;
}
}
diff --git a/LongoMatch.GUI/Gui/Component/Timeline.cs b/LongoMatch.GUI/Gui/Component/Timeline.cs
index 3301685..2e15576 100644
--- a/LongoMatch.GUI/Gui/Component/Timeline.cs
+++ b/LongoMatch.GUI/Gui/Component/Timeline.cs
@@ -28,7 +28,7 @@ using LongoMatch.Gui.Menus;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class Timeline : Gtk.Bin
{
const uint TIMEOUT_MS = 100;
@@ -101,15 +101,18 @@ namespace LongoMatch.Gui.Component
}
}
- public void Fit () {
+ public void Fit ()
+ {
focusbutton.Click ();
}
- public void ZoomIn () {
+ public void ZoomIn ()
+ {
focusscale.Adjustment.Value -= focusscale.Adjustment.StepIncrement;
}
-
- public void ZoomOut () {
+
+ public void ZoomOut ()
+ {
focusscale.Adjustment.Value += focusscale.Adjustment.StepIncrement;
}
diff --git a/LongoMatch.GUI/Gui/Component/VideoPreferencesPanel.cs
b/LongoMatch.GUI/Gui/Component/VideoPreferencesPanel.cs
index 4578e3c..916fc8c 100644
--- a/LongoMatch.GUI/Gui/Component/VideoPreferencesPanel.cs
+++ b/LongoMatch.GUI/Gui/Component/VideoPreferencesPanel.cs
@@ -22,11 +22,11 @@ using Misc = LongoMatch.Gui.Helpers.Misc;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class VideoPreferencesPanel : Gtk.Bin
{
CheckButton overlayTitle, enableSound;
-
+
public VideoPreferencesPanel ()
{
this.Build ();
@@ -60,23 +60,25 @@ namespace LongoMatch.Gui.Component
enableSound = new CheckButton ();
rendertable.Attach (enableSound, 1, 2, 3, 4,
- AttachOptions.Fill,
- AttachOptions.Fill, 0, 0);
+ AttachOptions.Fill,
+ AttachOptions.Fill, 0, 0);
enableSound.CanFocus = false;
enableSound.Show ();
enableSound.Active = Config.EnableAudio;
enableSound.Toggled += (sender, e) => {
- Config.EnableAudio = enableSound.Active;};
+ Config.EnableAudio = enableSound.Active;
+ };
overlayTitle = new CheckButton ();
rendertable.Attach (overlayTitle, 1, 2, 4, 5,
- AttachOptions.Fill,
- AttachOptions.Fill, 0, 0);
+ AttachOptions.Fill,
+ AttachOptions.Fill, 0, 0);
overlayTitle.CanFocus = false;
overlayTitle.Show ();
overlayTitle.Active = Config.OverlayTitle;
overlayTitle.Toggled += (sender, e) => {
- Config.OverlayTitle = overlayTitle.Active;};
+ Config.OverlayTitle = overlayTitle.Active;
+ };
SizeGroup sgroup = new SizeGroup (SizeGroupMode.Horizontal);
foreach (Widget w in capturetable) {
@@ -115,7 +117,7 @@ namespace LongoMatch.Gui.Component
combo.GetActiveIter (out iter);
store = combo.Model as ListStore;
- qual = (EncodingQuality) store.GetValue(iter, 1);
+ qual = (EncodingQuality)store.GetValue (iter, 1);
if (combo == renderqualcombo)
Config.RenderEncodingQuality = qual;
@@ -132,7 +134,7 @@ namespace LongoMatch.Gui.Component
combo.GetActiveIter (out iter);
store = combo.Model as ListStore;
- std = (VideoStandard) store.GetValue(iter, 1);
+ std = (VideoStandard)store.GetValue (iter, 1);
if (combo == renderimagecombo)
Config.RenderVideoStandard = std;
@@ -150,7 +152,7 @@ namespace LongoMatch.Gui.Component
combo.GetActiveIter (out iter);
store = combo.Model as ListStore;
- enc = (EncodingProfile) store.GetValue(iter, 1);
+ enc = (EncodingProfile)store.GetValue (iter, 1);
if (combo == renderenccombo)
Config.RenderEncodingProfile = enc;
diff --git a/LongoMatch.GUI/Gui/Dialog/About.cs b/LongoMatch.GUI/Gui/Dialog/About.cs
index 68d5575..01d90af 100644
--- a/LongoMatch.GUI/Gui/Dialog/About.cs
+++ b/LongoMatch.GUI/Gui/Dialog/About.cs
@@ -26,16 +26,17 @@ namespace LongoMatch.Gui.Dialog
public AboutDialog (Version version)
{
ProgramName = Config.SoftwareName;
- Version = String.Format("{0}.{1}.{2}",version.Major,version.Minor,version.Build);
+ Version = String.Format ("{0}.{1}.{2}", version.Major, version.Minor, version.Build);
Copyright = Config.Copyright;
Website = Constants.WEBSITE;
License = Config.License;
- Authors = new string[] {"Andoni Morales Alastruey", "Fluendo" };
+ Authors = new string[] { "Andoni Morales Alastruey", "Fluendo" };
TranslatorCredits = Constants.TRANSLATORS;
- SetUrlHook(delegate(Gtk.AboutDialog dialog, string url) {
+ SetUrlHook (delegate(Gtk.AboutDialog dialog, string url) {
try {
- System.Diagnostics.Process.Start(url);
- } catch {}
+ System.Diagnostics.Process.Start (url);
+ } catch {
+ }
});
}
}
diff --git a/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs b/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs
index 1fa17a4..b228cb8 100644
--- a/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs
@@ -74,8 +74,9 @@ namespace LongoMatch.Gui.Dialog
GLib.Timeout.Add (200, OnTimeout);
Run ();
}
-
- bool OnTimeout () {
+
+ bool OnTimeout ()
+ {
Pulse ();
return true;
}
diff --git a/LongoMatch.GUI/Gui/Dialog/CalendarDialog.cs b/LongoMatch.GUI/Gui/Dialog/CalendarDialog.cs
index 7f7c72e..4182db1 100644
--- a/LongoMatch.GUI/Gui/Dialog/CalendarDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/CalendarDialog.cs
@@ -28,7 +28,7 @@ namespace LongoMatch.Gui.Dialog
public CalendarDialog (DateTime date)
{
- this.Build();
+ this.Build ();
SkipPagerHint = true;
SkipTaskbarHint = true;
//Decorated = false;
@@ -42,13 +42,13 @@ namespace LongoMatch.Gui.Dialog
}
}
- protected virtual void OnCalendar1DaySelectedDoubleClick(object sender, System.EventArgs e)
+ protected virtual void OnCalendar1DaySelectedDoubleClick (object sender, System.EventArgs e)
{
selectedDate = calendar1.Date;
- this.Respond(ResponseType.Accept);
+ this.Respond (ResponseType.Accept);
}
- protected virtual void OnCalendar1DaySelected(object sender, System.EventArgs e)
+ protected virtual void OnCalendar1DaySelected (object sender, System.EventArgs e)
{
DateTime d = calendar1.Date;
selectedDate = new DateTime (d.Year, d.Month, d.Day, 0, 0, 0, DateTimeKind.Utc);
diff --git a/LongoMatch.GUI/Gui/Dialog/ChooseOptionDialog.cs b/LongoMatch.GUI/Gui/Dialog/ChooseOptionDialog.cs
index 9310a1b..80112fb 100644
--- a/LongoMatch.GUI/Gui/Dialog/ChooseOptionDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/ChooseOptionDialog.cs
@@ -37,7 +37,7 @@ namespace LongoMatch.Gui.Dialog
first = new RadioButton (first, desc);
first.Toggled += (sender, e) => {
if ((sender as RadioButton).Active) {
- SelectedOption = value[desc];
+ SelectedOption = value [desc];
}
};
first.ShowAll ();
@@ -45,7 +45,7 @@ namespace LongoMatch.Gui.Dialog
}
}
}
-
+
public object SelectedOption {
get;
protected set;
diff --git a/LongoMatch.GUI/Gui/Dialog/ChooseProjectDialog.cs
b/LongoMatch.GUI/Gui/Dialog/ChooseProjectDialog.cs
index 2dca673..315cfc4 100644
--- a/LongoMatch.GUI/Gui/Dialog/ChooseProjectDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/ChooseProjectDialog.cs
@@ -30,15 +30,16 @@ namespace LongoMatch.Gui.Dialog
projectlistwidget1.SelectionMode = Gtk.SelectionMode.Single;
projectlistwidget1.ProjectsSelected += (projects) => {
if (projects != null && projects.Count == 1) {
- Project = projects[0];
+ Project = projects [0];
}
};
}
- public void Fill (List<ProjectDescription> projects) {
+ public void Fill (List<ProjectDescription> projects)
+ {
projectlistwidget1.Fill (Config.DatabaseManager.ActiveDB.GetAllProjects ());
}
-
+
public ProjectDescription Project {
get;
set;
diff --git a/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs b/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs
index 2ff36c0..ceaf818 100644
--- a/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs
+++ b/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs
@@ -32,7 +32,7 @@ namespace LongoMatch.Gui.Dialog
{
IDataBaseManager manager;
ListStore store;
-
+
public DatabasesManager ()
{
this.Build ();
@@ -44,41 +44,42 @@ namespace LongoMatch.Gui.Dialog
IDatabase ActiveDB {
set {
- dblabel.Text = Catalog.GetString("Active database") +": " + value.Name;
+ dblabel.Text = Catalog.GetString ("Active database") + ": " + value.Name;
}
}
-
- void SetTreeView () {
+
+ void SetTreeView ()
+ {
/* DB name */
- TreeViewColumn nameCol = new TreeViewColumn();
- nameCol.Title = Catalog.GetString("Name");
- CellRendererText nameCell = new CellRendererText();
- nameCol.PackStart(nameCell, true);
- nameCol.SetCellDataFunc(nameCell, new TreeCellDataFunc(RenderName));
- treeview.AppendColumn(nameCol);
+ TreeViewColumn nameCol = new TreeViewColumn ();
+ nameCol.Title = Catalog.GetString ("Name");
+ CellRendererText nameCell = new CellRendererText ();
+ nameCol.PackStart (nameCell, true);
+ nameCol.SetCellDataFunc (nameCell, new TreeCellDataFunc (RenderName));
+ treeview.AppendColumn (nameCol);
/* DB last backup */
- TreeViewColumn lastbackupCol = new TreeViewColumn();
- lastbackupCol.Title = Catalog.GetString("Last backup");
- CellRendererText lastbackupCell = new CellRendererText();
- lastbackupCol.PackStart(lastbackupCell, true);
- lastbackupCol.SetCellDataFunc(lastbackupCell, new TreeCellDataFunc(RenderLastbackup));
- treeview.AppendColumn(lastbackupCol);
+ TreeViewColumn lastbackupCol = new TreeViewColumn ();
+ lastbackupCol.Title = Catalog.GetString ("Last backup");
+ CellRendererText lastbackupCell = new CellRendererText ();
+ lastbackupCol.PackStart (lastbackupCell, true);
+ lastbackupCol.SetCellDataFunc (lastbackupCell, new TreeCellDataFunc
(RenderLastbackup));
+ treeview.AppendColumn (lastbackupCol);
/* DB Projects count */
- TreeViewColumn countCol = new TreeViewColumn();
- countCol.Title = Catalog.GetString("Projects count");
- CellRendererText countCell = new CellRendererText();
- countCol.PackStart(countCell, true);
- countCol.SetCellDataFunc(countCell, new TreeCellDataFunc(RenderCount));
- treeview.AppendColumn(countCol);
- store = new ListStore(typeof (IDatabase));
+ TreeViewColumn countCol = new TreeViewColumn ();
+ countCol.Title = Catalog.GetString ("Projects count");
+ CellRendererText countCell = new CellRendererText ();
+ countCol.PackStart (countCell, true);
+ countCol.SetCellDataFunc (countCell, new TreeCellDataFunc (RenderCount));
+ treeview.AppendColumn (countCol);
+ store = new ListStore (typeof(IDatabase));
foreach (IDatabase db in manager.Databases) {
- store.AppendValues(db);
+ store.AppendValues (db);
}
treeview.Model = store;
}
-
+
IDatabase SelectedDB {
get {
TreeIter iter;
@@ -90,10 +91,10 @@ namespace LongoMatch.Gui.Dialog
void RenderCount (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model,
Gtk.TreeIter iter)
{
- IDatabase db = (IDatabase) store.GetValue(iter, 0);
+ IDatabase db = (IDatabase)store.GetValue (iter, 0);
- (cell as Gtk.CellRendererText).Text = db.Count.ToString();
- if(db == manager.ActiveDB) {
+ (cell as Gtk.CellRendererText).Text = db.Count.ToString ();
+ if (db == manager.ActiveDB) {
cell.CellBackground = "red";
} else {
cell.CellBackgroundGdk = LongoMatch.Gui.Helpers.Misc.ToGdkColor
(Config.Style.PaletteBackground);
@@ -102,10 +103,10 @@ namespace LongoMatch.Gui.Dialog
void RenderLastbackup (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model,
Gtk.TreeIter iter)
{
- IDatabase db = (IDatabase) store.GetValue(iter, 0);
+ IDatabase db = (IDatabase)store.GetValue (iter, 0);
- (cell as Gtk.CellRendererText).Text = db.LastBackup.ToShortDateString();
- if(db == manager.ActiveDB) {
+ (cell as Gtk.CellRendererText).Text = db.LastBackup.ToShortDateString ();
+ if (db == manager.ActiveDB) {
cell.CellBackground = "red";
} else {
cell.CellBackgroundGdk = LongoMatch.Gui.Helpers.Misc.ToGdkColor
(Config.Style.PaletteBackground);
@@ -114,10 +115,10 @@ namespace LongoMatch.Gui.Dialog
void RenderName (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model,
Gtk.TreeIter iter)
{
- IDatabase db = (IDatabase) store.GetValue(iter, 0);
+ IDatabase db = (IDatabase)store.GetValue (iter, 0);
(cell as Gtk.CellRendererText).Text = db.Name;
- if(db == manager.ActiveDB) {
+ if (db == manager.ActiveDB) {
cell.CellBackground = "red";
} else {
cell.CellBackgroundGdk = LongoMatch.Gui.Helpers.Misc.ToGdkColor
(Config.Style.PaletteBackground);
@@ -140,7 +141,7 @@ namespace LongoMatch.Gui.Dialog
if (dbname == null || dbname == "")
return;
- if (manager.Databases.Where (d => d.Name == dbname).Count() != 0) {
+ if (manager.Databases.Where (d => d.Name == dbname).Count () != 0) {
var msg = Catalog.GetString ("A database already exists with this name");
MessagesHelpers.ErrorMessage (this, msg);
return;
@@ -157,7 +158,7 @@ namespace LongoMatch.Gui.Dialog
IDatabase db;
treeview.Selection.GetSelected (out iter);
- db = store.GetValue (iter, 0) as IDatabase;
+ db = store.GetValue (iter, 0) as IDatabase;
if (db == manager.ActiveDB) {
var msg = Catalog.GetString ("This database is the active one and can't be
deleted");
@@ -170,7 +171,7 @@ namespace LongoMatch.Gui.Dialog
if (MessagesHelpers.QuestionMessage (this, msg)) {
db.Backup ();
manager.Delete (db);
- store.Remove(ref iter);
+ store.Remove (ref iter);
}
}
}
@@ -179,7 +180,7 @@ namespace LongoMatch.Gui.Dialog
{
IDatabase db = SelectedDB;
if (db != null) {
- if (db.Backup())
+ if (db.Backup ())
MessagesHelpers.InfoMessage (this, Catalog.GetString ("Backup
successful"));
else
MessagesHelpers.ErrorMessage (this, Catalog.GetString ("Could not
create backup"));
@@ -195,7 +196,7 @@ namespace LongoMatch.Gui.Dialog
selectbutton.Sensitive = selected;
rescanbutton.Sensitive = selected;
}
-
+
void HandleRescanClicked (object sender, EventArgs e)
{
IDatabase db = SelectedDB;
diff --git a/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs b/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs
index bfd885c..20d526e 100644
--- a/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs
@@ -25,16 +25,16 @@ namespace LongoMatch.Gui.Dialog
public partial class EditCategoryDialog : Gtk.Dialog
{
- public EditCategoryDialog(Project project, DashboardButton tagger)
+ public EditCategoryDialog (Project project, DashboardButton tagger)
{
- this.Build();
+ this.Build ();
timenodeproperties2.Tagger = tagger;
timenodeproperties2.Dashboard = project.Dashboard;
}
- public EditCategoryDialog(Project project, EventType eventType)
+ public EditCategoryDialog (Project project, EventType eventType)
{
- this.Build();
+ this.Build ();
timenodeproperties2.EventType = eventType;
timenodeproperties2.Dashboard = project.Dashboard;
}
@@ -43,7 +43,7 @@ namespace LongoMatch.Gui.Dialog
{
base.OnRealized ();
Resize (Allocation.Width, ActionArea.Allocation.Height +
- timenodeproperties2.Allocation.Height);
+ timenodeproperties2.Allocation.Height);
}
}
}
diff --git a/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs b/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs
index 5c83ca8..bcdf68f 100644
--- a/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs
@@ -27,21 +27,21 @@ namespace LongoMatch.Gui.Dialog
public partial class EndCaptureDialog : Gtk.Dialog
{
- public EndCaptureDialog(string filepath)
+ public EndCaptureDialog (string filepath)
{
- this.Build();
+ this.Build ();
image439.Pixbuf = Helpers.Misc.LoadStockIcon (this, "gtk-dialog-question",
Gtk.IconSize.Dialog);
savebutton.Visible = System.IO.File.Exists (filepath);
}
- protected virtual void OnQuit(object sender, System.EventArgs e)
+ protected virtual void OnQuit (object sender, System.EventArgs e)
{
- if(sender == quitbutton)
- Respond((int)EndCaptureResponse.Quit);
- else if(sender == savebutton)
- Respond((int)EndCaptureResponse.Save);
+ if (sender == quitbutton)
+ Respond ((int)EndCaptureResponse.Quit);
+ else if (sender == savebutton)
+ Respond ((int)EndCaptureResponse.Save);
else
- Respond((int)EndCaptureResponse.Return);
+ Respond ((int)EndCaptureResponse.Return);
}
}
}
diff --git a/LongoMatch.GUI/Gui/Dialog/EntryDialog.cs b/LongoMatch.GUI/Gui/Dialog/EntryDialog.cs
index dd5a333..2d0c0c2 100644
--- a/LongoMatch.GUI/Gui/Dialog/EntryDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/EntryDialog.cs
@@ -25,18 +25,18 @@ namespace LongoMatch.Gui.Dialog
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(false)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (false)]
public partial class EntryDialog : Gtk.Dialog
{
bool showCount;
- public EntryDialog()
+ public EntryDialog ()
{
- this.Build();
+ this.Build ();
ShowCount = false;
- setAvailableTemplatesVisible(false);
+ setAvailableTemplatesVisible (false);
}
public string Text {
@@ -56,7 +56,7 @@ namespace LongoMatch.Gui.Dialog
playersspinbutton.Value = value;
}
}
-
+
public string CountText {
set {
playerslabel.Text = value;
@@ -76,35 +76,36 @@ namespace LongoMatch.Gui.Dialog
public List<string> AvailableTemplates {
set {
- if(value.Count > 0) {
- foreach(String text in value)
- combobox.AppendText(text);
- setAvailableTemplatesVisible(true);
+ if (value.Count > 0) {
+ foreach (String text in value)
+ combobox.AppendText (text);
+ setAvailableTemplatesVisible (true);
combobox.Active = 0;
- }
- else
- setAvailableTemplatesVisible(false);
+ } else
+ setAvailableTemplatesVisible (false);
}
}
public string SelectedTemplate {
get {
- if(checkbutton.Active)
+ if (checkbutton.Active)
return combobox.ActiveText;
- else return null;
+ else
+ return null;
}
}
- private void setAvailableTemplatesVisible(bool visible) {
+ private void setAvailableTemplatesVisible (bool visible)
+ {
combobox.Visible = visible;
existentemplatelabel.Visible = visible;
checkbutton.Visible = visible;
}
- protected virtual void OnCheckbuttonToggled(object sender, System.EventArgs e)
+ protected virtual void OnCheckbuttonToggled (object sender, System.EventArgs e)
{
bool active = checkbutton.Active;
- if(ShowCount) {
+ if (ShowCount) {
playerslabel.Sensitive = !active;
playersspinbutton.Sensitive = !active;
}
diff --git a/LongoMatch.GUI/Gui/Dialog/EventTypeTagsEditor.cs
b/LongoMatch.GUI/Gui/Dialog/EventTypeTagsEditor.cs
index 203224c..c996037 100644
--- a/LongoMatch.GUI/Gui/Dialog/EventTypeTagsEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/EventTypeTagsEditor.cs
@@ -54,7 +54,7 @@ namespace LongoMatch.Gui.Dialog
var tagsByGroup = eventType.Tags.GroupBy (t => t.Group);
foreach (var tagsGroup in tagsByGroup) {
- AddNewGroup (tagsGroup.Key, tagsGroup.ToList());
+ AddNewGroup (tagsGroup.Key, tagsGroup.ToList ());
}
newGroupButton = CreateAddGroupButton ();
mainvbox.PackEnd (newGroupButton, false, true, 0);
@@ -99,7 +99,7 @@ namespace LongoMatch.Gui.Dialog
t = CreateTagsTable (g);
vbox.PackStart (hbox, true, true, 0);
vbox.PackStart (t, true, true, 0);
- vbox.PackEnd (new HSeparator(), true, true, 0);
+ vbox.PackEnd (new HSeparator (), true, true, 0);
vbox.ShowAll ();
mainvbox.PackStart (vbox, true, true, 0);
}
@@ -124,7 +124,7 @@ namespace LongoMatch.Gui.Dialog
g.container.ShowAll ();
}
}
-
+
void AddTag (TagsGroup g)
{
Tag t = new Tag (Catalog.GetString ("New tag"), g.nameEntry.Text);
@@ -230,7 +230,7 @@ namespace LongoMatch.Gui.Dialog
};
return b;
}
-
+
Button CreateAddTagButton (TagsGroup g)
{
Button b = CreateButton (Catalog.GetString ("Add new tag"), IconSize.Button);
diff --git a/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs
b/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs
index 3433b63..3575123 100644
--- a/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs
@@ -30,41 +30,42 @@ using LongoMatch.Video.Common;
namespace LongoMatch.Gui.Dialog
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(false)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (false)]
public partial class FramesCaptureProgressDialog : Gtk.Dialog
{
private FramesSeriesCapturer capturer;
- public FramesCaptureProgressDialog(FramesSeriesCapturer capturer)
+ public FramesCaptureProgressDialog (FramesSeriesCapturer capturer)
{
- this.Build();
+ this.Build ();
this.Deletable = false;
this.capturer = capturer;
capturer.Progress += Update;
- capturer.Start();
+ capturer.Start ();
}
- protected virtual void Update(int actual, int total, LongoMatch.Core.Common.Image frame) {
- if(actual <= total) {
- progressbar.Text= Catalog.GetString("Capturing frame: ")+actual+"/"+total;
- progressbar.Fraction = (double)actual/(double)total;
- if(frame != null) {
- if(image.Pixbuf != null)
- image.Pixbuf.Dispose();
+ protected virtual void Update (int actual, int total, LongoMatch.Core.Common.Image frame)
+ {
+ if (actual <= total) {
+ progressbar.Text = Catalog.GetString ("Capturing frame: ") + actual + "/" +
total;
+ progressbar.Fraction = (double)actual / (double)total;
+ if (frame != null) {
+ if (image.Pixbuf != null)
+ image.Pixbuf.Dispose ();
image.Pixbuf = frame.Value;
}
}
- if(actual == total) {
- progressbar.Text= Catalog.GetString("Done");
+ if (actual == total) {
+ progressbar.Text = Catalog.GetString ("Done");
cancelbutton.Visible = false;
okbutton.Visible = true;
}
}
- protected virtual void OnButtonCancelClicked(object sender, System.EventArgs e)
+ protected virtual void OnButtonCancelClicked (object sender, System.EventArgs e)
{
- capturer.Cancel();
+ capturer.Cancel ();
}
}
}
diff --git a/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs
b/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs
index 0a8dac6..63209b2 100644
--- a/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs
@@ -28,30 +28,38 @@ namespace LongoMatch.Gui.Dialog
public partial class HotKeySelectorDialog : Gtk.Dialog
{
HotKey hotKey;
+
#region Constructors
+
public HotKeySelectorDialog ()
{
hotKey = new HotKey ();
this.Build ();
}
+
#endregion
+
#region Properties
+
public HotKey HotKey {
get {
return this.hotKey;
}
}
+
#endregion
+
#region Overrides
+
bool IsSupportedModifier (Gdk.Key key)
{
return key == Gdk.Key.Shift_L ||
- key == Gdk.Key.Shift_R ||
- key == Gdk.Key.Alt_L ||
- key == Gdk.Key.Alt_R ||
- key == Gdk.Key.Control_L ||
- key == Gdk.Key.Control_R ||
- key == (Gdk.Key) ModifierType.None;
+ key == Gdk.Key.Shift_R ||
+ key == Gdk.Key.Alt_L ||
+ key == Gdk.Key.Alt_R ||
+ key == Gdk.Key.Control_L ||
+ key == Gdk.Key.Control_R ||
+ key == (Gdk.Key)ModifierType.None;
}
protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
@@ -66,8 +74,8 @@ namespace LongoMatch.Gui.Dialog
hotKey = Keyboard.ParseEvent (evnt);
if (hotKey.Modifier != -1 && !IsSupportedModifier ((Gdk.Key)hotKey.Modifier)) {
- string msg = Keyboard.NameFromKeyval ((uint) hotKey.Modifier) +
- Catalog.GetString ("is not a valid key modifier: Alt, Shift or Ctrl");
+ string msg = Keyboard.NameFromKeyval ((uint)hotKey.Modifier) +
+ Catalog.GetString ("is not a valid key modifier: Alt, Shift or
Ctrl");
Config.GUIToolkit.WarningMessage (msg, this);
hotKey = null;
return true;
@@ -75,6 +83,7 @@ namespace LongoMatch.Gui.Dialog
Respond (ResponseType.Ok);
return true;
}
+
#endregion
}
}
diff --git a/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs b/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs
index 3f57a54..cdaf137 100644
--- a/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs
@@ -58,8 +58,8 @@ namespace LongoMatch.Gui.Dialog
this.play = play;
notesframe.Visible = editNotes;
tagger.Visible = editPos && (play.EventType.TagFieldPosition ||
- play.EventType.TagHalfFieldPosition ||
- play.EventType.TagGoalPosition);
+ play.EventType.TagHalfFieldPosition ||
+ play.EventType.TagGoalPosition);
drawingarea3.Visible = editPlayers;
nameframe.Visible = editTags;
tagsvbox.Visible = editTags;
@@ -78,7 +78,7 @@ namespace LongoMatch.Gui.Dialog
if (editPlayers) {
teamtagger.Project = project;
teamtagger.LoadTeams (project.LocalTeamTemplate, project.VisitorTeamTemplate,
- project.Dashboard.FieldBackground);
+ project.Dashboard.FieldBackground);
/* Force lineup update */
teamtagger.CurrentTime = play.EventTime;
teamtagger.Select (play.Players, play.Team);
@@ -117,7 +117,7 @@ namespace LongoMatch.Gui.Dialog
tags.Insert (0, noneTag);
}
- for (int i=0; i < tags.Count; i++) {
+ for (int i = 0; i < tags.Count; i++) {
uint row_top, row_bottom, col_left, col_right;
Tag t = tags [i];
CheckButton tb;
@@ -166,7 +166,7 @@ namespace LongoMatch.Gui.Dialog
{
play.Players = players.ToList ();
}
-
+
void HandleTeamSelectionChangedEvent (TeamType team)
{
play.Team = team;
diff --git a/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs
b/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs
index 581b9a0..baabf00 100644
--- a/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs
@@ -28,31 +28,33 @@ namespace LongoMatch.Gui.Dialog
public partial class RenderingJobsDialog : Gtk.Dialog
{
IRenderingJobsManager manager;
-
+
public RenderingJobsDialog ()
{
this.Build ();
this.manager = Config.RenderingJobsManger;
- UpdateModel();
+ UpdateModel ();
cancelbutton.Clicked += OnCancelbuttonClicked;
clearbutton.Clicked += OnClearbuttonClicked;
retrybutton.Clicked += OnRetrybuttonClicked;
renderingjobstreeview2.Selection.Changed += OnSelectionChanged;
}
-
- private void UpdateModel() {
- TreeStore model = new TreeStore(typeof(Job));
+
+ private void UpdateModel ()
+ {
+ TreeStore model = new TreeStore (typeof(Job));
foreach (Job job in manager.Jobs)
- model.AppendValues(job);
+ model.AppendValues (job);
renderingjobstreeview2.Model = model;
- QueueDraw();
+ QueueDraw ();
}
-
- private void UpdateSelection() {
+
+ private void UpdateSelection ()
+ {
/* FIXME: Add support for multiple selection */
Job job;
- List<Job> jobs = renderingjobstreeview2.SelectedJobs();
+ List<Job> jobs = renderingjobstreeview2.SelectedJobs ();
cancelbutton.Visible = false;
retrybutton.Visible = false;
@@ -60,7 +62,7 @@ namespace LongoMatch.Gui.Dialog
if (jobs.Count == 0)
return;
- job = jobs[0];
+ job = jobs [0];
if (job.State == JobState.NotStarted ||
job.State == JobState.Running)
@@ -69,31 +71,31 @@ namespace LongoMatch.Gui.Dialog
if (job.State == JobState.Error || job.State == JobState.Cancelled)
retrybutton.Visible = true;
}
-
+
protected virtual void OnClearbuttonClicked (object sender, System.EventArgs e)
{
- manager.ClearDoneJobs();
- UpdateModel();
- UpdateSelection();
+ manager.ClearDoneJobs ();
+ UpdateModel ();
+ UpdateSelection ();
}
-
+
protected virtual void OnCancelbuttonClicked (object sender, System.EventArgs e)
{
- manager.CancelJobs(renderingjobstreeview2.SelectedJobs());
- UpdateSelection();
- QueueDraw();
+ manager.CancelJobs (renderingjobstreeview2.SelectedJobs ());
+ UpdateSelection ();
+ QueueDraw ();
}
-
+
protected virtual void OnRetrybuttonClicked (object sender, System.EventArgs e)
{
- manager.RetryJobs(renderingjobstreeview2.SelectedJobs());
- UpdateModel();
- UpdateSelection();
+ manager.RetryJobs (renderingjobstreeview2.SelectedJobs ());
+ UpdateModel ();
+ UpdateSelection ();
}
-
+
protected virtual void OnSelectionChanged (object sender, System.EventArgs e)
{
- UpdateSelection();
+ UpdateSelection ();
}
}
}
diff --git a/LongoMatch.GUI/Gui/Dialog/SnapshotsDialog.cs b/LongoMatch.GUI/Gui/Dialog/SnapshotsDialog.cs
index 72c6aac..47176b6 100644
--- a/LongoMatch.GUI/Gui/Dialog/SnapshotsDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/SnapshotsDialog.cs
@@ -25,18 +25,13 @@ using LongoMatch.Core.Handlers;
namespace LongoMatch.Gui.Dialog
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(false)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (false)]
public partial class SnapshotsDialog : Gtk.Dialog
{
-
-
-
-
-
- public SnapshotsDialog()
+ public SnapshotsDialog ()
{
- this.Build();
+ this.Build ();
}
public string Play {
@@ -48,7 +43,7 @@ namespace LongoMatch.Gui.Dialog
public uint Interval {
get {
- return 1000/(uint)spinbutton1.Value;
+ return 1000 / (uint)spinbutton1.Value;
}
}
diff --git a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
index 5f15818..8d840de 100644
--- a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
@@ -91,7 +91,7 @@ namespace LongoMatch.Gui.Dialog
tagger.SubstitutionMode = true;
tagger.ShowSubstitutionButtons = false;
LoadTeams (project, lineup.HomeStartingPlayers, lineup.HomeBenchPlayers,
- lineup.AwayStartingPlayers, lineup.AwayBenchPlayers);
+ lineup.AwayStartingPlayers, lineup.AwayBenchPlayers);
}
public void LoadSubstitution (Project project, SubstitutionEvent substitution)
@@ -113,7 +113,7 @@ namespace LongoMatch.Gui.Dialog
}
void LoadTeams (Project project, List<Player> homeFieldPlayers, List<Player> homeBenchPlayers,
- List<Player> awayFieldPlayers, List<Player> awayBenchPlayers)
+ List<Player> awayFieldPlayers, List<Player> awayBenchPlayers)
{
List<Player> homeTeamPlayers, awayTeamPlayers;
@@ -178,7 +178,7 @@ namespace LongoMatch.Gui.Dialog
selectedPlayer = null;
}
}
-
+
void HandlePlayersSubstitutionEvent (Team team, Player p1, Player p2, SubstitutionReason
reason, Time time)
{
tagger.Substitute (p1, p2, team);
diff --git a/LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs b/LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs
index fe4b41f..c66e86f 100644
--- a/LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs
@@ -23,18 +23,19 @@ using System;
namespace LongoMatch.Gui.Dialog
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(false)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (false)]
public partial class UpdateDialog : Gtk.Dialog
{
- public UpdateDialog()
+ public UpdateDialog ()
{
- this.Build();
+ this.Build ();
}
- public void Fill(Version version, string URL) {
- this.label5.Text = "The new version is: LongoMatch "+version.ToString();
+ public void Fill (Version version, string URL)
+ {
+ this.label5.Text = "The new version is: LongoMatch " + version.ToString ();
this.label7.Text = URL;
}
diff --git a/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
b/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
index c29c9aa..02a6cf7 100644
--- a/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
+++ b/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
@@ -28,19 +28,21 @@ using LongoMatch.Core.Store.Playlists;
namespace LongoMatch.Gui.Dialog
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(false)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (false)]
public partial class VideoEditionProperties : Gtk.Dialog
{
EncodingSettings encSettings;
ListStore stdStore, encStore, qualStore;
+
#region Constructors
+
public VideoEditionProperties ()
{
this.Build ();
encSettings = new EncodingSettings ();
stdStore = Misc.FillImageFormat (sizecombobox, VideoStandards.Rendering,
- Config.RenderVideoStandard);
+ Config.RenderVideoStandard);
encStore = Misc.FillEncodingFormat (formatcombobox, Config.RenderEncodingProfile);
qualStore = Misc.FillQuality (qualitycombobox, Config.RenderEncodingQuality);
descriptioncheckbutton.Active = Config.OverlayTitle;
@@ -51,10 +53,15 @@ namespace LongoMatch.Gui.Dialog
"*.avi", "*.mpg", "*.vob"
};
mediafilechooser2.FileChooserMode = FileChooserMode.Directory;
- mediafilechooser2.ChangedEvent += (sender, e) => {OutputDir =
mediafilechooser2.CurrentPath;};
+ mediafilechooser2.ChangedEvent += (sender, e) => {
+ OutputDir = mediafilechooser2.CurrentPath;
+ };
}
+
#endregion
+
#region Properties
+
public EncodingSettings EncodingSettings {
get {
return encSettings;
@@ -79,16 +86,20 @@ namespace LongoMatch.Gui.Dialog
}
}
}
-
+
#endregion Properties
+
#region Private Methods
+
string GetExtension ()
{
TreeIter iter;
formatcombobox.GetActiveIter (out iter);
return ((EncodingProfile)encStore.GetValue (iter, 1)).Extension;
}
+
#endregion
+
protected virtual void OnButtonOkClicked (object sender, System.EventArgs e)
{
TreeIter iter;
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index 2559d17..51366a4 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -30,8 +30,8 @@ using LongoMatch.Gui.Panel;
namespace LongoMatch.Gui
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(false)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (false)]
public partial class MainWindow : Gtk.Window, IMainController
{
IGUIToolkit guiToolKit;
@@ -40,9 +40,11 @@ namespace LongoMatch.Gui
ProjectType projectType;
Widget currentPanel;
Widget stackPanel;
+
#region Constructors
+
public MainWindow (IGUIToolkit guiToolkit) :
- base(Constants.SOFTWARE_NAME)
+ base (Constants.SOFTWARE_NAME)
{
this.Build ();
this.guiToolKit = guiToolkit;
@@ -64,8 +66,11 @@ namespace LongoMatch.Gui
this.Move (monitor_geometry.Width * 10 / 100, monitor_geometry.Height * 10 / 100);
#endif
}
+
#endregion
+
#region Plubic Methods
+
public IRenderingStateBar RenderingStateBar {
get {
return renderingstatebar1;
@@ -89,7 +94,7 @@ namespace LongoMatch.Gui
return (MenuItem)this.UIManager.GetWidget
("/menubar1/FileAction/PreferencesAction");
}
}
-
+
public MenuItem AboutMenu {
get {
return (MenuItem)this.UIManager.GetWidget
("/menubar1/HelpAction/AboutAction");
@@ -134,7 +139,7 @@ namespace LongoMatch.Gui
openedProject = project;
if (projectType == ProjectType.FileProject) {
Title = openedProject.Description.Title +
- " - " + Constants.SOFTWARE_NAME;
+ " - " + Constants.SOFTWARE_NAME;
} else {
Title = Constants.SOFTWARE_NAME;
}
@@ -181,7 +186,9 @@ namespace LongoMatch.Gui
}
#endregion
+
#region Private Methods
+
protected override bool OnKeyPressEvent (EventKey evnt)
{
bool ret = base.OnKeyPressEvent (evnt);
@@ -203,34 +210,46 @@ namespace LongoMatch.Gui
{
/* Adding Handlers for each event */
renderingstatebar1.ManageJobs += (e, o) => {
- Config.EventsBroker.EmitManageJobs ();};
+ Config.EventsBroker.EmitManageJobs ();
+ };
}
private void ConnectMenuSignals ()
{
SaveProjectAction.Activated += (o, e) => {
- Config.EventsBroker.EmitSaveProject (openedProject, projectType);};
+ Config.EventsBroker.EmitSaveProject (openedProject, projectType);
+ };
CloseProjectAction.Activated += (o, e) => {
- Config.EventsBroker.EmitCloseOpenedProject ();};
+ Config.EventsBroker.EmitCloseOpenedProject ();
+ };
ExportToProjectFileAction.Activated += (o, e) => {
- Config.EventsBroker.EmitExportProject (openedProject);};
+ Config.EventsBroker.EmitExportProject (openedProject);
+ };
CategoriesTemplatesManagerAction.Activated += (o, e) => {
- Config.EventsBroker.EmitManageCategories ();};
+ Config.EventsBroker.EmitManageCategories ();
+ };
TeamsTemplatesManagerAction.Activated += (o, e) => {
- Config.EventsBroker.EmitManageTeams ();};
+ Config.EventsBroker.EmitManageTeams ();
+ };
ProjectsManagerAction.Activated += (o, e) => {
- Config.EventsBroker.EmitManageProjects ();};
+ Config.EventsBroker.EmitManageProjects ();
+ };
DatabasesManagerAction.Activated += (o, e) => {
- Config.EventsBroker.EmitManageDatabases ();};
+ Config.EventsBroker.EmitManageDatabases ();
+ };
PreferencesAction.Activated += (sender, e) => {
- Config.EventsBroker.EmitEditPreferences ();};
+ Config.EventsBroker.EmitEditPreferences ();
+ };
ShowProjectStatsAction.Activated += (sender, e) => {
- Config.EventsBroker.EmitShowProjectStats (openedProject);};
+ Config.EventsBroker.EmitShowProjectStats (openedProject);
+ };
QuitAction.Activated += (o, e) => {
- CloseAndQuit ();};
+ CloseAndQuit ();
+ };
openAction.Activated += (sender, e) => {
Config.EventsBroker.EmitSaveProject (openedProject, projectType);
- Config.EventsBroker.EmitOpenProject ();};
+ Config.EventsBroker.EmitOpenProject ();
+ };
NewPojectAction.Activated += (sender, e) => {
Config.EventsBroker.EmitNewProject (null);
};
@@ -303,8 +322,11 @@ namespace LongoMatch.Gui
CloseAndQuit ();
return true;
}
+
#endregion
+
#region Callbacks
+
protected void OnVideoConverterToolActionActivated (object sender, System.EventArgs e)
{
int res;
@@ -313,7 +335,7 @@ namespace LongoMatch.Gui
converter.Destroy ();
if (res == (int)ResponseType.Ok) {
Config.EventsBroker.EmitConvertVideoFiles (converter.Files,
- converter.EncodingSettings);
+ converter.EncodingSettings);
}
}
@@ -337,6 +359,7 @@ namespace LongoMatch.Gui
{
Config.EventsBroker.EmitMigrateDB ();
}
+
#endregion
}
}
diff --git a/LongoMatch.GUI/Gui/Menu/PeriodsMenu.cs b/LongoMatch.GUI/Gui/Menu/PeriodsMenu.cs
index 03a2935..04f74eb 100644
--- a/LongoMatch.GUI/Gui/Menu/PeriodsMenu.cs
+++ b/LongoMatch.GUI/Gui/Menu/PeriodsMenu.cs
@@ -46,21 +46,22 @@ namespace LongoMatch.Gui.Menus
delitem.Visible = project != null && timer != null;
Popup ();
}
-
+
void CreateMenu ()
{
additem = new MenuItem (Catalog.GetString ("Add period"));
additem.Activated += (sender, e) => {
string periodname = Config.GUIToolkit.QueryMessage (Catalog.GetString
("Period name"), null,
- (project.Periods.Count +
1).ToString(),
- this);
+ (project.Periods.Count + 1).ToString (),
+ this);
if (periodname != null) {
project.Dashboard.GamePeriods.Add (periodname);
- Period p = new Period {Name = periodname};
+ Period p = new Period { Name = periodname };
p.Nodes.Add (new TimeNode {
Name = periodname,
- Start = new Time {TotalSeconds = time.TotalSeconds - 10},
- Stop = new Time {TotalSeconds = time.TotalSeconds + 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 c71bc38..0492833 100644
--- a/LongoMatch.GUI/Gui/Menu/PlaysMenu.cs
+++ b/LongoMatch.GUI/Gui/Menu/PlaysMenu.cs
@@ -37,28 +37,30 @@ namespace LongoMatch.Gui.Menus
EventType eventType;
Time time;
Project project;
-
+
public PlaysMenu ()
{
CreateMenu ();
}
-
- public void ShowListMenu (Project project, List<TimelineEvent> plays) {
+
+ public void ShowListMenu (Project project, List<TimelineEvent> plays)
+ {
ShowMenu (project, plays, null, null, project.EventTypes, true);
}
- public void ShowMenu (Project project, List<TimelineEvent> plays) {
+ public void ShowMenu (Project project, List<TimelineEvent> plays)
+ {
ShowMenu (project, plays, null, null, null, false);
}
-
+
public void ShowTimelineMenu (Project project, List<TimelineEvent> plays, EventType
eventType, Time time)
{
ShowMenu (project, plays, eventType, time, null, false);
}
-
+
private void ShowMenu (Project project, List<TimelineEvent> plays, EventType eventType, Time
time,
- List<EventType> eventTypes, bool editableName)
+ List<EventType> eventTypes, bool editableName)
{
bool isLineup = false, isSubstitution = false;
@@ -126,7 +128,7 @@ namespace LongoMatch.Gui.Menus
if (drawings.Visible) {
Menu drawingsMenu = new Menu ();
- for (int i=0; i < plays[0].Drawings.Count; i++) {
+ for (int i = 0; i < plays [0].Drawings.Count; i++) {
int index = i;
MenuItem drawingItem = new MenuItem (Catalog.GetString ("Drawing ") +
(i + 1));
MenuItem editItem = new MenuItem (Catalog.GetString ("Edit"));
@@ -156,13 +158,13 @@ namespace LongoMatch.Gui.Menus
MenuItem item;
foreach (Playlist pl in project.Playlists) {
- item = new MenuItem (pl.Name);
+ item = new MenuItem (pl.Name);
plMenu.Append (item);
item.Activated += (sender, e) => {
IEnumerable<IPlaylistElement> elements;
elements = plays.Select (p => new PlaylistPlayElement (p,
project.Description.FileSet));
- Config.EventsBroker.EmitAddPlaylistElement (pl,
elements.ToList());
+ Config.EventsBroker.EmitAddPlaylistElement (pl,
elements.ToList ());
};
}
@@ -171,18 +173,19 @@ namespace LongoMatch.Gui.Menus
item.Activated += (sender, e) => {
IEnumerable<IPlaylistElement> elements;
elements = plays.Select (p => new PlaylistPlayElement (p,
project.Description.FileSet));
- Config.EventsBroker.EmitAddPlaylistElement (null, elements.ToList());
+ Config.EventsBroker.EmitAddPlaylistElement (null, elements.ToList ());
};
plMenu.ShowAll ();
addPLN.Submenu = plMenu;
}
- Popup();
+ Popup ();
}
-
- void CreateMenu () {
- newPlay = new MenuItem("");
+
+ void CreateMenu ()
+ {
+ newPlay = new MenuItem ("");
Add (newPlay);
newPlay.Activated += HandleNePlayActivated;
@@ -215,8 +218,8 @@ namespace LongoMatch.Gui.Menus
render.Activated += (sender, e) => EmitRenderPlaylist (plays);
Add (render);
- snapshot = new MenuItem(Catalog.GetString("Export to PGN images"));
- snapshot.Activated += (sender, e) => Config.EventsBroker.EmitSnapshotSeries
(plays[0]);
+ snapshot = new MenuItem (Catalog.GetString ("Export to PGN images"));
+ snapshot.Activated += (sender, e) => Config.EventsBroker.EmitSnapshotSeries (plays
[0]);
Add (snapshot);
ShowAll ();
@@ -225,14 +228,14 @@ namespace LongoMatch.Gui.Menus
void HandleNePlayActivated (object sender, EventArgs e)
{
Config.EventsBroker.EmitNewTag (eventType,
- eventTime: time,
- start: time - new Time {TotalSeconds = 10},
- stop: time + new Time {TotalSeconds = 10});
+ eventTime: time,
+ start: time - new Time { TotalSeconds = 10 },
+ stop: time + new Time { TotalSeconds = 10 });
}
-
+
void EmitRenderPlaylist (List<TimelineEvent> plays)
{
- Playlist pl = new Playlist();
+ Playlist pl = new Playlist ();
foreach (TimelineEvent p in plays) {
pl.Elements.Add (new PlaylistPlayElement (p, project.Description.FileSet));
}
diff --git a/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs b/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
index 1d961e0..4b17805 100644
--- a/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
@@ -36,7 +36,7 @@ using Misc = LongoMatch.Gui.Helpers.Misc;
namespace LongoMatch.Gui.Panel
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class NewProjectPanel : Gtk.Bin, IPanel
{
public event BackEventHandle BackEvent;
@@ -66,7 +66,7 @@ namespace LongoMatch.Gui.Panel
this.gtoolkit = Config.GUIToolkit;
capturemediafilechooser.FileChooserMode = FileChooserMode.File;
capturemediafilechooser.ProposedFileName = String.Format ("Live-LongoMatch-{0}.mp4",
-
DateTime.Now.ToShortDateString ());
+ DateTime.Now.ToShortDateString ());
notebook1.ShowTabs = false;
notebook1.ShowBorder = false;
@@ -166,10 +166,12 @@ namespace LongoMatch.Gui.Panel
} else {
hometeamscombobox.Load (teams);
hometeamscombobox.Changed += (sender, e) => {
- LoadTemplate (hometeamscombobox.ActiveTeam, TeamType.LOCAL, false);};
+ LoadTemplate (hometeamscombobox.ActiveTeam, TeamType.LOCAL, false);
+ };
awayteamscombobox.Load (teams);
awayteamscombobox.Changed += (sender, e) => {
- LoadTemplate (awayteamscombobox.ActiveTeam, TeamType.VISITOR,
false);};
+ LoadTemplate (awayteamscombobox.ActiveTeam, TeamType.VISITOR, false);
+ };
}
hometeamscombobox.Active = 0;
awayteamscombobox.Active = 0;
@@ -229,7 +231,7 @@ namespace LongoMatch.Gui.Panel
bool filemode = false, urimode = false, capturemode = false;
if (projectType == ProjectType.FileProject ||
- projectType == ProjectType.EditProject) {
+ projectType == ProjectType.EditProject) {
filemode = true;
} else if (projectType == ProjectType.CaptureProject) {
capturemode = true;
@@ -245,7 +247,7 @@ namespace LongoMatch.Gui.Panel
void FillFormats ()
{
videoStandardList = Misc.FillImageFormat (imagecombobox, VideoStandards.Capture,
- Config.CaptureVideoStandard);
+ Config.CaptureVideoStandard);
encProfileList = Misc.FillEncodingFormat (encodingcombobox,
Config.CaptureEncodingProfile);
qualList = Misc.FillQuality (qualitycombobox, Config.CaptureEncodingQuality);
}
@@ -255,7 +257,7 @@ namespace LongoMatch.Gui.Panel
videoDevices = devices;
bool includeSourceName;
- includeSourceName = devices.GroupBy (d => d.SourceElement).Count() > 1;
+ includeSourceName = devices.GroupBy (d => d.SourceElement).Count () > 1;
foreach (Device device in devices) {
string deviceName;
@@ -315,7 +317,7 @@ namespace LongoMatch.Gui.Panel
}
}
teamtagger.LoadTeams (hometemplate, awaytemplate,
- analysisTemplate.FieldBackground);
+ analysisTemplate.FieldBackground);
}
void UpdateTitle ()
@@ -335,7 +337,7 @@ namespace LongoMatch.Gui.Panel
MediaFile file;
if (projectType == ProjectType.FileProject ||
- projectType == ProjectType.EditProject) {
+ projectType == ProjectType.EditProject) {
if (!mediafilesetselection1.FileSet.CheckFiles ()) {
gtoolkit.WarningMessage (Catalog.GetString ("You need at least 1
video file for the main angle"));
return false;
@@ -347,7 +349,7 @@ namespace LongoMatch.Gui.Panel
}
if (projectType == ProjectType.CaptureProject ||
- projectType == ProjectType.URICaptureProject) {
+ projectType == ProjectType.URICaptureProject) {
if (String.IsNullOrEmpty (capturemediafilechooser.CurrentPath)) {
gtoolkit.WarningMessage (Catalog.GetString ("No output video file"));
return false;
@@ -366,8 +368,8 @@ namespace LongoMatch.Gui.Panel
project.Description = new ProjectDescription ();
project.Description.Competition = competitionentry.Text;
project.Description.MatchDate = datepicker1.Date;
- project.Description.Description =
desctextview.Buffer.GetText(desctextview.Buffer.StartIter,
-
desctextview.Buffer.EndIter,true);
+ project.Description.Description = desctextview.Buffer.GetText
(desctextview.Buffer.StartIter,
+ desctextview.Buffer.EndIter, true);
project.Description.Season = seasonentry.Text;
project.Description.LocalName = project.LocalTeamTemplate.TeamName;
project.Description.VisitorName = project.VisitorTeamTemplate.TeamName;
@@ -407,12 +409,13 @@ namespace LongoMatch.Gui.Panel
if (projectType == ProjectType.CaptureProject) {
captureSettings.Device = videoDevices [devicecombobox.Active];
- captureSettings.Format =
captureSettings.Device.Formats[deviceformatcombobox.Active];
+ captureSettings.Format = captureSettings.Device.Formats
[deviceformatcombobox.Active];
file.VideoHeight = encSettings.VideoStandard.Height;
file.VideoWidth = encSettings.VideoStandard.Width;
} else if (projectType == ProjectType.URICaptureProject) {
captureSettings.Device = new Device {DeviceType = CaptureSourceType.URI,
- ID = urientry.Text};
+ ID = urientry.Text
+ };
file.VideoHeight = encSettings.VideoStandard.Height;
file.VideoWidth = encSettings.VideoStandard.Width;
} else if (projectType == ProjectType.FakeCaptureProject) {
@@ -464,7 +467,7 @@ namespace LongoMatch.Gui.Panel
FillDevices (mtoolkit.VideoDevices);
if (videoDevices == null || videoDevices.Count == 0) {
Config.GUIToolkit.ErrorMessage (Catalog.GetString ("No capture
devices found in the system"),
- this);
+ this);
return;
}
projectType = ProjectType.CaptureProject;
@@ -486,7 +489,7 @@ namespace LongoMatch.Gui.Panel
BackEvent ();
}
} else {
- notebook1.Page --;
+ notebook1.Page--;
}
if (notebook1.Page == PROJECT_TYPE) {
project = null;
@@ -504,8 +507,8 @@ namespace LongoMatch.Gui.Panel
return;
}
if (projectType == ProjectType.CaptureProject ||
- projectType == ProjectType.FakeCaptureProject ||
- projectType == ProjectType.URICaptureProject) {
+ projectType == ProjectType.FakeCaptureProject ||
+ projectType == ProjectType.URICaptureProject) {
project.CreateLineupEvent ();
Config.EventsBroker.EmitOpenNewProject (project, projectType,
captureSettings);
return;
@@ -518,7 +521,7 @@ namespace LongoMatch.Gui.Panel
return;
}
- notebook1.Page ++;
+ notebook1.Page++;
panelheader1.ApplyVisible = notebook1.Page != PROJECT_TYPE;
@@ -528,17 +531,17 @@ namespace LongoMatch.Gui.Panel
UpdateTitle ();
}
- void HandleShowMenuEvent(List<Player> players)
+ void HandleShowMenuEvent (List<Player> players)
{
- Menu menu = new Menu();
+ Menu menu = new Menu ();
MenuItem item;
if (players.Count > 0) {
- item = new MenuItem("Remove for this match");
+ item = new MenuItem ("Remove for this match");
item.Activated += (sender, e) => {
- hometemplate.RemovePlayers(players, false);
- awaytemplate.RemovePlayers(players, false);
- teamtagger.Reload();
+ hometemplate.RemovePlayers (players, false);
+ awaytemplate.RemovePlayers (players, false);
+ teamtagger.Reload ();
};
} else {
item = new MenuItem ("Reset players");
@@ -608,7 +611,7 @@ namespace LongoMatch.Gui.Panel
}
drawingarea.QueueDraw ();
}
-
+
void HandleDeviceChanged (object sender, EventArgs e)
{
Device device = videoDevices [devicecombobox.Active];
diff --git a/LongoMatch.GUI/Gui/Panel/PanelHeader.cs b/LongoMatch.GUI/Gui/Panel/PanelHeader.cs
index 01e85db..2e3f9da 100644
--- a/LongoMatch.GUI/Gui/Panel/PanelHeader.cs
+++ b/LongoMatch.GUI/Gui/Panel/PanelHeader.cs
@@ -21,7 +21,7 @@ using Gtk;
namespace LongoMatch.Gui.Panel
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class PanelHeader : Gtk.Bin
{
@@ -42,27 +42,27 @@ namespace LongoMatch.Gui.Panel
}
};
logoimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch", 45,
- IconLookupFlags.ForceSvg);
+ IconLookupFlags.ForceSvg);
backrectbuttonimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-back", 40,
- IconLookupFlags.ForceSvg);
- applyroundedbuttonimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-apply", 40,
- IconLookupFlags.ForceSvg);
+ IconLookupFlags.ForceSvg);
+ applyroundedbuttonimage.Pixbuf = Helpers.Misc.LoadIcon ("longomatch-apply", 40,
+ IconLookupFlags.ForceSvg);
headerhbox.HeightRequest = StyleConf.HeaderHeight;
}
-
+
public string Title {
set {
titlelabel.Markup = String.Format ("<span
font_desc=\"{0}\"><b>{1}</b></span>",
- StyleConf.HeaderFontSize, value);
+ StyleConf.HeaderFontSize, value);
}
}
-
+
public bool BackVisible {
set {
backrectbutton.Visible = value;
}
}
-
+
public bool ApplyVisible {
set {
applyroundedbutton.Visible = value;
diff --git a/LongoMatch.GUI/Gui/Panel/PreferencesPanel.cs b/LongoMatch.GUI/Gui/Panel/PreferencesPanel.cs
index 80ad6f4..ecd481a 100644
--- a/LongoMatch.GUI/Gui/Panel/PreferencesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/PreferencesPanel.cs
@@ -25,17 +25,18 @@ using Gdk;
namespace LongoMatch.Gui.Panel
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class PreferencesPanel : Gtk.Bin, IPanel
{
public event BackEventHandle BackEvent;
+
Widget selectedPanel;
ListStore prefsStore;
-
+
public PreferencesPanel ()
{
this.Build ();
- prefsStore = new ListStore(typeof(Pixbuf), typeof(string), typeof(Widget));
+ prefsStore = new ListStore (typeof(Pixbuf), typeof(string), typeof(Widget));
treeview.AppendColumn ("Icon", new CellRendererPixbuf (), "pixbuf", 0);
treeview.AppendColumn ("Desc", new CellRendererText (), "text", 1);
treeview.CursorChanged += HandleCursorChanged;
@@ -44,50 +45,53 @@ namespace LongoMatch.Gui.Panel
treeview.EnableGridLines = TreeViewGridLines.None;
treeview.EnableTreeLines = false;
AddPanels ();
- treeview.SetCursor (new TreePath("0"), null, false);
+ treeview.SetCursor (new TreePath ("0"), null, false);
panelheader1.ApplyVisible = false;
panelheader1.Title = Catalog.GetString ("PREFERENCES");
panelheader1.BackClicked += (sender, e) => {
if (BackEvent != null) {
BackEvent ();
- };
+ }
+ ;
};
}
-
- void AddPanels () {
+
+ void AddPanels ()
+ {
AddPane (Catalog.GetString ("General"),
- Helpers.Misc.LoadIcon ("longomatch-preferences", IconSize.Dialog, 0),
- new GeneralPreferencesPanel());
+ Helpers.Misc.LoadIcon ("longomatch-preferences", IconSize.Dialog, 0),
+ new GeneralPreferencesPanel ());
AddPane (Catalog.GetString ("Keyboard shortcuts"),
- Helpers.Misc.LoadIcon ("longomatch-shortcut", IconSize.Dialog, 0),
- new HotkeysConfiguration ());
+ Helpers.Misc.LoadIcon ("longomatch-shortcut", IconSize.Dialog, 0),
+ new HotkeysConfiguration ());
AddPane (Catalog.GetString ("Video"),
- Helpers.Misc.LoadIcon ("longomatch-record", IconSize.Dialog, 0),
- new VideoPreferencesPanel());
+ Helpers.Misc.LoadIcon ("longomatch-record", IconSize.Dialog, 0),
+ new VideoPreferencesPanel ());
AddPane (Catalog.GetString ("Live analysis"),
- Helpers.Misc.LoadIcon ("longomatch-video-device", IconSize.Dialog, 0),
- new LiveAnalysisPreferences());
+ Helpers.Misc.LoadIcon ("longomatch-video-device", IconSize.Dialog, 0),
+ new LiveAnalysisPreferences ());
AddPane (Catalog.GetString ("Plugins"),
- Helpers.Misc.LoadIcon ("longomatch-plugin", IconSize.Dialog, 0),
- new PluginsPreferences());
+ Helpers.Misc.LoadIcon ("longomatch-plugin", IconSize.Dialog, 0),
+ new PluginsPreferences ());
}
-
- void AddPane (string desc, Pixbuf icon, Widget pane) {
- prefsStore.AppendValues(icon, desc, pane);
+
+ void AddPane (string desc, Pixbuf icon, Widget pane)
+ {
+ prefsStore.AppendValues (icon, desc, pane);
}
-
+
void HandleCursorChanged (object sender, EventArgs e)
{
Widget newPanel;
TreeIter iter;
if (selectedPanel != null)
- propsvbox.Remove(selectedPanel);
+ propsvbox.Remove (selectedPanel);
- treeview.Selection.GetSelected(out iter);
- newPanel = prefsStore.GetValue(iter, 2) as Widget;
+ treeview.Selection.GetSelected (out iter);
+ newPanel = prefsStore.GetValue (iter, 2) as Widget;
newPanel.Visible = true;
- propsvbox.PackStart(newPanel, true, true, 0);
+ propsvbox.PackStart (newPanel, true, true, 0);
selectedPanel = newPanel;
}
}
diff --git a/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
b/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
index f4f3aa4..23b973c 100644
--- a/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
@@ -32,7 +32,7 @@ using LongoMatch.Gui.Dialog;
namespace LongoMatch.Gui.Panel
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class SportsTemplatesPanel : Gtk.Bin, IPanel
{
public event BackEventHandle BackEvent;
@@ -81,25 +81,30 @@ namespace LongoMatch.Gui.Panel
addcategorybutton.Entered += HandleEnterTagButton;
addcategorybutton.Left += HandleLeftTagButton;
addcategorybutton.Clicked += (object sender, EventArgs e) => {
- buttonswidget.AddButton ("Category"); };
+ buttonswidget.AddButton ("Category");
+ };
addtagbutton1.Entered += HandleEnterTagButton;
addtagbutton1.Left += HandleLeftTagButton;
addtagbutton1.Clicked += (object sender, EventArgs e) => {
- buttonswidget.AddButton ("Tag"); };
+ buttonswidget.AddButton ("Tag");
+ };
scorebutton.Entered += HandleEnterTagButton;
scorebutton.Left += HandleLeftTagButton;
scorebutton.Clicked += (object sender, EventArgs e) => {
- buttonswidget.AddButton ("Score"); };
+ buttonswidget.AddButton ("Score");
+ };
cardbutton.Entered += HandleEnterTagButton;
cardbutton.Left += HandleLeftTagButton;
cardbutton.Clicked += (object sender, EventArgs e) => {
- buttonswidget.AddButton ("Card"); };
+ buttonswidget.AddButton ("Card");
+ };
timerbutton.Entered += HandleEnterTagButton;
timerbutton.Left += HandleLeftTagButton;
timerbutton.Clicked += (object sender, EventArgs e) => {
- buttonswidget.AddButton ("Timer"); };
+ buttonswidget.AddButton ("Timer");
+ };
- templates = new ListStore (typeof(Pixbuf), typeof(string), typeof (string),
typeof(bool));
+ templates = new ListStore (typeof(Pixbuf), typeof(string), typeof(string),
typeof(bool));
// Connect treeview with Model and configure
dashboardseditortreeview.Model = templates;
@@ -188,7 +193,7 @@ namespace LongoMatch.Gui.Panel
string newName;
while (true) {
newName = Config.GUIToolkit.QueryMessage (Catalog.GetString
("Name:"), null,
- loadedTemplate.Name +
"_copy", this);
+ loadedTemplate.Name + "_copy", this);
if (newName == null)
break;
if (provider.TemplatesNames.Contains (newName)) {
@@ -325,11 +330,10 @@ namespace LongoMatch.Gui.Panel
while (provider.Exists (new_dashboard.Name) && !abort) {
string name = Config.GUIToolkit.QueryMessage
(Catalog.GetString ("Dashboard name:"),
- Catalog.GetString ("Name conflict"),
new_dashboard.Name + "#");
+ Catalog.GetString ("Name conflict"),
new_dashboard.Name + "#");
if (name == null) {
abort = true;
- }
- else {
+ } else {
new_dashboard.Name = name;
}
}
@@ -351,10 +355,9 @@ namespace LongoMatch.Gui.Panel
Load (new_dashboard.Name);
}
}
- }
- catch (Exception ex) {
+ } catch (Exception ex) {
Config.GUIToolkit.ErrorMessage (Catalog.GetString ("Error importing
template:") +
- "\n" + ex.Message);
+ "\n" + ex.Message);
Log.Exception (ex);
return;
}
@@ -372,13 +375,13 @@ namespace LongoMatch.Gui.Panel
dialog.CountText = Catalog.GetString ("Event types:");
dialog.AvailableTemplates = provider.TemplatesNames;
- while (dialog.Run() == (int)ResponseType.Ok) {
+ while (dialog.Run () == (int)ResponseType.Ok) {
if (dialog.Text == "") {
MessagesHelpers.ErrorMessage (dialog, Catalog.GetString ("The
dashboard name is empty."));
continue;
} else if (provider.Exists (dialog.Text)) {
var msg = Catalog.GetString ("The dashboard already exists. " +
- "Do you want to overwrite it?");
+ "Do you want to overwrite it?");
if (MessagesHelpers.QuestionMessage (this, msg)) {
create = true;
force = true;
diff --git a/LongoMatch.GUI/Gui/Panel/WelcomePanel.cs b/LongoMatch.GUI/Gui/Panel/WelcomePanel.cs
index 39f6534..bf62478 100644
--- a/LongoMatch.GUI/Gui/Panel/WelcomePanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/WelcomePanel.cs
@@ -26,34 +26,34 @@ using System.Collections.Generic;
namespace LongoMatch.Gui.Panel
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class WelcomePanel : Gtk.Bin
{
- static WelcomeButton [] buttons = {
+ static WelcomeButton[] buttons = {
new WelcomeButton ("longomatch-project-new", Catalog.GetString ("New"),
- new Action (() => Config.EventsBroker.EmitNewProject (null))),
+ new Action (() => Config.EventsBroker.EmitNewProject (null))),
new WelcomeButton ("longomatch-project-open", Catalog.GetString ("Open"),
- new Action (() => Config.EventsBroker.EmitOpenProject ())),
+ new Action (() => Config.EventsBroker.EmitOpenProject ())),
new WelcomeButton ("longomatch-project-import", Catalog.GetString ("Import"),
- new Action (() => Config.EventsBroker.EmitImportProject ())),
+ new Action (() => Config.EventsBroker.EmitImportProject ())),
new WelcomeButton ("longomatch-project", Catalog.GetString ("Projects\nmanager"),
- new Action (() => Config.EventsBroker.EmitManageProjects ())),
+ new Action (() => Config.EventsBroker.EmitManageProjects ())),
new WelcomeButton ("longomatch-template-config", Catalog.GetString
("Analysis\nDashboards\nmanager"),
- new Action (() => Config.EventsBroker.EmitManageCategories ())),
+ new Action (() => Config.EventsBroker.EmitManageCategories ())),
new WelcomeButton ("longomatch-team-config", Catalog.GetString ("Teams\nmanager"),
- new Action (() => Config.EventsBroker.EmitManageTeams ())),
+ new Action (() => Config.EventsBroker.EmitManageTeams ())),
};
List<Widget> buttonWidgets;
Gtk.Image logoImage;
SizeGroup sizegroup;
-
+
public WelcomePanel ()
{
this.Build ();
- buttonWidgets = new List<Widget>();
+ buttonWidgets = new List<Widget> ();
hbox1.BorderWidth = StyleConf.WelcomeBorder;
preferencesbutton.Clicked += HandlePreferencesClicked;
Create ();
@@ -62,10 +62,10 @@ namespace LongoMatch.Gui.Panel
uint NRows {
get {
- return (uint) (buttons.Length / StyleConf.WelcomeIconsPerRow);
+ return (uint)(buttons.Length / StyleConf.WelcomeIconsPerRow);
}
}
-
+
void HandlePreferencesClicked (object sender, EventArgs e)
{
Config.EventsBroker.EmitEditPreferences ();
@@ -74,13 +74,13 @@ namespace LongoMatch.Gui.Panel
void Create ()
{
// One extra row for our logo
- tablewidget.NRows = (uint) NRows + 1;
+ tablewidget.NRows = (uint)NRows + 1;
tablewidget.NColumns = StyleConf.WelcomeIconsPerRow;
sizegroup = new SizeGroup (SizeGroupMode.Horizontal);
Gtk.Image prefImage = new Gtk.Image (
- Helpers.Misc.LoadIcon ("longomatch-preferences",
- StyleConf.WelcomeIconSize, 0));
+ Helpers.Misc.LoadIcon ("longomatch-preferences",
+ StyleConf.WelcomeIconSize, 0));
preferencesbutton.Add (prefImage);
preferencesbutton.WidthRequest = StyleConf.WelcomeIconSize;
preferencesbutton.HeightRequest = StyleConf.WelcomeIconSize;
@@ -88,32 +88,33 @@ namespace LongoMatch.Gui.Panel
// Our logo
logoImage = new Gtk.Image ();
logoImage.Pixbuf = Config.Background.Scale (StyleConf.WelcomeLogoWidth,
- StyleConf.WelcomeLogoHeight).Value;
+ StyleConf.WelcomeLogoHeight).Value;
logoImage.WidthRequest = StyleConf.WelcomeLogoWidth;
logoImage.HeightRequest = StyleConf.WelcomeLogoHeight;
tablewidget.Attach (logoImage, 0, StyleConf.WelcomeIconsPerRow, 0, 1,
- AttachOptions.Expand | AttachOptions.Fill,
- AttachOptions.Expand | AttachOptions.Fill,
- 0, StyleConf.WelcomeIconsVSpacing / 2);
+ AttachOptions.Expand | AttachOptions.Fill,
+ AttachOptions.Expand | AttachOptions.Fill,
+ 0, StyleConf.WelcomeIconsVSpacing / 2);
- for (uint i=0; i < buttons.Length; i++) {
+ for (uint i = 0; i < buttons.Length; i++) {
Widget b;
uint c, l;
c = i % StyleConf.WelcomeIconsPerRow;
l = i / StyleConf.WelcomeIconsPerRow + 1;
- b = CreateButton (buttons[i]);
+ b = CreateButton (buttons [i]);
tablewidget.Attach (b, c, c + 1, l, l + 1,
- AttachOptions.Expand | AttachOptions.Fill,
- AttachOptions.Expand | AttachOptions.Fill,
- 0, StyleConf.WelcomeIconsVSpacing / 2);
+ AttachOptions.Expand | AttachOptions.Fill,
+ AttachOptions.Expand | AttachOptions.Fill,
+ 0, StyleConf.WelcomeIconsVSpacing / 2);
buttonWidgets.Add (b);
}
}
-
- Widget CreateButton (WelcomeButton b) {
+
+ Widget CreateButton (WelcomeButton b)
+ {
Button button;
VBox box;
Gtk.Image image;
@@ -124,7 +125,7 @@ namespace LongoMatch.Gui.Panel
Helpers.Misc.LoadIcon (b.name, StyleConf.WelcomeIconImageSize, 0));
button = new Button ();
- button.Clicked += (sender, e) => (b.func());
+ button.Clicked += (sender, e) => (b.func ());
button.HeightRequest = StyleConf.WelcomeIconSize;
button.WidthRequest = StyleConf.WelcomeIconSize;
button.Add (image);
@@ -146,13 +147,15 @@ namespace LongoMatch.Gui.Panel
return box;
}
}
-
- public struct WelcomeButton {
+
+ public struct WelcomeButton
+ {
public string name;
public string text;
public Action func;
- public WelcomeButton (string name, string text, Action func) {
+ public WelcomeButton (string name, string text, Action func)
+ {
this.name = name;
this.text = text;
this.func = func;
diff --git a/LongoMatch.GUI/Gui/TransparentDrawingArea.cs b/LongoMatch.GUI/Gui/TransparentDrawingArea.cs
index 0d98622..7b91937 100644
--- a/LongoMatch.GUI/Gui/TransparentDrawingArea.cs
+++ b/LongoMatch.GUI/Gui/TransparentDrawingArea.cs
@@ -25,7 +25,7 @@ namespace LongoMatch.Gui.Popup
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class TransparentDrawingArea : Gtk.Window
{
//Pixmpas and shapes
@@ -36,8 +36,8 @@ namespace LongoMatch.Gui.Popup
private Gdk.Color opaque;
//Mouse motion
- private double lastx=-1;
- private double lasty=-1;
+ private double lastx = -1;
+ private double lasty = -1;
//Reshaping timeout
private uint timeoutId;
@@ -54,13 +54,13 @@ namespace LongoMatch.Gui.Popup
private Widget targetWidget;
- public TransparentDrawingArea(Widget targetWidget):base(Gtk.WindowType.Toplevel)
+ public TransparentDrawingArea (Widget targetWidget) : base (Gtk.WindowType.Toplevel)
{
- this.Build();
+ this.Build ();
ExtensionEvents = ExtensionMode.All;
- Gdk.Color.Parse("red",ref foreground);
- LineColor=foreground;
+ Gdk.Color.Parse ("red", ref foreground);
+ LineColor = foreground;
lineWidth = 6;
modified = false;
this.targetWidget = targetWidget;
@@ -78,184 +78,193 @@ namespace LongoMatch.Gui.Popup
}
}
- public void ToggleGrab() {
- if(hardGrab)
- ReleaseGrab();
+ public void ToggleGrab ()
+ {
+ if (hardGrab)
+ ReleaseGrab ();
else
- AcquireGrab();
+ AcquireGrab ();
}
- public void ReleaseGrab() {
- if(hardGrab) {
- hardGrab=false;
- Pointer.Ungrab(Gtk.Global.CurrentEventTime);
+ public void ReleaseGrab ()
+ {
+ if (hardGrab) {
+ hardGrab = false;
+ Pointer.Ungrab (Gtk.Global.CurrentEventTime);
}
}
- public void AcquireGrab() {
+ public void AcquireGrab ()
+ {
GrabStatus stat;
- if(!hardGrab) {
- stat =Pointer.Grab(drawingarea.GdkWindow, false,
- EventMask.ButtonMotionMask |
- EventMask.ButtonPressMask |
- EventMask.ButtonReleaseMask,
- targetWidget.GdkWindow,
- new Gdk.Cursor(Gdk.CursorType.Pencil) /*
data->paint_cursor */,
- Gtk.Global.CurrentEventTime);
- if(stat == GrabStatus.Success) {
- hardGrab=true;
+ if (!hardGrab) {
+ stat = Pointer.Grab (drawingarea.GdkWindow, false,
+ EventMask.ButtonMotionMask |
+ EventMask.ButtonPressMask |
+ EventMask.ButtonReleaseMask,
+ targetWidget.GdkWindow,
+ new Gdk.Cursor (Gdk.CursorType.Pencil) /* data->paint_cursor */,
+ Gtk.Global.CurrentEventTime);
+ if (stat == GrabStatus.Success) {
+ hardGrab = true;
}
}
}
- public void ToggleVisibility() {
+ public void ToggleVisibility ()
+ {
Visible = !Visible;
}
- public void Clear() {
+ public void Clear ()
+ {
//Clear shape
shapeGC.Foreground = transparent;
- shape.DrawRectangle(shapeGC,true, 0, 0,Allocation.Width, Allocation.Height);
- shapeGC.Background=opaque;
+ shape.DrawRectangle (shapeGC, true, 0, 0, Allocation.Width, Allocation.Height);
+ shapeGC.Background = opaque;
- ShapeCombineMask(shape, 0,0);
+ ShapeCombineMask (shape, 0, 0);
//Clear pixmap
- pixmap.DrawRectangle(drawingarea.Style.BlackGC,true, 0, 0, Allocation.Width,
Allocation.Height);
+ pixmap.DrawRectangle (drawingarea.Style.BlackGC, true, 0, 0, Allocation.Width,
Allocation.Height);
}
- private bool Reshape() {
- if(modified)
- {
- ShapeCombineMask(shape, 0,0);
+ private bool Reshape ()
+ {
+ if (modified) {
+ ShapeCombineMask (shape, 0, 0);
modified = false;
}
return true;
}
- private void CreatePixmaps() {
+ private void CreatePixmaps ()
+ {
GCValues shapeGCV;
//Create a 1 depth pixmap used as a shape
//that will contain the info about transparency
- shape = new Pixmap(null,Gdk.Screen.Default.Width,Gdk.Screen.Default.Height,1);
- shapeGC = new Gdk.GC(shape);
- shapeGCV = new GCValues();
- shapeGC.GetValues(shapeGCV);
+ shape = new Pixmap (null, Gdk.Screen.Default.Width, Gdk.Screen.Default.Height, 1);
+ shapeGC = new Gdk.GC (shape);
+ shapeGCV = new GCValues ();
+ shapeGC.GetValues (shapeGCV);
transparent = shapeGCV.Foreground;
opaque = shapeGCV.Background;
shapeGC.Foreground = transparent;
-
shape.DrawRectangle(shapeGC,true,0,0,Gdk.Screen.Default.Width,Gdk.Screen.Default.Height);
- shapeGC.Background=opaque;
+ shape.DrawRectangle (shapeGC, true, 0, 0, Gdk.Screen.Default.Width,
Gdk.Screen.Default.Height);
+ shapeGC.Background = opaque;
- ShapeCombineMask(shape, 0,0);
+ ShapeCombineMask (shape, 0, 0);
//Create the pixmap that will contain the real drawing
//Used on Expose event to redraw the drawing area
- pixmap = new
Pixmap(drawingarea.GdkWindow,Gdk.Screen.Default.Width,Gdk.Screen.Default.Height);
-
pixmap.DrawRectangle(drawingarea.Style.BlackGC,true,0,0,Gdk.Screen.Default.Width,Gdk.Screen.Default.Height);
+ pixmap = new Pixmap (drawingarea.GdkWindow, Gdk.Screen.Default.Width,
Gdk.Screen.Default.Height);
+ pixmap.DrawRectangle (drawingarea.Style.BlackGC, true, 0, 0,
Gdk.Screen.Default.Width, Gdk.Screen.Default.Height);
}
- private void DrawCairoLine(Context c, int x1, int y1, int x2, int y2,Gdk.Color color) {
- c.Color = new Cairo.Color(color.Red, color.Green, color.Blue, 1);
- c.MoveTo(x1, y1);
- c.LineTo(x2, y2);
+ private void DrawCairoLine (Context c, int x1, int y1, int x2, int y2, Gdk.Color color)
+ {
+ c.Color = new Cairo.Color (color.Red, color.Green, color.Blue, 1);
+ c.MoveTo (x1, y1);
+ c.LineTo (x2, y2);
c.LineWidth = lineWidth;
c.LineCap = LineCap.Round;
c.LineJoin = LineJoin.Round;
- c.Stroke();
- c.Fill();
+ c.Stroke ();
+ c.Fill ();
}
- private void DrawLine(int x1, int y1, int x2, int y2) {
- Cairo.Rectangle rect = new Cairo.Rectangle(Math.Min(x1,x2) - lineWidth / 2,
- Math.Min(y1,y2) - lineWidth / 2,
- Math.Abs(x1-x2) + lineWidth,
- Math.Abs(y1-y2) + lineWidth);
-
- using(Context c =CairoHelper.Create(drawingarea.GdkWindow)) {
- c.Color = new Cairo.Color(foreground.Red, foreground.Green, foreground.Blue,
1);
- c.Rectangle(rect);
+ private void DrawLine (int x1, int y1, int x2, int y2)
+ {
+ Cairo.Rectangle rect = new Cairo.Rectangle (Math.Min (x1, x2) - lineWidth / 2,
+ Math.Min (y1, y2) - lineWidth / 2,
+ Math.Abs (x1 - x2) + lineWidth,
+ Math.Abs (y1 - y2) + lineWidth);
+
+ using (Context c = CairoHelper.Create (drawingarea.GdkWindow)) {
+ c.Color = new Cairo.Color (foreground.Red, foreground.Green, foreground.Blue,
1);
+ c.Rectangle (rect);
c.LineWidth = lineWidth;
c.LineCap = LineCap.Round;
c.LineJoin = LineJoin.Round;
- c.StrokePreserve();
- c.Fill();
+ c.StrokePreserve ();
+ c.Fill ();
}
- using(Context c =CairoHelper.Create(shape)) {
- DrawCairoLine(c,x1,y1,x2,y2,opaque);
+ using (Context c = CairoHelper.Create (shape)) {
+ DrawCairoLine (c, x1, y1, x2, y2, opaque);
}
- using(Context c =CairoHelper.Create(pixmap)) {
- DrawCairoLine(c,x1,y1,x2,y2,foreground);
+ using (Context c = CairoHelper.Create (pixmap)) {
+ DrawCairoLine (c, x1, y1, x2, y2, foreground);
}
modified = true;
}
- protected virtual void OnDrawingareaExposeEvent(object o, Gtk.ExposeEventArgs args)
+ protected virtual void OnDrawingareaExposeEvent (object o, Gtk.ExposeEventArgs args)
{
- EventExpose evnt = args.Event;
-
drawingarea.GdkWindow.DrawDrawable(drawingarea.Style.ForegroundGCs[(int)drawingarea.State],
- pixmap,
- evnt.Area.X, evnt.Area.Y,
- evnt.Area.X, evnt.Area.Y,
- evnt.Area.Width, evnt.Area.Height);
+ EventExpose evnt = args.Event;
+ drawingarea.GdkWindow.DrawDrawable (drawingarea.Style.ForegroundGCs
[(int)drawingarea.State],
+ pixmap,
+ evnt.Area.X, evnt.Area.Y,
+ evnt.Area.X, evnt.Area.Y,
+ evnt.Area.Width, evnt.Area.Height);
}
- protected virtual void OnDrawingareaButtonPressEvent(object o, Gtk.ButtonPressEventArgs args)
+ protected virtual void OnDrawingareaButtonPressEvent (object o, Gtk.ButtonPressEventArgs args)
{
- if(!hardGrab)
+ if (!hardGrab)
return;
lastx = args.Event.X;
lasty = args.Event.Y;
- if(args.Event.Button == 1)
- DrawLine((int)args.Event.X, (int)args.Event.Y,(int) args.Event.X,
(int)args.Event.Y);
+ if (args.Event.Button == 1)
+ DrawLine ((int)args.Event.X, (int)args.Event.Y, (int)args.Event.X,
(int)args.Event.Y);
}
- protected virtual void OnDrawingareaMotionNotifyEvent(object o, Gtk.MotionNotifyEventArgs
args)
+ protected virtual void OnDrawingareaMotionNotifyEvent (object o, Gtk.MotionNotifyEventArgs
args)
{
- if(!hardGrab)
+ if (!hardGrab)
return;
- if(lastx==-1 || lasty==-1) {
+ if (lastx == -1 || lasty == -1) {
lastx = args.Event.X;
lasty = args.Event.Y;
}
- DrawLine((int)lastx, (int)lasty, (int)args.Event.X, (int)args.Event.Y);
+ DrawLine ((int)lastx, (int)lasty, (int)args.Event.X, (int)args.Event.Y);
lastx = args.Event.X;
lasty = args.Event.Y;
}
- protected virtual void OnDrawingareaButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs
args)
+ protected virtual void OnDrawingareaButtonReleaseEvent (object o, Gtk.ButtonReleaseEventArgs
args)
{
- drawingarea.QueueDraw();
- lastx=-1;
- lasty=-1;
+ drawingarea.QueueDraw ();
+ lastx = -1;
+ lasty = -1;
}
- protected override void OnHidden()
+ protected override void OnHidden ()
{
- GLib.Source.Remove(timeoutId);
- base.OnHidden();
+ GLib.Source.Remove (timeoutId);
+ base.OnHidden ();
}
- protected override void OnShown() {
+ protected override void OnShown ()
+ {
//Prevent a dirty flash when the
//Window is created and hidden
- if(targetWidget != null) {
- base.OnShown();
- timeoutId = GLib.Timeout.Add(20,Reshape);
+ if (targetWidget != null) {
+ base.OnShown ();
+ timeoutId = GLib.Timeout.Add (20, Reshape);
}
}
- protected virtual void OnDrawingareaConfigureEvent(object o, Gtk.ConfigureEventArgs args)
+ protected virtual void OnDrawingareaConfigureEvent (object o, Gtk.ConfigureEventArgs args)
{
this.TransientFor = (Gtk.Window)targetWidget.Toplevel;
- this.Resize(Gdk.Screen.Default.Width,Gdk.Screen.Default.Height);
- CreatePixmaps();
+ this.Resize (Gdk.Screen.Default.Width, Gdk.Screen.Default.Height);
+ CreatePixmaps ();
}
}
}
diff --git a/LongoMatch.GUI/Gui/TreeView/CategoriesFilterTreeView.cs
b/LongoMatch.GUI/Gui/TreeView/CategoriesFilterTreeView.cs
index e8f886d..23b11de 100644
--- a/LongoMatch.GUI/Gui/TreeView/CategoriesFilterTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/CategoriesFilterTreeView.cs
@@ -24,12 +24,12 @@ using LongoMatch.Core.Store;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public class CategoriesFilterTreeView: FilterTreeViewBase
{
- public CategoriesFilterTreeView (): base()
+ public CategoriesFilterTreeView () : base ()
{
firstColumnName = Catalog.GetString ("Category");
HeadersVisible = false;
@@ -82,7 +82,7 @@ namespace LongoMatch.Gui.Component
Model = store;
}
- void UpdateSelectionPriv (TreeIter iter, bool active, bool checkParents=true, bool
recurse=true)
+ void UpdateSelectionPriv (TreeIter iter, bool active, bool checkParents = true, bool recurse
= true)
{
TreeIter child, parent;
@@ -114,7 +114,7 @@ namespace LongoMatch.Gui.Component
if (recurse) {
filter.IgnoreUpdates = true;
store.IterChildren (out child, iter);
- while (store.IterIsValid(child)) {
+ while (store.IterIsValid (child)) {
UpdateSelectionPriv (child, active, false, false);
store.IterNext (ref child);
}
@@ -155,7 +155,7 @@ namespace LongoMatch.Gui.Component
filter.Silent = true;
store.GetIterFirst (out iter);
- while (store.IterIsValid(iter)) {
+ while (store.IterIsValid (iter)) {
UpdateSelection (iter, select_all);
store.IterNext (ref iter);
}
diff --git a/LongoMatch.GUI/Gui/TreeView/FilterBaseView.cs b/LongoMatch.GUI/Gui/TreeView/FilterBaseView.cs
index 609e85e..275d8dd 100644
--- a/LongoMatch.GUI/Gui/TreeView/FilterBaseView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/FilterBaseView.cs
@@ -34,21 +34,22 @@ namespace LongoMatch.Gui.Component
protected string firstColumnName = "";
protected TreeStore store;
protected EventsFilter filter;
-
+
public FilterTreeViewBase ()
{
- PrepareTree();
- CreateMenu();
+ PrepareTree ();
+ CreateMenu ();
}
-
- public virtual void SetFilter (EventsFilter filter, Project project) {
- this.project = project;
+
+ public virtual void SetFilter (EventsFilter filter, Project project)
+ {
+ this.project = project;
this.filter = filter;
- FillTree();
+ FillTree ();
}
-
+
public new TreeModel Model {
- set{
+ set {
base.Model = value;
store = value as TreeStore;
}
@@ -56,79 +57,83 @@ namespace LongoMatch.Gui.Component
return base.Model;
}
}
-
- private void PrepareTree () {
+
+ private void PrepareTree ()
+ {
TreeViewColumn nameColumn = new TreeViewColumn ();
CellRendererText nameCell = new CellRendererText ();
- nameColumn.Title = Catalog.GetString(firstColumnName);
+ nameColumn.Title = Catalog.GetString (firstColumnName);
nameColumn.PackStart (nameCell, true);
nameColumn.SetCellDataFunc (nameCell, new TreeCellDataFunc (RenderColumn));
TreeViewColumn filterColumn = new TreeViewColumn ();
CellRendererToggle filterCell = new CellRendererToggle ();
- filterColumn.Title = Catalog.GetString("Visible");
+ filterColumn.Title = Catalog.GetString ("Visible");
filterCell.Toggled += HandleFilterCellToggled;
filterColumn.PackStart (filterCell, true);
- filterColumn.AddAttribute(filterCell, "active", 1);
+ filterColumn.AddAttribute (filterCell, "active", 1);
AppendColumn (nameColumn);
AppendColumn (filterColumn);
}
-
- void CreateMenu() {
+
+ void CreateMenu ()
+ {
Gtk.Action select_all;
Gtk.Action select_none;
UIManager manager;
ActionGroup g;
- manager= new UIManager();
- g = new ActionGroup("MenuGroup");
+ manager = new UIManager ();
+ g = new ActionGroup ("MenuGroup");
- select_all = new Gtk.Action("AllAction", Mono.Unix.Catalog.GetString("Select all"),
null, "gtk-edit");
- select_none = new Gtk.Action("NoneAction", Mono.Unix.Catalog.GetString("Unselect
all"), null, "gtk-edit");
+ select_all = new Gtk.Action ("AllAction", Mono.Unix.Catalog.GetString ("Select all"),
null, "gtk-edit");
+ select_none = new Gtk.Action ("NoneAction", Mono.Unix.Catalog.GetString ("Unselect
all"), null, "gtk-edit");
- g.Add(select_all, null);
- g.Add(select_none, null);
+ g.Add (select_all, null);
+ g.Add (select_none, null);
- manager.InsertActionGroup(g,0);
+ manager.InsertActionGroup (g, 0);
- manager.AddUiFromString("<ui>"+
- " <popup action='Menu'>"+
- " <menuitem action='AllAction'/>"+
- " <menuitem action='NoneAction'/>"+
- " </popup>"+
- "</ui>");
+ manager.AddUiFromString ("<ui>" +
+ " <popup action='Menu'>" +
+ " <menuitem action='AllAction'/>" +
+ " <menuitem action='NoneAction'/>" +
+ " </popup>" +
+ "</ui>");
- playersMenu = manager.GetWidget("/Menu") as Menu;
+ playersMenu = manager.GetWidget ("/Menu") as Menu;
- select_all.Activated += (sender, e) => Select(true);
- select_none.Activated += (sender, e) => Select(false);
+ select_all.Activated += (sender, e) => Select (true);
+ select_none.Activated += (sender, e) => Select (false);
}
protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
{
- if(Misc.RightButtonClicked (evnt))
- playersMenu.Popup();
+ if (Misc.RightButtonClicked (evnt))
+ playersMenu.Popup ();
return base.OnButtonPressEvent (evnt);
}
-
+
protected void HandleFilterCellToggled (object o, ToggledArgs args)
{
Gtk.TreeIter iter;
- if (store.GetIterFromString(out iter, args.Path))
- {
- bool active = !((bool) store.GetValue(iter, 1));
- UpdateSelection(iter, active);
+ if (store.GetIterFromString (out iter, args.Path)) {
+ bool active = !((bool)store.GetValue (iter, 1));
+ UpdateSelection (iter, active);
}
}
-
+
protected abstract void FillTree ();
- protected abstract void UpdateSelection (TreeIter iter, bool active);
+
+ protected abstract void UpdateSelection (TreeIter iter, bool active);
+
protected abstract void RenderColumn (TreeViewColumn column, CellRenderer cell, TreeModel
model, TreeIter iter);
- protected abstract void Select(bool select_all);
-
+
+ protected abstract void Select (bool select_all);
+
protected override bool OnKeyPressEvent (EventKey evnt)
{
return false;
diff --git a/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs b/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
index 5c3e73f..f7b53c1 100644
--- a/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
+++ b/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
@@ -218,11 +218,11 @@ namespace LongoMatch.Gui.Component
using (IContext context = new CairoContext (window)) {
Area bkg = new Area (new Point (backgroundArea.X, backgroundArea.Y),
- backgroundArea.Width, backgroundArea.Height);
+ backgroundArea.Width, backgroundArea.Height);
Area cell = new Area (new Point (cellArea.X, cellArea.Y),
- cellArea.Width, cellArea.Height);
+ cellArea.Width, cellArea.Height);
PlayslistCellRenderer.Render (Item, Count, IsExpanded, Config.DrawingToolkit,
- context, bkg, cell, state);
+ context, bkg, cell, state);
}
}
}
diff --git a/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs
index 0bb5092..c92ef65 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs
@@ -29,8 +29,8 @@ using Misc = LongoMatch.Gui.Helpers.Misc;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public class PlayListTreeView : Gtk.TreeView
{
Project project;
@@ -95,13 +95,13 @@ namespace LongoMatch.Gui.Component
PlaylistVideo video = new PlaylistVideo (file);
int index = playlist.Elements.IndexOf (element);
if (!prepend) {
- index ++;
+ index++;
}
playlist.Elements.Insert (index, video);
(Model as TreeStore).InsertWithValues (parent, index, video);
}
}
-
+
void AddImage (Playlist playlist, IPlaylistElement element, bool prepend, TreeIter parent)
{
Pixbuf pix = LongoMatch.Gui.Helpers.Misc.OpenImage (this);
@@ -110,14 +110,15 @@ namespace LongoMatch.Gui.Component
PlaylistImage plimage = new PlaylistImage (image, new Time (5000));
int index = playlist.Elements.IndexOf (element);
if (!prepend) {
- index ++;
+ index++;
}
playlist.Elements.Insert (index, plimage);
(Model as TreeStore).InsertWithValues (parent, index, plimage);
}
}
- Menu CreateExternalsMenu (Playlist playlist, IPlaylistElement element, bool prepend, TreeIter
parent) {
+ Menu CreateExternalsMenu (Playlist playlist, IPlaylistElement element, bool prepend, TreeIter
parent)
+ {
Menu addMenu = new Menu ();
MenuItem video = new MenuItem (Catalog.GetString ("External video"));
video.Activated += (sender, e) => AddVideo (playlist, element, prepend, parent);
@@ -141,7 +142,7 @@ namespace LongoMatch.Gui.Component
edit = new MenuItem (Catalog.GetString ("Edit name"));
edit.Activated += (sender, e) => {
string name = Config.GUIToolkit.QueryMessage (Catalog.GetString
("Name:"), null,
- pl.Title);
+ pl.Title);
if (!String.IsNullOrEmpty (name)) {
pl.Title = name;
}
@@ -179,7 +180,7 @@ namespace LongoMatch.Gui.Component
edit = new MenuItem (Catalog.GetString ("Edit name"));
edit.Activated += (sender, e) => {
string name = Config.GUIToolkit.QueryMessage (Catalog.GetString ("Name:"),
null,
- playlist.Name);
+ playlist.Name);
if (!String.IsNullOrEmpty (name)) {
playlist.Name = name;
}
@@ -222,7 +223,7 @@ namespace LongoMatch.Gui.Component
}
}
} else {
- GetPathAtPos ((int) evnt.X, (int) evnt.Y, out pathClicked);
+ GetPathAtPos ((int)evnt.X, (int)evnt.Y, out pathClicked);
}
return base.OnButtonPressEvent (evnt);
}
@@ -346,7 +347,7 @@ namespace LongoMatch.Gui.Component
{
Selection.GetSelected (out selectedIter);
FillElementAndPlaylist (selectedIter, out dragSourcePlaylist,
- out dragSourceElement);
+ out dragSourceElement);
dragStarted = true;
base.OnDragBegin (context);
}
@@ -363,7 +364,7 @@ namespace LongoMatch.Gui.Component
}
return base.OnButtonReleaseEvent (evnt);
}
-
+
protected override void OnDragEnd (DragContext context)
{
base.OnDragEnd (context);
diff --git a/LongoMatch.GUI/Gui/TreeView/PlayersFilterTreeView.cs
b/LongoMatch.GUI/Gui/TreeView/PlayersFilterTreeView.cs
index 55830a6..7061c9a 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlayersFilterTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlayersFilterTreeView.cs
@@ -27,35 +27,37 @@ using LongoMatch.Core.Store.Templates;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public class PlayersFilterTreeView: FilterTreeViewBase
{
Team local, visitor;
Player localTeam, visitorTeam;
TreeIter localIter, visitorIter;
-
- public PlayersFilterTreeView (): base()
+
+ public PlayersFilterTreeView () : base ()
{
- visitorTeam = new Player();
- localTeam = new Player();
+ visitorTeam = new Player ();
+ localTeam = new Player ();
HeadersVisible = false;
}
-
- public override void SetFilter (EventsFilter filter, Project project) {
+
+ public override void SetFilter (EventsFilter filter, Project project)
+ {
this.local = project.LocalTeamTemplate;
this.visitor = project.VisitorTeamTemplate;
localTeam.Name = local.TeamName;
visitorTeam.Name = visitor.TeamName;
- base.SetFilter(filter, project);
+ base.SetFilter (filter, project);
}
-
- protected override void FillTree () {
- TreeStore store = new TreeStore (typeof (Player), typeof (bool));
+
+ protected override void FillTree ()
+ {
+ TreeStore store = new TreeStore (typeof(Player), typeof(bool));
localIter = store.AppendValues (localTeam);
visitorIter = store.AppendValues (visitorTeam);
- store.SetValue(localIter, 1, false);
- store.SetValue(visitorIter, 1, false);
+ store.SetValue (localIter, 1, false);
+ store.SetValue (visitorIter, 1, false);
filter.IgnoreUpdates = true;
foreach (Player player in local.PlayingPlayersList) {
@@ -71,24 +73,24 @@ namespace LongoMatch.Gui.Component
filter.Update ();
Model = store;
}
-
+
- protected override void UpdateSelection(TreeIter iter, bool active) {
+ protected override void UpdateSelection (TreeIter iter, bool active)
+ {
TreeStore store = Model as TreeStore;
- Player player = (Player) store.GetValue(iter, 0);
+ Player player = (Player)store.GetValue (iter, 0);
/* Check all children */
- if (player == localTeam || player == visitorTeam)
- {
+ if (player == localTeam || player == visitorTeam) {
TreeIter child;
- store.IterChildren(out child, iter);
+ store.IterChildren (out child, iter);
filter.IgnoreUpdates = true;
- while (store.IterIsValid(child)) {
- Player childPlayer = (Player) store.GetValue(child, 0);
+ while (store.IterIsValid (child)) {
+ Player childPlayer = (Player)store.GetValue (child, 0);
filter.FilterPlayer (childPlayer, active);
- store.SetValue(child, 1, active);
- store.IterNext(ref child);
+ store.SetValue (child, 1, active);
+ store.IterNext (ref child);
}
filter.IgnoreUpdates = false;
} else {
@@ -96,33 +98,34 @@ namespace LongoMatch.Gui.Component
if (!active) {
TreeIter team;
/* Uncheck the team check button */
- if (local.List.Contains(player))
+ if (local.List.Contains (player))
team = localIter;
else
team = visitorIter;
- store.SetValue(team, 1, false);
+ store.SetValue (team, 1, false);
}
}
- store.SetValue(iter, 1, active);
- filter.Update();
+ store.SetValue (iter, 1, active);
+ filter.Update ();
}
-
+
protected override void RenderColumn (TreeViewColumn column, CellRenderer cell, TreeModel
model, TreeIter iter)
{
- Player player = (Player) model.GetValue (iter, 0);
- string name = player.ToString();
+ Player player = (Player)model.GetValue (iter, 0);
+ string name = player.ToString ();
if (player == localTeam || player == visitorTeam) {
name = player.Name;
}
(cell as CellRendererText).Text = name;
}
-
- protected override void Select(bool select_all) {
- UpdateSelection(localIter, select_all);
- UpdateSelection(visitorIter, select_all);
+
+ protected override void Select (bool select_all)
+ {
+ UpdateSelection (localIter, select_all);
+ UpdateSelection (visitorIter, select_all);
}
-
+
protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
{
return false;
diff --git a/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
index 23d7d0e..1c2caf8 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
@@ -26,14 +26,15 @@ namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class PlayersTreeView : ListTreeViewBase
{
TreePath pathClicked;
- public PlayersTreeView() {
+ public PlayersTreeView ()
+ {
this.Team = TeamType.LOCAL;
}
@@ -42,15 +43,16 @@ namespace LongoMatch.Gui.Component
get;
}
- protected override int SortFunction(TreeModel model, TreeIter a, TreeIter b) {
+ protected override int SortFunction (TreeModel model, TreeIter a, TreeIter b)
+ {
object oa;
object ob;
- if(model == null)
+ if (model == null)
return 0;
- oa = model.GetValue(a, 0);
- ob = model.GetValue(b, 0);
+ oa = model.GetValue (a, 0);
+ ob = model.GetValue (b, 0);
if (oa == null && ob == null) {
return 0;
@@ -60,13 +62,13 @@ namespace LongoMatch.Gui.Component
return 1;
}
- if(oa is Player)
- return (oa as Player).Number.CompareTo((ob as Player).Number);
+ if (oa is Player)
+ return (oa as Player).Number.CompareTo ((ob as Player).Number);
else
- return (oa as TimeNode).Start.CompareTo((ob as TimeNode).Start);
+ return (oa as TimeNode).Start.CompareTo ((ob as TimeNode).Start);
}
- override protected bool OnKeyPressEvent(Gdk.EventKey evnt)
+ override protected bool OnKeyPressEvent (Gdk.EventKey evnt)
{
return false;
}
@@ -106,19 +108,20 @@ namespace LongoMatch.Gui.Component
ShowMenu ();
}
} else {
- GetPathAtPos ((int) evnt.X, (int) evnt.Y, out pathClicked);
- base.OnButtonPressEvent(evnt);
+ GetPathAtPos ((int)evnt.X, (int)evnt.Y, out pathClicked);
+ base.OnButtonPressEvent (evnt);
}
return true;
}
- override protected bool SelectFunction(TreeSelection selection, TreeModel model, TreePath
path, bool selected) {
+ override protected bool SelectFunction (TreeSelection selection, TreeModel model, TreePath
path, bool selected)
+ {
// Don't allow multiselection for Players
- if(!selected && selection.GetSelectedRows().Length > 0) {
- if(selection.GetSelectedRows().Length == 1 &&
- GetValueFromPath(selection.GetSelectedRows()[0]) is Player)
+ if (!selected && selection.GetSelectedRows ().Length > 0) {
+ if (selection.GetSelectedRows ().Length == 1 &&
+ GetValueFromPath (selection.GetSelectedRows () [0]) is Player)
return false;
- return !(GetValueFromPath(path) is Player);
+ return !(GetValueFromPath (path) is Player);
}
// Always unselect
else
diff --git a/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs
index 363ed38..e271506 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs
@@ -28,8 +28,8 @@ using Misc = LongoMatch.Gui.Helpers.Misc;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.Category("LongoMatch")]
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.Category ("LongoMatch")]
+ [System.ComponentModel.ToolboxItem (true)]
public class PlaysTreeView : ListTreeViewBase
{
@@ -68,7 +68,7 @@ namespace LongoMatch.Gui.Component
TreeIter childIter = childModel.AppendValues (evtTter, evt);
TreePath childPath = childModel.GetPath (childIter);
TreePath path = modelSort.ConvertChildPathToPath (
- modelFilter.ConvertChildPathToPath (childPath));
+ modelFilter.ConvertChildPathToPath (childPath));
return path;
}
@@ -104,16 +104,16 @@ namespace LongoMatch.Gui.Component
manager.InsertActionGroup (g, 0);
manager.AddUiFromString ("<ui>" +
- " <popup action='CategoryMenu'>" +
- " <menuitem action='EditPropAction'/>" +
- " <menu action='SortMenuAction'>" +
- " <menuitem action='SortByNameAction'/>" +
- " <menuitem action='SortByStartAction'/>" +
- " <menuitem action='SortByStopAction'/>" +
- " <menuitem action='SortByDurationAction'/>" +
- " </menu>" +
- " </popup>" +
- "</ui>");
+ " <popup action='CategoryMenu'>" +
+ " <menuitem action='EditPropAction'/>" +
+ " <menu action='SortMenuAction'>" +
+ " <menuitem action='SortByNameAction'/>" +
+ " <menuitem action='SortByStartAction'/>" +
+ " <menuitem action='SortByStopAction'/>" +
+ " <menuitem action='SortByDurationAction'/>" +
+ " </menu>" +
+ " </popup>" +
+ "</ui>");
categoriesMenu = manager.GetWidget ("/CategoryMenu") as Menu;
@@ -166,7 +166,7 @@ namespace LongoMatch.Gui.Component
// Dont't store categories
if (objecta is EventType && objectb is EventType) {
return int.Parse (model.GetPath (a).ToString ())
- - int.Parse (model.GetPath (b).ToString ());
+ - int.Parse (model.GetPath (b).ToString ());
} else if (objecta is TimelineEvent && objectb is TimelineEvent) {
tna = objecta as TimelineEvent;
tnb = objectb as TimelineEvent;
@@ -267,7 +267,7 @@ namespace LongoMatch.Gui.Component
Console.WriteLine (logical + " " + expand + " " + open_all);
return base.OnExpandCollapseCursorRow (logical, expand, open_all);
}
-
+
override protected bool OnButtonPressEvent (Gdk.EventButton evnt)
{
TreePath[] paths = Selection.GetSelectedRows ();
diff --git a/LongoMatch.GUI/Gui/TreeView/RenderingJobsTreeView.cs
b/LongoMatch.GUI/Gui/TreeView/RenderingJobsTreeView.cs
index 5570332..286ca35 100644
--- a/LongoMatch.GUI/Gui/TreeView/RenderingJobsTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/RenderingJobsTreeView.cs
@@ -25,58 +25,59 @@ using LongoMatch.Core.Common;
namespace LongoMatch.Gui.Component
{
- [System.ComponentModel.ToolboxItem(true)]
+ [System.ComponentModel.ToolboxItem (true)]
public partial class RenderingJobsTreeView : Gtk.TreeView
{
public RenderingJobsTreeView ()
{
- TreeViewColumn nameColumn = new TreeViewColumn();
- nameColumn.Title = Catalog.GetString("Job name");
- CellRendererText nameCell = new CellRendererText();
- nameColumn.PackStart(nameCell, true);
+ TreeViewColumn nameColumn = new TreeViewColumn ();
+ nameColumn.Title = Catalog.GetString ("Job name");
+ CellRendererText nameCell = new CellRendererText ();
+ nameColumn.PackStart (nameCell, true);
- TreeViewColumn stateColumn = new TreeViewColumn();
- stateColumn.Title = Catalog.GetString("State");
- CellRendererPixbuf stateCell = new CellRendererPixbuf();
- stateColumn.PackStart(stateCell, true);
+ TreeViewColumn stateColumn = new TreeViewColumn ();
+ stateColumn.Title = Catalog.GetString ("State");
+ CellRendererPixbuf stateCell = new CellRendererPixbuf ();
+ stateColumn.PackStart (stateCell, true);
- nameColumn.SetCellDataFunc(nameCell, new Gtk.TreeCellDataFunc(RenderName));
- stateColumn.SetCellDataFunc(stateCell, new Gtk.TreeCellDataFunc(RenderState));
+ nameColumn.SetCellDataFunc (nameCell, new Gtk.TreeCellDataFunc (RenderName));
+ stateColumn.SetCellDataFunc (stateCell, new Gtk.TreeCellDataFunc (RenderState));
- AppendColumn(nameColumn);
- AppendColumn(stateColumn);
+ AppendColumn (nameColumn);
+ AppendColumn (stateColumn);
}
-
- public List<Job> SelectedJobs () {
+
+ public List<Job> SelectedJobs ()
+ {
/* FIXME: Only single selection is supported for now */
TreeIter iter;
List<Job> list;
TreePath[] pathArray;
- list = new List<Job>();
- pathArray = Selection.GetSelectedRows();
+ list = new List<Job> ();
+ pathArray = Selection.GetSelectedRows ();
- for(int i=0; i< pathArray.Length; i++) {
- Model.GetIterFromString(out iter, pathArray[i].ToString());
- list.Add((Job) Model.GetValue(iter, 0));
+ for (int i = 0; i < pathArray.Length; i++) {
+ Model.GetIterFromString (out iter, pathArray [i].ToString ());
+ list.Add ((Job)Model.GetValue (iter, 0));
}
return list;
}
-
- private void RenderName(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel
model, Gtk.TreeIter iter)
+
+ private void RenderName (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel
model, Gtk.TreeIter iter)
{
- Job job = (Job) model.GetValue(iter, 0);
+ Job job = (Job)model.GetValue (iter, 0);
(cell as Gtk.CellRendererText).Text = job.Name;
}
- private void RenderState(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel
model, Gtk.TreeIter iter)
+ private void RenderState (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel
model, Gtk.TreeIter iter)
{
- Job job = (Job) model.GetValue(iter, 0);
+ Job job = (Job)model.GetValue (iter, 0);
- (cell as Gtk.CellRendererPixbuf).Pixbuf = IconLoader.LoadIcon(this,
job.StateIconName, IconSize.Button);
+ (cell as Gtk.CellRendererPixbuf).Pixbuf = IconLoader.LoadIcon (this,
job.StateIconName, IconSize.Button);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]