Merge lp:~dangarner/xibo/1.2.2-pre into lp:xibo/1.3

Proposed by Dan Garner
Status: Merged
Merged at revision: 211
Proposed branch: lp:~dangarner/xibo/1.2.2-pre
Merge into: lp:xibo/1.3
Diff against target: 7154 lines (+4782/-473) (has conflicts)
36 files modified
client/dotNET/CacheManager.cs (+75/-1)
client/dotNET/FileCollector.cs (+57/-28)
client/dotNET/MainForm.cs (+88/-62)
client/dotNET/Properties/Resources.Designer.cs (+1/-1)
client/dotNET/Properties/Settings.Designer.cs (+14/-2)
client/dotNET/Properties/Settings.settings (+5/-2)
client/dotNET/Region.cs (+8/-1)
client/dotNET/RequiredFiles.cs (+206/-0)
client/dotNET/RssReader.cs (+1/-1)
client/dotNET/Schedule.cs (+1/-1)
client/dotNET/ScheduleManager.cs (+16/-1)
client/dotNET/Web References/xmds/Reference.cs (+86/-19)
client/dotNET/Web References/xmds/Reference.map (+1/-1)
client/dotNET/Web References/xmds/xmds.wsdl (+24/-1)
client/dotNET/XiboClient.csproj (+7/-5)
client/dotNET/app.config (+5/-2)
client/dotNET/bin/Release/XiboClient.exe.config (+24/-3)
client/dotNET/bin/Release/XiboClient.vshost.exe.config (+24/-3)
client/python/XiboClient.py (+196/-0)
client/python/client.conf (+25/-0)
client/python/configure.py (+1753/-0)
client/python/gui.glade (+1451/-0)
default.pot (+293/-283)
server/README.TXT (+4/-4)
server/install/database/27.sql (+9/-0)
server/lib/app/kit.class.php (+9/-13)
server/lib/data/display.data.class.php (+84/-6)
server/lib/data/displaygroup.data.class.php (+9/-0)
server/lib/data/schedule.data.class.php (+10/-5)
server/lib/pages/display.class.php (+169/-19)
server/lib/pages/layout.class.php (+8/-2)
server/lib/pages/module.class.php (+16/-0)
server/lib/pages/region.class.php (+5/-0)
server/lib/pages/schedule.class.php (+14/-6)
server/lib/service/service.wsdl (+23/-0)
server/lib/service/xmdssoap.class.php (+61/-1)
Text conflict in client/python/XiboClient.py
Conflict adding file client/python/client.conf.  Moved existing file to client/python/client.conf.moved.
Conflict adding file client/python/configure.py.  Moved existing file to client/python/configure.py.moved.
Conflict adding file client/python/gui.glade.  Moved existing file to client/python/gui.glade.moved.
Conflict adding file client/python/xibo.ico.  Moved existing file to client/python/xibo.ico.moved.
To merge this branch: bzr merge lp:~dangarner/xibo/1.2.2-pre
Reviewer Review Type Date Requested Status
Dan Garner Approve
Review via email: mp+51553@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dan Garner (dangarner) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'client/dotNET/CacheManager.cs'
--- client/dotNET/CacheManager.cs 2010-04-19 21:45:10 +0000
+++ client/dotNET/CacheManager.cs 2011-02-28 15:09:00 +0000
@@ -25,6 +25,7 @@
25using System.Windows.Forms;25using System.Windows.Forms;
26using System.Xml.Serialization;26using System.Xml.Serialization;
27using System.Diagnostics;27using System.Diagnostics;
28using System.Xml;
2829
29namespace XiboClient30namespace XiboClient
30{31{
@@ -173,7 +174,7 @@
173 /// </summary>174 /// </summary>
174 /// <param name="path"></param>175 /// <param name="path"></param>
175 /// <returns>True is it is and false if it isnt</returns>176 /// <returns>True is it is and false if it isnt</returns>
176 public bool IsValid(String path)177 public bool IsValidPath(String path)
177 {178 {
178 // TODO: what makes a path valid?179 // TODO: what makes a path valid?
179 // Currently a path is valid if it is in the cache180 // Currently a path is valid if it is in the cache
@@ -185,6 +186,10 @@
185 {186 {
186 if (file.path == path)187 if (file.path == path)
187 {188 {
189 // If we cached it over 2 minutes ago, then check the GetLastWriteTime
190 if (file.cacheDate > DateTime.Now.AddMinutes(-2))
191 return true;
192
188 try193 try
189 {194 {
190 // Check to see if this file has been modified since the MD5 cache195 // Check to see if this file has been modified since the MD5 cache
@@ -209,6 +214,75 @@
209 // Reached the end of the cache and havent found the file.214 // Reached the end of the cache and havent found the file.
210 return false;215 return false;
211 }216 }
217
218 /// <summary>
219 /// Is the provided layout file a valid layout (has all media)
220 /// </summary>
221 /// <param name="layoutFile"></param>
222 /// <returns></returns>
223 public bool IsValidLayout(string layoutFile)
224 {
225 Debug.WriteLine("Checking Layout " + layoutFile + " is valid");
226
227 if (!IsValidPath(layoutFile))
228 return false;
229
230 // Load the XLF, get all media ID's
231 XmlDocument layoutXml = new XmlDocument();
232 layoutXml.Load(Properties.Settings.Default.LibraryPath + @"\" + layoutFile);
233
234 XmlNodeList mediaNodes = layoutXml.SelectNodes("//media");
235
236 foreach (XmlNode media in mediaNodes)
237 {
238 // Is this a stored media type?
239 switch (media.Attributes["type"].Value)
240 {
241 case "video":
242 case "image":
243 case "flash":
244 case "ppt":
245
246 // Get the path and see if its valid
247 if (!IsValidPath(media.InnerText))
248 return false;
249
250 break;
251
252 default:
253 continue;
254 }
255 }
256
257 return true;
258 }
259
260 /// <summary>
261 /// Regenerate from Required Files
262 /// </summary>
263 public void Regenerate()
264 {
265 if (!File.Exists(Application.UserAppDataPath + "\\" + Properties.Settings.Default.RequiredFilesFile))
266 return;
267
268 // Open the XML file and check each required file that isnt already there
269 XmlDocument xml = new XmlDocument();
270 xml.Load(Application.UserAppDataPath + "\\" + Properties.Settings.Default.RequiredFilesFile);
271
272 XmlNodeList fileNodes = xml.SelectNodes("//RequiredFile/Path");
273
274 foreach (XmlNode file in fileNodes)
275 {
276 string path = file.InnerText;
277
278 // Does the file exist?
279 if (!File.Exists(Properties.Settings.Default.LibraryPath + @"\" + path))
280 continue;
281
282 // Add this file to the cache manager
283 Add(path, GetMD5(path));
284 }
285 }
212 }286 }
213287
214 public struct Md5Resource288 public struct Md5Resource
215289
=== modified file 'client/dotNET/FileCollector.cs'
--- client/dotNET/FileCollector.cs 2010-04-19 21:45:10 +0000
+++ client/dotNET/FileCollector.cs 2011-02-28 15:09:00 +0000
@@ -31,28 +31,26 @@
31 class FileCollector31 class FileCollector
32 {32 {
33 private CacheManager _cacheManager;33 private CacheManager _cacheManager;
34 private RequiredFiles _requiredFiles;
35 private XmlDocument _xml;
3436
35 public FileCollector(CacheManager cacheManager, string xmlString)37 public FileCollector(CacheManager cacheManager, string xmlString)
36 {38 {
37 _cacheManager = cacheManager;39 _cacheManager = cacheManager;
3840
39 xml = new XmlDocument();41 // Load the XML file RF call
42 _xml = new XmlDocument();
43 _xml.LoadXml(xmlString);
4044
41 try45 // Create a required files object
42 {46 _requiredFiles = new RequiredFiles();
43 xml.LoadXml(xmlString);47 _requiredFiles.RequiredFilesXml = _xml;
44 }
45 catch (Exception e)
46 {
47 //Log this error
48 System.Diagnostics.Debug.WriteLine(e.Message);
49 }
5048
51 // Get the key for later use49 // Get the key for later use
52 hardwareKey = new HardwareKey();50 hardwareKey = new HardwareKey();
5351
54 // Make a new filelist collection52 // Make a new filelist collection
55 files = new Collection<FileList>();53 _files = new Collection<RequiredFile>();
5654
57 // Create a webservice call55 // Create a webservice call
58 xmdsFile = new XiboClient.xmds.xmds();56 xmdsFile = new XiboClient.xmds.xmds();
@@ -73,13 +71,13 @@
73 /// </summary>71 /// </summary>
74 public void CompareAndCollect()72 public void CompareAndCollect()
75 {73 {
76 XmlNodeList fileNodes = xml.SelectNodes("/files/file");74 XmlNodeList fileNodes = _xml.SelectNodes("/files/file");
7775
78 //Inspect each file we have here76 //Inspect each file we have here
79 foreach (XmlNode file in fileNodes)77 foreach (XmlNode file in fileNodes)
80 {78 {
81 XmlAttributeCollection attributes = file.Attributes;79 XmlAttributeCollection attributes = file.Attributes;
82 FileList fileList = new FileList();80 RequiredFile fileList = new RequiredFile();
8381
84 if (attributes["type"].Value == "layout")82 if (attributes["type"].Value == "layout")
85 {83 {
@@ -120,13 +118,15 @@
120 fileList.md5 = attributes["md5"].Value;118 fileList.md5 = attributes["md5"].Value;
121 fileList.retrys = 0;119 fileList.retrys = 0;
122120
123 files.Add(fileList);121 _files.Add(fileList);
124 }122 }
125 else123 else
126 {124 {
127 // The MD5 of the current file and the MD5 in RequiredFiles are the same.125 // The MD5 of the current file and the MD5 in RequiredFiles are the same.
128 // Therefore make sure this MD5 is in the CacheManager126 // Therefore make sure this MD5 is in the CacheManager
129 _cacheManager.Add(path + ".xlf", md5);127 _cacheManager.Add(path + ".xlf", md5);
128
129 _requiredFiles.MarkComplete(int.Parse(path), md5);
130 }130 }
131 }131 }
132 else132 else
@@ -141,7 +141,7 @@
141 fileList.md5 = attributes["md5"].Value;141 fileList.md5 = attributes["md5"].Value;
142 fileList.retrys = 0;142 fileList.retrys = 0;
143143
144 files.Add(fileList);144 _files.Add(fileList);
145 }145 }
146 }146 }
147 else if (attributes["type"].Value == "media")147 else if (attributes["type"].Value == "media")
@@ -183,13 +183,16 @@
183 fileList.md5 = attributes["md5"].Value;183 fileList.md5 = attributes["md5"].Value;
184 fileList.retrys = 0;184 fileList.retrys = 0;
185185
186 files.Add(fileList);186 _files.Add(fileList);
187 }187 }
188 else188 else
189 {189 {
190 // The MD5 of the current file and the MD5 in RequiredFiles are the same.190 // The MD5 of the current file and the MD5 in RequiredFiles are the same.
191 // Therefore make sure this MD5 is in the CacheManager191 // Therefore make sure this MD5 is in the CacheManager
192 _cacheManager.Add(path, md5);192 _cacheManager.Add(path, md5);
193
194 string[] filePart = path.Split('.');
195 _requiredFiles.MarkComplete(int.Parse(filePart[0]), md5);
193 }196 }
194 }197 }
195 else198 else
@@ -205,7 +208,7 @@
205 fileList.md5 = attributes["md5"].Value;208 fileList.md5 = attributes["md5"].Value;
206 fileList.retrys = 0;209 fileList.retrys = 0;
207210
208 files.Add(fileList);211 _files.Add(fileList);
209 }212 }
210 }213 }
211 else if (attributes["type"].Value == "blacklist")214 else if (attributes["type"].Value == "blacklist")
@@ -234,10 +237,24 @@
234 }237 }
235 }238 }
236239
237 System.Diagnostics.Debug.WriteLine(String.Format("There are {0} files to get", files.Count.ToString()));240 Debug.WriteLine(String.Format("There are {0} files to get", _files.Count.ToString()));
241
242 // Output a list of the files we need to get
243 string debugMessage = "";
244
245 foreach (RequiredFile fileToGet in _files)
246 debugMessage += string.Format("File: {0}, Type: {1}, MD5: {2}. ", fileToGet.path, fileToGet.type, fileToGet.md5);
247
248 Debug.WriteLine(debugMessage);
249
250 // Report the files files back to XMDS
251 _requiredFiles.ReportInventory();
252
253 // Write Required Files
254 _requiredFiles.WriteRequiredFiles();
238255
239 // Is there anything to get?256 // Is there anything to get?
240 if (files.Count == 0)257 if (_files.Count == 0)
241 {258 {
242 CollectionComplete();259 CollectionComplete();
243 return;260 return;
@@ -247,7 +264,7 @@
247 _currentFile = 0;264 _currentFile = 0;
248265
249 // Preload the first filelist266 // Preload the first filelist
250 _currentFileList = files[_currentFile];267 _currentFileList = _files[_currentFile];
251268
252 // Get the first file269 // Get the first file
253 GetFile();270 GetFile();
@@ -367,6 +384,10 @@
367 {384 {
368 // Add to the CacheManager385 // Add to the CacheManager
369 _cacheManager.Add(_currentFileList.path + ".xlf", md5sum);386 _cacheManager.Add(_currentFileList.path + ".xlf", md5sum);
387
388 // Report this completion back to XMDS
389 _requiredFiles.MarkComplete(int.Parse(_currentFileList.path), md5sum);
390 _requiredFiles.ReportInventory();
370 }391 }
371392
372 // Fire a layout complete event393 // Fire a layout complete event
@@ -437,6 +458,11 @@
437458
438 System.Diagnostics.Debug.WriteLine(string.Format("File downloaded: {0}", _currentFileList.path));459 System.Diagnostics.Debug.WriteLine(string.Format("File downloaded: {0}", _currentFileList.path));
439460
461 // Report this completion back to XMDS
462 string[] filePart = _currentFileList.path.Split('.');
463 _requiredFiles.MarkComplete(int.Parse(filePart[0]), md5sum);
464 _requiredFiles.ReportInventory();
465
440 // All the file has been recieved. Move on to the next file.466 // All the file has been recieved. Move on to the next file.
441 _currentFile++;467 _currentFile++;
442 }468 }
@@ -467,13 +493,16 @@
467 /// </summary>493 /// </summary>
468 public void GetFile()494 public void GetFile()
469 {495 {
470 if (_currentFile > (files.Count - 1))496 if (_currentFile > (_files.Count - 1))
471 {497 {
472 System.Diagnostics.Debug.WriteLine(String.Format("Finished Recieving {0} files", files.Count));498 System.Diagnostics.Debug.WriteLine(String.Format("Finished Receiving {0} files", _files.Count));
473499
474 // Clean up500 // Clean up
475 files.Clear();501 _files.Clear();
476 xmdsFile.Dispose(); 502 xmdsFile.Dispose();
503
504 // Write Required Files
505 _requiredFiles.WriteRequiredFiles();
477506
478 // Finished getting this file list507 // Finished getting this file list
479 CollectionComplete();508 CollectionComplete();
@@ -483,7 +512,7 @@
483 // Get the current file into the currentfilelist if the current one is finished512 // Get the current file into the currentfilelist if the current one is finished
484 if (_currentFileList.complete)513 if (_currentFileList.complete)
485 {514 {
486 _currentFileList = files[_currentFile];515 _currentFileList = _files[_currentFile];
487 }516 }
488517
489 System.Diagnostics.Debug.WriteLine(String.Format("Getting the file : {0} chunk : {1}", _currentFileList.path, _currentFileList.chunkOffset.ToString()));518 System.Diagnostics.Debug.WriteLine(String.Format("Getting the file : {0} chunk : {1}", _currentFileList.path, _currentFileList.chunkOffset.ToString()));
@@ -496,7 +525,7 @@
496 }525 }
497526
498 [Serializable]527 [Serializable]
499 private struct FileList528 private struct RequiredFile
500 {529 {
501 public string path;530 public string path;
502 public string type;531 public string type;
@@ -511,9 +540,9 @@
511540
512 private XmlDocument xml;541 private XmlDocument xml;
513 private HardwareKey hardwareKey;542 private HardwareKey hardwareKey;
514 private Collection<FileList> files;543 private Collection<RequiredFile> _files;
515 private int _currentFile;544 private int _currentFile;
516 private FileList _currentFileList;545 private RequiredFile _currentFileList;
517 private xmds.xmds xmdsFile;546 private xmds.xmds xmdsFile;
518547
519 public event LayoutFileChangedDelegate LayoutFileChanged;548 public event LayoutFileChangedDelegate LayoutFileChanged;
520549
=== modified file 'client/dotNET/MainForm.cs'
--- client/dotNET/MainForm.cs 2010-08-26 20:15:36 +0000
+++ client/dotNET/MainForm.cs 2011-02-28 15:09:00 +0000
@@ -72,14 +72,45 @@
7272
73 _statLog = new StatLog();73 _statLog = new StatLog();
7474
75 this.FormClosing += new FormClosingEventHandler(MainForm_FormClosing);
76 this.Shown += new EventHandler(MainForm_Shown);
77 }
78
79 /// <summary>
80 /// Called after the form has been shown
81 /// </summary>
82 /// <param name="sender"></param>
83 /// <param name="e"></param>
84 void MainForm_Shown(object sender, EventArgs e)
85 {
86 // Process any stuff that has happened during the loading process
87 Application.DoEvents();
88
75 // Create a cachemanager89 // Create a cachemanager
76 SetCacheManager();90 SetCacheManager();
7791
78 this.FormClosing += new FormClosingEventHandler(MainForm_FormClosing);92 try
93 {
94 // Create the Schedule
95 _schedule = new Schedule(Application.UserAppDataPath + "\\" + Properties.Settings.Default.ScheduleFile, ref _cacheManager);
96
97 // Bind to the schedule change event - notifys of changes to the schedule
98 _schedule.ScheduleChangeEvent += new Schedule.ScheduleChangeDelegate(schedule_ScheduleChangeEvent);
99
100 // Initialize the other schedule components
101 _schedule.InitializeComponents();
102 }
103 catch (Exception ex)
104 {
105 Debug.WriteLine(ex.Message, LogType.Error.ToString());
106 MessageBox.Show("Fatal Error initialising the application", "Fatal Error");
107 Close();
108 Dispose();
109 }
79 }110 }
80111
81 /// <summary>112 /// <summary>
82 /// Called when the form has finished loading113 /// Called before the form has loaded for the first time
83 /// </summary>114 /// </summary>
84 /// <param name="sender"></param>115 /// <param name="sender"></param>
85 /// <param name="e"></param>116 /// <param name="e"></param>
@@ -96,30 +127,13 @@
96 Cursor.Position = new Point(_clientSize.Width, _clientSize.Height);127 Cursor.Position = new Point(_clientSize.Width, _clientSize.Height);
97 Cursor.Hide();128 Cursor.Hide();
98129
130 ShowSplashScreen();
131
99 // Change the default Proxy class132 // Change the default Proxy class
100 OptionForm.SetGlobalProxy();133 OptionForm.SetGlobalProxy();
101134
102 // UserApp data135 // UserApp data
103 Debug.WriteLine(new LogMessage("MainForm_Load", "User AppData Path: " + Application.UserAppDataPath), LogType.Info.ToString());136 Debug.WriteLine(new LogMessage("MainForm_Load", "User AppData Path: " + Application.UserAppDataPath), LogType.Info.ToString());
104
105 try
106 {
107 // Create the Schedule
108 _schedule = new Schedule(Application.UserAppDataPath + "\\" + Properties.Settings.Default.ScheduleFile, ref _cacheManager);
109
110 // Bind to the schedule change event - notifys of changes to the schedule
111 _schedule.ScheduleChangeEvent += new Schedule.ScheduleChangeDelegate(schedule_ScheduleChangeEvent);
112
113 // Initialize the other schedule components
114 _schedule.InitializeComponents();
115 }
116 catch (Exception ex)
117 {
118 Debug.WriteLine(ex.Message, LogType.Error.ToString());
119 MessageBox.Show("Fatal Error initialising the application", "Fatal Error");
120 Close();
121 Dispose();
122 }
123 }137 }
124138
125 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)139 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
@@ -152,11 +166,20 @@
152 }166 }
153 catch (Exception ex)167 catch (Exception ex)
154 {168 {
155 Trace.WriteLine(new LogMessage("Schedule", "Unable to reuse the Cache Manager because: " + ex.Message));169 Trace.WriteLine(new LogMessage("MainForm - SetCacheManager", "Unable to reuse the Cache Manager because: " + ex.Message));
156170
157 // Create a new cache manager171 // Create a new cache manager
158 _cacheManager = new CacheManager();172 _cacheManager = new CacheManager();
159 }173 }
174
175 try
176 {
177 _cacheManager.Regenerate();
178 }
179 catch (Exception ex)
180 {
181 Trace.WriteLine(new LogMessage("MainForm - SetCacheManager", "Regenerate failed because: " + ex.Message));
182 }
160 }183 }
161184
162 /// <summary>185 /// <summary>
@@ -191,9 +214,29 @@
191 {214 {
192 Debug.WriteLine(ex.Message);215 Debug.WriteLine(ex.Message);
193 _isExpired = true;216 _isExpired = true;
217
218 ShowSplashScreen();
219
220 // In 10 seconds fire the next layout?
221 Timer timer = new Timer();
222 timer.Interval = 10000;
223 timer.Tick += new EventHandler(splashScreenTimer_Tick);
224
225 // Start the timer
226 timer.Start();
194 }227 }
195 }228 }
196229
230 void splashScreenTimer_Tick(object sender, EventArgs e)
231 {
232 Debug.WriteLine(new LogMessage("timer_Tick", "Loading next layout after splashscreen"));
233
234 Timer timer = (Timer)sender;
235 timer.Stop();
236 timer.Dispose();
237
238 _schedule.NextLayout();
239 }
197240
198 /// <summary>241 /// <summary>
199 /// Prepares the Layout.. rendering all the necessary controls242 /// Prepares the Layout.. rendering all the necessary controls
@@ -213,8 +256,7 @@
213 // Default or not256 // Default or not
214 if (layoutPath == Properties.Settings.Default.LibraryPath + @"\Default.xml" || String.IsNullOrEmpty(layoutPath))257 if (layoutPath == Properties.Settings.Default.LibraryPath + @"\Default.xml" || String.IsNullOrEmpty(layoutPath))
215 {258 {
216 ShowSplashScreen();259 throw new Exception("Default layout");
217 return;
218 }260 }
219 else261 else
220 {262 {
@@ -232,33 +274,16 @@
232 }274 }
233 catch (Exception ex)275 catch (Exception ex)
234 {276 {
235 // couldnt open the layout file, so use the embedded one277 Trace.WriteLine(string.Format("Could not find the layout file {0}: {1}", layoutPath, ex.Message));
236 System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();278 throw;
237 Stream resourceStream = assembly.GetManifestResourceStream("XiboClient.Resources.splash.jpg");
238
239 // Load into a stream and then into an Image
240 try
241 {
242 Image bgSplash = Image.FromStream(resourceStream);
243
244 Bitmap bmpSplash = new Bitmap(bgSplash, _clientSize);
245 this.BackgroundImage = bmpSplash;
246 }
247 catch
248 {
249 // Log
250 System.Diagnostics.Debug.WriteLine(ex.Message);
251 System.Diagnostics.Trace.WriteLine("Could not find the layout file {0}", layoutPath);
252 }
253 return;
254 }279 }
255 }280 }
256281
257 // Attributes of the main layout node282 // Attributes of the main layout node
258 XmlNode layoutNode = layoutXml.SelectSingleNode("/layout");283 XmlNode layoutNode = layoutXml.SelectSingleNode("/layout");
259 284
260 XmlAttributeCollection layoutAttributes = layoutNode.Attributes;285 XmlAttributeCollection layoutAttributes = layoutNode.Attributes;
261 286
262 // Set the background and size of the form287 // Set the background and size of the form
263 _layoutWidth = int.Parse(layoutAttributes["width"].Value);288 _layoutWidth = int.Parse(layoutAttributes["width"].Value);
264 _layoutHeight = int.Parse(layoutAttributes["height"].Value);289 _layoutHeight = int.Parse(layoutAttributes["height"].Value);
@@ -266,7 +291,7 @@
266291
267 // Scaling factor, will be applied to all regions292 // Scaling factor, will be applied to all regions
268 _scaleFactor = Math.Min(_clientSize.Width / _layoutWidth, _clientSize.Height / _layoutHeight);293 _scaleFactor = Math.Min(_clientSize.Width / _layoutWidth, _clientSize.Height / _layoutHeight);
269 294
270 // Want to be able to center this shiv - therefore work out which one of these is going to have left overs295 // Want to be able to center this shiv - therefore work out which one of these is going to have left overs
271 int backgroundWidth = (int)(_layoutWidth * _scaleFactor);296 int backgroundWidth = (int)(_layoutWidth * _scaleFactor);
272 int backgroundHeight = (int)(_layoutHeight * _scaleFactor);297 int backgroundHeight = (int)(_layoutHeight * _scaleFactor);
@@ -282,7 +307,7 @@
282 if (leftOverX != 0) leftOverX = leftOverX / 2;307 if (leftOverX != 0) leftOverX = leftOverX / 2;
283 if (leftOverY != 0) leftOverY = leftOverY / 2;308 if (leftOverY != 0) leftOverY = leftOverY / 2;
284 }309 }
285 catch 310 catch
286 {311 {
287 leftOverX = 0;312 leftOverX = 0;
288 leftOverY = 0;313 leftOverY = 0;
@@ -361,25 +386,24 @@
361 // Check to see if there are any regions on this layout.386 // Check to see if there are any regions on this layout.
362 if (listRegions.Count == 0 || listMedia.Count == 0)387 if (listRegions.Count == 0 || listMedia.Count == 0)
363 {388 {
364 Trace.WriteLine(new LogMessage("PrepareLayout", 389 Trace.WriteLine(new LogMessage("PrepareLayout",
365 string.Format("A layout with {0} regions and {1} media has been detected.", listRegions.Count.ToString(), listMedia.Count.ToString())), 390 string.Format("A layout with {0} regions and {1} media has been detected.", listRegions.Count.ToString(), listMedia.Count.ToString())),
366 LogType.Info.ToString());391 LogType.Info.ToString());
367392
368 if (_schedule.ActiveLayouts == 1)393 if (_schedule.ActiveLayouts == 1)
369 {394 {
370 Trace.WriteLine(new LogMessage("PrepareLayout", "Only 1 layout scheduled and it has nothing to show."), LogType.Info.ToString());395 Trace.WriteLine(new LogMessage("PrepareLayout", "Only 1 layout scheduled and it has nothing to show."), LogType.Info.ToString());
371396
372 // Fall back to the splash screen (will only shift from here once a new schedule is detected)397 throw new Exception("Only 1 layout schduled and it has nothing to show");
373 ShowSplashScreen();
374 }398 }
375 else399 else
376 {400 {
377 Trace.WriteLine(new LogMessage("PrepareLayout", 401 Trace.WriteLine(new LogMessage("PrepareLayout",
378 string.Format(string.Format("An empty layout detected, will show for {0} seconds.", Properties.Settings.Default.emptyLayoutDuration.ToString()))), LogType.Info.ToString());402 string.Format(string.Format("An empty layout detected, will show for {0} seconds.", Properties.Settings.Default.emptyLayoutDuration.ToString()))), LogType.Info.ToString());
379403
380 // Put a small dummy region in place, with a small dummy media node - which expires in 10 seconds.404 // Put a small dummy region in place, with a small dummy media node - which expires in 10 seconds.
381 XmlDocument dummyXml = new XmlDocument();405 XmlDocument dummyXml = new XmlDocument();
382 dummyXml.LoadXml(string.Format("<region id='blah' width='1' height='1' top='1' left='1'><media id='blah' type='text' duration='{0}'><raw><text></text></raw></media></region>", 406 dummyXml.LoadXml(string.Format("<region id='blah' width='1' height='1' top='1' left='1'><media id='blah' type='text' duration='{0}'><raw><text></text></raw></media></region>",
383 Properties.Settings.Default.emptyLayoutDuration.ToString()));407 Properties.Settings.Default.emptyLayoutDuration.ToString()));
384408
385 // Replace the list of regions (they mean nothing as they are empty)409 // Replace the list of regions (they mean nothing as they are empty)
@@ -400,10 +424,10 @@
400424
401 options.scheduleId = _scheduleId;425 options.scheduleId = _scheduleId;
402 options.layoutId = _layoutId;426 options.layoutId = _layoutId;
403 options.width = (int) (double.Parse(nodeAttibutes["width"].Value) * _scaleFactor);427 options.width = (int)(double.Parse(nodeAttibutes["width"].Value) * _scaleFactor);
404 options.height = (int) (double.Parse(nodeAttibutes["height"].Value) * _scaleFactor);428 options.height = (int)(double.Parse(nodeAttibutes["height"].Value) * _scaleFactor);
405 options.left = (int) (double.Parse(nodeAttibutes["left"].Value) * _scaleFactor);429 options.left = (int)(double.Parse(nodeAttibutes["left"].Value) * _scaleFactor);
406 options.top = (int) (double.Parse(nodeAttibutes["top"].Value) * _scaleFactor);430 options.top = (int)(double.Parse(nodeAttibutes["top"].Value) * _scaleFactor);
407 options.scaleFactor = _scaleFactor;431 options.scaleFactor = _scaleFactor;
408432
409 // Set the backgrounds (used for Web content offsets)433 // Set the backgrounds (used for Web content offsets)
@@ -411,9 +435,9 @@
411 options.backgroundTop = options.top * -1;435 options.backgroundTop = options.top * -1;
412436
413 //Account for scaling437 //Account for scaling
414 options.left = options.left + (int) leftOverX;438 options.left = options.left + (int)leftOverX;
415 options.top = options.top + (int) leftOverY;439 options.top = options.top + (int)leftOverY;
416 440
417 // All the media nodes for this region / layout combination441 // All the media nodes for this region / layout combination
418 options.mediaNodes = region.ChildNodes;442 options.mediaNodes = region.ChildNodes;
419443
@@ -421,7 +445,7 @@
421 temp.DurationElapsedEvent += new Region.DurationElapsedDelegate(temp_DurationElapsedEvent);445 temp.DurationElapsedEvent += new Region.DurationElapsedDelegate(temp_DurationElapsedEvent);
422446
423 Debug.WriteLine("Created new region", "MainForm - Prepare Layout");447 Debug.WriteLine("Created new region", "MainForm - Prepare Layout");
424 448
425 // Dont be fooled, this innocent little statement kicks everything off449 // Dont be fooled, this innocent little statement kicks everything off
426 temp.regionOptions = options;450 temp.regionOptions = options;
427451
@@ -456,6 +480,8 @@
456480
457 Bitmap bmpSplash = new Bitmap(bgSplash, _clientSize);481 Bitmap bmpSplash = new Bitmap(bgSplash, _clientSize);
458 this.BackgroundImage = bmpSplash;482 this.BackgroundImage = bmpSplash;
483
484 bgSplash.Dispose();
459 }485 }
460 catch (Exception ex)486 catch (Exception ex)
461 {487 {
462488
=== modified file 'client/dotNET/Properties/Resources.Designer.cs'
--- client/dotNET/Properties/Resources.Designer.cs 2009-12-31 11:38:50 +0000
+++ client/dotNET/Properties/Resources.Designer.cs 2011-02-28 15:09:00 +0000
@@ -1,7 +1,7 @@
1//------------------------------------------------------------------------------1//------------------------------------------------------------------------------
2// <auto-generated>2// <auto-generated>
3// This code was generated by a tool.3// This code was generated by a tool.
4// Runtime Version:2.0.50727.49274// Runtime Version:2.0.50727.4952
5//5//
6// Changes to this file may cause incorrect behavior and will be lost if6// Changes to this file may cause incorrect behavior and will be lost if
7// the code is regenerated.7// the code is regenerated.
88
=== modified file 'client/dotNET/Properties/Settings.Designer.cs'
--- client/dotNET/Properties/Settings.Designer.cs 2010-09-26 14:33:38 +0000
+++ client/dotNET/Properties/Settings.Designer.cs 2011-02-28 15:09:00 +0000
@@ -47,7 +47,7 @@
47 [global::System.Configuration.UserScopedSettingAttribute()]47 [global::System.Configuration.UserScopedSettingAttribute()]
48 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]48 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
49 [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]49 [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
50 [global::System.Configuration.DefaultSettingValueAttribute("http://localhost/xibo/xmds.php")]50 [global::System.Configuration.DefaultSettingValueAttribute("http://localhost/Series%201.2/server-121-soap-wsdl/server/xmds.php")]
51 public string XiboClient_xmds_xmds {51 public string XiboClient_xmds_xmds {
52 get {52 get {
53 return ((string)(this["XiboClient_xmds_xmds"]));53 return ((string)(this["XiboClient_xmds_xmds"]));
@@ -271,7 +271,7 @@
271 271
272 [global::System.Configuration.ApplicationScopedSettingAttribute()]272 [global::System.Configuration.ApplicationScopedSettingAttribute()]
273 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]273 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
274 [global::System.Configuration.DefaultSettingValueAttribute("1.2.0")]274 [global::System.Configuration.DefaultSettingValueAttribute("1.2.2")]
275 public string ClientVersion {275 public string ClientVersion {
276 get {276 get {
277 return ((string)(this["ClientVersion"]));277 return ((string)(this["ClientVersion"]));
@@ -370,5 +370,17 @@
370 this["emptyLayoutDuration"] = value;370 this["emptyLayoutDuration"] = value;
371 }371 }
372 }372 }
373
374 [global::System.Configuration.UserScopedSettingAttribute()]
375 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
376 [global::System.Configuration.DefaultSettingValueAttribute("requiredFiles.xml")]
377 public string RequiredFilesFile {
378 get {
379 return ((string)(this["RequiredFilesFile"]));
380 }
381 set {
382 this["RequiredFilesFile"] = value;
383 }
384 }
373 }385 }
374}386}
375387
=== modified file 'client/dotNET/Properties/Settings.settings'
--- client/dotNET/Properties/Settings.settings 2010-09-26 14:33:38 +0000
+++ client/dotNET/Properties/Settings.settings 2011-02-28 15:09:00 +0000
@@ -9,7 +9,7 @@
9 <Value Profile="(Default)">schedule.xml</Value>9 <Value Profile="(Default)">schedule.xml</Value>
10 </Setting>10 </Setting>
11 <Setting Name="XiboClient_xmds_xmds" Type="(Web Service URL)" Scope="User">11 <Setting Name="XiboClient_xmds_xmds" Type="(Web Service URL)" Scope="User">
12 <Value Profile="(Default)">http://localhost/xibo/xmds.php</Value>12 <Value Profile="(Default)">http://localhost/Series%201.2/server-121-soap-wsdl/server/xmds.php</Value>
13 </Setting>13 </Setting>
14 <Setting Name="ServerKey" Type="System.String" Scope="User">14 <Setting Name="ServerKey" Type="System.String" Scope="User">
15 <Value Profile="(Default)">yourserverkey</Value>15 <Value Profile="(Default)">yourserverkey</Value>
@@ -69,7 +69,7 @@
69 <Value Profile="(Default)">cacheManager.xml</Value>69 <Value Profile="(Default)">cacheManager.xml</Value>
70 </Setting>70 </Setting>
71 <Setting Name="ClientVersion" Type="System.String" Scope="Application">71 <Setting Name="ClientVersion" Type="System.String" Scope="Application">
72 <Value Profile="(Default)">1.2.0</Value>72 <Value Profile="(Default)">1.2.2</Value>
73 </Setting>73 </Setting>
74 <Setting Name="scrollStepAmount" Type="System.Decimal" Scope="User">74 <Setting Name="scrollStepAmount" Type="System.Decimal" Scope="User">
75 <Value Profile="(Default)">1</Value>75 <Value Profile="(Default)">1</Value>
@@ -95,5 +95,8 @@
95 <Setting Name="emptyLayoutDuration" Type="System.Decimal" Scope="User">95 <Setting Name="emptyLayoutDuration" Type="System.Decimal" Scope="User">
96 <Value Profile="(Default)">10</Value>96 <Value Profile="(Default)">10</Value>
97 </Setting>97 </Setting>
98 <Setting Name="RequiredFilesFile" Type="System.String" Scope="User">
99 <Value Profile="(Default)">requiredFiles.xml</Value>
100 </Setting>
98 </Settings>101 </Settings>
99</SettingsFile>102</SettingsFile>
100\ No newline at end of file103\ No newline at end of file
101104
=== modified file 'client/dotNET/Region.cs'
--- client/dotNET/Region.cs 2010-08-26 19:23:14 +0000
+++ client/dotNET/Region.cs 2011-02-28 15:09:00 +0000
@@ -309,6 +309,13 @@
309 System.Diagnostics.Trace.WriteLine("Duration is Empty, using a default of 60.", "Region - SetNextMediaNode");309 System.Diagnostics.Trace.WriteLine("Duration is Empty, using a default of 60.", "Region - SetNextMediaNode");
310 }310 }
311311
312 // We cannot have a 0 duration here... not sure why we would... but
313 if (options.duration == 0 && options.type != "video")
314 {
315 int emptyLayoutDuration = int.Parse(Properties.Settings.Default.emptyLayoutDuration.ToString());
316 options.duration = (emptyLayoutDuration == 0) ? 10 : emptyLayoutDuration;
317 }
318
312 // There will be some stuff on option nodes319 // There will be some stuff on option nodes
313 XmlNode optionNode = mediaNode.FirstChild; 320 XmlNode optionNode = mediaNode.FirstChild;
314321
@@ -378,7 +385,7 @@
378 if (options.type == "video" || options.type == "flash" || options.type == "image" || options.type == "powerpoint")385 if (options.type == "video" || options.type == "flash" || options.type == "image" || options.type == "powerpoint")
379 {386 {
380 // Use the cache manager to determine if the file is valid387 // Use the cache manager to determine if the file is valid
381 validNode = _cacheManager.IsValid(options.uri);388 validNode = _cacheManager.IsValidPath(options.uri);
382 }389 }
383 }390 }
384391
385392
=== added file 'client/dotNET/RequiredFiles.cs'
--- client/dotNET/RequiredFiles.cs 1970-01-01 00:00:00 +0000
+++ client/dotNET/RequiredFiles.cs 2011-02-28 15:09:00 +0000
@@ -0,0 +1,206 @@
1/*
2 * Xibo - Digitial Signage - http://www.xibo.org.uk
3 * Copyright (C) 2011 Daniel Garner
4 *
5 * This file is part of Xibo.
6 *
7 * Xibo is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * any later version.
11 *
12 * Xibo is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with Xibo. If not, see <http://www.gnu.org/licenses/>.
19 */
20using System;
21using System.Collections.Generic;
22using System.Collections.ObjectModel;
23using System.Text;
24using System.IO;
25using System.Security.Cryptography;
26using System.Xml;
27using System.Diagnostics;
28using System.Windows.Forms;
29using System.Xml.Serialization;
30
31namespace XiboClient
32{
33 public class RequiredFiles
34 {
35 private XmlDocument _requiredFilesXml;
36 public Collection<RequiredFile> _requiredFiles;
37 private xmds.xmds _report;
38
39 public RequiredFiles()
40 {
41 _requiredFiles = new Collection<RequiredFile>();
42
43 // Create a webservice call
44 _report = new XiboClient.xmds.xmds();
45
46 // Start up the Xmds Service Object
47 _report.Credentials = null;
48 _report.Url = Properties.Settings.Default.XiboClient_xmds_xmds;
49 _report.UseDefaultCredentials = false;
50 }
51
52 /// <summary>
53 /// Set required files from the XML document
54 /// </summary>
55 private void SetRequiredFiles()
56 {
57 // Itterate through the RF XML and populate the RF collection
58 XmlNodeList fileNodes = _requiredFilesXml.SelectNodes("/files/file");
59
60 foreach (XmlNode file in fileNodes)
61 {
62 RequiredFile rf = new RequiredFile();
63
64 XmlAttributeCollection attributes = file.Attributes;
65
66 rf.FileType = attributes["type"].Value;
67 rf.Complete = 0;
68 rf.Md5 = "";
69 rf.LastChecked = DateTime.Now;
70
71 if (rf.FileType == "media")
72 {
73 string[] filePart = attributes["path"].Value.Split('.');
74 rf.Id = int.Parse(filePart[0]);
75 rf.Path = attributes["path"].Value;
76 }
77 else if (rf.FileType == "layout")
78 {
79 rf.Id = int.Parse(attributes["path"].Value);
80 rf.Path = attributes["path"].Value + ".xlf";
81 }
82 else
83 {
84 continue;
85 }
86
87 _requiredFiles.Add(rf);
88 }
89 }
90
91 /// <summary>
92 /// Required Files XML
93 /// </summary>
94 public XmlDocument RequiredFilesXml
95 {
96 set
97 {
98 _requiredFilesXml = value;
99 SetRequiredFiles();
100 }
101 }
102
103 /// <summary>
104 /// Mark a RequiredFile as complete
105 /// </summary>
106 /// <param name="id"></param>
107 /// <param name="md5"></param>
108 public void MarkComplete(int id, string md5)
109 {
110 foreach (RequiredFile rf in _requiredFiles)
111 {
112 if (rf.Id == id)
113 {
114 RequiredFile newRf = rf;
115
116 newRf.Complete = 1;
117 newRf.Md5 = md5;
118
119
120 _requiredFiles.Add(newRf);
121 _requiredFiles.Remove(rf);
122
123 return;
124 }
125 }
126 }
127
128 /// <summary>
129 /// Mark a RequiredFile as incomplete
130 /// </summary>
131 /// <param name="id"></param>
132 /// <param name="md5"></param>
133 public void MarkIncomplete(int id, string md5)
134 {
135 foreach (RequiredFile rf in _requiredFiles)
136 {
137 if (rf.Id == id)
138 {
139 RequiredFile newRf = rf;
140
141 newRf.Complete = 0;
142 newRf.Md5 = md5;
143
144 _requiredFiles.Add(newRf);
145 _requiredFiles.Remove(rf);
146
147 return;
148 }
149 }
150 }
151
152 /// <summary>
153 /// Writes Required Files to disk
154 /// </summary>
155 public void WriteRequiredFiles()
156 {
157 Debug.WriteLine(new LogMessage("RequiredFiles - WriteRequiredFiles", "About to Write RequiredFiles"), LogType.Info.ToString());
158
159 try
160 {
161 using (StreamWriter streamWriter = new StreamWriter(Application.UserAppDataPath + "\\" + Properties.Settings.Default.RequiredFilesFile))
162 {
163 XmlSerializer xmlSerializer = new XmlSerializer(typeof(RequiredFiles));
164
165 xmlSerializer.Serialize(streamWriter, this);
166 }
167 }
168 catch (Exception ex)
169 {
170 System.Diagnostics.Trace.WriteLine(new LogMessage("RequiredFiles - WriteRequiredFiles", "Unable to write RequiredFiles to disk because: " + ex.Message));
171 }
172 }
173
174 /// <summary>
175 /// Report Required Files to XMDS
176 /// </summary>
177 public void ReportInventory()
178 {
179 HardwareKey hardwareKey = new HardwareKey();
180
181 // Build the XML required by media file
182 string xml = "";
183
184 foreach (RequiredFile rf in _requiredFiles)
185 {
186 xml += string.Format("<file type=\"{0}\" id=\"{1}\" complete=\"{2}\" lastChecked=\"{3}\" md5=\"{4}\" />",
187 rf.FileType, rf.Id.ToString(), rf.Complete.ToString(), rf.LastChecked.ToString(), rf.Md5);
188 }
189
190 xml = string.Format("<files>{0}</files>", xml);
191
192 _report.MediaInventoryAsync(Properties.Settings.Default.Version, Properties.Settings.Default.ServerKey,
193 hardwareKey.Key, xml);
194 }
195 }
196
197 public struct RequiredFile
198 {
199 public string FileType;
200 public int Id;
201 public int Complete;
202 public DateTime LastChecked;
203 public string Md5;
204 public string Path;
205 }
206}
0207
=== modified file 'client/dotNET/Resources/splash.jpg'
1Binary files client/dotNET/Resources/splash.jpg 2008-12-19 23:34:13 +0000 and client/dotNET/Resources/splash.jpg 2011-02-28 15:09:00 +0000 differ208Binary files client/dotNET/Resources/splash.jpg 2008-12-19 23:34:13 +0000 and client/dotNET/Resources/splash.jpg 2011-02-28 15:09:00 +0000 differ
=== modified file 'client/dotNET/RssReader.cs'
--- client/dotNET/RssReader.cs 2010-09-26 17:37:39 +0000
+++ client/dotNET/RssReader.cs 2011-02-28 15:09:00 +0000
@@ -120,7 +120,7 @@
120 item.DateString = date;120 item.DateString = date;
121121
122 // Fudge the date...122 // Fudge the date...
123 if (date.Contains("+"))123 if (date.Contains("+") || date.Contains("-"))
124 DateTime.TryParse(date, out item.Date);124 DateTime.TryParse(date, out item.Date);
125 else125 else
126 DateTime.TryParse(date.Substring(0, date.Length - 4), out item.Date);126 DateTime.TryParse(date.Substring(0, date.Length - 4), out item.Date);
127127
=== modified file 'client/dotNET/Schedule.cs'
--- client/dotNET/Schedule.cs 2010-08-22 16:49:09 +0000
+++ client/dotNET/Schedule.cs 2011-02-28 15:09:00 +0000
@@ -74,7 +74,7 @@
74 _cacheManager = cacheManager;74 _cacheManager = cacheManager;
7575
76 // Create a schedule manager76 // Create a schedule manager
77 _scheduleManager = new ScheduleManager(scheduleLocation);77 _scheduleManager = new ScheduleManager(_cacheManager, scheduleLocation);
7878
79 // Create a new Xmds service object79 // Create a new Xmds service object
80 _xmds2 = new XiboClient.xmds.xmds();80 _xmds2 = new XiboClient.xmds.xmds();
8181
=== modified file 'client/dotNET/ScheduleManager.cs'
--- client/dotNET/ScheduleManager.cs 2010-08-25 21:39:53 +0000
+++ client/dotNET/ScheduleManager.cs 2011-02-28 15:09:00 +0000
@@ -42,13 +42,15 @@
42 private Collection<LayoutSchedule> _layoutSchedule;42 private Collection<LayoutSchedule> _layoutSchedule;
43 private Collection<LayoutSchedule> _currentSchedule;43 private Collection<LayoutSchedule> _currentSchedule;
44 private bool _refreshSchedule;44 private bool _refreshSchedule;
45 private CacheManager _cacheManager;
4546
46 /// <summary>47 /// <summary>
47 /// Creates a new schedule Manager48 /// Creates a new schedule Manager
48 /// </summary>49 /// </summary>
49 /// <param name="scheduleLocation"></param>50 /// <param name="scheduleLocation"></param>
50 public ScheduleManager(string scheduleLocation)51 public ScheduleManager(CacheManager cacheManager, string scheduleLocation)
51 {52 {
53 _cacheManager = cacheManager;
52 _location = scheduleLocation;54 _location = scheduleLocation;
5355
54 // Create an empty layout schedule56 // Create an empty layout schedule
@@ -178,6 +180,19 @@
178 // For each layout in the schedule determine if it is currently inside the _currentSchedule, and whether it should be180 // For each layout in the schedule determine if it is currently inside the _currentSchedule, and whether it should be
179 foreach (LayoutSchedule layout in _layoutSchedule)181 foreach (LayoutSchedule layout in _layoutSchedule)
180 {182 {
183 // Is the layout valid in the cachemanager?
184 try
185 {
186 if (!_cacheManager.IsValidLayout(layout.id + ".xlf"))
187 continue;
188 }
189 catch
190 {
191 // TODO: Ignore this layout.. raise an error?
192 Trace.WriteLine("Unable to determine if layout is valid or not");
193 continue;
194 }
195
181 // If this is the default, skip it196 // If this is the default, skip it
182 if (layout.NodeName == "default")197 if (layout.NodeName == "default")
183 {198 {
184199
=== modified file 'client/dotNET/Web References/xmds/Reference.cs'
--- client/dotNET/Web References/xmds/Reference.cs 2009-12-31 11:38:50 +0000
+++ client/dotNET/Web References/xmds/Reference.cs 2011-02-28 15:09:00 +0000
@@ -1,7 +1,7 @@
1//------------------------------------------------------------------------------1//------------------------------------------------------------------------------
2// <auto-generated>2// <auto-generated>
3// This code was generated by a tool.3// This code was generated by a tool.
4// Runtime Version:2.0.50727.49274// Runtime Version:2.0.50727.4952
5//5//
6// Changes to this file may cause incorrect behavior and will be lost if6// Changes to this file may cause incorrect behavior and will be lost if
7// the code is regenerated.7// the code is regenerated.
@@ -9,7 +9,7 @@
9//------------------------------------------------------------------------------9//------------------------------------------------------------------------------
1010
11// 11//
12// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.4927.12// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.4952.
13// 13//
14#pragma warning disable 159114#pragma warning disable 1591
1515
@@ -23,7 +23,7 @@
23 23
24 24
25 /// <remarks/>25 /// <remarks/>
26 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]26 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
27 [System.Diagnostics.DebuggerStepThroughAttribute()]27 [System.Diagnostics.DebuggerStepThroughAttribute()]
28 [System.ComponentModel.DesignerCategoryAttribute("code")]28 [System.ComponentModel.DesignerCategoryAttribute("code")]
29 [System.Web.Services.WebServiceBindingAttribute(Name="xmdsBinding", Namespace="urn:xmds")]29 [System.Web.Services.WebServiceBindingAttribute(Name="xmdsBinding", Namespace="urn:xmds")]
@@ -45,6 +45,8 @@
45 45
46 private System.Threading.SendOrPostCallback SubmitStatsOperationCompleted;46 private System.Threading.SendOrPostCallback SubmitStatsOperationCompleted;
47 47
48 private System.Threading.SendOrPostCallback MediaInventoryOperationCompleted;
49
48 private bool useDefaultCredentialsSetExplicitly;50 private bool useDefaultCredentialsSetExplicitly;
49 51
50 /// <remarks/>52 /// <remarks/>
@@ -108,6 +110,9 @@
108 public event SubmitStatsCompletedEventHandler SubmitStatsCompleted;110 public event SubmitStatsCompletedEventHandler SubmitStatsCompleted;
109 111
110 /// <remarks/>112 /// <remarks/>
113 public event MediaInventoryCompletedEventHandler MediaInventoryCompleted;
114
115 /// <remarks/>
111 [System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:xmds#RegisterDisplay", RequestNamespace="urn:xmds", ResponseNamespace="urn:xmds")]116 [System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:xmds#RegisterDisplay", RequestNamespace="urn:xmds", ResponseNamespace="urn:xmds")]
112 [return: System.Xml.Serialization.SoapElementAttribute("ActivationMessage")]117 [return: System.Xml.Serialization.SoapElementAttribute("ActivationMessage")]
113 public string RegisterDisplay(string serverKey, string hardwareKey, string displayName, string version) {118 public string RegisterDisplay(string serverKey, string hardwareKey, string displayName, string version) {
@@ -402,6 +407,42 @@
402 }407 }
403 408
404 /// <remarks/>409 /// <remarks/>
410 [System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:xmds#MediaInventory", RequestNamespace="urn:xmds", ResponseNamespace="urn:xmds")]
411 [return: System.Xml.Serialization.SoapElementAttribute("success")]
412 public bool MediaInventory(string version, string serverKey, string hardwareKey, [System.Xml.Serialization.SoapElementAttribute("mediaInventory")] string mediaInventory1) {
413 object[] results = this.Invoke("MediaInventory", new object[] {
414 version,
415 serverKey,
416 hardwareKey,
417 mediaInventory1});
418 return ((bool)(results[0]));
419 }
420
421 /// <remarks/>
422 public void MediaInventoryAsync(string version, string serverKey, string hardwareKey, string mediaInventory1) {
423 this.MediaInventoryAsync(version, serverKey, hardwareKey, mediaInventory1, null);
424 }
425
426 /// <remarks/>
427 public void MediaInventoryAsync(string version, string serverKey, string hardwareKey, string mediaInventory1, object userState) {
428 if ((this.MediaInventoryOperationCompleted == null)) {
429 this.MediaInventoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnMediaInventoryOperationCompleted);
430 }
431 this.InvokeAsync("MediaInventory", new object[] {
432 version,
433 serverKey,
434 hardwareKey,
435 mediaInventory1}, this.MediaInventoryOperationCompleted, userState);
436 }
437
438 private void OnMediaInventoryOperationCompleted(object arg) {
439 if ((this.MediaInventoryCompleted != null)) {
440 System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
441 this.MediaInventoryCompleted(this, new MediaInventoryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
442 }
443 }
444
445 /// <remarks/>
405 public new void CancelAsync(object userState) {446 public new void CancelAsync(object userState) {
406 base.CancelAsync(userState);447 base.CancelAsync(userState);
407 }448 }
@@ -421,11 +462,11 @@
421 }462 }
422 463
423 /// <remarks/>464 /// <remarks/>
424 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]465 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
425 public delegate void RegisterDisplayCompletedEventHandler(object sender, RegisterDisplayCompletedEventArgs e);466 public delegate void RegisterDisplayCompletedEventHandler(object sender, RegisterDisplayCompletedEventArgs e);
426 467
427 /// <remarks/>468 /// <remarks/>
428 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]469 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
429 [System.Diagnostics.DebuggerStepThroughAttribute()]470 [System.Diagnostics.DebuggerStepThroughAttribute()]
430 [System.ComponentModel.DesignerCategoryAttribute("code")]471 [System.ComponentModel.DesignerCategoryAttribute("code")]
431 public partial class RegisterDisplayCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {472 public partial class RegisterDisplayCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@@ -447,11 +488,11 @@
447 }488 }
448 489
449 /// <remarks/>490 /// <remarks/>
450 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]491 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
451 public delegate void RequiredFilesCompletedEventHandler(object sender, RequiredFilesCompletedEventArgs e);492 public delegate void RequiredFilesCompletedEventHandler(object sender, RequiredFilesCompletedEventArgs e);
452 493
453 /// <remarks/>494 /// <remarks/>
454 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]495 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
455 [System.Diagnostics.DebuggerStepThroughAttribute()]496 [System.Diagnostics.DebuggerStepThroughAttribute()]
456 [System.ComponentModel.DesignerCategoryAttribute("code")]497 [System.ComponentModel.DesignerCategoryAttribute("code")]
457 public partial class RequiredFilesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {498 public partial class RequiredFilesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@@ -473,11 +514,11 @@
473 }514 }
474 515
475 /// <remarks/>516 /// <remarks/>
476 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]517 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
477 public delegate void GetFileCompletedEventHandler(object sender, GetFileCompletedEventArgs e);518 public delegate void GetFileCompletedEventHandler(object sender, GetFileCompletedEventArgs e);
478 519
479 /// <remarks/>520 /// <remarks/>
480 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]521 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
481 [System.Diagnostics.DebuggerStepThroughAttribute()]522 [System.Diagnostics.DebuggerStepThroughAttribute()]
482 [System.ComponentModel.DesignerCategoryAttribute("code")]523 [System.ComponentModel.DesignerCategoryAttribute("code")]
483 public partial class GetFileCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {524 public partial class GetFileCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@@ -499,11 +540,11 @@
499 }540 }
500 541
501 /// <remarks/>542 /// <remarks/>
502 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]543 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
503 public delegate void ScheduleCompletedEventHandler(object sender, ScheduleCompletedEventArgs e);544 public delegate void ScheduleCompletedEventHandler(object sender, ScheduleCompletedEventArgs e);
504 545
505 /// <remarks/>546 /// <remarks/>
506 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]547 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
507 [System.Diagnostics.DebuggerStepThroughAttribute()]548 [System.Diagnostics.DebuggerStepThroughAttribute()]
508 [System.ComponentModel.DesignerCategoryAttribute("code")]549 [System.ComponentModel.DesignerCategoryAttribute("code")]
509 public partial class ScheduleCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {550 public partial class ScheduleCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@@ -525,11 +566,11 @@
525 }566 }
526 567
527 /// <remarks/>568 /// <remarks/>
528 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]569 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
529 public delegate void RecieveXmlLogCompletedEventHandler(object sender, RecieveXmlLogCompletedEventArgs e);570 public delegate void RecieveXmlLogCompletedEventHandler(object sender, RecieveXmlLogCompletedEventArgs e);
530 571
531 /// <remarks/>572 /// <remarks/>
532 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]573 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
533 [System.Diagnostics.DebuggerStepThroughAttribute()]574 [System.Diagnostics.DebuggerStepThroughAttribute()]
534 [System.ComponentModel.DesignerCategoryAttribute("code")]575 [System.ComponentModel.DesignerCategoryAttribute("code")]
535 public partial class RecieveXmlLogCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {576 public partial class RecieveXmlLogCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@@ -551,11 +592,11 @@
551 }592 }
552 593
553 /// <remarks/>594 /// <remarks/>
554 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]595 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
555 public delegate void BlackListCompletedEventHandler(object sender, BlackListCompletedEventArgs e);596 public delegate void BlackListCompletedEventHandler(object sender, BlackListCompletedEventArgs e);
556 597
557 /// <remarks/>598 /// <remarks/>
558 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]599 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
559 [System.Diagnostics.DebuggerStepThroughAttribute()]600 [System.Diagnostics.DebuggerStepThroughAttribute()]
560 [System.ComponentModel.DesignerCategoryAttribute("code")]601 [System.ComponentModel.DesignerCategoryAttribute("code")]
561 public partial class BlackListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {602 public partial class BlackListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@@ -577,11 +618,11 @@
577 }618 }
578 619
579 /// <remarks/>620 /// <remarks/>
580 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]621 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
581 public delegate void SubmitLogCompletedEventHandler(object sender, SubmitLogCompletedEventArgs e);622 public delegate void SubmitLogCompletedEventHandler(object sender, SubmitLogCompletedEventArgs e);
582 623
583 /// <remarks/>624 /// <remarks/>
584 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]625 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
585 [System.Diagnostics.DebuggerStepThroughAttribute()]626 [System.Diagnostics.DebuggerStepThroughAttribute()]
586 [System.ComponentModel.DesignerCategoryAttribute("code")]627 [System.ComponentModel.DesignerCategoryAttribute("code")]
587 public partial class SubmitLogCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {628 public partial class SubmitLogCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@@ -603,11 +644,11 @@
603 }644 }
604 645
605 /// <remarks/>646 /// <remarks/>
606 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]647 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
607 public delegate void SubmitStatsCompletedEventHandler(object sender, SubmitStatsCompletedEventArgs e);648 public delegate void SubmitStatsCompletedEventHandler(object sender, SubmitStatsCompletedEventArgs e);
608 649
609 /// <remarks/>650 /// <remarks/>
610 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4918")]651 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
611 [System.Diagnostics.DebuggerStepThroughAttribute()]652 [System.Diagnostics.DebuggerStepThroughAttribute()]
612 [System.ComponentModel.DesignerCategoryAttribute("code")]653 [System.ComponentModel.DesignerCategoryAttribute("code")]
613 public partial class SubmitStatsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {654 public partial class SubmitStatsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@@ -627,6 +668,32 @@
627 }668 }
628 }669 }
629 }670 }
671
672 /// <remarks/>
673 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
674 public delegate void MediaInventoryCompletedEventHandler(object sender, MediaInventoryCompletedEventArgs e);
675
676 /// <remarks/>
677 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
678 [System.Diagnostics.DebuggerStepThroughAttribute()]
679 [System.ComponentModel.DesignerCategoryAttribute("code")]
680 public partial class MediaInventoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
681
682 private object[] results;
683
684 internal MediaInventoryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
685 base(exception, cancelled, userState) {
686 this.results = results;
687 }
688
689 /// <remarks/>
690 public bool Result {
691 get {
692 this.RaiseExceptionIfNecessary();
693 return ((bool)(this.results[0]));
694 }
695 }
696 }
630}697}
631698
632#pragma warning restore 1591699#pragma warning restore 1591
633\ No newline at end of file700\ No newline at end of file
634701
=== modified file 'client/dotNET/Web References/xmds/Reference.map'
--- client/dotNET/Web References/xmds/Reference.map 2009-12-31 11:38:50 +0000
+++ client/dotNET/Web References/xmds/Reference.map 2011-02-28 15:09:00 +0000
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">2<DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3 <Results>3 <Results>
4 <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost/1.0.0/server/xmds.php?wsdl" filename="xmds.wsdl" />4 <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://localhost/Series 1.2/server-121-soap-wsdl/server/xmds.php?wsdl" filename="xmds.wsdl" />
5 </Results>5 </Results>
6</DiscoveryClientResultsFile>6</DiscoveryClientResultsFile>
7\ No newline at end of file7\ No newline at end of file
88
=== modified file 'client/dotNET/Web References/xmds/xmds.wsdl'
--- client/dotNET/Web References/xmds/xmds.wsdl 2009-12-31 11:38:50 +0000
+++ client/dotNET/Web References/xmds/xmds.wsdl 2011-02-28 15:09:00 +0000
@@ -81,6 +81,15 @@
81 <wsdl:message name="SubmitStatsResponse">81 <wsdl:message name="SubmitStatsResponse">
82 <wsdl:part name="success" type="xsd:boolean" />82 <wsdl:part name="success" type="xsd:boolean" />
83 </wsdl:message>83 </wsdl:message>
84 <wsdl:message name="MediaInventoryRequest">
85 <wsdl:part name="version" type="xsd:string" />
86 <wsdl:part name="serverKey" type="xsd:string" />
87 <wsdl:part name="hardwareKey" type="xsd:string" />
88 <wsdl:part name="mediaInventory" type="xsd:string" />
89 </wsdl:message>
90 <wsdl:message name="MediaInventoryResponse">
91 <wsdl:part name="success" type="xsd:boolean" />
92 </wsdl:message>
84 <wsdl:portType name="xmdsPortType">93 <wsdl:portType name="xmdsPortType">
85 <wsdl:operation name="RegisterDisplay">94 <wsdl:operation name="RegisterDisplay">
86 <documentation>Registered the Display on the Xibo Network</documentation>95 <documentation>Registered the Display on the Xibo Network</documentation>
@@ -122,6 +131,11 @@
122 <wsdl:input message="tns:SubmitStatsRequest" />131 <wsdl:input message="tns:SubmitStatsRequest" />
123 <wsdl:output message="tns:SubmitStatsResponse" />132 <wsdl:output message="tns:SubmitStatsResponse" />
124 </wsdl:operation>133 </wsdl:operation>
134 <wsdl:operation name="MediaInventory">
135 <documentation>Report back the clients MediaInventory</documentation>
136 <wsdl:input message="tns:MediaInventoryRequest" />
137 <wsdl:output message="tns:MediaInventoryResponse" />
138 </wsdl:operation>
125 </wsdl:portType>139 </wsdl:portType>
126 <wsdl:binding name="xmdsBinding" type="tns:xmdsPortType">140 <wsdl:binding name="xmdsBinding" type="tns:xmdsPortType">
127 <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />141 <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
@@ -197,10 +211,19 @@
197 <soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />211 <soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
198 </wsdl:output>212 </wsdl:output>
199 </wsdl:operation>213 </wsdl:operation>
214 <wsdl:operation name="MediaInventory">
215 <soap:operation soapAction="urn:xmds#MediaInventory" style="rpc" />
216 <wsdl:input>
217 <soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
218 </wsdl:input>
219 <wsdl:output>
220 <soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
221 </wsdl:output>
222 </wsdl:operation>
200 </wsdl:binding>223 </wsdl:binding>
201 <wsdl:service name="xmds">224 <wsdl:service name="xmds">
202 <wsdl:port name="xmdsPort" binding="tns:xmdsBinding">225 <wsdl:port name="xmdsPort" binding="tns:xmdsBinding">
203 <soap:address location="http://localhost/1.0.0/server/xmds.php" />226 <soap:address location="http://localhost/Series%201.2/server-121-soap-wsdl/server/xmds.php" />
204 </wsdl:port>227 </wsdl:port>
205 </wsdl:service>228 </wsdl:service>
206</wsdl:definitions>229</wsdl:definitions>
207\ No newline at end of file230\ No newline at end of file
208231
=== modified file 'client/dotNET/XiboClient.csproj'
--- client/dotNET/XiboClient.csproj 2010-08-22 12:42:36 +0000
+++ client/dotNET/XiboClient.csproj 2011-02-28 15:09:00 +0000
@@ -161,6 +161,7 @@
161 <Compile Include="Region.cs">161 <Compile Include="Region.cs">
162 <SubType>Component</SubType>162 <SubType>Component</SubType>
163 </Compile>163 </Compile>
164 <Compile Include="RequiredFiles.cs" />
164 <Compile Include="Rss.cs">165 <Compile Include="Rss.cs">
165 <SubType>Form</SubType>166 <SubType>Form</SubType>
166 </Compile>167 </Compile>
@@ -267,10 +268,10 @@
267 <WebReferences Include="Web References\" />268 <WebReferences Include="Web References\" />
268 </ItemGroup>269 </ItemGroup>
269 <ItemGroup>270 <ItemGroup>
270 <WebReferenceUrl Include="http://localhost/1.0.0/server/xmds.php%3fwsdl">271 <WebReferenceUrl Include="http://localhost/Series%25201.2/server-121-soap-wsdl/server/xmds.php%3fwsdl">
271 <UrlBehavior>Dynamic</UrlBehavior>272 <UrlBehavior>Dynamic</UrlBehavior>
272 <RelPath>Web References\xmds\</RelPath>273 <RelPath>Web References\xmds\</RelPath>
273 <UpdateFromURL>http://localhost/1.0.0/server/xmds.php%3fwsdl</UpdateFromURL>274 <UpdateFromURL>http://localhost/Series%25201.2/server-121-soap-wsdl/server/xmds.php%3fwsdl</UpdateFromURL>
274 <ServiceLocationURL>275 <ServiceLocationURL>
275 </ServiceLocationURL>276 </ServiceLocationURL>
276 <CachedDynamicPropName>277 <CachedDynamicPropName>
@@ -294,11 +295,12 @@
294 </EmbeddedResource>295 </EmbeddedResource>
295 </ItemGroup>296 </ItemGroup>
296 <ItemGroup>297 <ItemGroup>
297 <EmbeddedResource Include="Resources\splash.jpg" />
298 </ItemGroup>
299 <ItemGroup>
300 <EmbeddedResource Include="Resources\HtmlTemplate.htm" />298 <EmbeddedResource Include="Resources\HtmlTemplate.htm" />
301 </ItemGroup>299 </ItemGroup>
300 <ItemGroup>
301 <EmbeddedResource Include="Resources\splash.jpg">
302 </EmbeddedResource>
303 </ItemGroup>
302 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />304 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
303 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 305 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
304 Other similar extension points exist, see Microsoft.Common.targets.306 Other similar extension points exist, see Microsoft.Common.targets.
305307
=== modified file 'client/dotNET/app.config'
--- client/dotNET/app.config 2010-09-26 14:33:38 +0000
+++ client/dotNET/app.config 2011-02-28 15:09:00 +0000
@@ -14,7 +14,7 @@
14 <value>DEFAULT</value>14 <value>DEFAULT</value>
15 </setting>15 </setting>
16 <setting name="XiboClient_xmds_xmds" serializeAs="String">16 <setting name="XiboClient_xmds_xmds" serializeAs="String">
17 <value>http://localhost/xibo/xmds.php</value>17 <value>http://localhost/Series%201.2/server-121-soap-wsdl/server/xmds.php</value>
18 </setting>18 </setting>
19 <setting name="ServerKey" serializeAs="String">19 <setting name="ServerKey" serializeAs="String">
20 <value>yourserverkey</value>20 <value>yourserverkey</value>
@@ -79,6 +79,9 @@
79 <setting name="emptyLayoutDuration" serializeAs="String">79 <setting name="emptyLayoutDuration" serializeAs="String">
80 <value>10</value>80 <value>10</value>
81 </setting>81 </setting>
82 <setting name="RequiredFilesFile" serializeAs="String">
83 <value>requiredFiles.xml</value>
84 </setting>
82 </XiboClient.Properties.Settings>85 </XiboClient.Properties.Settings>
83 </userSettings>86 </userSettings>
84 <applicationSettings>87 <applicationSettings>
@@ -102,7 +105,7 @@
102 <value>cacheManager.xml</value>105 <value>cacheManager.xml</value>
103 </setting>106 </setting>
104 <setting name="ClientVersion" serializeAs="String">107 <setting name="ClientVersion" serializeAs="String">
105 <value>1.2.0</value>108 <value>1.2.2</value>
106 </setting>109 </setting>
107 <setting name="xmdsResetTimeout" serializeAs="String">110 <setting name="xmdsResetTimeout" serializeAs="String">
108 <value>900</value>111 <value>900</value>
109112
=== modified file 'client/dotNET/bin/Release/AxInterop.ShockwaveFlashObjects.dll'
110Binary files client/dotNET/bin/Release/AxInterop.ShockwaveFlashObjects.dll 2010-04-19 21:45:10 +0000 and client/dotNET/bin/Release/AxInterop.ShockwaveFlashObjects.dll 2011-02-28 15:09:00 +0000 differ113Binary files client/dotNET/bin/Release/AxInterop.ShockwaveFlashObjects.dll 2010-04-19 21:45:10 +0000 and client/dotNET/bin/Release/AxInterop.ShockwaveFlashObjects.dll 2011-02-28 15:09:00 +0000 differ
=== modified file 'client/dotNET/bin/Release/AxInterop.WMPLib.dll'
111Binary files client/dotNET/bin/Release/AxInterop.WMPLib.dll 2010-04-19 21:45:10 +0000 and client/dotNET/bin/Release/AxInterop.WMPLib.dll 2011-02-28 15:09:00 +0000 differ114Binary files client/dotNET/bin/Release/AxInterop.WMPLib.dll 2010-04-19 21:45:10 +0000 and client/dotNET/bin/Release/AxInterop.WMPLib.dll 2011-02-28 15:09:00 +0000 differ
=== modified file 'client/dotNET/bin/Release/Interop.ShockwaveFlashObjects.dll'
112Binary files client/dotNET/bin/Release/Interop.ShockwaveFlashObjects.dll 2010-04-19 21:45:10 +0000 and client/dotNET/bin/Release/Interop.ShockwaveFlashObjects.dll 2011-02-28 15:09:00 +0000 differ115Binary files client/dotNET/bin/Release/Interop.ShockwaveFlashObjects.dll 2010-04-19 21:45:10 +0000 and client/dotNET/bin/Release/Interop.ShockwaveFlashObjects.dll 2011-02-28 15:09:00 +0000 differ
=== modified file 'client/dotNET/bin/Release/Interop.WMPLib.dll'
113Binary files client/dotNET/bin/Release/Interop.WMPLib.dll 2010-04-19 21:45:10 +0000 and client/dotNET/bin/Release/Interop.WMPLib.dll 2011-02-28 15:09:00 +0000 differ116Binary files client/dotNET/bin/Release/Interop.WMPLib.dll 2010-04-19 21:45:10 +0000 and client/dotNET/bin/Release/Interop.WMPLib.dll 2011-02-28 15:09:00 +0000 differ
=== modified file 'client/dotNET/bin/Release/XiboClient.exe.config'
--- client/dotNET/bin/Release/XiboClient.exe.config 2010-04-19 21:45:10 +0000
+++ client/dotNET/bin/Release/XiboClient.exe.config 2011-02-28 15:09:00 +0000
@@ -14,7 +14,7 @@
14 <value>DEFAULT</value>14 <value>DEFAULT</value>
15 </setting>15 </setting>
16 <setting name="XiboClient_xmds_xmds" serializeAs="String">16 <setting name="XiboClient_xmds_xmds" serializeAs="String">
17 <value>http://localhost/xibo/xmds.php</value>17 <value>http://localhost/Series%201.2/server-121-soap-wsdl/server/xmds.php</value>
18 </setting>18 </setting>
19 <setting name="ServerKey" serializeAs="String">19 <setting name="ServerKey" serializeAs="String">
20 <value>yourserverkey</value>20 <value>yourserverkey</value>
@@ -61,6 +61,27 @@
61 <setting name="scrollStepAmount" serializeAs="String">61 <setting name="scrollStepAmount" serializeAs="String">
62 <value>1</value>62 <value>1</value>
63 </setting>63 </setting>
64 <setting name="sizeX" serializeAs="String">
65 <value>0</value>
66 </setting>
67 <setting name="sizeY" serializeAs="String">
68 <value>0</value>
69 </setting>
70 <setting name="offsetX" serializeAs="String">
71 <value>0</value>
72 </setting>
73 <setting name="offsetY" serializeAs="String">
74 <value>0</value>
75 </setting>
76 <setting name="expireModifiedLayouts" serializeAs="String">
77 <value>True</value>
78 </setting>
79 <setting name="emptyLayoutDuration" serializeAs="String">
80 <value>10</value>
81 </setting>
82 <setting name="RequiredFilesFile" serializeAs="String">
83 <value>requiredFiles.xml</value>
84 </setting>
64 </XiboClient.Properties.Settings>85 </XiboClient.Properties.Settings>
65 </userSettings>86 </userSettings>
66 <applicationSettings>87 <applicationSettings>
@@ -75,7 +96,7 @@
75 <value>blacklist.xml</value>96 <value>blacklist.xml</value>
76 </setting>97 </setting>
77 <setting name="Version" serializeAs="String">98 <setting name="Version" serializeAs="String">
78 <value>1</value>99 <value>2</value>
79 </setting>100 </setting>
80 <setting name="StatsLogFile" serializeAs="String">101 <setting name="StatsLogFile" serializeAs="String">
81 <value>stats.xml</value>102 <value>stats.xml</value>
@@ -84,7 +105,7 @@
84 <value>cacheManager.xml</value>105 <value>cacheManager.xml</value>
85 </setting>106 </setting>
86 <setting name="ClientVersion" serializeAs="String">107 <setting name="ClientVersion" serializeAs="String">
87 <value>1.0.7</value>108 <value>1.2.2</value>
88 </setting>109 </setting>
89 <setting name="xmdsResetTimeout" serializeAs="String">110 <setting name="xmdsResetTimeout" serializeAs="String">
90 <value>900</value>111 <value>900</value>
91112
=== modified file 'client/dotNET/bin/Release/XiboClient.vshost.exe.config'
--- client/dotNET/bin/Release/XiboClient.vshost.exe.config 2010-04-19 21:45:10 +0000
+++ client/dotNET/bin/Release/XiboClient.vshost.exe.config 2011-02-28 15:09:00 +0000
@@ -14,7 +14,7 @@
14 <value>DEFAULT</value>14 <value>DEFAULT</value>
15 </setting>15 </setting>
16 <setting name="XiboClient_xmds_xmds" serializeAs="String">16 <setting name="XiboClient_xmds_xmds" serializeAs="String">
17 <value>http://localhost/xibo/xmds.php</value>17 <value>http://localhost/Series%201.2/server-121-soap-wsdl/server/xmds.php</value>
18 </setting>18 </setting>
19 <setting name="ServerKey" serializeAs="String">19 <setting name="ServerKey" serializeAs="String">
20 <value>yourserverkey</value>20 <value>yourserverkey</value>
@@ -61,6 +61,27 @@
61 <setting name="scrollStepAmount" serializeAs="String">61 <setting name="scrollStepAmount" serializeAs="String">
62 <value>1</value>62 <value>1</value>
63 </setting>63 </setting>
64 <setting name="sizeX" serializeAs="String">
65 <value>0</value>
66 </setting>
67 <setting name="sizeY" serializeAs="String">
68 <value>0</value>
69 </setting>
70 <setting name="offsetX" serializeAs="String">
71 <value>0</value>
72 </setting>
73 <setting name="offsetY" serializeAs="String">
74 <value>0</value>
75 </setting>
76 <setting name="expireModifiedLayouts" serializeAs="String">
77 <value>True</value>
78 </setting>
79 <setting name="emptyLayoutDuration" serializeAs="String">
80 <value>10</value>
81 </setting>
82 <setting name="RequiredFilesFile" serializeAs="String">
83 <value>requiredFiles.xml</value>
84 </setting>
64 </XiboClient.Properties.Settings>85 </XiboClient.Properties.Settings>
65 </userSettings>86 </userSettings>
66 <applicationSettings>87 <applicationSettings>
@@ -75,7 +96,7 @@
75 <value>blacklist.xml</value>96 <value>blacklist.xml</value>
76 </setting>97 </setting>
77 <setting name="Version" serializeAs="String">98 <setting name="Version" serializeAs="String">
78 <value>1</value>99 <value>2</value>
79 </setting>100 </setting>
80 <setting name="StatsLogFile" serializeAs="String">101 <setting name="StatsLogFile" serializeAs="String">
81 <value>stats.xml</value>102 <value>stats.xml</value>
@@ -84,7 +105,7 @@
84 <value>cacheManager.xml</value>105 <value>cacheManager.xml</value>
85 </setting>106 </setting>
86 <setting name="ClientVersion" serializeAs="String">107 <setting name="ClientVersion" serializeAs="String">
87 <value>1.0.7</value>108 <value>1.2.2</value>
88 </setting>109 </setting>
89 <setting name="xmdsResetTimeout" serializeAs="String">110 <setting name="xmdsResetTimeout" serializeAs="String">
90 <value>900</value>111 <value>900</value>
91112
=== modified file 'client/python/XiboClient.py'
--- client/python/XiboClient.py 2011-02-10 22:25:35 +0000
+++ client/python/XiboClient.py 2011-02-28 15:09:00 +0000
@@ -48,7 +48,11 @@
48import PIL.Image48import PIL.Image
49import math49import math
5050
51<<<<<<< TREE
51version = "1.3.0a1"52version = "1.3.0a1"
53=======
54version = "1.2.1a1"
55>>>>>>> MERGE-SOURCE
5256
53# What layout schema version is supported57# What layout schema version is supported
54schemaVersion = 158schemaVersion = 1
@@ -1015,11 +1019,18 @@
1015 if config.get('Main','manualUpdate') == 'true':1019 if config.get('Main','manualUpdate') == 'true':
1016 log.lights('offlineUpdate','start')1020 log.lights('offlineUpdate','start')
10171021
1022 if config.get('Main','manualUpdate') == 'true':
1023 log.lights('offlineUpdate','start')
1024
1018 # Check if the file is downloading already1025 # Check if the file is downloading already
1019 if not tmpFileName in self.runningDownloads:1026 if not tmpFileName in self.runningDownloads:
1020 # Make a download thread and actually download the file.1027 # Make a download thread and actually download the file.
1021 # Add the running thread to the self.runningDownloads dictionary1028 # Add the running thread to the self.runningDownloads dictionary
1029<<<<<<< TREE
1022 self.runningDownloads[tmpFileName] = XiboDownloadThread(self,tmpType,tmpFileName,tmpSize,tmpHash,tmpId)1030 self.runningDownloads[tmpFileName] = XiboDownloadThread(self,tmpType,tmpFileName,tmpSize,tmpHash,tmpId)
1031=======
1032 self.runningDownloads[tmpFileName] = XiboDownloadThread(self,tmpType,tmpFileName,tmpSize,tmpHash)
1033>>>>>>> MERGE-SOURCE
1023 log.updateRunningDownloads(len(self.runningDownloads))1034 log.updateRunningDownloads(len(self.runningDownloads))
10241035
1025 if self.offline:1036 if self.offline:
@@ -2544,7 +2555,11 @@
25442555
2545class XMDS:2556class XMDS:
2546 def __init__(self):2557 def __init__(self):
2558<<<<<<< TREE
2547 self.__schemaVersion__ = "3"2559 self.__schemaVersion__ = "3"
2560=======
2561 self.__schemaVersion__ = "2"
2562>>>>>>> MERGE-SOURCE
25482563
2549 # Semaphore to allow only one XMDS call to run check simultaneously2564 # Semaphore to allow only one XMDS call to run check simultaneously
2550 self.checkLock = Semaphore()2565 self.checkLock = Semaphore()
@@ -2959,6 +2974,7 @@
2959 log.log(0,"error",str(err))2974 log.log(0,"error",str(err))
2960 self.hasInitialised = False2975 self.hasInitialised = False
29612976
2977<<<<<<< TREE
2962 def MediaInventory(self,inventoryXml):2978 def MediaInventory(self,inventoryXml):
2963 response = None2979 response = None
2964 log.lights('Log','amber')2980 log.lights('Log','amber')
@@ -3186,6 +3202,186 @@
3186 log.lights('RD','green')3202 log.lights('RD','green')
31873203
3188#### Finish Webservice3204#### Finish Webservice
3205=======
3206class XMDSOffline(Thread):
3207 def __init__(self,displayManager):
3208 Thread.__init__(self)
3209 self.__schemaVersion__ = "2"
3210 self.displayManager = displayManager
3211 self.updatePath = ""
3212 self.__running__ = True
3213 self.__scanPath__ = '/media'
3214
3215 # Semaphore to allow only one XMDS call to run check simultaneously
3216 self.checkLock = Semaphore()
3217
3218 self.hasInitialised = False
3219
3220 salt = None
3221 try:
3222 salt = config.get('Main','xmdsClientID')
3223 except:
3224 log.log(0,"error",_("No XMDS Client ID specified in your configuration"))
3225 log.log(0,"error",_("Please check your xmdsClientID configuration option"))
3226 exit(1)
3227
3228 self.uuid = uuid.uuid5(uuid.NAMESPACE_DNS, salt)
3229 # Convert the UUID in to a SHA1 hash
3230 self.uuid = hashlib.sha1(str(self.uuid)).hexdigest()
3231
3232 licenseKey = ''
3233 try:
3234 licenseKey = config.get('Main','xmdsLicenseKey')
3235 except:
3236 pass
3237
3238 if licenseKey != '':
3239 self.uuid = licenseKey
3240
3241 self.name = None
3242 try:
3243 self.name = config.get('Main','xmdsClientName')
3244 except:
3245 pass
3246
3247 if self.name == None or self.name == "":
3248 import platform
3249 self.name = platform.node()
3250
3251 self.start()
3252
3253 def run(self):
3254 # Sleep for 10 seconds to allow the client time to start and settle.
3255 time.sleep(10)
3256
3257 # Startup a loop listening scanning for new mounts
3258 log.log(5,'info','Offline Update: Scanning.',True)
3259 while self.__running__:
3260 for folder in os.listdir(self.__scanPath__):
3261 log.log(5,'info','Offline Update: Checking %s for new content.' % os.path.join(self.__scanPath__,folder),True)
3262 log.log(5,'info','Offline Update: Client License Key: %s' % self.uuid,True)
3263 if os.path.isdir(os.path.join(self.__scanPath__,folder,self.uuid)):
3264 log.log(5,'info','Offline Update: Starting update from %s.' % os.path.join(self.__scanPath__,folder,self.uuid),True)
3265 self.updatePath = os.path.join(self.__scanPath__,folder)
3266 self.displayManager.scheduler.collect()
3267 time.sleep(5)
3268 self.displayManager.downloader.collect()
3269 log.log(5,'info','Offline Update: Sleeping 30 seconds.',True)
3270 time.sleep(30)
3271
3272 def getIP(self):
3273 return 'Offline Mode'
3274
3275 def getDisk(self):
3276 s = os.statvfs(config.get('Main','libraryDir'))
3277 return (s.f_bsize * s.f_blocks,s.f_bsize * s.f_bavail)
3278
3279 def getUUID(self):
3280 return str(self.uuid)
3281
3282 def getName(self):
3283 return str(self.name)
3284
3285 def getKey(self):
3286 return 'Offline'
3287
3288 def check(self):
3289 return True
3290
3291 def RequiredFiles(self):
3292 """Connect to XMDS and get a list of required files"""
3293 log.lights('RF','amber')
3294 req = None
3295 if self.check():
3296 try:
3297 # Update the IP Address shown on the infoScreen
3298 log.updateIP(self.getIP())
3299 except:
3300 pass
3301
3302 log.updateFreeSpace(self.getDisk())
3303
3304 try:
3305 fh = open(os.path.join(self.updatePath,self.uuid,'rf.xml'), 'r')
3306 req = fh.read()
3307 fh.close()
3308 except IOError:
3309 log.lights('RF','red')
3310 raise XMDSException("XMDS could not be initialised")
3311
3312 else:
3313 log.log(0,"error","XMDS could not be initialised")
3314 log.lights('RF','grey')
3315 raise XMDSException("XMDS could not be initialised")
3316
3317 log.lights('RF','green')
3318 return req
3319
3320 def SubmitLog(self,logXml):
3321 pass
3322
3323 def SubmitStats(self,statXml):
3324 pass
3325
3326 def Schedule(self):
3327 """Connect to XMDS and get the current schedule"""
3328 log.lights('S','amber')
3329 req = None
3330 if self.check():
3331 try:
3332 fh = open(os.path.join(self.updatePath,self.uuid,'schedule.xml'), 'r')
3333 req = fh.read()
3334 fh.close()
3335 except IOError:
3336 log.lights('S','red')
3337 raise XMDSException("XMDS could not be initialised")
3338 else:
3339 log.log(0,"error","XMDS could not be initialised")
3340 log.lights('S','grey')
3341 raise XMDSException("XMDS could not be initialised")
3342
3343 log.lights('S','green')
3344 return req
3345
3346 def GetFile(self,tmpPath,tmpType,tmpOffset,tmpChunk):
3347 """Connect to XMDS and download a file"""
3348 response = None
3349 log.lights('GF','amber')
3350 if self.check():
3351 if tmpType == 'media':
3352 try:
3353 fh = open(os.path.join(self.updatePath,self.uuid,tmpPath), 'r')
3354 fh.seek(tmpOffset)
3355 response = fh.read(tmpChunk)
3356 fh.close()
3357 except:
3358 log.lights('GF','red')
3359 raise XMDSException("XMDS could not be initialised")
3360 if tmpType == 'layout':
3361 try:
3362 fh = open(os.path.join(self.updatePath,self.uuid,tmpPath), 'r')
3363 response = fh.read()
3364 fh.close()
3365 except:
3366 log.lights('GF','red')
3367 raise XMDSException("XMDS could not be initialised")
3368 if tmpType == 'blacklist':
3369 response = ""
3370 else:
3371 log.log(0,"error","XMDS could not be initialised")
3372 log.lights('GF','grey')
3373 raise XMDSException("XMDS could not be initialised")
3374
3375 log.lights('GF','green')
3376 return response
3377
3378 def RegisterDisplay(self):
3379 log.lights('RD','amber')
3380 time.sleep(5)
3381 log.lights('RD','green')
3382
3383#### Finish Webservice
3384>>>>>>> MERGE-SOURCE
31893385
3190class XiboDisplayManager:3386class XiboDisplayManager:
3191 def __init__(self):3387 def __init__(self):
31923388
=== added file 'client/python/client.conf'
--- client/python/client.conf 1970-01-01 00:00:00 +0000
+++ client/python/client.conf 2011-02-28 15:09:00 +0000
@@ -0,0 +1,25 @@
1[Main]
2;clientConfLoc=/home/matt/xibo
3;clientConfName=site.cfg
4
5;logWriter defines where the log file is written to
6;xiboLogScreen - Console
7;xiboLogFile - Log file stored in the same folder as the executable
8
9logWriter=xiboLogFile
10
11;logLevel defines the level of information written to the logger
12;INFO - information, warning and error messages
13;WARNING - warning and error messages
14;ERROR - error messages
15
16logLevel=INFO
17
18logFileName=error.log
19
20[Options]
21logType=XiboLogXmds,XiboLogFile,XiboLogScreen
22logTypeHuman=Xibo Server,Local File,Console
23scheduler=XmdsScheduler
24downloader=XiboDownloadManager
25colourDepth=8,16,24
026
=== renamed file 'client/python/client.conf' => 'client/python/client.conf.moved'
=== added file 'client/python/configure.py'
--- client/python/configure.py 1970-01-01 00:00:00 +0000
+++ client/python/configure.py 2011-02-28 15:09:00 +0000
@@ -0,0 +1,1753 @@
1#!/usr/bin/python
2
3# -*- coding: utf-8 -*-
4
5#
6# Xibo - Digitial Signage - http://www.xibo.org.uk
7# Copyright (C) 2011 Matt Holder
8#
9# This file is part of Xibo.
10#
11# Xibo is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Affero General Public License as published by
13# the Free Software Foundation, either version 3 of the License, or
14# any later version.
15#
16# Xibo is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU Affero General Public License for more details.
20#
21# You should have received a copy of the GNU Affero General Public License
22# along with Xibo. If not, see <http://www.gnu.org/licenses/>.
23#
24
25gettextAvailable = None
26
27try:
28 import gettext
29 gettextAvailable = True
30except:
31 print "Could not import gettext"
32 print "Creating dummy function for _()"
33 def _(string):
34 return string
35try:
36 import sys
37except:
38 print "Could not import sys module"
39 sys.exit()
40
41try:
42 import uuid
43except:
44 print "Could not import uuid module"
45 sys.exit()
46
47try:
48 import ConfigParser
49except:
50 print "Could not import ConfigParser module"
51 sys.exit()
52
53try:
54 import os
55except:
56 print "Could not import os module"
57 sys.exit()
58
59try:
60 import logging
61except:
62 print "Could not import logging module"
63 sys.exit()
64
65try:
66 import pygtk
67 pygtk.require("2.0")
68except:
69 print "Could not import pygtk"
70 sys.exit()
71
72try:
73 import gtk
74except:
75 print "Could not import gtk"
76 sys.exit(1)
77
78try:
79 import gtk.glade
80except:
81 print "Could not import gtk.glade"
82 sys.exit(1)
83
84try:
85 import gobject
86except:
87 print "Could not import gobject"
88 sys.exit()
89
90#Only run this if gettext is available
91if gettextAvailable:
92 gettext.install('ivcm', './locale', unicode=False)
93
94
95class xiboConfWindow:
96 """This is the PyWine application"""
97
98
99 def __init__(self,clientConfFile,lift = False):
100
101 #This is the location of the config. file for the client
102 #itself. This comes from when the instance of the class
103 #is created.
104 self.clientConfFile = clientConfFile
105
106 #Firstly, read in the values relating to log from the config. client config. file
107 config = None
108 try:
109 config = ConfigParser.ConfigParser()
110 config.read(self.clientConfFile)
111 except:
112 print "Could not open %s"%self.clientConfFile
113
114 #Xibo client configuration file name
115 logFileName="error.log"
116 try:
117 logFileName = config.get('Main','logFileName')
118 except:
119 pass
120
121 logWriter="xiboLogScreen"
122 try:
123 logWriter = config.get('Main','logWriter')
124 except:
125 pass
126
127
128 logLevel="INFO"
129 try:
130 logLevel = config.get('Main','logLevel')
131 except:
132 pass
133 a=logging
134
135 loggingLevel = None
136 if logLevel == "INFO":
137 loggingLevel = a.INFO
138 elif logLevel == "WARNING":
139 loggingLevel = a.WARNING
140 elif logLevel == "ERROR":
141 loggingLevel = a.ERROR
142
143 if logWriter == "xiboLogScreen":
144 a.basicConfig(level=loggingLevel)
145 elif logWriter == "xiboLogFile":
146
147 a.basicConfig(level=loggingLevel,filename=logFileName,filemode="w")
148
149# #Set up the logger
150# logging.basicConfig(level=logging.INFO,filename="error.log",filemode="w")
151# #format='%(asctime)s %(levelname)s %(lineno)d %(message)s'
152
153
154 self.logger = a.getLogger("PyClientConfig")
155 self.logger1 = a.getLogger("PyClientConfig.GUI")
156 self.logger2 = a.getLogger('PyClientConfig.readConfig')
157 self.logger3 = a.getLogger("PyClientConfig.saveConfigSignal")
158 self.logger4 = a.getLogger("PyClientConfig.genClientID")
159 self.logger5 = a.getLogger("PyClientConfig.getConfValues")
160 self.logger6 = a.getLogger("PyClientConfig.advancedOptionsCheck")
161 self.logger7 = a.getLogger("PyClientConfig.readConfigAppConf")
162 self.logger8 = a.getLogger("PyClientConfig.offlineOperationToggle")
163 self.logger9 = a.getLogger("PyClientConfig.clearFormSignal")
164 self.logger10 = a.getLogger("PyClientConfig.onDestroy")
165 self.logger11 = a.getLogger("PyClientConfig.saveSignal")
166 self.logger12 = a.getLogger("PyclientConfig.LoadDefaultValues")
167
168 self.logger1.info('Config. client config. file: %s'%self.clientConfFile)
169
170 self.logger1.info("logWriter: %s"%logWriter)
171 self.logger1.info("logLevel: %s"%logLevel)
172 self.logger.info("logFileName: %s"%logFileName)
173
174 #Name of the default log file for the python client
175 self.pyClientLogName = "run.log"
176
177
178 #Read out the values from the client configuration file
179 configValues = self.readConfigAppConf()
180
181 #Take the options for log type from the file, and set the
182 #class instance variable. The combo box is then populated from this.
183 self.logWriterTypes = configValues["logTypeOptions"]
184
185 self.logger1.info("logWriter: %s"%self.logWriterTypes)
186
187 #Take the options for the human readable log type options
188 self.logWriterHumanTypes = configValues["logTypeHumanOptions"]
189
190 self.logger1.info("logWriteHumanOptions: %s"%self.logWriterHumanTypes)
191
192 #Take the location of the configuration file and set the class
193 #instance variable. This path is then used when the config.
194 #file is written
195
196 self.pyClientConfName = configValues["xiboClientConf"]
197
198
199 self.logger1.info("Xibo client config. file: %s"%self.pyClientConfName)
200
201 self.pyClientConfDefaultsName = "defaults.cfg"
202
203 #Grab the directory location and check this directory exists.
204
205 self.pyclientConfPath = configValues["clientConfLoc"]
206
207 self.logger1.info("Xibo client config. file path: %s"%self.pyclientConfPath)
208
209 self.logger1.info("Config file combined path: %s"%os.path.join(self.pyclientConfPath,self.pyClientConfName))
210
211 #Take the options for scheduler type and add them to a class
212 #instance variable
213
214 self.schedulerOptions = configValues["schedulerOptions"]
215
216 #Add a blank entry to the combo box, so that a blank option
217 #can mean that the value is not written to the config. file
218 self.schedulerOptions.insert(0,"")
219
220 #Downloader options
221 self.downloaderOptions = configValues["downloaderOptions"]
222 self.downloaderOptions.insert(0,"")
223
224 #Colour Depth options
225 self.colourDepthOptions = configValues["colourDepthOptions"]
226 self.colourDepthOptions.insert(0,"")
227
228 #Lift enable options
229 self.liftEnableOptions = ["True","False"]
230
231 #Manual update options
232 self.manualUpdateOptions = ["True","False"]
233
234 #Set the Glade file
235 self.builder = gtk.Builder()
236 self.builder.add_from_file("gui.glade")
237 self.builder.connect_signals(self)
238
239 #Create instances of the text fields, window etc
240 self.window = self.builder.get_object("mainWindow")
241 self.clearButton = self.builder.get_object("clearFields")
242 self.saveButton = self.builder.get_object("saveConfig")
243
244 self.serverURLText = self.builder.get_object("serverURLText")
245 self.clientIDText = self.builder.get_object("clientIDText")
246 self.serverKeyText = self.builder.get_object("serverKeyText")
247 self.refreshText = self.builder.get_object("refreshText")
248 self.serverConnBool = self.builder.get_object("serverConnection")
249 self.fullScreenBool = self.builder.get_object("fullScreen")
250 self.screenWidthText = self.builder.get_object("screenWidthText")
251 self.screenHeightText = self.builder.get_object("screenHeightText")
252 self.captureStatisticsBool = self.builder.get_object("captureStatistics")
253 self.queueSizeText = self.builder.get_object("queueSizeText")
254 self.logLevelSpin = self.builder.get_object("logLevelSpin")
255 self.logTypeCombo = self.builder.get_object("logTypeCombo")
256 self.clientNameText = self.builder.get_object("clientNameText")
257
258 self.offlineCheckButton = self.builder.get_object("offlineCheckButton")
259
260 #Advanced options widgets
261
262 self.liftDefaultTagText = self.builder.get_object('liftDefaultTagText')
263 self.lift7TagText = self.builder.get_object('lift7TagText')
264 self.lift6TagText = self.builder.get_object('lift6TagText')
265 self.lift5TagText = self.builder.get_object('lift5TagText')
266 self.lift4TagText = self.builder.get_object('lift4TagText')
267 self.lift3TagText = self.builder.get_object('lift3TagText')
268 self.lift2TagText = self.builder.get_object('lift2TagText')
269 self.lift1TagText = self.builder.get_object('lift1TagText')
270 self.lift0TagText = self.builder.get_object('lift0TagText')
271 self.firstSerialText = self.builder.get_object('firstSerialText')
272 self.secondSerialText = self.builder.get_object('secondSerialText')
273 self.liftTriggerValue = self.builder.get_object('liftTriggerValue')
274 self.liftEnableCombo = self.builder.get_object('liftEnableCombo')
275 self.dateFormatEntry = self.builder.get_object('dateFormatEntry')
276 self.libraryEntry = self.builder.get_object('libraryEntry')
277 self.socketTimeSpin = self.builder.get_object('socketTimeSpin')
278 self.checksumCheckButton = self.builder.get_object('checksumCheckButton')
279 self.lowTextureCheckButton = self.builder.get_object('lowTextureCheckButton')
280 self.framesSpin = self.builder.get_object('framesSpin')
281 self.vwidthSpin = self.builder.get_object('vwidthSpin')
282 self.vheightSpin = self.builder.get_object('vheightSpin')
283 self.vrotateSpin = self.builder.get_object('vrotateSpin')
284 self.schedulerCombo = self.builder.get_object("schedulerCombo")
285 self.downloaderCombo = self.builder.get_object("downloaderCombo")
286 self.colourDepthCombo = self.builder.get_object("colourDepthCombo")
287 self.notebook1 = self.builder.get_object("notebook1")
288
289 self.errorDialog = self.builder.get_object("errorDialog")
290 self.messageDialog = self.builder.get_object("infoDialog")
291
292 self.statsCaptureLabel = self.builder.get_object("statsCaptureLabel")
293 self.statsQueueSizeLabel = self.builder.get_object("statsQueueSizeLabel")
294
295 #Grab the log file link button and make it invisible by default
296 self.logFileLinkButton = self.builder.get_object("logFileLinkButton")
297 self.logFileLinkButton.hide()
298
299 self.statsFrame = self.builder.get_object("frame2")
300
301 #We want to be able to hide the lift options if the command line flag
302 #has not been passed. We can do this by grabbing the 5th (4th when
303 #counting from zero) page, and using the hide method.
304
305 self.liftTabVisible = lift
306 print self.liftTabVisible
307
308 if lift == False:
309 liftPage = self.notebook1.get_nth_page(4)
310 liftPage.hide()
311 self.logger1.info("Lift options hidden")
312
313 #Hide the statistics options unless the lift
314 #tab is being shown
315 self.captureStatisticsBool.hide()
316 self.queueSizeText.hide()
317 self.statsCaptureLabel.hide()
318 self.statsQueueSizeLabel.hide()
319 self.statsFrame.hide()
320
321 else:
322 self.logger1.info("Lift options available")
323
324 #Set a class instance variable for whether the advanced tab is shown or not
325 self.advancedTabVisible = False
326
327 #Now hide the tab
328 advancedPage = self.notebook1.get_nth_page(3)
329 advancedPage.hide()
330
331 #Fill in the comboboxes
332
333 #log type combobox
334
335 liststore = gtk.ListStore(gobject.TYPE_STRING)
336 print "ABC: ",self.logWriterHumanTypes
337 for elem in self.logWriterHumanTypes:
338 liststore.append([elem])
339
340 self.logTypeCombo.set_model(liststore)
341 self.logTypeCombo.set_active(0)
342
343 cell = gtk.CellRendererText()
344 self.logTypeCombo.pack_start(cell, True)
345 self.logTypeCombo.add_attribute(cell, "text", 0)
346
347 #scheduler combobox
348
349 schedulerListStore = gtk.ListStore(gobject.TYPE_STRING)
350
351 for elem in self.schedulerOptions:
352 schedulerListStore.append([elem])
353
354 self.schedulerCombo.set_model(schedulerListStore)
355 self.schedulerCombo.set_active(0)
356
357 self.schedulerCombo.pack_start(cell, True)
358 self.schedulerCombo.add_attribute(cell, "text", 0)
359
360
361 #downloader combobox
362
363 downloaderListStore = gtk.ListStore(gobject.TYPE_STRING)
364
365 for elem in self.downloaderOptions:
366 downloaderListStore.append([elem])
367
368 self.downloaderCombo.set_model(downloaderListStore)
369 self.downloaderCombo.set_active(0)
370
371 self.downloaderCombo.pack_start(cell, True)
372 self.downloaderCombo.add_attribute(cell, "text", 0)
373
374 #colour depth combobox
375
376 colourDepthListStore = gtk.ListStore(gobject.TYPE_STRING)
377
378 for elem in self.colourDepthOptions:
379 colourDepthListStore.append([elem])
380
381 self.colourDepthCombo.set_model(colourDepthListStore)
382 self.colourDepthCombo.set_active(0)
383
384 self.colourDepthCombo.pack_start(cell, True)
385 self.colourDepthCombo.add_attribute(cell, "text", 0)
386
387
388
389 #lift enable combobox
390
391 liftEnableListStore = gtk.ListStore(gobject.TYPE_STRING)
392
393 liftEnableOptions = ["True","False"]
394
395 for elem in liftEnableOptions:
396 liftEnableListStore.append([elem])
397
398 self.liftEnableCombo.set_model(liftEnableListStore)
399 self.liftEnableCombo.set_active(0)
400
401 self.liftEnableCombo.pack_start(cell, True)
402 self.liftEnableCombo.add_attribute(cell, "text", 0)
403
404
405 #Set the range of values we accept for the spin controls
406
407 width_adj = gtk.Adjustment(1024, 1.0, 10000, 1.0, 5.0, 0.0)
408 height_adj = gtk.Adjustment(1024, 1.0, 10000, 1.0, 5.0, 0.0)
409 queue_adj = gtk.Adjustment(10, 1.0, 10000, 1.0, 5.0, 0.0)
410 refresh_adj = gtk.Adjustment(100, 1.0, 10000, 1.0, 5.0, 0.0)
411 logLevel_adj = gtk.Adjustment(0, 0, 10, 1.0, 2.0, 0.0)
412
413 socketTime_adj = gtk.Adjustment(0, 0, 100, 1.0, 2.0, 0.0)
414 frames_adj = gtk.Adjustment(0, 0, 100, 1.0, 2.0, 0.0)
415 vwidth_adj = gtk.Adjustment(0, 0, 10000, 1.0, 2.0, 0.0)
416 vheight_adj = gtk.Adjustment(0, 0, 10000, 1.0, 2.0, 0.0)
417 vrotate_adj = gtk.Adjustment(0, -359, 359, 1.0, 2.0, 0.0)
418 liftTrigger_adj = gtk.Adjustment(0, 0, 100, 1.0, 2.0, 0.0)
419
420 self.screenWidthText.configure(width_adj, 0, 0)
421 self.screenWidthText.set_wrap(True)
422
423 self.screenHeightText.configure(height_adj, 0, 0)
424 self.screenHeightText.set_wrap(True)
425
426 self.queueSizeText.configure(queue_adj, 0, 0)
427 self.queueSizeText.set_wrap(True)
428
429 self.refreshText.configure(refresh_adj, 0, 0)
430 self.refreshText.set_wrap(True)
431
432 self.logLevelSpin.configure(logLevel_adj, 0, 0)
433 self.logLevelSpin.set_wrap(True)
434
435 self.socketTimeSpin.configure(socketTime_adj,0,0)
436 self.socketTimeSpin.set_wrap(True)
437
438 self.framesSpin.configure(frames_adj,0,0)
439 self.framesSpin.set_wrap(True)
440
441 self.vwidthSpin.configure(vwidth_adj,0,0)
442 self.vwidthSpin.set_wrap(True)
443
444 self.vheightSpin.configure(vheight_adj,0,0)
445 self.vheightSpin.set_wrap(True)
446
447 self.vrotateSpin.configure(vrotate_adj,0,0)
448 self.vrotateSpin.set_wrap(True)
449
450 self.liftTriggerValue.configure(liftTrigger_adj,0,0)
451 self.liftTriggerValue.set_wrap(True)
452
453 #We want the labels to be translatable,
454 #Using the Glade stuff grab the labels
455 self.serverURLLabel = self.builder.get_object("serverURLLabel")
456 self.clientIDLabel = self.builder.get_object("clientIDLabel")
457 self.serverKeyLabel = self.builder.get_object("serverKeyLabel")
458 self.refreshLabel = self.builder.get_object("refreshLabel")
459 self.connectionLabel = self.builder.get_object("connectionLabel")
460 self.fullscreenLabel = self.builder.get_object("fullscreenLabel")
461 self.widthLabel = self.builder.get_object("widthLabel")
462 self.heightLabel = self.builder.get_object("heightLabel")
463 self.logLevelLabel = self.builder.get_object("logLevelLabel")
464 self.logTypeLabel = self.builder.get_object("logTypeLabel")
465 self.loggingFrameLabel = self.builder.get_object("loggingFrameLabel")
466 self.statsFrameLabel = self.builder.get_object("statsFrameLabel")
467 self.clientNameLabel = self.builder.get_object("clientNameLabel")
468
469 #Labels for advanced options and tabs
470 self.liftDefaultLabel = self.builder.get_object('liftDefaultLabel')
471 self.lift7Label = self.builder.get_object('lift7Label')
472 self.lift6Label = self.builder.get_object('lift6Label')
473 self.lift5Label = self.builder.get_object('lift5Label')
474 self.lift4Label = self.builder.get_object('lift4Label')
475 self.lift3Label = self.builder.get_object('lift3Label')
476 self.lift2Label = self.builder.get_object('lift2Label')
477 self.lift1Label = self.builder.get_object('lift1Label')
478 self.lift0Label = self.builder.get_object('lift0Label')
479 self.tagLiftLabel = self.builder.get_object('tagLiftLabel')
480 self.genLiftOptions = self.builder.get_object('genLiftOptions')
481 self.firstSerialLabel = self.builder.get_object('firstSerialLabel')
482 self.secondSerialLabel = self.builder.get_object('secondSerialLabel')
483 self.liftTriggerLabel = self.builder.get_object('liftTriggerLabel')
484 self.liftEnableLabel = self.builder.get_object('liftEnableLabel')
485 self.liftOptionsLabel = self.builder.get_object('liftOptionsLabel')
486 self.advancedOptionsLabel = self.builder.get_object('advancedOptionsLabel')
487 self.otherSettingsLabel = self.builder.get_object('otherSettingsLabel')
488 self.clientSettingsLabel = self.builder.get_object('clientSettingsLabel')
489 self.serverSettingsLabel = self.builder.get_object('serverSettingsLabel')
490 self.dateFormatLabel = self.builder.get_object('dateFormatLabel')
491 self.schedulerLabel = self.builder.get_object('schedulerLabel')
492 self.downloaderLabel = self.builder.get_object('downloaderLabel')
493 self.libraryLabel = self.builder.get_object('libraryLabel')
494 self.bppLabel = self.builder.get_object('bppLabel')
495 self.socketTimeLabel = self.builder.get_object('socketTimeLabel')
496 self.checksumLabel = self.builder.get_object('checksumLabel')
497 self.lowTextureLabel = self.builder.get_object('lowTextureLabel')
498 self.framesLabel = self.builder.get_object('framesLabel')
499 self.vwidthLabel = self.builder.get_object('vwidthLabel')
500 self.vheightLabel = self.builder.get_object('vheightLabel')
501 self.vrotationLabel = self.builder.get_object('vrotationLabel')
502 self.advancedOptionsCheck = self.builder.get_object("advancedOptionsCheck")
503
504# self.manualUpdateLabel = self.builder.get_object("manualUpdateLabel")
505# self.manualUpdateCombo = self.builder.get_object("manualUpdateCombo")
506 self.xmdsLicenseKeyLabel = self.builder.get_object("xmdsLicenseKeyLabel")
507 self.xmdsLicenseKeyEntry = self.builder.get_object("xmdsLicenseKeyEntry")
508
509 self.onlineOpLabel = self.builder.get_object("onlineOpLabel")
510 self.offlineOpLabel = self.builder.get_object("offlineOpLabel")
511
512
513 #Now set the text in the labels. This is useful so that we can
514 #then use this as a basis for translations on launchpad
515
516# self.manualUpdateLabel.set_text(_("Manual Update"))
517 self.xmdsLicenseKeyLabel.set_text(_("xmdsLicenseKey"))
518
519 self.serverURLLabel.set_text(_("Server URL"))
520 self.clientIDLabel.set_text(_("Client ID"))
521 self.serverKeyLabel.set_text(_("Server Key"))
522 self.refreshLabel.set_text(_("Set the number of seconds between the client contacting the server for updates"))
523 self.connectionLabel.set_text(_("Require connection to server"))
524 self.fullscreenLabel.set_text(_("Fullscreen"))
525 self.widthLabel.set_text(_("Width"))
526 self.heightLabel.set_text(_("Height"))
527 self.logLevelLabel.set_text(_("Log Level"))
528 self.logTypeLabel.set_text(_("Log Type"))
529 self.statsCaptureLabel.set_text(_("Statistics Capturing"))
530 self.statsQueueSizeLabel.set_text(_("Queue Size"))
531 self.loggingFrameLabel.set_text(_("Logging"))
532 self.statsFrameLabel.set_text(_("Statistics Generation"))
533
534 self.clientNameLabel.set_text(_("Client Name"))
535
536 self.liftDefaultLabel.set_label(_('Default'))
537 self.lift7Label.set_label(_('Lift 7'))
538 self.lift6Label.set_label(_('Lift 6'))
539 self.lift5Label.set_label(_('Lift 5'))
540 self.lift4Label.set_label(_('Lift 4'))
541 self.lift3Label.set_label(_('Lift 3'))
542 self.lift2Label.set_label(_('Lift 2'))
543 self.lift1Label.set_label(_('Lift 1'))
544 self.lift0Label.set_label(_('Lift 0'))
545 self.tagLiftLabel.set_label(_('Tagging Lift Options'))
546 self.genLiftOptions.set_label(_('General Lift Options'))
547 self.firstSerialLabel.set_label(_('1st Serial Port'))
548 self.secondSerialLabel.set_label(_('2nd Serial Port'))
549 self.liftTriggerLabel.set_label(_('Lift Trigger'))
550 self.liftEnableLabel.set_label(_('Lift Enable'))
551 self.liftOptionsLabel.set_label(_('Lift Options'))
552 self.advancedOptionsLabel.set_label(_('Advanced Options'))
553 self.otherSettingsLabel.set_label(_('Other Settings'))
554 self.clientSettingsLabel.set_label(_('Client Settings'))
555 self.serverSettingsLabel.set_label(_('Server Settings'))
556 self.dateFormatLabel.set_label(_('Date Format'))
557 self.schedulerLabel.set_label(_('Scheduler'))
558 self.downloaderLabel.set_label(_('Downloader'))
559 self.libraryLabel.set_label(_('Library Location'))
560 self.bppLabel.set_label(_('Colour Depth (BPP)'))
561 self.socketTimeLabel.set_label(_('Socket Timeout (s)'))
562 self.checksumLabel.set_label(_('Checksum Downloaded Media'))
563 self.lowTextureLabel.set_label(_('Low Texture Memory'))
564 self.framesLabel.set_label(_('Frames per Second'))
565 self.vwidthLabel.set_label(_('Virtual Width'))
566 self.vheightLabel.set_label(_('Virtual Height'))
567 self.vrotationLabel.set_label(_('Rotation'))
568
569 self.onlineOpLabel.set_label(_("Online operation (syncronise with Xibo server)"))
570# self.offlineOpLabel.set_label(_("Offline operation (synchronise with USB memory stick)"))
571
572 #Set the icon for the Window
573 self.window.set_icon_from_file("xibo.ico")
574
575
576 #Now set the labels of the buttons and window
577
578 self.clearButton.set_label(_("Clear Form"))
579 self.saveButton.set_label(_("Save Config"))
580 self.window.set_title(_("Xibo Client Configuration"))
581
582
583 #Set up the combo box
584
585# manualUpdateListStore = gtk.ListStore(gobject.TYPE_STRING)
586
587# for elem in self.manualUpdateOptions:
588# manualUpdateListStore.append([elem])
589
590# self.manualUpdateCombo.set_model(manualUpdateListStore)
591# self.manualUpdateCombo.set_active(1)
592
593# self.manualUpdateCombo.pack_start(cell, True)
594# self.manualUpdateCombo.add_attribute(cell, "text", 0)
595
596 logFilePath = os.path.join(os.path.abspath(''),self.pyClientLogName)
597
598 self.logFileLinkButton.set_uri("file:%s%s%s"%(os.sep,os.sep,logFilePath))
599
600# print "File path: ", logFilePath
601
602 #Set the tick box to online operation
603 self.offlineCheckButton.set_active(True)
604 self.offlineCheckButton.set_active(False)
605
606 #Set tooltips
607 self.set_tooltips()
608
609 self.window.show()
610
611 #Check that the directory exists where the configuration file
612 #is stored.
613
614 if os.path.exists(self.pyclientConfPath):
615 if os.path.isfile(self.pyclientConfPath):
616
617 self.logger1.error("Python client path chosen is a file")
618
619 print "Location is a file."
620 self.errorDialog.set_markup(_("File path is a file. Cannot write to it"))
621 self.errorDialog.show()
622 print "Exiting gracefully"
623# sys.exit()
624 elif os.path.isdir(self.pyclientConfPath):
625 self.logger1.info("Python client path chosen is available")
626 print "Location exists."
627 print "Carrying on..."
628
629 self.pyClientConfName = os.path.join(self.pyclientConfPath,self.pyClientConfName)
630 else:
631 print "Configuration directory does not exist"
632 self.logger1.warning("Python client path chosen does not exist")
633 try:
634 os.makedirs(self.pyclientConfPath)
635 print "Directory created"
636 self.logger1.info("Python client path chosen has been created")
637 self.pyClientConfName = os.path.join(self.pyclientConfPath,self.pyClientConfName)
638 except OSError:
639 self.logger1.error("Python client path chosen could not be created")
640 self.errorDialog.set_markup(_("File path could not be created"))
641 self.errorDialog.show()
642
643
644 #Check that a file can be written to this directory
645 try:
646 file_written = open(os.path.join(self.pyclientConfPath,"tmp"),"w")
647 file_written.close()
648 except:
649 self.logger1.error("Could not write to testing file")
650
651 is_file = os.path.isfile(os.path.join(self.pyclientConfPath,"tmp"))
652
653 self.logger1.info("Testing file has been created in the chosen location")
654
655 #Check that the file can be written to
656
657 try:
658 file_edit = open(os.path.join(self.pyclientConfPath,"tmp"),"w")
659 file_edit.write("tmp")
660 file_edit.close()
661 print "boo"
662 except:
663 self.logger1.info("Testing file could not be written to")
664
665 is_data = False
666 data = None
667
668 try:
669 data = open(os.path.join(self.pyclientConfPath,"tmp"),"r").read()
670 except:
671 self.logger1.error("Cannot open testing file to read data")
672 if data == "tmp":
673 is_data = True
674 self.logger1.info("Testing file could be written to")
675 else:
676 self.logger1.info("Testing file could not be written to")
677
678 #Check that the file can be deleted
679 is_deleted = False
680 try:
681 os.remove(os.path.join(self.pyclientConfPath,"tmp"))
682 except:
683 self.logger1.error("Cannot delete testing file")
684
685 if os.path.isfile(os.path.join(self.pyclientConfPath,"tmp")) == False:
686 is_deleted = True
687 self.logger1.info("Testing file has been deleted successfully")
688
689 if is_deleted and is_data and is_file:
690 print "Location is acceptable for file writing"
691 self.logger1.info("Location is acceptable for file writing")
692 self.messageDialog.set_markup(_("File location is acceptable"))
693 self.messageDialog.show()
694
695 else:
696 print "Cannot write to file"
697 self.logger1.error("Location selected is not acceptable for file writing")
698 print "Exiting gracefully"
699 self.errorDialog.show()
700 self.errorDialog.set_markup(_("Cannot write to file"))
701# sys.exit()
702
703
704
705 print self.pyClientConfName
706
707
708 if is_deleted and is_data and is_file:
709
710 #Read the configuration information from the configuration file
711 self.readConfig()
712
713 #Check to see if the client ID field is blank.
714 #If so, then generate one
715
716 if self.clientIDText.get_text() == "":
717 uuid = self.genClientID()
718 self.clientIDText.set_text(str(uuid))
719
720 def messageDialogExit(self,widget):
721 sys.exit()
722
723 def infoDialogOKSignal(self,widget):
724 self.messageDialog.hide()
725
726 def offlineOperationToggle(self,widget):
727
728 offlineOperation = widget.get_active()
729
730 self.logger8.info(_("Offline operation checkbox toggled"))
731
732 if offlineOperation:
733 print "Offline operation selected"
734# self.manualUpdateCombo.set_sensitive(True)
735 # self.xmdsLicenseKeyEntry.set_sensitive(True)
736
737 self.logger8.info(_("Offline operation selected"))
738
739 self.serverURLText.set_sensitive(False)
740 self.clientIDText.set_sensitive(False)
741 self.serverKeyText.set_sensitive(False)
742 self.clientNameText.set_sensitive(False)
743
744 else:
745 print "Online operation selected"
746 self.logger8.info(_("Online operation selected"))
747# self.manualUpdateCombo.set_sensitive(False)
748 # self.xmdsLicenseKeyEntry.set_sensitive(False)
749
750 self.serverURLText.set_sensitive(True)
751 self.clientIDText.set_sensitive(True)
752 self.serverKeyText.set_sensitive(True)
753 self.clientNameText.set_sensitive(True)
754
755 def on_advancedOptionsCheck(self,widget):
756 """Function called when advanced options checkbox is toggled.
757 Used to hide / display the advanced notebook tab"""
758
759 advancedPage = self.notebook1.get_nth_page(3)
760
761 if self.advancedOptionsCheck.get_active() and self.advancedTabVisible == False:
762 advancedPage.show()
763 self.advancedTabVisible = True
764 self.logger6.info(_("advancedTabEnabled"))
765
766 elif self.advancedOptionsCheck.get_active() == False and self.advancedTabVisible:
767 advancedPage.hide()
768 self.advancedTabVisible = False
769 self.logger6.info(_("advancedTabDisabled"))
770
771 def readConfigAppConf(self):
772 """This reads the configuration file that is used by the configuration application"""
773 self.logger7.info(_("Configuration application configuration file being read in"))
774 config_file = ""
775 try:
776 config_file = open(self.clientConfFile,"r")
777
778 #Implement all the stuff to read the config file in
779 data = config_file.read()
780 config_file.close()
781 self.logger7.info(_("Reading configuration file to make sure file is not empty"))
782 #If the file is not empty, then try and process it
783
784 if len(data) != 0:
785 config = ConfigParser.ConfigParser()
786 config.read(self.clientConfFile)
787
788 self.logger7.info(_("Reading configuration file"))
789
790 #Get the information from the configuration file
791 #and display into the GUI
792
793 #Xibo client configuration file location
794 xiboClientConf = None
795
796 try:
797 xiboClientConf = config.get('Main','clientConfName')
798 except:
799 xiboClientConf = "site.cfg"
800
801 self.logger7.info(_("Client configuration: %s"%xiboClientConf))
802
803 #Options pertaining to log type
804 logTypeOptions = config.get("Options","logType").split(",")
805 for i in range(len(logTypeOptions)):
806 logTypeOptions[i] = _(logTypeOptions[i])
807
808 print logTypeOptions
809
810 #Options pertaining to log type (human readable form)
811 logTypeHumanOptions = config.get("Options","logTypeHuman").split(",")
812
813 for i in range(len(logTypeHumanOptions)):
814 logTypeHumanOptions[i] = _(logTypeHumanOptions[i])
815
816 self.logger7.info(_("logTypeOptions: %s"%logTypeOptions))
817
818 self.logger7.info(_("logTypeHumanOptions: %s"%logTypeHumanOptions))
819
820 #Options pertaining to scheduler
821 schedulerOptions = config.get("Options","scheduler").split(",")
822 for i in range(len(schedulerOptions)):
823 schedulerOptions[i] = _(schedulerOptions[i])
824
825 print schedulerOptions
826
827 self.logger7.info(_("schedulerOptions: %s"%schedulerOptions))
828
829
830 #Options pertaining to downloader
831 downloaderOptions = config.get("Options","downloader").split(",")
832 for i in range(len(downloaderOptions)):
833 downloaderOptions[i] = _(downloaderOptions[i])
834
835 print downloaderOptions
836
837 self.logger7.info(_("downloaderOptions: %s"%downloaderOptions))
838
839 #Options pertaining to colour depth (BPP)
840 colourDepthOptions = config.get("Options","colourDepth").split(",")
841 for i in range(len(colourDepthOptions)):
842 colourDepthOptions[i] = _(colourDepthOptions[i])
843
844 print colourDepthOptions
845
846 self.logger7.info(_("colourDepthOptions: %s"%colourDepthOptions))
847
848 clientConfLoc = None
849
850 try:
851 clientConfLoc = config.get("Main","clientConfLoc")
852 except:
853 clientConfLoc = os.path.expanduser('~/.xibo')
854
855 clientConfName = None
856 try:
857 clientConfName = config.get("Main","clientConfName")
858 except:
859 clientConfName = "site.cfg"
860
861
862 self.logger7.info(_("clientConfLocation: %s"%clientConfLoc))
863 self.logger7.info(_("clientConfName: %s"%clientConfName))
864
865
866 return {"xiboClientConf":xiboClientConf,"logTypeOptions":logTypeOptions,"logTypeHumanOptions":logTypeHumanOptions,"clientConfLoc":clientConfLoc,"clientConfName":clientConfName,"schedulerOptions":schedulerOptions,"downloaderOptions":downloaderOptions,"colourDepthOptions":colourDepthOptions}
867
868 else:
869 self.logger7.error("Configuration file is empty. Cannot continue")
870 self.errorDialog.set_markup(_("The configuration application configuration file is empty. Cannot continue"))
871 self.errorDialog.show()
872
873 except:
874 print "Could not open the configuration application configuration file"
875
876 self.logger7.error(_("Could not open configuration file. Cannot continue"))
877
878 self.errorDialog.set_markup(_("File path is a file. Cannot write to itCould not open the configuration application configuration file"))
879 self.errorDialog.show()
880 return -1
881
882 def clearFormSignal(self,widget,data=None):
883
884 self.serverURLText.set_text("")
885 self.clientIDText.set_text("")
886 self.serverKeyText.set_text("")
887 self.refreshText.set_text("")
888 self.serverConnBool.set_active(False)
889 self.fullScreenBool.set_active(False)
890 self.screenWidthText.set_text("")
891 self.screenHeightText.set_text("")
892 self.captureStatisticsBool.set_active(False)
893 self.queueSizeText.set_text("")
894
895 self.screenWidthText.set_value(0)
896 self.screenHeightText.set_value(0)
897 self.queueSizeText.set_value(0)
898
899
900 self.clearButton.set_tooltip_text(_("Clear input fields"))
901 self.saveButton.set_tooltip_text(_("Save data to file"))
902
903 self.logLevelSpin.set_value(0)
904
905 self.logTypeCombo.set_active(0)
906 self.liftEnableCombo.set_active(0)
907 self.schedulerCombo.set_active(0)
908 self.downloaderCombo.set_active(0)
909 self.colourDepthCombo.set_active(0)
910 self.manualUpdateCombo.set_active(0)
911
912
913 self.checksumCheckButton.set_active(False)
914 self.lowTextureCheckButton.set_active(False)
915
916 self.clientNameText.set_text("")
917
918 #Advanced options widgets
919
920 self.liftDefaultTagText.set_text("")
921 self.lift7TagText.set_text("")
922 self.lift6TagText.set_text("")
923 self.lift5TagText.set_text("")
924 self.lift4TagText.set_text("")
925 self.lift3TagText.set_text("")
926 self.lift2TagText.set_text("")
927 self.lift1TagText.set_text("")
928 self.lift0TagText.set_text("")
929 self.firstSerialText.set_text("")
930 self.secondSerialText.set_text("")
931 self.liftTriggerValue.set_value(0)
932
933 self.dateFormatEntry.set_text("")
934 self.libraryEntry.set_text("")
935 self.socketTimeSpin.set_value(0)
936
937 self.framesSpin.set_value(0)
938 self.vwidthSpin.set_value(0)
939 self.vheightSpin.set_value(0)
940 self.vrotateSpin.set_value(0)
941
942 self.xmdsLicenseKeyEntry.set_text("")
943
944 self.logger9.info("Clearing form elements")
945
946 def logTypeComboChanged(self,widget,data=None):
947
948 model = widget.get_model()
949 index = widget.get_active()
950 logTypeText = model[index][0].lower()
951
952 if logTypeText == "local file":
953 #Check to see if the file pointed to by the link exists
954 error_file = self.logFileLinkButton.get_uri().split(":%s%s"%(os.sep,os.sep))[1]
955 if os.path.isfile(error_file):
956 self.logFileLinkButton.show()
957 else:
958 self.logFileLinkButton.hide()
959
960 val = widget.get_active()
961
962
963 def onDestroy(self,widget,data=None):
964 """
965 Close the program. Executes when the main
966 window is destroyed
967 """
968 self.logger10.info("Exiting program")
969 gtk.main_quit()
970
971
972 def confValErr(self,err,logger):
973 #print "Error finding config. value in file: %s"%err
974 #self.logger2.warning("%s item not in config. file"%err)
975 logger.warning("%s item not in config. file"%err)
976
977 def readConfig(self):
978 """Function used to read in the configuration file and
979 fill in the GUI text elements"""
980
981 #Firstly check if the configuration file exists. If it does then
982 #open it and extract the values. These can then be filled into the
983 #fields on the GUI
984
985 #Try opening the configuration file, if it does not exists, then
986 #create it
987
988 config_file = ""
989 try:
990 config_file = open(self.pyClientConfName,"r")
991
992 self.logger2.info("Config. file opened successfully")
993
994 #Implement all the stuff to read the config file in
995 data = config_file.read()
996 config_file.close()
997 #If the file is not empty, then try and process it
998
999 if len(data) != 0:
1000 self.logger2.info("Config. data read in successfully")
1001
1002
1003 self.readDataFromConfigFile(self.pyClientConfName,self.logger2)
1004
1005
1006 except IOError:
1007 print "Cannot open"
1008 self.logger2.warning("Cannot open configuration file")
1009 #Read in the values from the site.cfg.default
1010
1011 self.readDataFromConfigFile(self.pyClientConfDefaultsName,self.logger12,defaults=True)
1012 self.messageDialog.set_markup(_("Could not open configuration file. A new one will be created"))
1013 self.messageDialog.show()
1014
1015
1016
1017
1018 def readDataFromConfigFile(self,confFileName,logger,defaults=False):
1019
1020
1021 config = ConfigParser.ConfigParser()
1022 config.read(confFileName)
1023
1024 #Get the information from the configuration file
1025 #and display into the GUI
1026
1027 try:
1028 self.serverURLText.set_text(config.get('Main','xmdsUrl'))
1029 logger.info("serverURL: %s"%config.get('Main','xmdsUrl'))
1030 except:
1031 self.confValErr('xmdsUrl',logger)
1032
1033 if defaults == False:
1034 try:
1035 self.clientIDText.set_text(config.get("Main","xmdsClientID"))
1036 logger.info("clientID: %s"%config.get('Main','xmdsClientID'))
1037 except:
1038 self.confValErr("xmdsClientID",logger)
1039 logger.warning("xmdClientID item not in config. file")
1040
1041 try:
1042 self.serverKeyText.set_text(config.get('Main','xmdsKey'))
1043 logger.info("xmdsKey: %s"%config.get('Main','xmdsKey'))
1044 except:
1045 self.confValErr('xmdsKey',logger)
1046
1047 try:
1048 self.refreshText.set_text(config.get('Main','xmdsUpdateInterval'))
1049 logger.info("xmdsUpdateInterval: %s"%config.get('Main','xmdsUpdateInterval'))
1050 except:
1051 self.confValErr('xmdsUpdateInterval',logger)
1052
1053 try:
1054 self.clientNameText.set_text(config.get('Main','xmdsClientName'))
1055 logger.info("xmdsClientName: %s"%config.get('Main','xmdsClientName'))
1056 except:
1057 self.confValErr('xmdsClientName',logger)
1058
1059
1060 try:
1061 requireXmds = False
1062 if config.get('Main','requireXmds') == "true":
1063 requireXmds = True
1064
1065 self.serverConnBool.set_active(requireXmds)
1066 logger.info("requireXMDS: %s"%requireXmds)
1067
1068 except:
1069 self.confValErr("requireXmds",logger)
1070
1071 try:
1072 fullScreen = False
1073 if config.get('Main','fullscreen') == "true":
1074 fullScreen = True
1075 self.fullScreenBool.set_active(fullScreen)
1076 logger.info("fullscreen: %s"%fullscreen)
1077
1078
1079 except:
1080 self.confValErr("fullscreen",logger)
1081
1082 try:
1083 captureStats = False
1084 if config.get('Stats','collect') == "true":
1085 captureStats = True
1086 logger.info("captureStats: %s"%captureStats)
1087
1088 self.captureStatisticsBool.set_active(captureStats)
1089 except:
1090 self.confValErr("Stats - Collect",logger)
1091
1092
1093 try:
1094 self.screenWidthText.set_value(int(config.get('Main','width')))
1095 logger.info("screenWidth: %s"%config.get('Main','width'))
1096
1097 except:
1098 self.confValErr("width",logger)
1099
1100 try:
1101 self.screenHeightText.set_value(int(config.get('Main','height')))
1102 logger.info("screenHeight: %s"%config.get('Main','height'))
1103
1104 except:
1105 self.confValErr("height",logger)
1106
1107 try:
1108 self.queueSizeText.set_value(int(config.get('Stats','queueSize')))
1109 logger.info("queueSize: %s"%config.get('Stats','queueSize'))
1110
1111 except:
1112 self.confValErr("queueSize",logger)
1113
1114 try:
1115 self.logLevelSpin.set_value(int(config.get('Logging','logLevel')))
1116 logger.info("Logging level: %s"%config.get('Logging','logLevel'))
1117
1118 except:
1119 self.confValErr("logLevel",logger)
1120
1121 try:
1122 logType = config.get('Logging','logWriter')
1123
1124 val = 0
1125
1126 for elem in self.logWriterTypes:
1127 if elem.lower() == logType.lower():
1128 print elem.lower(), logType.lower()
1129 break
1130 val += 1
1131 print "*"*len(str(self.logWriterTypes))
1132 print logType
1133 print self.logWriterTypes
1134 print " "*(len(str(self.logWriterTypes))/2),val
1135 print self.logWriterHumanTypes
1136 print "*"*len(str(self.logWriterTypes))
1137
1138 logger.info("logWriter: %s"%self.logWriterTypes[val])
1139 logger.info("logWriterHuman: %s"%self.logWriterHumanTypes[val])
1140 self.logTypeCombo.set_active(val)
1141 except:
1142 self.confValErr("logWriter",logger)
1143
1144
1145 #Advanced options
1146
1147 try:
1148 self.dateFormatEntry.set_text(config.get("TickerMedia","dateFormat"))
1149 logger.info("tickerMedia: %s"%config.get('TickerMedia','dateFormat'))
1150
1151 except:
1152 self.confValErr("dateFormat",logger)
1153
1154 try:
1155 self.libraryEntry.set_text(config.get("Main","libraryDir"))
1156 logger.info("libraryDir: %s"%config.get('Main','libraryDir'))
1157
1158 except:
1159 self.confValErr("libraryDir",logger)
1160
1161 try:
1162 self.socketTimeSpin.set_value(int(config.get("Main","socketTimeout")))
1163 logger.info("socketTimeout: %s"%config.get('Main','socketTimeout'))
1164
1165 except:
1166 self.confValErr("socketTimeout",logger)
1167
1168 try:
1169 self.framesSpin.set_value(int(config.get("Main","fps")))
1170 logger.info("FPS: %s"%config.get('Main','fps'))
1171
1172 except:
1173 self.confValErr("fps",logger)
1174
1175 try:
1176 self.vwidthSpin.set_value(int(config.get("Main","vwidth")))
1177 logger.info("VirtualWidth: %s"%config.get('Main','vwidth'))
1178
1179 except:
1180 self.confValErr("vwidth",logger)
1181
1182 try:
1183 self.vheightSpin.set_value(int(config.get("Main","vheight")))
1184 logger.info("VirtualHeight: %s"%config.get('Main','vheight'))
1185
1186 except:
1187 self.confValErr("vheight",logger)
1188
1189 try:
1190 self.vrotateSpin.set_value(int(config.get("Main","vrotation")))
1191 logger.info("VirtualRotation: %s"%config.get('Main','vrotation'))
1192
1193 except:
1194 self.confValErr("vrotation",logger)
1195
1196
1197 try:
1198 self.xmdsLicenseKeyEntry.set_text(config.get("Main","xmdsLicenseKey"))
1199 logger.info("xmdsLicenseKey: %s"%config.get('Main','xmdsLicenseKey'))
1200
1201 except:
1202 self.confValErr('xmdsLicenseKey',logger)
1203
1204
1205 #Sort out the combo boxes
1206
1207 try:
1208 schedType = config.get("Main","Scheduler")
1209
1210 val = 0
1211 for elem in self.schedulerOptions:
1212 if elem.lower() == schedType.lower():
1213 break
1214 val += 1
1215 logger.info("scheduler: %s"%self.schedulerOptions[val])
1216
1217 self.schedulerCombo.set_active(val)
1218 except:
1219 self.confValErr("scheduler",logger)
1220
1221 try:
1222 dloadType = config.get("Main","Downloader")
1223
1224 val = 0
1225 for elem in self.downloaderOptions:
1226 if elem.lower() == dloadType.lower():
1227 break
1228 val += 1
1229 logger.info("downloader: %s"%self.downloaderOptions[val])
1230
1231 self.downloaderCombo.set_active(val)
1232 except:
1233 self.confValErr("downloader",logger)
1234
1235 try:
1236 bppType = config.get("Main","bpp")
1237
1238 val = 0
1239
1240 for elem in self.colourDepthOptions:
1241 if elem.lower() == bppType.lower():
1242 break
1243 val += 1
1244 logger.info("BPP: %s"%self.colourDepthOptions[val])
1245
1246 self.colourDepthCombo.set_active(val)
1247 except:
1248 self.confValErr("bpp",logger)
1249
1250 #USB update section
1251 try:
1252 manualUpdateType = config.get("Main","manualUpdate")
1253 logger.info("offlineUpdate: %s"%manualUpdateType)
1254
1255 if manualUpdateType == "true":
1256 manualUpdateType = True
1257 elif manualUpdateType == "false":
1258 manualUpdateType = False
1259
1260 if manualUpdateType == True or manualUpdateType == False:
1261 if manualUpdateType == True:
1262 print "Stuff done"
1263 self.offlineCheckButton.set_active(True)
1264 self.offlineOperationToggle(self,self.offlineCheckButton)
1265
1266 except:
1267 self.confValErr('offlineUpdate',logger)
1268 print "Manual Update Failed"
1269
1270 #Now the check boxes
1271
1272 checksum = False
1273 try:
1274 if config.get('Main','checksumPreviousDownloads') == "true":
1275 checksum = True
1276
1277 logger.info("checksumPreviousDownloads: %s"%checksum)
1278
1279 except:
1280 self.confValErr("checksumPreviousDownloads",logger)
1281
1282
1283 lowTexture = False
1284
1285 try:
1286 if config.get('Main','lowTextureMemory') == "true":
1287 lowTexture = True
1288 logger.info("lowTextureMemory: %s"%lowTexture)
1289
1290 except:
1291 self.confValErr("lowTextureMemory",logger)
1292
1293
1294 self.checksumCheckButton.set_active(checksum)
1295
1296 self.lowTextureCheckButton.set_active(lowTexture)
1297
1298
1299 #Now the lift options
1300 try:
1301 self.liftDefaultTagText.set_text(config.get("LiftTags","default"))
1302 logger.info("DefaultLiftTag: %s"%config.get('LiftTags','default'))
1303
1304 except:
1305 self.confValErr("liftTags",logger)
1306
1307 try:
1308 self.lift7TagText.set_text(config.get("LiftTags","lift7"))
1309 logger.info("Lift7Tag: %s"%config.get('LiftTags','lift7'))
1310
1311 except:
1312 self.confValErr("lift7",logger)
1313
1314 try:
1315 self.lift6TagText.set_text(config.get("LiftTags","lift6"))
1316 logger.info("Lift6Tag: %s"%config.get('LiftTags','lift6'))
1317 except:
1318 self.confValErr("lift6",logger)
1319
1320 try:
1321 self.lift5TagText.set_text(config.get("LiftTags","lift5"))
1322 logger.info("Lift5Tag: %s"%config.get('LiftTags','lift5'))
1323 except:
1324 self.confValErr("lift5",logger)
1325
1326 try:
1327 self.lift4TagText.set_text(config.get("LiftTags","lift4"))
1328 logger.info("Lift4Tag: %s"%config.get('LiftTags','lift4'))
1329 except:
1330 self.confValErr("lift4",logger)
1331
1332 try:
1333 self.lift3TagText.set_text(config.get("LiftTags","lift3"))
1334 logger.info("Lift3Tag: %s"%config.get('LiftTags','lift3'))
1335 except:
1336 self.confValErr("lift3",logger)
1337
1338 try:
1339 self.lift2TagText.set_text(config.get("LiftTags","lift2"))
1340 logger.info("Lift2Tag: %s"%config.get('LiftTags','lift2'))
1341 except:
1342 self.confValErr("lift2",logger)
1343
1344 try:
1345 self.lift1TagText.set_text(config.get("LiftTags","lift1"))
1346 logger.info("Lift1Tag: %s"%config.get('LiftTags','lift1'))
1347 except:
1348 self.confValErr("lift1",logger)
1349
1350 try:
1351 self.lift0TagText.set_text(config.get("LiftTags","lift0"))
1352 logger.info("Lift0Tag: %s"%config.get('LiftTags','lift0'))
1353 except:
1354 self.confValErr("lift0",logger)
1355
1356 try:
1357 self.firstSerialText.set_text(config.get("Lift","serial0"))
1358 logger.info("FirstSerial: %s"%config.get('Lift','serial0'))
1359 except:
1360 self.confValErr("serial0",logger)
1361
1362 try:
1363 self.secondSerialText.set_text(config.get("Lift","serial1"))
1364 logger.info("SecondSerial: %s"%config.get('Lift','serial1'))
1365 except:
1366 self.confValErr("serial1",logger)
1367
1368 try:
1369 self.liftTriggerValue.set_value(int(config.get("Lift","trigger")))
1370 logger.info("LiftTrigger: %s"%config.get('Lift','trigger'))
1371 except:
1372 self.confValErr("trigger",logger)
1373
1374 try:
1375
1376 liftEnableType = config.get("Lift","enabled")
1377 logger.info("LiftEnabled: %s"%config.get('Lift','enabled'))
1378
1379 val = 0
1380
1381 for elem in self.liftEnableOptions:
1382 if elem.lower() == liftEnableType.lower():
1383 break
1384 val += 1
1385
1386 self.liftEnableCombo.set_active(val)
1387 except:
1388 self.confValErr("liftEnabled",logger)
1389
1390 def saveConfigSignal(self,widget,data=None):
1391 a = self.getConfValues()
1392 self.logger11.info("Config Values to process: %s"%a)
1393 config = ConfigParser.RawConfigParser()
1394
1395 config.optionxform = str
1396
1397 configOptions = ["Main", "Logging", "Stats", "TickerMedia", "Lift", "LiftTags"]
1398
1399 for configOption in configOptions:
1400 #print configOption
1401 config.add_section(configOption)
1402
1403 for elem in a:
1404 #print elem, a[elem][1], configOption
1405 if a[elem][0] == configOption:
1406 print elem, a[elem][1],configOption
1407 try:
1408
1409 config.set(configOption, elem, str(a[elem][1]))
1410 self.logger11.info("Value: %s %s %s"%(configOption,elem,str(a[elem][1])))
1411 except:
1412 print "Error setting option:"
1413 print "Element:", elem
1414 print "Data:", a[elem]
1415 print "Error setting: %s, %s"%(elem,a[elem][1])
1416 print a[elem][1]
1417 print str(a[elem][1])
1418 self.logger11.error("Error setting value: %s %s %s"%(configOption,elem,str(a[elem][1])))
1419 finally:
1420 #Write everything, barring the error item
1421
1422 # with open(self.pyClientConfName, 'wb') as configfile:
1423 # config.write(configfile)
1424
1425 try:
1426 configfile = open(self.pyClientConfName,"wb")
1427 config.write(configfile)
1428 self.logger11.info("Data successfully written")
1429 self.messageDialog.set_markup(_("Successfully written configuration file"))
1430 self.messageDialog.show()
1431
1432 except:
1433 self.logger11.error("Data could not be written")
1434 self.errorDialog.set_markup(_("Could not open / write to configuration file. Cannot continue"))
1435 self.errorDialog.show()
1436
1437# #Read in the existing configuration file as a string
1438# #we can then replace every instance of %s with one of the
1439# #configuration items
1440
1441# #I have chosen this way because then we can keep the comments
1442# #in place for manual usage
1443
1444# config_template_string = ""
1445# try:
1446# f = open("site.cfg.default","r")
1447# config_template_string = f.read()
1448# f.close()
1449# except:
1450# print "Error reading default config file"
1451
1452 #Now create the string to write to the new config. file
1453
1454# config_string = config_template_string%(a["serverURL"],a["clientID"],a["serverKey"],a["refresh"],a["serverConn"],a["screenWidth"],a["screenHeight"],a["fullScreen"],a["logType"],a["logVal"],a["captureStats"],a["queueSize"])
1455
1456# #Now write the configuration file
1457
1458# try:
1459# f = open(self.pyClientConfLoc,"w")
1460# # f.write(config_string)
1461# f.close()
1462# except:
1463# print "Could not write configuration file"
1464
1465 def genClientID(self):
1466 """Function used to generate a random client ID. Returns a generated UUID"""
1467 uuidStr = uuid.uuid4()
1468 self.logger4.info("UUID Generated: %s"%uuidStr)
1469 return uuidStr
1470
1471
1472 def set_tooltips(self):
1473
1474 self.clearButton.set_tooltip_text(_("Clear input fields"))
1475 self.saveButton.set_tooltip_text(_("Save data to file"))
1476
1477 self.serverURLText.set_tooltip_text(_("URL of your Xibo server"))
1478 self.clientIDText.set_tooltip_text(_("Client identifier (used to generate license key hash)"))
1479 self.serverKeyText.set_tooltip_text(_("Server key"))
1480 self.refreshText.set_tooltip_text(_("Collection interval"))
1481 self.serverConnBool.set_tooltip_text(_("Does the client have to connect to XMDS before playing cached content?"))
1482 self.fullScreenBool.set_tooltip_text(_("Should the client run fullscreen"))
1483 self.screenWidthText.set_tooltip_text(_("Width of the rendered output screen"))
1484 self.screenHeightText.set_tooltip_text(_("Height of the rendered output screen"))
1485 self.captureStatisticsBool.set_tooltip_text(_("States whether statistics are generated or not"))
1486 self.queueSizeText.set_tooltip_text(_("Statistics queue size"))
1487 self.logLevelSpin.set_tooltip_text(_("Amount of log data to write. The higher the number, the more is written"))
1488 self.logTypeCombo.set_tooltip_text(_("Where log data should be written to"))
1489 self.clientNameText.set_tooltip_text(_("Name as it will be displayed in the server app"))
1490
1491 #Advanced options widgets
1492
1493 self.liftDefaultTagText.set_tooltip_text(_("Tag associated with lift input"))
1494 self.lift7TagText.set_tooltip_text(_("Tag associated with lift input"))
1495 self.lift6TagText.set_tooltip_text(_("Tag associated with lift input"))
1496 self.lift5TagText.set_tooltip_text(_("Tag associated with lift input"))
1497 self.lift4TagText.set_tooltip_text(_("Tag associated with lift input"))
1498 self.lift3TagText.set_tooltip_text(_("Tag associated with lift input"))
1499 self.lift2TagText.set_tooltip_text(_("Tag associated with lift input"))
1500 self.lift1TagText.set_tooltip_text(_("Tag associated with lift input"))
1501 self.lift0TagText.set_tooltip_text(_("Tag associated with lift input"))
1502 self.firstSerialText.set_tooltip_text(_("First serial port to use for lift purposes"))
1503 self.secondSerialText.set_tooltip_text(_("First serial port to use for lift purposes"))
1504 self.liftTriggerValue.set_tooltip_text(_("Number of times lift is triggered before layout is changed"))
1505 self.liftEnableCombo.set_tooltip_text(_("Sets whether lift functionality is enabled or not"))
1506 self.dateFormatEntry.set_tooltip_text(_("Date format the client should render dates in when displaying RSS tickers"))
1507 self.libraryEntry.set_tooltip_text(_("Which folder to store content in. Can be relative or absolute path"))
1508 self.socketTimeSpin.set_tooltip_text(_("How long should we wait (in seconds) before timing out a hung socket"))
1509 self.checksumCheckButton.set_tooltip_text(_("Should the client checksum all downloaded content to ensure it's unchanged at startup"))
1510 self.lowTextureCheckButton.set_tooltip_text(_("Should the client attempt to minimise the amount of graphics texture memory it uses"))
1511 self.framesSpin.set_tooltip_text(_("How many fps to force the client to run"))
1512 self.vwidthSpin.set_tooltip_text(_("Width of the rendered virtual output screen (this will be a section within the overall window"))
1513 self.vheightSpin.set_tooltip_text(_("Height of the rendered virtual output screen (this will be a section within the overall window"))
1514 self.vrotateSpin.set_tooltip_text(_("Angle to rotate virtual window within the rendered output window"))
1515 self.schedulerCombo.set_tooltip_text(_("Which scheduler module to use"))
1516 self.downloaderCombo.set_tooltip_text(_("Which download manager module to use"))
1517 self.colourDepthCombo.set_tooltip_text(_("Colour depth of the rendered output"))
1518
1519 self.xmdsLicenseKeyEntry.set_tooltip_text(_("Sets license key value to use when syncronising from memory stick"))
1520# self.manualUpdateCombo.set_tooltip_text(_("Sets whether update from memory stick is enabled"))
1521
1522 def getConfValues(self):
1523
1524 model = self.logTypeCombo.get_model()
1525 index = self.logTypeCombo.get_active()
1526# logTypeText = model[index][0]
1527
1528 logTypeText = self.logWriterTypes[index]
1529
1530 configType = "Main"
1531
1532 serverUrl = [configType,self.serverURLText.get_text()]
1533 clientId = [configType,self.clientIDText.get_text()]
1534 serverKey = [configType,self.serverKeyText.get_text()]
1535 refresh = [configType,int(self.refreshText.get_text())]
1536 serverConn = [configType,str(self.serverConnBool.get_active()).lower()]
1537 fullScreen = [configType,str(self.fullScreenBool.get_active()).lower()]
1538 screenWidth = [configType, self.screenWidthText.get_value_as_int()]
1539 screenHeight = [configType, self.screenHeightText.get_value_as_int()]
1540 captureStats = ["Stats",str(self.captureStatisticsBool.get_active()).lower()]
1541 queueSize = ["Stats",self.queueSizeText.get_value_as_int()]
1542 logType = ["Logging", logTypeText]
1543 logVal = ["Logging",self.logLevelSpin.get_value_as_int()]
1544 xmdsClientName = ["Main",self.clientNameText.get_text()]
1545
1546 self.logger5.info("ServerURL: %s"%serverUrl)
1547 self.logger5.info("clientID: %s"%clientId)
1548 self.logger5.info("serverKey: %s"%serverKey)
1549 self.logger5.info("refresh: %s"%refresh)
1550 self.logger5.info("serverConn: %s"%serverConn)
1551 self.logger5.info("fullScreen: %s"%fullScreen)
1552 self.logger5.info("screenWidth: %s"%screenWidth)
1553 self.logger5.info("screenHeight: %s"%screenHeight)
1554 self.logger5.info("captureStats: %s"%captureStats)
1555 self.logger5.info("queueSize: %s"%queueSize)
1556 self.logger5.info("logType: %s"%logType)
1557 self.logger5.info("logVal: %s"%logVal)
1558 self.logger5.info("xmdsClientName: %s"%xmdsClientName)
1559
1560 #Take the boolean values and make them lower case.
1561
1562 configOptions = {"xmdsUrl": serverUrl, "xmdsClientID": clientId,"xmdsKey":serverKey,"xmdsUpdateInterval":refresh,"requireXMDS":serverConn,"fullScreen":fullScreen,"width":screenWidth,"height":screenHeight,"collect":captureStats,"queueSize":queueSize,"logWriter":logType,"logLevel":logVal,"xmdsClientName":xmdsClientName}
1563
1564 #GET THE LIFT OPTIONS
1565
1566
1567 #ONLY DO THIS IF THE LIFT TAB IS SHOWING
1568 #THEN ADD THEM TO THE DICTIONARY
1569
1570# if self.liftTabVisible == True:
1571
1572 #The above is deprecated. This is because we don't want the information to be
1573 #"deleted" from the configuration file if we choose not to show these options
1574 #on subsequent file loads
1575 if 1:
1576
1577 configType = "Lift"
1578 configType1 = "LiftTags"
1579
1580 model = self.liftEnableCombo.get_model()
1581 index = self.liftEnableCombo.get_active()
1582 liftEnableText = model[index][0].lower()
1583
1584 liftDefaultTag = [configType1,self.liftDefaultTagText.get_text()]
1585 lift7Tag = [configType1, self.lift7TagText.get_text()]
1586 lift6Tag = [configType1, self.lift6TagText.get_text()]
1587 lift5Tag = [configType1, self.lift5TagText.get_text()]
1588 lift4Tag = [configType1, self.lift4TagText.get_text()]
1589 lift3Tag = [configType1, self.lift3TagText.get_text()]
1590 lift2Tag = [configType1, self.lift2TagText.get_text()]
1591 lift1Tag = [configType1, self.lift1TagText.get_text()]
1592 lift0Tag = [configType1, self.lift0TagText.get_text()]
1593 firstSerial = [configType, self.firstSerialText.get_text()]
1594 secondSerial = [configType, self.secondSerialText.get_text()]
1595 liftTrigger = [configType, self.liftTriggerValue.get_text()]
1596 liftEnable = [configType, liftEnableText]
1597
1598 if liftDefaultTag[1] != "":
1599 configOptions["default"] = liftDefaultTag
1600
1601 if lift7Tag[1] != "":
1602 configOptions["lift7"] =lift7Tag
1603
1604 if lift6Tag[1] != "":
1605 configOptions["lift6"] =lift6Tag
1606
1607 if lift5Tag[1] != "":
1608 configOptions["lift5"] =lift5Tag
1609
1610 if lift4Tag[1] != "":
1611 configOptions["lift4"] =lift4Tag
1612
1613 if lift3Tag[1] != "":
1614 configOptions["lift3"] =lift3Tag
1615
1616 if lift2Tag[1] != "":
1617 configOptions["lift2"] =lift2Tag
1618
1619 if lift1Tag[1] != "":
1620 configOptions["lift1"] =lift1Tag
1621
1622 if lift0Tag[1] != "":
1623 configOptions["lift0"] =lift0Tag
1624
1625 if firstSerial[1] != "":
1626 configOptions["serial0"] =firstSerial
1627
1628 if secondSerial[1] != "":
1629 configOptions["serial1"] =secondSerial
1630
1631 if liftEnable[1] != "false":
1632 configOptions["enabled"] =liftEnable
1633
1634 if liftTrigger != "0":
1635 configOptions["trigger"] =liftTrigger
1636
1637# if self.advancedTabVisible == True:
1638
1639 #The above is deprecated. This is because we don't want the information to be
1640 #"deleted" from the configuration file if we choose not to show these options
1641 #on subsequent file loads
1642 if 1:
1643 configType = "Main"
1644
1645 model = self.schedulerCombo.get_model()
1646 index = self.schedulerCombo.get_active()
1647 schedulerComboText = model[index][0]
1648
1649 model = self.downloaderCombo.get_model()
1650 index = self.downloaderCombo.get_active()
1651 downloaderComboText = model[index][0]
1652
1653 model = self.colourDepthCombo.get_model()
1654 index = self.colourDepthCombo.get_active()
1655 colourDepthComboText = model[index][0]
1656
1657 xmdsLicenseKeyEntry = [configType,self.xmdsLicenseKeyEntry.get_text()]
1658
1659# model = self.manualUpdateCombo.get_model()
1660# index = self.manualUpdateCombo.get_active()
1661# manualUpdateText = model[index][0]
1662
1663 manualUpdateText = str(self.offlineCheckButton.get_active()).lower()
1664
1665 manualUpdate = [configType,manualUpdateText.lower()]
1666
1667 dateFormatEntry = ["TickerMedia", self.dateFormatEntry.get_text()]
1668
1669 libraryEntry = [configType, self.libraryEntry.get_text()]
1670 socketTimeSpin = [configType, self.socketTimeSpin.get_text()]
1671 checksum = [configType, str(self.checksumCheckButton.get_active()).lower()]
1672 lowTexture = [configType, str(self.lowTextureCheckButton.get_active()).lower()]
1673
1674
1675 frames = [configType, self.framesSpin.get_text()]
1676 vwidth = [configType, self.vwidthSpin.get_text()]
1677 vheight = [configType, self.vheightSpin.get_text()]
1678 vrotate = [configType, self.vrotateSpin.get_text()]
1679 scheduler = [configType, schedulerComboText]
1680 downloader = [configType, downloaderComboText]
1681 colourDepth = [configType, colourDepthComboText]
1682
1683 if xmdsLicenseKeyEntry[1] != "":
1684 configOptions["xmdsLicenseKey"] = xmdsLicenseKeyEntry
1685
1686 if manualUpdateText[1] != "":
1687 configOptions["manualUpdate"] = manualUpdate
1688
1689
1690 if dateFormatEntry[1] != "":
1691 configOptions["dateFormat"] = dateFormatEntry
1692
1693 if libraryEntry[1] != "":
1694 configOptions["libraryDir"] = libraryEntry
1695
1696 if socketTimeSpin[1] != "0":
1697 configOptions["socketTimeout"] = socketTimeSpin
1698
1699 if checksum[1] == "true":
1700 configOptions["checksumPreviousDownloads"] = checksum
1701
1702 if lowTexture[1] == "true":
1703 configOptions["lowTextureMemory"] = lowTexture
1704
1705 if frames[1] != "0":
1706 configOptions["fps"] = frames
1707
1708 if vwidth[1] != "0":
1709 configOptions["vwidth"] = vwidth
1710
1711 if vheight[1] != "0":
1712 configOptions["vheight"] = vheight
1713
1714 if vrotate[1] != "0":
1715 configOptions["vrotation"] = vrotate
1716
1717 if scheduler[1] != "":
1718 configOptions["scheduler"] = scheduler
1719
1720 if downloader[1] != "":
1721 configOptions["downloader"] = downloader
1722
1723 if colourDepth[1] != "":
1724 configOptions["bpp"] = colourDepth
1725
1726 return configOptions
1727def cmdOptions():
1728 options = sys.argv[1:]
1729
1730 #For each option in the array strip off any - characters and convert to lower case
1731
1732 for i in range(len(options)):
1733 options[i] = options[i].strip("-").lower()
1734
1735 return options
1736
1737if __name__ == "__main__":
1738
1739 #Grab the command line options
1740 options = cmdOptions()
1741
1742 #Find out of the lift option has been passed
1743 lift = False
1744 try:
1745 options.index("lift")
1746 lift = True
1747 except ValueError:
1748 print "Option not found"
1749 lift = False
1750
1751
1752 wine = xiboConfWindow("client.conf", lift = lift)
1753 gtk.main()
01754
=== renamed file 'client/python/configure.py' => 'client/python/configure.py.moved'
=== modified file 'client/python/defaults.cfg'
=== added file 'client/python/gui.glade'
--- client/python/gui.glade 1970-01-01 00:00:00 +0000
+++ client/python/gui.glade 2011-02-28 15:09:00 +0000
@@ -0,0 +1,1451 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.16"/>
4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkWindow" id="mainWindow">
6 <property name="width_request">600</property>
7 <property name="height_request">445</property>
8 <property name="title" translatable="yes">Xibo Client Configuration</property>
9 <property name="resizable">False</property>
10 <signal name="destroy" handler="onDestroy"/>
11 <child>
12 <object class="GtkFixed" id="fixed1">
13 <property name="width_request">600</property>
14 <property name="height_request">445</property>
15 <property name="visible">True</property>
16 <child>
17 <object class="GtkNotebook" id="notebook1">
18 <property name="width_request">600</property>
19 <property name="height_request">440</property>
20 <property name="visible">True</property>
21 <property name="can_focus">True</property>
22 <child>
23 <object class="GtkFixed" id="fixed2">
24 <property name="visible">True</property>
25 <child>
26 <object class="GtkLabel" id="refreshLabel">
27 <property name="width_request">267</property>
28 <property name="height_request">38</property>
29 <property name="visible">True</property>
30 <property name="label" translatable="yes">Set the number of seconds between the client contacting the server for updates</property>
31 <property name="justify">right</property>
32 <property name="wrap">True</property>
33 </object>
34 <packing>
35 <property name="x">8</property>
36 <property name="y">303</property>
37 </packing>
38 </child>
39 <child>
40 <object class="GtkButton" id="clearFields">
41 <property name="label" translatable="yes">Clear Form</property>
42 <property name="width_request">100</property>
43 <property name="height_request">33</property>
44 <property name="visible">True</property>
45 <property name="can_focus">True</property>
46 <property name="receives_default">True</property>
47 <signal name="clicked" handler="clearFormSignal"/>
48 </object>
49 <packing>
50 <property name="x">370</property>
51 <property name="y">364</property>
52 </packing>
53 </child>
54 <child>
55 <object class="GtkButton" id="saveConfig">
56 <property name="label" translatable="yes">Save Config</property>
57 <property name="width_request">100</property>
58 <property name="height_request">33</property>
59 <property name="visible">True</property>
60 <property name="can_focus">True</property>
61 <property name="receives_default">True</property>
62 <signal name="clicked" handler="saveConfigSignal"/>
63 </object>
64 <packing>
65 <property name="x">475</property>
66 <property name="y">363</property>
67 </packing>
68 </child>
69 <child>
70 <object class="GtkLabel" id="connectionLabel">
71 <property name="width_request">213</property>
72 <property name="height_request">40</property>
73 <property name="visible">True</property>
74 <property name="label" translatable="yes">Require connection to server</property>
75 <property name="justify">right</property>
76 <property name="wrap">True</property>
77 </object>
78 <packing>
79 <property name="x">12</property>
80 <property name="y">357</property>
81 </packing>
82 </child>
83 <child>
84 <object class="GtkCheckButton" id="serverConnection">
85 <property name="width_request">40</property>
86 <property name="height_request">32</property>
87 <property name="visible">True</property>
88 <property name="can_focus">True</property>
89 <property name="receives_default">False</property>
90 <property name="tooltip_text" translatable="yes">This setting is used by the client to
91determine whether a connection to
92the server is needed before the client
93displays any content.
94
95This can be used to allow client that
96are not connected to a network to show
97pre-loaded content</property>
98 <property name="draw_indicator">True</property>
99 </object>
100 <packing>
101 <property name="x">220</property>
102 <property name="y">362</property>
103 </packing>
104 </child>
105 <child>
106 <object class="GtkSpinButton" id="refreshText">
107 <property name="width_request">100</property>
108 <property name="height_request">27</property>
109 <property name="visible">True</property>
110 <property name="can_focus">True</property>
111 <property name="invisible_char">●</property>
112 </object>
113 <packing>
114 <property name="x">272</property>
115 <property name="y">308</property>
116 </packing>
117 </child>
118 <child>
119 <object class="GtkCheckButton" id="advancedOptionsCheck">
120 <property name="label" translatable="yes">Display Advanced Options</property>
121 <property name="width_request">200</property>
122 <property name="height_request">33</property>
123 <property name="visible">True</property>
124 <property name="can_focus">True</property>
125 <property name="receives_default">False</property>
126 <property name="draw_indicator">True</property>
127 <signal name="toggled" handler="on_advancedOptionsCheck"/>
128 </object>
129 <packing>
130 <property name="x">386</property>
131 <property name="y">316</property>
132 </packing>
133 </child>
134 <child>
135 <object class="GtkFrame" id="frame7">
136 <property name="width_request">561</property>
137 <property name="height_request">186</property>
138 <property name="visible">True</property>
139 <property name="label_xalign">0</property>
140 <property name="shadow_type">out</property>
141 <child>
142 <object class="GtkAlignment" id="alignment7">
143 <property name="visible">True</property>
144 <property name="left_padding">12</property>
145 <child>
146 <object class="GtkFixed" id="fixed13">
147 <property name="visible">True</property>
148 <child>
149 <object class="GtkEntry" id="serverURLText">
150 <property name="width_request">375</property>
151 <property name="height_request">30</property>
152 <property name="visible">True</property>
153 <property name="can_focus">True</property>
154 <property name="invisible_char">●</property>
155 </object>
156 <packing>
157 <property name="x">108</property>
158 <property name="y">7</property>
159 </packing>
160 </child>
161 <child>
162 <object class="GtkLabel" id="serverURLLabel">
163 <property name="width_request">100</property>
164 <property name="height_request">27</property>
165 <property name="visible">True</property>
166 <property name="label" translatable="yes">Server URL</property>
167 <property name="justify">right</property>
168 </object>
169 <packing>
170 <property name="y">10</property>
171 </packing>
172 </child>
173 <child>
174 <object class="GtkEntry" id="clientIDText">
175 <property name="width_request">375</property>
176 <property name="height_request">30</property>
177 <property name="visible">True</property>
178 <property name="can_focus">True</property>
179 <property name="invisible_char">●</property>
180 </object>
181 <packing>
182 <property name="x">108</property>
183 <property name="y">48</property>
184 </packing>
185 </child>
186 <child>
187 <object class="GtkLabel" id="clientIDLabel">
188 <property name="width_request">100</property>
189 <property name="height_request">30</property>
190 <property name="visible">True</property>
191 <property name="label" translatable="yes">Client ID</property>
192 <property name="justify">right</property>
193 </object>
194 <packing>
195 <property name="x">7</property>
196 <property name="y">49</property>
197 </packing>
198 </child>
199 <child>
200 <object class="GtkEntry" id="serverKeyText">
201 <property name="width_request">375</property>
202 <property name="height_request">30</property>
203 <property name="visible">True</property>
204 <property name="can_focus">True</property>
205 <property name="invisible_char">●</property>
206 </object>
207 <packing>
208 <property name="x">108</property>
209 <property name="y">91</property>
210 </packing>
211 </child>
212 <child>
213 <object class="GtkLabel" id="serverKeyLabel">
214 <property name="width_request">100</property>
215 <property name="height_request">30</property>
216 <property name="visible">True</property>
217 <property name="label" translatable="yes">Server Key</property>
218 <property name="justify">right</property>
219 </object>
220 <packing>
221 <property name="y">92</property>
222 </packing>
223 </child>
224 <child>
225 <object class="GtkEntry" id="clientNameText">
226 <property name="width_request">375</property>
227 <property name="height_request">30</property>
228 <property name="visible">True</property>
229 <property name="can_focus">True</property>
230 <property name="invisible_char">●</property>
231 </object>
232 <packing>
233 <property name="x">108</property>
234 <property name="y">132</property>
235 </packing>
236 </child>
237 <child>
238 <object class="GtkLabel" id="clientNameLabel">
239 <property name="width_request">87</property>
240 <property name="height_request">27</property>
241 <property name="visible">True</property>
242 <property name="label" translatable="yes">Client Name</property>
243 </object>
244 <packing>
245 <property name="y">135</property>
246 </packing>
247 </child>
248 </object>
249 </child>
250 </object>
251 </child>
252 <child type="label">
253 <object class="GtkLabel" id="onlineOpLabel">
254 <property name="visible">True</property>
255 <property name="label" translatable="yes">&lt;b&gt;Online operation (synchronise with server)&lt;/b&gt;</property>
256 <property name="use_markup">True</property>
257 </object>
258 </child>
259 </object>
260 <packing>
261 <property name="x">17</property>
262 <property name="y">46</property>
263 </packing>
264 </child>
265 <child>
266 <object class="GtkCheckButton" id="offlineCheckButton">
267 <property name="label" translatable="yes">Offline operation (syncronise from memory stick)</property>
268 <property name="width_request">362</property>
269 <property name="height_request">30</property>
270 <property name="visible">True</property>
271 <property name="can_focus">True</property>
272 <property name="receives_default">False</property>
273 <property name="draw_indicator">True</property>
274 <signal name="toggled" handler="offlineOperationToggle"/>
275 </object>
276 <packing>
277 <property name="x">16</property>
278 <property name="y">7</property>
279 </packing>
280 </child>
281 <child>
282 <object class="GtkLabel" id="xmdsLicenseKeyLabel">
283 <property name="width_request">122</property>
284 <property name="height_request">30</property>
285 <property name="visible">True</property>
286 <property name="label" translatable="yes">XMDS License Key</property>
287 </object>
288 <packing>
289 <property name="x">16</property>
290 <property name="y">247</property>
291 </packing>
292 </child>
293 <child>
294 <object class="GtkEntry" id="xmdsLicenseKeyEntry">
295 <property name="width_request">296</property>
296 <property name="height_request">30</property>
297 <property name="visible">True</property>
298 <property name="can_focus">True</property>
299 <property name="invisible_char">●</property>
300 </object>
301 <packing>
302 <property name="x">140</property>
303 <property name="y">246</property>
304 </packing>
305 </child>
306 </object>
307 </child>
308 <child type="tab">
309 <object class="GtkLabel" id="serverSettingsLabel">
310 <property name="visible">True</property>
311 <property name="label" translatable="yes">Server Settings</property>
312 </object>
313 <packing>
314 <property name="tab_fill">False</property>
315 </packing>
316 </child>
317 <child>
318 <object class="GtkFixed" id="fixed3">
319 <property name="visible">True</property>
320 <child>
321 <object class="GtkLabel" id="fullscreenLabel">
322 <property name="width_request">100</property>
323 <property name="height_request">32</property>
324 <property name="visible">True</property>
325 <property name="label" translatable="yes">Fullscreen</property>
326 </object>
327 <packing>
328 <property name="x">19</property>
329 <property name="y">27</property>
330 </packing>
331 </child>
332 <child>
333 <object class="GtkCheckButton" id="fullScreen">
334 <property name="width_request">100</property>
335 <property name="height_request">32</property>
336 <property name="visible">True</property>
337 <property name="can_focus">True</property>
338 <property name="receives_default">False</property>
339 <property name="tooltip_text" translatable="yes">Set this option if the client
340should run in full screen mode</property>
341 <property name="draw_indicator">True</property>
342 </object>
343 <packing>
344 <property name="x">125</property>
345 <property name="y">24</property>
346 </packing>
347 </child>
348 <child>
349 <object class="GtkLabel" id="widthLabel">
350 <property name="width_request">57</property>
351 <property name="height_request">32</property>
352 <property name="visible">True</property>
353 <property name="label" translatable="yes">Width</property>
354 <property name="justify">right</property>
355 </object>
356 <packing>
357 <property name="x">54</property>
358 <property name="y">60</property>
359 </packing>
360 </child>
361 <child>
362 <object class="GtkSpinButton" id="screenWidthText">
363 <property name="width_request">100</property>
364 <property name="height_request">27</property>
365 <property name="visible">True</property>
366 <property name="can_focus">True</property>
367 <property name="invisible_char">●</property>
368 </object>
369 <packing>
370 <property name="x">126</property>
371 <property name="y">61</property>
372 </packing>
373 </child>
374 <child>
375 <object class="GtkLabel" id="heightLabel">
376 <property name="width_request">57</property>
377 <property name="height_request">27</property>
378 <property name="visible">True</property>
379 <property name="label" translatable="yes">Height</property>
380 </object>
381 <packing>
382 <property name="x">49</property>
383 <property name="y">100</property>
384 </packing>
385 </child>
386 <child>
387 <object class="GtkSpinButton" id="screenHeightText">
388 <property name="width_request">100</property>
389 <property name="height_request">30</property>
390 <property name="visible">True</property>
391 <property name="can_focus">True</property>
392 <property name="invisible_char">●</property>
393 </object>
394 <packing>
395 <property name="x">125</property>
396 <property name="y">97</property>
397 </packing>
398 </child>
399 </object>
400 <packing>
401 <property name="position">1</property>
402 </packing>
403 </child>
404 <child type="tab">
405 <object class="GtkLabel" id="clientSettingsLabel">
406 <property name="visible">True</property>
407 <property name="label" translatable="yes">Client Settings</property>
408 </object>
409 <packing>
410 <property name="position">1</property>
411 <property name="tab_fill">False</property>
412 </packing>
413 </child>
414 <child>
415 <object class="GtkFixed" id="fixed4">
416 <property name="visible">True</property>
417 <child>
418 <object class="GtkFrame" id="frame1">
419 <property name="width_request">582</property>
420 <property name="height_request">172</property>
421 <property name="visible">True</property>
422 <property name="label_xalign">0</property>
423 <property name="shadow_type">out</property>
424 <child>
425 <object class="GtkAlignment" id="alignment1">
426 <property name="visible">True</property>
427 <property name="left_padding">12</property>
428 <child>
429 <object class="GtkFixed" id="fixed5">
430 <property name="visible">True</property>
431 <child>
432 <object class="GtkLabel" id="logTypeLabel">
433 <property name="width_request">100</property>
434 <property name="height_request">28</property>
435 <property name="visible">True</property>
436 <property name="label" translatable="yes">Log Type</property>
437 </object>
438 <packing>
439 <property name="x">4</property>
440 <property name="y">15</property>
441 </packing>
442 </child>
443 <child>
444 <object class="GtkLabel" id="logLevelLabel">
445 <property name="width_request">100</property>
446 <property name="height_request">30</property>
447 <property name="visible">True</property>
448 <property name="label" translatable="yes">Log Level</property>
449 </object>
450 <packing>
451 <property name="y">44</property>
452 </packing>
453 </child>
454 <child>
455 <object class="GtkComboBox" id="logTypeCombo">
456 <property name="width_request">218</property>
457 <property name="height_request">28</property>
458 <property name="visible">True</property>
459 <signal name="changed" handler="logTypeComboChanged"/>
460 </object>
461 <packing>
462 <property name="x">103</property>
463 <property name="y">14</property>
464 </packing>
465 </child>
466 <child>
467 <object class="GtkSpinButton" id="logLevelSpin">
468 <property name="width_request">97</property>
469 <property name="height_request">27</property>
470 <property name="visible">True</property>
471 <property name="can_focus">True</property>
472 <property name="tooltip_text" translatable="yes">The higher the value, the
473more verbose the logging</property>
474 <property name="invisible_char">●</property>
475 </object>
476 <packing>
477 <property name="x">103</property>
478 <property name="y">50</property>
479 </packing>
480 </child>
481 <child>
482 <object class="GtkLinkButton" id="logFileLinkButton">
483 <property name="label" translatable="yes">Open Log File</property>
484 <property name="width_request">114</property>
485 <property name="height_request">27</property>
486 <property name="visible">True</property>
487 <property name="can_focus">True</property>
488 <property name="receives_default">True</property>
489 <property name="has_tooltip">True</property>
490 <property name="relief">none</property>
491 </object>
492 <packing>
493 <property name="x">207</property>
494 <property name="y">50</property>
495 </packing>
496 </child>
497 </object>
498 </child>
499 </object>
500 </child>
501 <child type="label">
502 <object class="GtkLabel" id="loggingFrameLabel">
503 <property name="visible">True</property>
504 <property name="label" translatable="yes">&lt;b&gt;Logging&lt;/b&gt;</property>
505 <property name="use_markup">True</property>
506 </object>
507 </child>
508 </object>
509 <packing>
510 <property name="x">8</property>
511 <property name="y">9</property>
512 </packing>
513 </child>
514 <child>
515 <object class="GtkFrame" id="frame2">
516 <property name="width_request">582</property>
517 <property name="height_request">208</property>
518 <property name="visible">True</property>
519 <property name="label_xalign">0</property>
520 <property name="shadow_type">out</property>
521 <child>
522 <object class="GtkAlignment" id="alignment2">
523 <property name="visible">True</property>
524 <property name="left_padding">12</property>
525 <child>
526 <object class="GtkFixed" id="fixed6">
527 <property name="visible">True</property>
528 <child>
529 <object class="GtkLabel" id="statsCaptureLabel">
530 <property name="width_request">63</property>
531 <property name="height_request">43</property>
532 <property name="visible">True</property>
533 <property name="label" translatable="yes">Statistics capturing</property>
534 <property name="justify">right</property>
535 <property name="wrap">True</property>
536 </object>
537 <packing>
538 <property name="x">17</property>
539 <property name="y">13</property>
540 </packing>
541 </child>
542 <child>
543 <object class="GtkCheckButton" id="captureStatistics">
544 <property name="width_request">100</property>
545 <property name="height_request">30</property>
546 <property name="visible">True</property>
547 <property name="can_focus">True</property>
548 <property name="receives_default">False</property>
549 <property name="draw_indicator">True</property>
550 </object>
551 <packing>
552 <property name="x">99</property>
553 <property name="y">18</property>
554 </packing>
555 </child>
556 <child>
557 <object class="GtkLabel" id="statsQueueSizeLabel">
558 <property name="width_request">73</property>
559 <property name="height_request">25</property>
560 <property name="visible">True</property>
561 <property name="label" translatable="yes">Queue Size</property>
562 </object>
563 <packing>
564 <property name="x">5</property>
565 <property name="y">62</property>
566 </packing>
567 </child>
568 <child>
569 <object class="GtkSpinButton" id="queueSizeText">
570 <property name="width_request">100</property>
571 <property name="height_request">30</property>
572 <property name="visible">True</property>
573 <property name="can_focus">True</property>
574 <property name="invisible_char">●</property>
575 </object>
576 <packing>
577 <property name="x">101</property>
578 <property name="y">57</property>
579 </packing>
580 </child>
581 </object>
582 </child>
583 </object>
584 </child>
585 <child type="label">
586 <object class="GtkLabel" id="statsFrameLabel">
587 <property name="visible">True</property>
588 <property name="label" translatable="yes">&lt;b&gt;Statistic Capturing&lt;/b&gt;</property>
589 <property name="use_markup">True</property>
590 </object>
591 </child>
592 </object>
593 <packing>
594 <property name="x">8</property>
595 <property name="y">192</property>
596 </packing>
597 </child>
598 </object>
599 <packing>
600 <property name="position">2</property>
601 </packing>
602 </child>
603 <child type="tab">
604 <object class="GtkLabel" id="otherSettingsLabel">
605 <property name="visible">True</property>
606 <property name="label" translatable="yes">Other settings</property>
607 </object>
608 <packing>
609 <property name="position">2</property>
610 <property name="tab_fill">False</property>
611 </packing>
612 </child>
613 <child>
614 <object class="GtkFixed" id="fixed10">
615 <property name="visible">True</property>
616 <child>
617 <object class="GtkLabel" id="schedulerLabel">
618 <property name="width_request">73</property>
619 <property name="height_request">25</property>
620 <property name="visible">True</property>
621 <property name="label" translatable="yes">Scheduler</property>
622 </object>
623 <packing>
624 <property name="x">14</property>
625 <property name="y">16</property>
626 </packing>
627 </child>
628 <child>
629 <object class="GtkLabel" id="downloaderLabel">
630 <property name="width_request">82</property>
631 <property name="height_request">22</property>
632 <property name="visible">True</property>
633 <property name="label" translatable="yes">Downloader</property>
634 </object>
635 <packing>
636 <property name="x">15</property>
637 <property name="y">51</property>
638 </packing>
639 </child>
640 <child>
641 <object class="GtkLabel" id="libraryLabel">
642 <property name="width_request">68</property>
643 <property name="height_request">38</property>
644 <property name="visible">True</property>
645 <property name="label" translatable="yes">Library Location</property>
646 <property name="wrap">True</property>
647 </object>
648 <packing>
649 <property name="x">17</property>
650 <property name="y">82</property>
651 </packing>
652 </child>
653 <child>
654 <object class="GtkLabel" id="bppLabel">
655 <property name="width_request">82</property>
656 <property name="height_request">40</property>
657 <property name="visible">True</property>
658 <property name="label" translatable="yes">Colour depth (BPP)</property>
659 <property name="wrap">True</property>
660 </object>
661 <packing>
662 <property name="x">17</property>
663 <property name="y">129</property>
664 </packing>
665 </child>
666 <child>
667 <object class="GtkFrame" id="frame5">
668 <property name="width_request">278</property>
669 <property name="height_request">125</property>
670 <property name="visible">True</property>
671 <property name="label_xalign">0</property>
672 <property name="shadow_type">out</property>
673 <child>
674 <object class="GtkAlignment" id="alignment5">
675 <property name="visible">True</property>
676 <property name="left_padding">12</property>
677 <child>
678 <object class="GtkFixed" id="fixed11">
679 <property name="visible">True</property>
680 <child>
681 <object class="GtkLabel" id="vwidthLabel">
682 <property name="width_request">100</property>
683 <property name="height_request">25</property>
684 <property name="visible">True</property>
685 <property name="label" translatable="yes">Virtual Width</property>
686 </object>
687 <packing>
688 <property name="y">9</property>
689 </packing>
690 </child>
691 <child>
692 <object class="GtkLabel" id="vheightLabel">
693 <property name="width_request">100</property>
694 <property name="height_request">25</property>
695 <property name="visible">True</property>
696 <property name="label" translatable="yes">Virtual Height</property>
697 </object>
698 <packing>
699 <property name="y">41</property>
700 </packing>
701 </child>
702 <child>
703 <object class="GtkLabel" id="vrotationLabel">
704 <property name="width_request">66</property>
705 <property name="height_request">25</property>
706 <property name="visible">True</property>
707 <property name="label" translatable="yes">Rotation</property>
708 </object>
709 <packing>
710 <property name="y">72</property>
711 </packing>
712 </child>
713 <child>
714 <object class="GtkSpinButton" id="vwidthSpin">
715 <property name="width_request">100</property>
716 <property name="height_request">27</property>
717 <property name="visible">True</property>
718 <property name="can_focus">True</property>
719 <property name="invisible_char">●</property>
720 </object>
721 <packing>
722 <property name="x">135</property>
723 <property name="y">7</property>
724 </packing>
725 </child>
726 <child>
727 <object class="GtkSpinButton" id="vheightSpin">
728 <property name="width_request">100</property>
729 <property name="height_request">27</property>
730 <property name="visible">True</property>
731 <property name="can_focus">True</property>
732 <property name="invisible_char">●</property>
733 </object>
734 <packing>
735 <property name="x">135</property>
736 <property name="y">39</property>
737 </packing>
738 </child>
739 <child>
740 <object class="GtkSpinButton" id="vrotateSpin">
741 <property name="width_request">100</property>
742 <property name="height_request">27</property>
743 <property name="visible">True</property>
744 <property name="can_focus">True</property>
745 <property name="invisible_char">●</property>
746 </object>
747 <packing>
748 <property name="x">135</property>
749 <property name="y">71</property>
750 </packing>
751 </child>
752 </object>
753 </child>
754 </object>
755 </child>
756 <child type="label">
757 <object class="GtkLabel" id="virtualWinLabel">
758 <property name="visible">True</property>
759 <property name="label" translatable="yes">&lt;b&gt;Virtual Window&lt;/b&gt;</property>
760 <property name="use_markup">True</property>
761 </object>
762 </child>
763 </object>
764 <packing>
765 <property name="x">308</property>
766 <property name="y">269</property>
767 </packing>
768 </child>
769 <child>
770 <object class="GtkLabel" id="socketTimeLabel">
771 <property name="width_request">107</property>
772 <property name="height_request">40</property>
773 <property name="visible">True</property>
774 <property name="label" translatable="yes">Socket Timeout (seconds)</property>
775 <property name="wrap">True</property>
776 </object>
777 <packing>
778 <property name="x">16</property>
779 <property name="y">183</property>
780 </packing>
781 </child>
782 <child>
783 <object class="GtkLabel" id="checksumLabel">
784 <property name="width_request">100</property>
785 <property name="height_request">57</property>
786 <property name="visible">True</property>
787 <property name="label" translatable="yes">Checksum Downloaded Media</property>
788 <property name="wrap">True</property>
789 </object>
790 <packing>
791 <property name="x">15</property>
792 <property name="y">232</property>
793 </packing>
794 </child>
795 <child>
796 <object class="GtkLabel" id="lowTextureLabel">
797 <property name="width_request">85</property>
798 <property name="height_request">42</property>
799 <property name="visible">True</property>
800 <property name="label" translatable="yes">Low Texture Memory</property>
801 <property name="wrap">True</property>
802 </object>
803 <packing>
804 <property name="x">14</property>
805 <property name="y">299</property>
806 </packing>
807 </child>
808 <child>
809 <object class="GtkLabel" id="framesLabel">
810 <property name="width_request">80</property>
811 <property name="height_request">42</property>
812 <property name="visible">True</property>
813 <property name="label" translatable="yes">Frames per Second</property>
814 <property name="wrap">True</property>
815 </object>
816 <packing>
817 <property name="x">14</property>
818 <property name="y">351</property>
819 </packing>
820 </child>
821 <child>
822 <object class="GtkLabel" id="dateFormatLabel">
823 <property name="width_request">100</property>
824 <property name="height_request">27</property>
825 <property name="visible">True</property>
826 <property name="label" translatable="yes">Date Format</property>
827 </object>
828 <packing>
829 <property name="x">307</property>
830 <property name="y">14</property>
831 </packing>
832 </child>
833 <child>
834 <object class="GtkComboBox" id="schedulerCombo">
835 <property name="width_request">170</property>
836 <property name="height_request">27</property>
837 <property name="visible">True</property>
838 </object>
839 <packing>
840 <property name="x">127</property>
841 <property name="y">15</property>
842 </packing>
843 </child>
844 <child>
845 <object class="GtkComboBox" id="downloaderCombo">
846 <property name="width_request">170</property>
847 <property name="height_request">27</property>
848 <property name="visible">True</property>
849 </object>
850 <packing>
851 <property name="x">127</property>
852 <property name="y">48</property>
853 </packing>
854 </child>
855 <child>
856 <object class="GtkEntry" id="libraryEntry">
857 <property name="width_request">170</property>
858 <property name="height_request">27</property>
859 <property name="visible">True</property>
860 <property name="can_focus">True</property>
861 <property name="invisible_char">●</property>
862 </object>
863 <packing>
864 <property name="x">127</property>
865 <property name="y">85</property>
866 </packing>
867 </child>
868 <child>
869 <object class="GtkComboBox" id="colourDepthCombo">
870 <property name="width_request">100</property>
871 <property name="height_request">27</property>
872 <property name="visible">True</property>
873 </object>
874 <packing>
875 <property name="x">127</property>
876 <property name="y">133</property>
877 </packing>
878 </child>
879 <child>
880 <object class="GtkSpinButton" id="socketTimeSpin">
881 <property name="width_request">100</property>
882 <property name="height_request">27</property>
883 <property name="visible">True</property>
884 <property name="can_focus">True</property>
885 <property name="invisible_char">●</property>
886 </object>
887 <packing>
888 <property name="x">127</property>
889 <property name="y">188</property>
890 </packing>
891 </child>
892 <child>
893 <object class="GtkCheckButton" id="checksumCheckButton">
894 <property name="width_request">18</property>
895 <property name="height_request">27</property>
896 <property name="visible">True</property>
897 <property name="can_focus">True</property>
898 <property name="receives_default">False</property>
899 <property name="draw_indicator">True</property>
900 </object>
901 <packing>
902 <property name="x">127</property>
903 <property name="y">240</property>
904 </packing>
905 </child>
906 <child>
907 <object class="GtkCheckButton" id="lowTextureCheckButton">
908 <property name="width_request">20</property>
909 <property name="height_request">20</property>
910 <property name="visible">True</property>
911 <property name="can_focus">True</property>
912 <property name="receives_default">False</property>
913 <property name="draw_indicator">True</property>
914 </object>
915 <packing>
916 <property name="x">127</property>
917 <property name="y">308</property>
918 </packing>
919 </child>
920 <child>
921 <object class="GtkSpinButton" id="framesSpin">
922 <property name="width_request">100</property>
923 <property name="height_request">27</property>
924 <property name="visible">True</property>
925 <property name="can_focus">True</property>
926 <property name="invisible_char">●</property>
927 </object>
928 <packing>
929 <property name="x">127</property>
930 <property name="y">356</property>
931 </packing>
932 </child>
933 <child>
934 <object class="GtkEntry" id="dateFormatEntry">
935 <property name="width_request">150</property>
936 <property name="height_request">27</property>
937 <property name="visible">True</property>
938 <property name="can_focus">True</property>
939 <property name="invisible_char">●</property>
940 </object>
941 <packing>
942 <property name="x">432</property>
943 <property name="y">15</property>
944 </packing>
945 </child>
946 </object>
947 <packing>
948 <property name="position">3</property>
949 </packing>
950 </child>
951 <child type="tab">
952 <object class="GtkLabel" id="advancedOptionsLabel">
953 <property name="visible">True</property>
954 <property name="label" translatable="yes">Advanced Options</property>
955 </object>
956 <packing>
957 <property name="position">3</property>
958 <property name="tab_fill">False</property>
959 </packing>
960 </child>
961 <child>
962 <object class="GtkFixed" id="fixed7">
963 <property name="visible">True</property>
964 <child>
965 <object class="GtkFrame" id="frame3">
966 <property name="width_request">290</property>
967 <property name="height_request">390</property>
968 <property name="visible">True</property>
969 <property name="label_xalign">0</property>
970 <property name="shadow_type">out</property>
971 <child>
972 <object class="GtkAlignment" id="alignment3">
973 <property name="visible">True</property>
974 <property name="left_padding">12</property>
975 <child>
976 <object class="GtkFixed" id="fixed8">
977 <property name="visible">True</property>
978 <child>
979 <object class="GtkLabel" id="firstSerialLabel">
980 <property name="width_request">100</property>
981 <property name="height_request">22</property>
982 <property name="visible">True</property>
983 <property name="label" translatable="yes">1st Serial Port</property>
984 </object>
985 <packing>
986 <property name="y">11</property>
987 </packing>
988 </child>
989 <child>
990 <object class="GtkLabel" id="secondSerialLabel">
991 <property name="width_request">100</property>
992 <property name="height_request">22</property>
993 <property name="visible">True</property>
994 <property name="label" translatable="yes">2nd Serial Port</property>
995 </object>
996 <packing>
997 <property name="x">1</property>
998 <property name="y">50</property>
999 </packing>
1000 </child>
1001 <child>
1002 <object class="GtkLabel" id="liftTriggerLabel">
1003 <property name="width_request">87</property>
1004 <property name="height_request">22</property>
1005 <property name="visible">True</property>
1006 <property name="label" translatable="yes">Trigger Value</property>
1007 </object>
1008 <packing>
1009 <property name="x">2</property>
1010 <property name="y">97</property>
1011 </packing>
1012 </child>
1013 <child>
1014 <object class="GtkLabel" id="liftEnableLabel">
1015 <property name="width_request">75</property>
1016 <property name="height_request">23</property>
1017 <property name="visible">True</property>
1018 <property name="label" translatable="yes">Enable Lift</property>
1019 </object>
1020 <packing>
1021 <property name="y">136</property>
1022 </packing>
1023 </child>
1024 <child>
1025 <object class="GtkEntry" id="firstSerialText">
1026 <property name="width_request">140</property>
1027 <property name="height_request">27</property>
1028 <property name="visible">True</property>
1029 <property name="can_focus">True</property>
1030 <property name="invisible_char">●</property>
1031 </object>
1032 <packing>
1033 <property name="x">118</property>
1034 <property name="y">5</property>
1035 </packing>
1036 </child>
1037 <child>
1038 <object class="GtkEntry" id="secondSerialText">
1039 <property name="width_request">140</property>
1040 <property name="height_request">27</property>
1041 <property name="visible">True</property>
1042 <property name="can_focus">True</property>
1043 <property name="invisible_char">●</property>
1044 </object>
1045 <packing>
1046 <property name="x">118</property>
1047 <property name="y">45</property>
1048 </packing>
1049 </child>
1050 <child>
1051 <object class="GtkSpinButton" id="liftTriggerValue">
1052 <property name="width_request">100</property>
1053 <property name="height_request">27</property>
1054 <property name="visible">True</property>
1055 <property name="can_focus">True</property>
1056 <property name="invisible_char">●</property>
1057 </object>
1058 <packing>
1059 <property name="x">117</property>
1060 <property name="y">93</property>
1061 </packing>
1062 </child>
1063 <child>
1064 <object class="GtkComboBox" id="liftEnableCombo">
1065 <property name="width_request">100</property>
1066 <property name="height_request">27</property>
1067 <property name="visible">True</property>
1068 </object>
1069 <packing>
1070 <property name="x">117</property>
1071 <property name="y">138</property>
1072 </packing>
1073 </child>
1074 </object>
1075 </child>
1076 </object>
1077 </child>
1078 <child type="label">
1079 <object class="GtkLabel" id="genLiftOptions">
1080 <property name="visible">True</property>
1081 <property name="label" translatable="yes">&lt;b&gt;General Lift Options&lt;/b&gt;</property>
1082 <property name="use_markup">True</property>
1083 </object>
1084 </child>
1085 </object>
1086 <packing>
1087 <property name="x">5</property>
1088 <property name="y">6</property>
1089 </packing>
1090 </child>
1091 <child>
1092 <object class="GtkFrame" id="frame4">
1093 <property name="width_request">290</property>
1094 <property name="height_request">390</property>
1095 <property name="visible">True</property>
1096 <property name="label_xalign">0</property>
1097 <property name="shadow_type">out</property>
1098 <child>
1099 <object class="GtkAlignment" id="alignment4">
1100 <property name="visible">True</property>
1101 <property name="left_padding">12</property>
1102 <child>
1103 <object class="GtkFixed" id="fixed9">
1104 <property name="visible">True</property>
1105 <child>
1106 <object class="GtkLabel" id="lift0Label">
1107 <property name="width_request">40</property>
1108 <property name="height_request">27</property>
1109 <property name="visible">True</property>
1110 <property name="label" translatable="yes">lift0</property>
1111 </object>
1112 <packing>
1113 <property name="y">10</property>
1114 </packing>
1115 </child>
1116 <child>
1117 <object class="GtkLabel" id="lift1Label">
1118 <property name="width_request">40</property>
1119 <property name="height_request">27</property>
1120 <property name="visible">True</property>
1121 <property name="label" translatable="yes">lift1</property>
1122 </object>
1123 <packing>
1124 <property name="y">40</property>
1125 </packing>
1126 </child>
1127 <child>
1128 <object class="GtkLabel" id="lift2Label">
1129 <property name="width_request">40</property>
1130 <property name="height_request">27</property>
1131 <property name="visible">True</property>
1132 <property name="label" translatable="yes">lift2</property>
1133 </object>
1134 <packing>
1135 <property name="y">72</property>
1136 </packing>
1137 </child>
1138 <child>
1139 <object class="GtkLabel" id="lift3Label">
1140 <property name="width_request">40</property>
1141 <property name="height_request">27</property>
1142 <property name="visible">True</property>
1143 <property name="label" translatable="yes">lift3</property>
1144 </object>
1145 <packing>
1146 <property name="y">104</property>
1147 </packing>
1148 </child>
1149 <child>
1150 <object class="GtkLabel" id="lift4Label">
1151 <property name="width_request">40</property>
1152 <property name="height_request">27</property>
1153 <property name="visible">True</property>
1154 <property name="label" translatable="yes">lift4</property>
1155 </object>
1156 <packing>
1157 <property name="y">136</property>
1158 </packing>
1159 </child>
1160 <child>
1161 <object class="GtkLabel" id="lift5Label">
1162 <property name="width_request">40</property>
1163 <property name="height_request">27</property>
1164 <property name="visible">True</property>
1165 <property name="label" translatable="yes">lift5</property>
1166 </object>
1167 <packing>
1168 <property name="y">169</property>
1169 </packing>
1170 </child>
1171 <child>
1172 <object class="GtkLabel" id="lift6Label">
1173 <property name="width_request">40</property>
1174 <property name="height_request">27</property>
1175 <property name="visible">True</property>
1176 <property name="label" translatable="yes">lift6</property>
1177 </object>
1178 <packing>
1179 <property name="y">200</property>
1180 </packing>
1181 </child>
1182 <child>
1183 <object class="GtkLabel" id="lift7Label">
1184 <property name="width_request">40</property>
1185 <property name="height_request">27</property>
1186 <property name="visible">True</property>
1187 <property name="label" translatable="yes">lift7</property>
1188 </object>
1189 <packing>
1190 <property name="y">233</property>
1191 </packing>
1192 </child>
1193 <child>
1194 <object class="GtkLabel" id="liftDefaultLabel">
1195 <property name="width_request">50</property>
1196 <property name="height_request">27</property>
1197 <property name="visible">True</property>
1198 <property name="label" translatable="yes">default</property>
1199 </object>
1200 <packing>
1201 <property name="x">5</property>
1202 <property name="y">264</property>
1203 </packing>
1204 </child>
1205 <child>
1206 <object class="GtkEntry" id="lift0TagText">
1207 <property name="width_request">140</property>
1208 <property name="height_request">27</property>
1209 <property name="visible">True</property>
1210 <property name="can_focus">True</property>
1211 <property name="invisible_char">●</property>
1212 </object>
1213 <packing>
1214 <property name="x">77</property>
1215 <property name="y">8</property>
1216 </packing>
1217 </child>
1218 <child>
1219 <object class="GtkEntry" id="lift1TagText">
1220 <property name="width_request">140</property>
1221 <property name="height_request">27</property>
1222 <property name="visible">True</property>
1223 <property name="can_focus">True</property>
1224 <property name="invisible_char">●</property>
1225 </object>
1226 <packing>
1227 <property name="x">77</property>
1228 <property name="y">39</property>
1229 </packing>
1230 </child>
1231 <child>
1232 <object class="GtkEntry" id="lift2TagText">
1233 <property name="width_request">140</property>
1234 <property name="height_request">27</property>
1235 <property name="visible">True</property>
1236 <property name="can_focus">True</property>
1237 <property name="invisible_char">●</property>
1238 </object>
1239 <packing>
1240 <property name="x">77</property>
1241 <property name="y">71</property>
1242 </packing>
1243 </child>
1244 <child>
1245 <object class="GtkEntry" id="lift3TagText">
1246 <property name="width_request">140</property>
1247 <property name="height_request">27</property>
1248 <property name="visible">True</property>
1249 <property name="can_focus">True</property>
1250 <property name="invisible_char">●</property>
1251 </object>
1252 <packing>
1253 <property name="x">77</property>
1254 <property name="y">103</property>
1255 </packing>
1256 </child>
1257 <child>
1258 <object class="GtkEntry" id="lift4TagText">
1259 <property name="width_request">140</property>
1260 <property name="height_request">27</property>
1261 <property name="visible">True</property>
1262 <property name="can_focus">True</property>
1263 <property name="invisible_char">●</property>
1264 </object>
1265 <packing>
1266 <property name="x">77</property>
1267 <property name="y">135</property>
1268 </packing>
1269 </child>
1270 <child>
1271 <object class="GtkEntry" id="lift5TagText">
1272 <property name="width_request">140</property>
1273 <property name="height_request">27</property>
1274 <property name="visible">True</property>
1275 <property name="can_focus">True</property>
1276 <property name="invisible_char">●</property>
1277 </object>
1278 <packing>
1279 <property name="x">77</property>
1280 <property name="y">167</property>
1281 </packing>
1282 </child>
1283 <child>
1284 <object class="GtkEntry" id="lift6TagText">
1285 <property name="width_request">140</property>
1286 <property name="height_request">27</property>
1287 <property name="visible">True</property>
1288 <property name="can_focus">True</property>
1289 <property name="invisible_char">●</property>
1290 </object>
1291 <packing>
1292 <property name="x">77</property>
1293 <property name="y">199</property>
1294 </packing>
1295 </child>
1296 <child>
1297 <object class="GtkEntry" id="lift7TagText">
1298 <property name="width_request">140</property>
1299 <property name="height_request">27</property>
1300 <property name="visible">True</property>
1301 <property name="can_focus">True</property>
1302 <property name="invisible_char">●</property>
1303 </object>
1304 <packing>
1305 <property name="x">77</property>
1306 <property name="y">231</property>
1307 </packing>
1308 </child>
1309 <child>
1310 <object class="GtkEntry" id="liftDefaultTagText">
1311 <property name="width_request">140</property>
1312 <property name="height_request">27</property>
1313 <property name="visible">True</property>
1314 <property name="can_focus">True</property>
1315 <property name="invisible_char">●</property>
1316 </object>
1317 <packing>
1318 <property name="x">77</property>
1319 <property name="y">265</property>
1320 </packing>
1321 </child>
1322 </object>
1323 </child>
1324 </object>
1325 </child>
1326 <child type="label">
1327 <object class="GtkLabel" id="tagLiftLabel">
1328 <property name="visible">True</property>
1329 <property name="label" translatable="yes">&lt;b&gt;Tagging Lift Options&lt;/b&gt;</property>
1330 <property name="use_markup">True</property>
1331 </object>
1332 </child>
1333 </object>
1334 <packing>
1335 <property name="x">299</property>
1336 <property name="y">5</property>
1337 </packing>
1338 </child>
1339 </object>
1340 <packing>
1341 <property name="position">4</property>
1342 </packing>
1343 </child>
1344 <child type="tab">
1345 <object class="GtkLabel" id="liftOptionsLabel">
1346 <property name="visible">True</property>
1347 <property name="label" translatable="yes">Lift Options</property>
1348 </object>
1349 <packing>
1350 <property name="position">4</property>
1351 <property name="tab_fill">False</property>
1352 </packing>
1353 </child>
1354 </object>
1355 <packing>
1356 <property name="y">1</property>
1357 </packing>
1358 </child>
1359 </object>
1360 </child>
1361 </object>
1362 <object class="GtkMessageDialog" id="errorDialog">
1363 <property name="border_width">5</property>
1364 <property name="modal">True</property>
1365 <property name="type_hint">normal</property>
1366 <property name="skip_taskbar_hint">True</property>
1367 <property name="message_type">error</property>
1368 <property name="use_markup">True</property>
1369 <property name="secondary_use_markup">True</property>
1370 <child internal-child="vbox">
1371 <object class="GtkVBox" id="dialog-vbox1">
1372 <property name="visible">True</property>
1373 <property name="spacing">2</property>
1374 <child internal-child="action_area">
1375 <object class="GtkHButtonBox" id="dialog-action_area1">
1376 <property name="visible">True</property>
1377 <property name="layout_style">end</property>
1378 <child>
1379 <placeholder/>
1380 </child>
1381 <child>
1382 <object class="GtkButton" id="errorExitButton">
1383 <property name="label" translatable="yes">Exit</property>
1384 <property name="visible">True</property>
1385 <property name="can_focus">True</property>
1386 <property name="receives_default">True</property>
1387 <signal name="clicked" handler="messageDialogExit"/>
1388 </object>
1389 <packing>
1390 <property name="expand">False</property>
1391 <property name="fill">False</property>
1392 <property name="position">1</property>
1393 </packing>
1394 </child>
1395 </object>
1396 <packing>
1397 <property name="expand">False</property>
1398 <property name="pack_type">end</property>
1399 <property name="position">0</property>
1400 </packing>
1401 </child>
1402 </object>
1403 </child>
1404 <action-widgets>
1405 <action-widget response="0">errorExitButton</action-widget>
1406 </action-widgets>
1407 </object>
1408 <object class="GtkMessageDialog" id="infoDialog">
1409 <property name="border_width">5</property>
1410 <property name="modal">True</property>
1411 <property name="type_hint">normal</property>
1412 <property name="skip_taskbar_hint">True</property>
1413 <child internal-child="vbox">
1414 <object class="GtkVBox" id="dialog-vbox3">
1415 <property name="visible">True</property>
1416 <property name="spacing">2</property>
1417 <child internal-child="action_area">
1418 <object class="GtkHButtonBox" id="dialog-action_area3">
1419 <property name="visible">True</property>
1420 <property name="layout_style">end</property>
1421 <child>
1422 <object class="GtkButton" id="infoDialogOK">
1423 <property name="label" translatable="yes">OK</property>
1424 <property name="visible">True</property>
1425 <property name="can_focus">True</property>
1426 <property name="receives_default">True</property>
1427 <signal name="clicked" handler="infoDialogOKSignal"/>
1428 </object>
1429 <packing>
1430 <property name="expand">False</property>
1431 <property name="fill">False</property>
1432 <property name="position">0</property>
1433 </packing>
1434 </child>
1435 <child>
1436 <placeholder/>
1437 </child>
1438 </object>
1439 <packing>
1440 <property name="expand">False</property>
1441 <property name="pack_type">end</property>
1442 <property name="position">0</property>
1443 </packing>
1444 </child>
1445 </object>
1446 </child>
1447 <action-widgets>
1448 <action-widget response="0">infoDialogOK</action-widget>
1449 </action-widgets>
1450 </object>
1451</interface>
01452
=== renamed file 'client/python/gui.glade' => 'client/python/gui.glade.moved'
=== added file 'client/python/xibo.ico'
1Binary files client/python/xibo.ico 1970-01-01 00:00:00 +0000 and client/python/xibo.ico 2011-02-28 15:09:00 +0000 differ1453Binary files client/python/xibo.ico 1970-01-01 00:00:00 +0000 and client/python/xibo.ico 2011-02-28 15:09:00 +0000 differ
=== renamed file 'client/python/xibo.ico' => 'client/python/xibo.ico.moved'
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: