savant-scenes 0.2.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/src/SceneManager.rb +15 -8
- data/bin/src/glade/SceneManager.glade +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9e5402055742f0f70932825792310aa90141712
|
4
|
+
data.tar.gz: f5fc4f1f20d3420f0e8df55b11c85ffb711f33e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee0003002a456eaa16107db29af9e58a525e1336426d90f0e326df4b9d83e54e2d82926af4782c6f9e522eb2be1f79ea7e72ea3c6971e3fe849060038bca59b2
|
7
|
+
data.tar.gz: 28fc520229783fce34564cff5764c7ce5658b955b9924ae7a11f0699e59c279794c00bd9d03042d140b7227ef9bfe17034fb6d41c6f8fa2185e1b16c4a51785f
|
data/bin/src/SceneManager.rb
CHANGED
@@ -21,7 +21,7 @@ class SceneManager
|
|
21
21
|
@listviewSavantScenes.col_title(:modify => "", :scene => "Scene Name", :tags => "Zones Affected", :isGlobal => "Global", :isActive => "Active", :isScheduled => "Scheduled", :hasCustomImage => "Custom Image", :userSceneOrder => "User Order")
|
22
22
|
@listviewSavantScenes.col_xalign(:isGlobal => 0.5, :isActive => 0.5, :isScheduled => 0.5, :hasCustomImage => 0.5, :userSceneOrder => 0.5)
|
23
23
|
@listviewSavantScenes.col_width(:tags => 100, :image => 100)
|
24
|
-
@listviewSavantScenes.ren_editable(:scene => true, :user => true, :id => true)
|
24
|
+
@listviewSavantScenes.ren_editable(:scene => true, :user => true, :id => true, :isGlobal => String)
|
25
25
|
|
26
26
|
row = @listviewSavantScenes.add_row
|
27
27
|
row[:scene] = ""
|
@@ -45,10 +45,10 @@ class SceneManager
|
|
45
45
|
text == "this is never going to validate"
|
46
46
|
}
|
47
47
|
|
48
|
-
#Validate
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
#Validate isGlobal to only be a 0 or 1
|
49
|
+
@listviewSavantScenes.renderer(:isGlobal).validate_block = Proc.new { |text, model_sym, row, view|
|
50
|
+
text == "0" || text == "1"
|
51
|
+
}
|
52
52
|
|
53
53
|
# Capture user name change, save to SQL, and transfer SQL to host
|
54
54
|
# @listviewSavantScenes.renderer(:user).edited_callback = Proc.new { |model_sym, row, view |
|
@@ -109,6 +109,7 @@ class SceneManager
|
|
109
109
|
else
|
110
110
|
@scliBridge = "/usr/local/bin/sclibridge "
|
111
111
|
@dis = "GNUstep/Library/ApplicationSupport/RacePointMedia/statusfiles/dis/dashboard.sqlite"
|
112
|
+
alert "smart host"
|
112
113
|
end
|
113
114
|
end
|
114
115
|
end
|
@@ -146,6 +147,7 @@ class SceneManager
|
|
146
147
|
x = x[1].split("\n")
|
147
148
|
@savantHostName = x[0][1..-1]
|
148
149
|
@str = @scliBridge + "readstate \"" + @savantHostName + ".SoftwareVersion\""
|
150
|
+
alert @str
|
149
151
|
end
|
150
152
|
end
|
151
153
|
end
|
@@ -160,6 +162,8 @@ class SceneManager
|
|
160
162
|
end
|
161
163
|
ssh.loop
|
162
164
|
end
|
165
|
+
alert @savantHostName
|
166
|
+
alert @savantHostVersion
|
163
167
|
@builder["labelHostInfo"].text = @savantHostName + " Version : " + @savantHostVersion
|
164
168
|
|
165
169
|
#return true if version is 8.3 or later
|
@@ -283,6 +287,7 @@ class SceneManager
|
|
283
287
|
editScenes = []
|
284
288
|
editIDs = []
|
285
289
|
editUsers = []
|
290
|
+
editGlobal = []
|
286
291
|
count = 0
|
287
292
|
@listviewSavantScenes.each_row do |row|
|
288
293
|
if row[:modify]
|
@@ -290,6 +295,7 @@ class SceneManager
|
|
290
295
|
editScenes << row[:scene]
|
291
296
|
editIDs << row[:id]
|
292
297
|
editUsers << row[:user]
|
298
|
+
editGlobal << row[:isGlobal]
|
293
299
|
end
|
294
300
|
end
|
295
301
|
#make sure a scene was selected, else alert the user
|
@@ -305,9 +311,10 @@ class SceneManager
|
|
305
311
|
stm.bind_param 2, id
|
306
312
|
stm.execute
|
307
313
|
stm.close
|
308
|
-
stm = @db.prepare( "update scenes set name=? where identifier=?" )
|
314
|
+
stm = @db.prepare( "update scenes set name=?, isGlobal=? where identifier=?" )
|
309
315
|
stm.bind_param 1, editScenes[count]
|
310
|
-
stm.bind_param 2,
|
316
|
+
stm.bind_param 2, editGlobal[count]
|
317
|
+
stm.bind_param 3, id
|
311
318
|
stm.execute
|
312
319
|
stm.close
|
313
320
|
|
@@ -362,7 +369,7 @@ class SceneManager
|
|
362
369
|
end
|
363
370
|
end
|
364
371
|
|
365
|
-
#
|
372
|
+
# Duplicate the selected scenes
|
366
373
|
# def buttonDuplicateScene__clicked(*argv)
|
367
374
|
# get_glade_variables()
|
368
375
|
#
|
@@ -280,7 +280,7 @@
|
|
280
280
|
<property name="margin_top">12</property>
|
281
281
|
<property name="margin_bottom">12</property>
|
282
282
|
<property name="label" translatable="yes"> Savant scene manager copies the dashboard.sqlite file from the host to a temporary folder and lists all scenes from all users on that host.
|
283
|
-
You can backup and restore this database, as well as delete scenes or edit certain properties: Scene Name and
|
283
|
+
You can backup and restore this database, as well as delete scenes or edit certain properties: Scene Name, user email, and if the scene is Global.
|
284
284
|
|
285
285
|
If the host is running at least 8.3, you can also activate scenes.</property>
|
286
286
|
<property name="justify">center</property>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: savant-scenes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Miller
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir:
|
10
10
|
- bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-05-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sqlite3
|
@@ -132,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
132
|
requirements:
|
133
133
|
- - ">="
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
version: '2.
|
135
|
+
version: '2.2'
|
136
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
138
|
- - ">="
|