gtk2passwordapp 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/gtk2passwordapp CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
- # $Date: 2009/02/19 15:50:30 $
2
+ # $Date: 2009/02/20 16:12:17 $
3
3
  ##########################################################
4
4
  require 'lib/global_options_variables'
5
- GlobalOptionsVariables.set('0.0.1',
5
+ GlobalOptionsVariables.set('0.0.2',
6
6
  <<EOT
7
7
  Usage: #{$0.sub(/^.*\//,'')} [options]
8
8
 
data/lib/configuration.rb CHANGED
@@ -1,4 +1,4 @@
1
- #$Date: 2009/02/19 17:56:37 $
1
+ #$Date: 2009/02/20 16:10:29 $
2
2
  # Note: you'll see in ~/.gtk2passwordapp a file called passphrase.txt.
3
3
  # Do not edit or delete passphrase, or you'll loose your passwords data.
4
4
  module Configuration
@@ -13,7 +13,7 @@ module Configuration
13
13
  DEFAULT_PASSWORD_LENGTH = 7
14
14
  MIN_PASSWORD_LENGTH = 3
15
15
 
16
- VERIFIED_EXPIRED = 60*15 # 15 minutes
16
+ VERIFIED_EXPIRED = 60*60 # one hour
17
17
  PASSWORD_EXPIRED = 60*60*24*30*3 # 3 months
18
18
 
19
19
  URL_PATTERN = Regexp.new('^https?:\/\/[^\s\']+$')
@@ -1,4 +1,4 @@
1
- # $Date: 2009/02/19 20:50:22 $
1
+ # $Date: 2009/02/20 16:08:59 $
2
2
  require 'lib/passwords_data'
3
3
  require 'gtk2'
4
4
  require 'find'
@@ -13,7 +13,7 @@ class Gtk2PasswordApp
13
13
  'website' => 'http://ruby-gnome-apps.blogspot.com/search/label/Passwords',
14
14
  'website-label' => 'Ruby Gnome Password Manager',
15
15
  'license' => 'GPL',
16
- 'copyright' => '$Date: 2009/02/19 20:50:22 $'.gsub(/\s*\$\s*/,''),
16
+ 'copyright' => '$Date: 2009/02/20 16:08:59 $'.gsub(/\s*\$\s*/,''),
17
17
  'logo' => Gdk::Pixbuf.new(LOGO_IMAGE),
18
18
  }
19
19
 
@@ -549,18 +549,20 @@ class Gtk2PasswordApp
549
549
  quit_windows
550
550
  else
551
551
  menu = Gtk::Menu.new
552
- @passwords.accounts.each {|account|
553
- menuitem = Gtk::MenuItem.new(account)
554
- menuitem.child.modify_fg(Gtk::STATE_NORMAL, RED) if @passwords.expired?(account)
555
- menu.append(menuitem)
556
- menuitem.signal_connect('activate'){|b|
557
- primary = Gtk::Clipboard.get(Gdk::Selection::PRIMARY)
558
- clipboard = Gtk::Clipboard.get(Gdk::Selection::CLIPBOARD)
559
- primary.text = clipboard.text = @passwords.password_of(b.child.text.strip)
560
- }
561
- }
562
552
 
563
- menu.append( Gtk::SeparatorMenuItem.new )
553
+ if verify_user then
554
+ @passwords.accounts.each {|account|
555
+ menuitem = Gtk::MenuItem.new(account)
556
+ menuitem.child.modify_fg(Gtk::STATE_NORMAL, RED) if @passwords.expired?(account)
557
+ menu.append(menuitem)
558
+ menuitem.signal_connect('activate'){|b|
559
+ primary = Gtk::Clipboard.get(Gdk::Selection::PRIMARY)
560
+ clipboard = Gtk::Clipboard.get(Gdk::Selection::CLIPBOARD)
561
+ primary.text = clipboard.text = @passwords.password_of(b.child.text.strip)
562
+ }
563
+ }
564
+ menu.append( Gtk::SeparatorMenuItem.new )
565
+ end
564
566
 
565
567
  menuitem = Gtk::MenuItem.new('Quit')
566
568
  menuitem.signal_connect('activate'){
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.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - carlosjhr64@gmail.com