lib/qooxview/helpers/config_base.rb in qooxview-1.9.9 vs lib/qooxview/helpers/config_base.rb in qooxview-1.9.10
- old
+ new
@@ -7,10 +7,11 @@
def setup_data
value_block :wide
value_list :functions, 'ConfigBases.list_functions'
value_str :dputs_logfile
+ value_str :dputs_logall
value_text :welcome_text
value_block :narrow
value_str :locale_force
value_str :version_local
@@ -39,10 +40,11 @@
c._version_local = 'orig'
c._welcome_text = 'Welcome to Profeda'
# Values for slow, buggy lines. For a good transfer-rate, choose 16x more
c._block_size = 4096
c._max_upload_size = 65_536
+ c.dputs_logall = '/var/log/gestion/gestion.log'
c.dputs_logfile = '/var/log/gestion/events.log'
c.dputs_show_time = %w(min)
c.dputs_silent = %w(false)
c.dputs_terminal_width = 160
c.openprint_simul = %w(false)
@@ -98,16 +100,24 @@
def setup_instance
dputs(4) { "Setting up ConfigBase with debug_lvl = #{debug_lvl}" }
if !Object.const_defined? :DEBUG_LVL
self.debug_lvl = debug_lvl
end
+ is_loading { setup_defaults }
+ end
+
+ def setup_defaults
+ DPuts.logall_file = dputs_logall
+ DPuts.log_file = dputs_logfile
DPuts.silent = dputs_silent == %w(true)
DPuts.show_time = (dputs_show_time || %w(min)).first
DPuts.terminal_width = (dputs_terminal_width || 160).to_i
- is_loading { setup_defaults }
+
+ send_config
end
- def setup_defaults
+ # This can be used in an overriden ConfigBase-class to send individual configs
+ def send_config
end
def is_loading
oldloading = @loading
@loading = true