[longomatch] Fix warnings
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix warnings
- Date: Tue, 28 Oct 2014 09:54:52 +0000 (UTC)
commit 81614e9afb4df87edb36d76e40e7cfba99dd6b1e
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Oct 24 19:42:54 2014 +0200
Fix warnings
LongoMatch.Core/Stats/EventTypeStats.cs | 1 -
LongoMatch.Core/Stats/ProjectStats.cs | 2 -
LongoMatch.Core/Store/HotKey.cs | 2 -
LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs | 1 -
LongoMatch.GUI.Multimedia/Gui/VideoWindow.cs | 2 +-
LongoMatch.GUI/Gui/Component/CodingWidget.cs | 2 -
.../Gui/Component/PlaysPositionViewer.cs | 1 -
.../Gui/Component/PlaysSelectionWidget.cs | 2 -
.../Gui/Component/Stats/PlayersViewer.cs | 4 +--
LongoMatch.GUI/Gui/Component/TeamsComboBox.cs | 1 -
LongoMatch.GUI/Gui/Component/Timeline.cs | 2 -
LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs | 6 -----
LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs | 2 +-
.../Gui/TreeView/CategoriesFilterTreeView.cs | 1 -
LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs | 24 --------------------
.../Core/Templates/CategoriesTemplate.cs | 1 -
.../Core/Templates/TeamTemplate.cs | 2 -
LongoMatch.Multimedia/Player/GstPlayer.cs | 1 -
LongoMatch.Services/Services/FileDB.cs | 2 +-
LongoMatch.Services/Services/ProjectsManager.cs | 2 -
LongoMatch/Main.cs | 2 +-
21 files changed, 5 insertions(+), 58 deletions(-)
---
diff --git a/LongoMatch.Core/Stats/EventTypeStats.cs b/LongoMatch.Core/Stats/EventTypeStats.cs
index 6a70a22..d7bf33b 100644
--- a/LongoMatch.Core/Stats/EventTypeStats.cs
+++ b/LongoMatch.Core/Stats/EventTypeStats.cs
@@ -48,7 +48,6 @@ namespace LongoMatch.Core.Stats
TotalCount = events.Count;
LocalTeamCount = homeEvents.Count;
VisitorTeamCount = awayEvents.Count;
- List<Tag> tags = events.SelectMany (e => e.Tags).Distinct ().ToList ();
SubcategoriesStats = new List<SubCategoryStat> ();
if (eventType is AnalysisEventType) {
var tagsByGroup = (eventType as AnalysisEventType).TagsByGroup;
diff --git a/LongoMatch.Core/Stats/ProjectStats.cs b/LongoMatch.Core/Stats/ProjectStats.cs
index b68181f..5d1bfcf 100644
--- a/LongoMatch.Core/Stats/ProjectStats.cs
+++ b/LongoMatch.Core/Stats/ProjectStats.cs
@@ -28,13 +28,11 @@ namespace LongoMatch.Core.Stats
{
public class ProjectStats: IDisposable
{
- List<EventTypeStats> catStats;
EventsFilter filter;
Project project;
public ProjectStats (Project project)
{
- catStats = new List<EventTypeStats>();
this.project = project;
filter = new EventsFilter (project);
CreateStats ();
diff --git a/LongoMatch.Core/Store/HotKey.cs b/LongoMatch.Core/Store/HotKey.cs
index 3f3715a..309a96d 100644
--- a/LongoMatch.Core/Store/HotKey.cs
+++ b/LongoMatch.Core/Store/HotKey.cs
@@ -115,8 +115,6 @@ namespace LongoMatch.Core.Store
public override string ToString ()
{
- string modifierS = "";
-
if (!Defined)
return Catalog.GetString ("Not defined");
return Keyboard.HotKeyName (this);
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
index 2dcd38a..630f7a3 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
@@ -363,7 +363,6 @@ namespace LongoMatch.Gui
void Open (MediaFileSet fileSet, bool seek, bool force=false)
{
- MediaFile mf;
ResetGui ();
CloseSegment ();
if (fileSet != this.fileSet || force) {
diff --git a/LongoMatch.GUI.Multimedia/Gui/VideoWindow.cs b/LongoMatch.GUI.Multimedia/Gui/VideoWindow.cs
index 818a0b1..6062574 100644
--- a/LongoMatch.GUI.Multimedia/Gui/VideoWindow.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/VideoWindow.cs
@@ -24,7 +24,7 @@ namespace LongoMatch.Gui
public partial class VideoWindow : Gtk.Bin
{
AspectFrame frame;
- public new event EventHandler ReadyEvent;
+ public event EventHandler ReadyEvent;
public new event ExposeEventHandler ExposeEvent;
public new event ButtonPressEventHandler ButtonPressEvent;
public new event ScrollEventHandler ScrollEvent;
diff --git a/LongoMatch.GUI/Gui/Component/CodingWidget.cs b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
index fc57684..7b45949 100644
--- a/LongoMatch.GUI/Gui/Component/CodingWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
@@ -37,7 +37,6 @@ namespace LongoMatch.Gui.Component
ProjectType projectType;
Project project;
List<Player> selectedPlayers;
- TimelineEvent loadedPlay;
List<Window> activeWindows;
int currentPage;
Gdk.Pixbuf timelineIco, timelineActiveIco;
@@ -255,7 +254,6 @@ namespace LongoMatch.Gui.Component
void HandlePlayLoaded (TimelineEvent play)
{
- loadedPlay = play;
timeline.LoadPlay (play);
}
diff --git a/LongoMatch.GUI/Gui/Component/PlaysPositionViewer.cs
b/LongoMatch.GUI/Gui/Component/PlaysPositionViewer.cs
index fa9a045..da84fba 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysPositionViewer.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysPositionViewer.cs
@@ -29,7 +29,6 @@ namespace LongoMatch.Gui.Component
PlaysMenu menu;
Project project;
- EventsFilter filter;
public PlaysPositionViewer ()
{
diff --git a/LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
b/LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
index 24453ea..0f5b5ca 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
@@ -34,7 +34,6 @@ namespace LongoMatch.Gui.Component
{
Project project;
- EventsFilter filter;
PlayersFilterTreeView playersfilter;
CategoriesFilterTreeView categoriesfilter;
Pixbuf listIco, listActiveIco;
@@ -78,7 +77,6 @@ namespace LongoMatch.Gui.Component
public void SetProject(Project project, EventsFilter filter) {
this.project = project;
- this.filter = filter;
playsList.Filter = filter;
localPlayersList.Filter = filter;
visitorPlayersList.Filter = filter;
diff --git a/LongoMatch.GUI/Gui/Component/Stats/PlayersViewer.cs
b/LongoMatch.GUI/Gui/Component/Stats/PlayersViewer.cs
index 95838a8..aa252f3 100644
--- a/LongoMatch.GUI/Gui/Component/Stats/PlayersViewer.cs
+++ b/LongoMatch.GUI/Gui/Component/Stats/PlayersViewer.cs
@@ -62,9 +62,7 @@ namespace LongoMatch.Gui.Component.Stats
}
void AddTeam (TeamTemplate tpl, Dashboard cats) {
- TreeIter teamIter;
-
- teamIter = store.AppendValues (tpl.TeamName, null);
+ store.AppendValues (tpl.TeamName, null);
}
void HandleCursorChanged (object sender, EventArgs e)
diff --git a/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs b/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
index 2c4e3e9..6d44067 100644
--- a/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
+++ b/LongoMatch.GUI/Gui/Component/TeamsComboBox.cs
@@ -29,7 +29,6 @@ namespace LongoMatch.Gui.Component
public class TeamsComboBox: Gtk.ComboBox
{
ListStore store;
- Button internalButton;
CellRendererPixbuf pixrender;
CellRendererText texrender;
diff --git a/LongoMatch.GUI/Gui/Component/Timeline.cs b/LongoMatch.GUI/Gui/Component/Timeline.cs
index 258d3f5..ce41e91 100644
--- a/LongoMatch.GUI/Gui/Component/Timeline.cs
+++ b/LongoMatch.GUI/Gui/Component/Timeline.cs
@@ -34,7 +34,6 @@ namespace LongoMatch.Gui.Component
PlaysTimeline timeline;
Timerule timerule;
TimelineLabels labels;
- MediaFile projectFile;
double secondsPerPixel;
uint timeoutID;
Time currentTime, nextCurrentTime;
@@ -131,7 +130,6 @@ namespace LongoMatch.Gui.Component
timeoutID = GLib.Timeout.Add (TIMEOUT_MS, UpdateTime);
}
focusscale.Value = 6;
- projectFile = project.Description.FileSet.GetAngle (MediaFileAngle.Angle1);
timerule.Duration = project.Description.FileSet.GetAngle
(MediaFileAngle.Angle1).Duration;
timeline.ShowMenuEvent += HandleShowMenu;
timeline.ShowTimersMenuEvent += HandleShowTimersMenu;
diff --git a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
index c7a0b74..a58a9a9 100644
--- a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
@@ -96,16 +96,10 @@ namespace LongoMatch.Gui.Dialog
public void LoadSubstitution (Project project, SubstitutionEvent substitution)
{
- TeamTemplate team;
List<Player> hfp, hbp, afp, abp;
this.substitution = substitution;
project.CurrentLineup (substitution.EventTime, out hfp, out hbp, out afp, out abp);
- if (substitution.Team == Team.LOCAL) {
- team = homeTeam;
- } else {
- team = awayTeam;
- }
playershbox.Visible = true;
tagger.SubstitutionMode = false;
tagger.ShowSubstitutionButtons = false;
diff --git a/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs b/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
index f44fe66..1b2904d 100644
--- a/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
@@ -50,7 +50,7 @@ namespace LongoMatch.Gui.Panel
CaptureSettings captureSettings;
EncodingSettings encSettings;
List<Device> videoDevices;
- ListStore teams, videoStandardList, encProfileList, qualList;
+ ListStore videoStandardList, encProfileList, qualList;
IMultimediaToolkit mtoolkit;
IGUIToolkit gtoolkit;
Color red;
diff --git a/LongoMatch.GUI/Gui/TreeView/CategoriesFilterTreeView.cs
b/LongoMatch.GUI/Gui/TreeView/CategoriesFilterTreeView.cs
index 056a95b..a51fec7 100644
--- a/LongoMatch.GUI/Gui/TreeView/CategoriesFilterTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/CategoriesFilterTreeView.cs
@@ -29,7 +29,6 @@ namespace LongoMatch.Gui.Component
[System.ComponentModel.ToolboxItem(true)]
public class CategoriesFilterTreeView: FilterTreeViewBase
{
- Project project;
public CategoriesFilterTreeView (): base()
{
diff --git a/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs
index 2690b7f..8fa4984 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlayListTreeView.cs
@@ -33,8 +33,6 @@ namespace LongoMatch.Gui.Component
public class PlayListTreeView : Gtk.TreeView
{
Project project;
- Playlist selectedPlaylist;
- IPlaylistElement selectedElement;
TreeIter selectedIter;
Playlist dragSourcePlaylist;
IPlaylistElement dragSourceElement;
@@ -164,28 +162,6 @@ namespace LongoMatch.Gui.Component
return base.OnButtonPressEvent (evnt);
}
- protected void OnTitle (object o, EventArgs args)
- {
- PlaylistPlayElement ple;
- EntryDialog ed;
-
- ple = selectedElement as PlaylistPlayElement;
- ed = new EntryDialog ();
- ed.Title = Catalog.GetString ("Edit Title");
- ed.Text = ple.Title;
- if (ed.Run () == (int)ResponseType.Ok) {
- ple.Title = ed.Text;
- this.QueueDraw ();
- }
- ed.Destroy ();
- }
-
- protected void OnDelete (object obj, EventArgs args)
- {
- selectedPlaylist.Remove (selectedElement);
- (Model as TreeStore).Remove (ref selectedIter);
- }
-
void FillElementAndPlaylist (TreeIter iter, out Playlist playlist, out IPlaylistElement
element)
{
TreeIter parent;
diff --git a/LongoMatch.Migration/Core/Templates/CategoriesTemplate.cs
b/LongoMatch.Migration/Core/Templates/CategoriesTemplate.cs
index 682e5d5..22d9209 100644
--- a/LongoMatch.Migration/Core/Templates/CategoriesTemplate.cs
+++ b/LongoMatch.Migration/Core/Templates/CategoriesTemplate.cs
@@ -45,7 +45,6 @@ namespace LongoMatch.Store.Templates
{
/* Database additions */
GameUnitsList gameUnits;
- Version version;
byte[] fieldImage, halfFieldImage, goalImage ;
/// <summary>
diff --git a/LongoMatch.Migration/Core/Templates/TeamTemplate.cs
b/LongoMatch.Migration/Core/Templates/TeamTemplate.cs
index 8904ab3..94a41f9 100644
--- a/LongoMatch.Migration/Core/Templates/TeamTemplate.cs
+++ b/LongoMatch.Migration/Core/Templates/TeamTemplate.cs
@@ -37,7 +37,6 @@ namespace LongoMatch.Store.Templates
private byte[] thumbnailBuf;
private const int MAX_WIDTH=100;
private const int MAX_HEIGHT=100;
- Version version;
public TeamTemplate () {
init (Guid.NewGuid ());
@@ -166,7 +165,6 @@ namespace LongoMatch.Store.Templates
Clear();
for(int i=1; i<=playersCount; i++)
AddDefaultItem(i-1);
- version = new Version (Constants.DB_MAYOR_VERSION, Constants.DB_MINOR_VERSION);
}
void init (Guid uuid) {
diff --git a/LongoMatch.Multimedia/Player/GstPlayer.cs b/LongoMatch.Multimedia/Player/GstPlayer.cs
index 76d4194..c01c699 100644
--- a/LongoMatch.Multimedia/Player/GstPlayer.cs
+++ b/LongoMatch.Multimedia/Player/GstPlayer.cs
@@ -32,7 +32,6 @@ namespace LongoMatch.Video.Player
public event ErrorHandler Error;
public event StateChangeHandler StateChange;
- public event TickHandler Tick;
public event ReadyToSeekHandler ReadyToSeek;
public event EosHandler Eos;
diff --git a/LongoMatch.Services/Services/FileDB.cs b/LongoMatch.Services/Services/FileDB.cs
index 7284096..48f0539 100644
--- a/LongoMatch.Services/Services/FileDB.cs
+++ b/LongoMatch.Services/Services/FileDB.cs
@@ -120,7 +120,7 @@ namespace LongoMatch.DB
projectsDB.LastBackup = DateTime.UtcNow;
projectsDB.Save ();
return true;
- } catch (Exception ex) {
+ } catch {
return false;
}
}
diff --git a/LongoMatch.Services/Services/ProjectsManager.cs b/LongoMatch.Services/Services/ProjectsManager.cs
index 8f5aa09..ea48e51 100644
--- a/LongoMatch.Services/Services/ProjectsManager.cs
+++ b/LongoMatch.Services/Services/ProjectsManager.cs
@@ -30,7 +30,6 @@ namespace LongoMatch.Services
{
IGUIToolkit guiToolkit;
IMultimediaToolkit multimediaToolkit;
- IMainController mainController;
IAnalysisWindow analysisWindow;
public ProjectsManager (IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit,
@@ -38,7 +37,6 @@ namespace LongoMatch.Services
{
this.multimediaToolkit = multimediaToolkit;
this.guiToolkit = guiToolkit;
- mainController = guiToolkit.MainController;
ConnectSignals ();
}
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index 351d0f9..6620fca 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -80,7 +80,7 @@ namespace LongoMatch
if (manager != null) {
try {
manager.ShutdownMultimediaBackends ();
- } catch (Exception ex) {
+ } catch {
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]