navilocal 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44aea07beba53d9e85a3ca39d76ee5085fc1baec93d0f67fddd8ae4b931ab0f7
4
- data.tar.gz: 6c7246d64199dff25eeabed0e6f7da3c1c1652edee78a9529f8207fa38a834a2
3
+ metadata.gz: 50e2ab7fb4d7cf1813173539e3d2ab77b5acdc47849a9cb7e29ed1a2bdf87917
4
+ data.tar.gz: 07d35928083050ff99e47f2bb88cd37abf6d8daffc3edc624d680ffa7939a636
5
5
  SHA512:
6
- metadata.gz: 06fa4c7f08442c515f705aae097f9c84fcda79ae271f0b51aeb90dc83d116427c775c3e77877f16ade15dac839e927787e4240f0e3ca418051ae4da9f3e26dee
7
- data.tar.gz: 6c969be5fa8a7cc045355ca626b556d8453bdc9871297a980094baa7988a693563bdcfc5aa2e8399b84e9e141978be30b37be0c75e3e4a90d7005a0d49435f0c
6
+ metadata.gz: 9a83cf5c0460528507e4f74b2f016de3eec43e07cfa551f808d8e14df2db79e4e1638aa9f072923fabb8e13f1508772008ae9848bd036cc30decd0ddbe0f9cb8
7
+ data.tar.gz: ba0911cd0c6bfd6bf0043b68c35167481f15891cbb8a57af58d63290658b33d407328acdcade619431e8a0d5f9f0514d2034f0dc74fe613114428142dc19f610
@@ -3,6 +3,10 @@ module CommonFunctions
3
3
  def create_tags(buffer)
4
4
  buffer.create_tag("double_spaced_line",
5
5
  "pixels_inside_wrap" => 2)
6
+
7
+ buffer.create_tag("small_gap_below",
8
+ "pixels_below_lines" => 2)
9
+
6
10
  buffer.create_tag("large_spaced_line",
7
11
  "pixels_inside_wrap" => 8)
8
12
  buffer.create_tag("wide_margins",
@@ -4,8 +4,9 @@ module NaviClientInstaller
4
4
  attr_accessor :window_ui
5
5
  include CommonFunctions
6
6
  attr_accessor :next_btn
7
+ attr_accessor :cancel_btn
7
8
 
8
- def initialize(settings, next_btn=nil)
9
+ def initialize(settings, next_btn=nil, show_cancel_btn = nil)
9
10
  builder = Gtk::Builder.new(:resource => '/com/navi/navi-client/ui/account_configuration.ui')
10
11
  css_provider = Gtk::CssProvider.new
11
12
  css_provider.load(:resource_path => '/com/navi/navi-client/css/main.css')
@@ -15,7 +16,13 @@ module NaviClientInstaller
15
16
  @combo_text_provider = builder.get_object("combo_text_ac_provider")
16
17
  @entry_email = builder.get_object("entry_email")
17
18
  @entry_password = builder.get_object("entry_password")
18
- @next_btn = next_btn.nil? ? builder.get_object("btn_change") : next_btn
19
+
20
+
21
+ if(next_btn.nil?)
22
+ @next_btn = builder.get_object("btn_change")
23
+ @cancel_btn = builder.get_object("btn_cancel")
24
+ @cancel_btn.visible = true unless show_cancel_btn.nil?
25
+ end
19
26
  @next_btn.visible = true
20
27
 
21
28
  # @settings = settings
@@ -97,12 +97,14 @@ module NaviClientInstaller
97
97
  end
98
98
 
99
99
 
100
- @logout_control = Proc.new do |arg|
100
+ @logout_control = Proc.new do |show_cancel_btn|
101
101
  # @current_window.prepare_ui btn_next, btn_back
102
102
  #
103
103
  main_stack.remove (@step_account_configuration.window_ui) if @step_account_configuration
104
104
 
105
- @step_account_configuration = NaviClientInstaller::AccountConfiguration.new @settings
105
+ @step_account_configuration = NaviClientInstaller::AccountConfiguration.new @settings, nil, show_cancel_btn
106
+ temp_password = @settings.password
107
+ temp_username = @settings.username
106
108
 
107
109
  @step_account_configuration.next_btn.signal_connect 'clicked' do |button|
108
110
 
@@ -112,6 +114,14 @@ module NaviClientInstaller
112
114
  @splash.initiate_signup @signup_gauss, @logout_control
113
115
  end
114
116
 
117
+ @step_account_configuration.cancel_btn&.signal_connect 'clicked' do |button|
118
+ @settings.password = temp_password
119
+ @settings.username = temp_username
120
+ @settings.save_settings
121
+ main_stack.set_visible_child(@splash.window_ui)
122
+ @splash.initiate_signup @signup_gauss, @logout_control
123
+ end
124
+
115
125
  main_stack.add_named(@step_account_configuration.window_ui, "account_configuration")
116
126
 
117
127
 
@@ -38,6 +38,8 @@ module NaviClientInstaller
38
38
  @settings = settings
39
39
  apply_css @window_ui, css_provider
40
40
 
41
+
42
+ create_tags(@log_display.buffer)
41
43
  @iter_log = @log_display.buffer.get_iter_at(:offset => 0)
42
44
 
43
45
  @log_display.signal_connect 'size-allocate' do |button|
@@ -47,7 +49,7 @@ module NaviClientInstaller
47
49
 
48
50
  @stop_btn.signal_connect 'clicked' do |button|
49
51
  terminate_worker_thread
50
- @logger.debug "Process terminated"
52
+ @logger.debug "process terminated"
51
53
  button.set_sensitive false
52
54
  @spinner_indicator.active = false
53
55
  @notifier.label = "Terminated.."
@@ -152,7 +154,6 @@ module NaviClientInstaller
152
154
  filenames = []
153
155
  dateStarted = DateTime.now
154
156
  @logger.debug "Syncing started at #{dateStarted}"
155
- @client.logToLoggly({event:"EMAIL_SYNC_STARTED", env: env, storage: "local", email: @settings.username})
156
157
 
157
158
  sendEmailCompletedEvent = true
158
159
  folder = "Inbox"
@@ -165,7 +166,7 @@ module NaviClientInstaller
165
166
  downloaded = [downloaded, total].min
166
167
 
167
168
  @email_indicator.label = "#{downloaded}/#{total}"
168
-
169
+ @client.logToLoggly({event:"EMAIL_SYNC_STARTED", env: env, storage: "local", email: @settings.username, total_email: total, already_downloaded: downloaded})
169
170
 
170
171
  # start_naviai
171
172
  @notifier.label = "Checking for previous failures.."
@@ -183,7 +184,7 @@ module NaviClientInstaller
183
184
  downloaded = [downloaded, total].min
184
185
  @email_indicator.label = "#{downloaded}/#{total}"
185
186
 
186
- @logger.debug "Processing Complete. OK..."
187
+ @logger.debug "processing Complete. OK..."
187
188
 
188
189
  if filenames.size == 50 || isLast
189
190
  sendEmailCompletedEvent = !sendEmailCompletedEvent
@@ -208,7 +209,7 @@ module NaviClientInstaller
208
209
  totalTimeInSecs = (dateEnded - dateStarted) * 24 * 60 * 60
209
210
  new_emails = true
210
211
 
211
- @client.logToLoggly({event:"EMAIL_SYNC_FINISHED", env: env, storage: "local", email: @settings.username, emailCount: index + 1, time_elapsed: totalTimeInSecs.to_f.round(2)})
212
+ @client.logToLoggly({event:"EMAIL_SYNC_FINISHED", env: env, storage: "local", email: @settings.username, emailCount: index + 1, time_elapsed: totalTimeInSecs.to_f.round(2), total_email: total, already_downloaded: downloaded})
212
213
  @logger.debug "#{index + 1} emails from the #{folder} has been downloaded. OK"
213
214
  @logger.debug "started: #{dateStarted.to_s} , ended: #{dateEnded.to_s}, Total time: #{totalTimeInSecs.to_f.round(2)} secs"
214
215
  end
@@ -227,7 +228,7 @@ module NaviClientInstaller
227
228
 
228
229
  if complete
229
230
  downloaded+=1
230
- @logger.debug "Processing Complete. OK..."
231
+ @logger.debug "processing Complete. OK..."
231
232
  else
232
233
  @notifier.label = "Fetching emails..."
233
234
  @logger.debug "processing email##{index + 1} with id #{mail.__id__.to_s} and uuid #{id}"
@@ -300,13 +301,15 @@ class CustomLogger
300
301
 
301
302
  def info msg
302
303
  # p msg
303
- @buffer.insert_markup(@iter, "#{msg}\n")
304
+ @buffer.insert(@iter, "#{msg}", :tags => %w(small_gap_below normal-size))
305
+ @buffer.insert_markup(@iter, "\n")
304
306
  @logger_custom.info msg
305
307
  end
306
308
 
307
309
  def debug msg
308
310
  # p msg
309
- @buffer.insert_markup(@iter, "#{msg}\n")
311
+ @buffer.insert(@iter, "#{msg}", :tags => %w(small_gap_below normal-size))
312
+ @buffer.insert_markup(@iter, "\n")
310
313
  @logger_custom.debug msg
311
314
  end
312
315
  end
@@ -58,14 +58,13 @@ module NaviClientInstaller
58
58
  password_entry = @builder.get_object("entry_splash_pass")
59
59
  back_btn = @builder.get_object("back")
60
60
  connect_btn = @builder.get_object("connect_btn")
61
- account_label = @builder.get_object("account_label")
62
61
 
63
62
  email_entry.set_text @settings.username
64
63
  password_entry.set_text ""
65
64
 
66
65
  if login_info.label.to_s.empty?
67
66
  back_btn.signal_connect("clicked") {|widget|
68
- back_callback&.call
67
+ back_callback&.call true
69
68
  }
70
69
 
71
70
  connect_btn.signal_connect("clicked") {|widget|
@@ -115,13 +114,10 @@ module NaviClientInstaller
115
114
  }
116
115
 
117
116
  # create_tags(login_info.buffer)
118
- create_tags(account_label.buffer)
119
117
 
120
118
  login_info.label = "Please connect to our app using your preferred email address."
121
119
  # login_info.buffer.insert(login_info.buffer.get_iter_at(:offset => 0), "Please connect to our app using your preferred email address.")
122
120
 
123
- account_label.buffer.insert(account_label.buffer.get_iter_at(:offset => 0), "Don't have an Account? Create Account.")
124
-
125
121
  end
126
122
 
127
123
 
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navilocal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Msanjib