[longomatch] Display a readable string if the device is unknown
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Display a readable string if the device is unknown
- Date: Tue, 8 Jun 2010 21:47:32 +0000 (UTC)
commit ea3c68fe0e0996899b36e8fa34e98b05c2339ddc
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Jun 3 22:13:47 2010 +0200
Display a readable string if the device is unknown
LongoMatch/Gui/Component/ProjectDetailsWidget.cs | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
index 15e443e..203f6c6 100644
--- a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
@@ -436,6 +436,7 @@ namespace LongoMatch.Gui.Component
foreach (object[] device in videoDevices){
string deviceElement;
+ string deviceName;
if (Environment.OSVersion.Platform == PlatformID.Unix){
if ((int)device[1] == (int)CapturerType.DVCAM)
deviceElement = Catalog.GetString("DV camera");
@@ -443,8 +444,8 @@ namespace LongoMatch.Gui.Component
deviceElement = Catalog.GetString("GConf Source");
} else
deviceElement = Catalog.GetString("DirectShow Source");
-
- devicecombobox.AppendText(device[0]+" ("+deviceElement+")");
+ deviceName = ((string)device[0] == "") ? Catalog.GetString("Unknown"): (string)device [0];
+ devicecombobox.AppendText(deviceName + " ("+deviceElement+")");
devicecombobox.Active = 0;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]