Skip to content
This repository
Browse code

saner update

  • Loading branch information...
commit b1b5da23cd00f2212a33eb07bae9ce7dae6153fb 1 parent 0b416a3
Roger Pack authored August 22, 2011
35  bin/sensible-cinema
@@ -93,14 +93,13 @@ module SensibleSwing
93 93
      ARGV.index("--create-mode")
94 94
     end
95 95
     
96  
-    # currently advanced mode only *adds* buttons
97 96
     def new_jbutton title, tooltip = nil
98 97
       button = JButton.new title
99 98
       button.tool_tip = tooltip
100 99
       button.set_bounds(44, @starting_button_y, @button_width, 23)
101 100
       @panel.add button
102 101
       @buttons << button
103  
-      if block_given? # allow for new_jbutton("xx") do ... end [this works through some miraculous means LOL]
  102
+      if block_given? # allow for new_jbutton("xx") do ... end [this is possible through some miraculous means LOL]
104 103
         button.on_clicked { yield }
105 104
       end
106 105
       increment_button_location
@@ -134,9 +133,9 @@ module SensibleSwing
134 133
 
135 134
     LocalStorage = Storage.new("sensible_cinema_storage")
136 135
     
137  
-    def close_when_done thread, jitem
138  
-      if jitem
139  
-        Thread.new { thread.join; jitem.dispose }
  136
+    def close_when_done thread, j_item
  137
+      if j_item
  138
+        Thread.new { thread.join; j_item.dispose }
140 139
       end
141 140
     end
142 141
     
@@ -167,14 +166,14 @@ module SensibleSwing
167 166
     end
168 167
     
169 168
     # a window that when closed doesn't bring the whole app down
170  
-    def self.new_child_window
171  
-      out = MainWindow.new
172  
-      out.setDefaultCloseOperation(JFrame::DISPOSE_ON_CLOSE)
173  
-      out.parent=self
174  
-      out
  169
+    def new_child_window
  170
+      child = MainWindow.new
  171
+      child.setDefaultCloseOperation(JFrame::DISPOSE_ON_CLOSE)
  172
+      child.parent=self # this should have failed in the PPL
  173
+      child
175 174
     end
176 175
     
177  
-    attr_accessor :parent
  176
+    attr_accessor :parent, :upconv_line
178 177
 
179 178
     def add_change_upconvert_options_button
180 179
       @show_upconvert_options = new_jbutton("Set Playback Upconversion Quality Options") do
@@ -190,7 +189,7 @@ module SensibleSwing
190 189
           LocalStorage['screen_multiples'] = 2.0
191 190
         end
192 191
         
193  
-        upconvert_window = MainWindow.new_child_window
  192
+        upconvert_window = new_child_window
194 193
         upconvert_window.add_change_upconvert_buttons
195 194
       end
196 195
       @show_upconvert_options.tool_tip= "Allows you to set your upconvert options.\nUpconverting attempts to playback your movie with higher quality on high resolution monitors."
@@ -203,7 +202,13 @@ module SensibleSwing
203 202
     end
204 203
     
205 204
     def change_upconvert_line_to_current
206  
-      @upconv_line.set_text get_current_upconvert_as_phrase if @upconv_line # LODO ...
  205
+      current = get_current_upconvert_as_phrase
  206
+      if @upconv_line
  207
+        @upconv_line.set_text current
  208
+      end
  209
+      if @parent && @parent.upconv_line
  210
+        @parent.upconv_line.set_text current
  211
+      end # LODO we want both [?]
207 212
     end
208 213
     
209 214
     def select_new_sxs_style
@@ -361,7 +366,7 @@ module SensibleSwing
361 366
     def setup_advanced_buttons
362 367
     
363 368
       new_jbutton("Display the standard buttons") do
364  
-        window = MainWindow.new_child_window
  369
+        window = new_child_window
365 370
         window.setup_normal_buttons
366 371
       end
367 372
     
@@ -503,7 +508,7 @@ module SensibleSwing
503 508
       add_text_line 'Create Options with local intermediary file:'
504 509
       
505 510
       new_jbutton("Show options with local intermediary file") do
506  
-        window = MainWindow.new_child_window
  511
+        window = new_child_window
507 512
         window.add_options_that_use_local_files
508 513
       end
509 514
       
2  upconvert.bat
... ...
@@ -1 +1 @@
1  
-j bin/sensible-cinema --upconvert-mode
  1
+j %* bin/sensible-cinema --upconvert-mode

0 notes on commit b1b5da2

Please sign in to comment.
Something went wrong with that request. Please try again.