gtk2passwordapp 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/bin/gtk2passwordapp CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
- # $Date: 2009/02/25 20:35:45 $
2
+ # $Date: 2009/02/27 23:51:40 $
3
3
  ##########################################################
4
4
  require 'lib/global_options_variables'
5
- GlobalOptionsVariables.set('0.0.7',
5
+ GlobalOptionsVariables.set('0.0.8',
6
6
  <<EOT
7
7
  Usage: #{$0.sub(/^.*\//,'')} [options]
8
8
 
@@ -15,6 +15,7 @@ EOT
15
15
  )
16
16
  require 'lib/setup_user_space'
17
17
  UserSpace.setup
18
+ UserSpace.copy('/README.txt')
18
19
  require USER_CONF_DIR+CONF_FILE
19
20
  ##########################################################
20
21
  require 'lib/gtk2passwordapp'
data/bin/gtk2passwordmenu CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
- # $Date: 2009/02/25 20:35:45 $
2
+ # $Date: 2009/02/27 23:51:40 $
3
3
  ##########################################################
4
4
  require 'lib/global_options_variables'
5
- GlobalOptionsVariables.set('0.0.7',
5
+ GlobalOptionsVariables.set('0.0.8',
6
6
  <<EOT
7
7
  Usage: gtk2passwordmenu [options]
8
8
 
@@ -18,6 +18,7 @@ EOT
18
18
  )
19
19
  require 'lib/setup_user_space'
20
20
  UserSpace.setup
21
+ UserSpace.copy('/README.txt')
21
22
  require USER_CONF_DIR+CONF_FILE
22
23
  ##########################################################
23
24
  require 'lib/gtk2passwordmenu'
@@ -1,4 +1,4 @@
1
- # $Date: 2009/02/26 01:03:00 $
1
+ # $Date: 2009/02/28 00:30:16 $
2
2
  require 'lib/passwords_data'
3
3
  require 'find'
4
4
 
@@ -12,7 +12,7 @@ class Gtk2PasswordApp
12
12
  'website' => 'http://ruby-gnome-apps.blogspot.com/search/label/Passwords',
13
13
  'website-label' => 'Ruby Gnome Password Manager',
14
14
  'license' => 'GPL',
15
- 'copyright' => '$Date: 2009/02/26 01:03:00 $'.gsub(/\s*\$\s*/,''),
15
+ 'copyright' => '$Date: 2009/02/28 00:30:16 $'.gsub(/\s*\$\s*/,''),
16
16
  'logo' => Gdk::Pixbuf.new(GEM_ROOT_DIR+'/gifs/logo.gif'),
17
17
  }
18
18
 
@@ -427,6 +427,9 @@ class Gtk2PasswordApp
427
427
  combo_box.remove_text(i)
428
428
  end
429
429
  }
430
+ if i = new_list.index( widget[:account].active_text ) then
431
+ combo_box.active = i
432
+ end
430
433
  else
431
434
  quit_windows
432
435
  end
@@ -437,11 +440,17 @@ class Gtk2PasswordApp
437
440
 
438
441
  # Delete
439
442
  widget[:delete].signal_connect('clicked'){
440
- account = (widget[:account].active_text)? widget[:account].active_text.strip: ''
441
- i = @passwords.accounts.index(account)
442
- @passwords.delete(account)
443
- widget[:account].remove_text(i)
444
- @updated = true
443
+ account = (widget[:account].active_text)? widget[:account].active_text.strip: nil
444
+ if account then
445
+ i = @passwords.accounts.index(account)
446
+ if i then
447
+ @passwords.delete(account)
448
+ widget[:account].remove_text(i)
449
+ widget[:account].active = (i > 0)? i - 1: 0
450
+ @updated = true
451
+ quick_message("#{account} deleted.", window)
452
+ end
453
+ end
445
454
  }
446
455
 
447
456
  # Cancel
@@ -495,7 +504,8 @@ class Gtk2PasswordApp
495
504
  if !@passwords.online? then
496
505
  button[:edit].child.modify_fg(Gtk::STATE_NORMAL, (@passwords.expired?(combo_box.active_text.strip))? RED: BLACK) if combo_box.active_text
497
506
  combo_box.signal_connect('changed'){
498
- button[:edit].child.modify_fg(Gtk::STATE_NORMAL, (@passwords.expired?(combo_box.active_text.strip))? RED: BLACK)
507
+ txt = combo_box.active_text
508
+ button[:edit].child.modify_fg(Gtk::STATE_NORMAL, (@passwords.expired?(txt.strip))? RED: BLACK) if txt
499
509
  }
500
510
  end
501
511
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk2passwordapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - carlosjhr64@gmail.com
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-25 00:00:00 -08:00
12
+ date: 2009-02-27 00:00:00 -08:00
13
13
  default_executable: gtk2youtubeapp
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency