1. Erik Grinaker
  2. Revelation

Commits

Erik Grinaker  committed 4dfbd6e

use better stock icons for dialog buttons

  • Participants
  • Parent commits 9b4f955
  • Branches default

Comments (0)

Files changed (5)

File ChangeLog

View file
 
 	* added a password checker dialog
 
+	* use better stock icons for dialog buttons
+
 2005-03-17  Erik Grinaker <erikg@codepoet.no>
 
 	* fix potential crash on quit with some pygtk versions

File NEWS

View file
 - hide any open dialogs when locking the file
 - update icons on theme change
 - use better lock icon
+- use better stock icons for dialog buttons
 - left-align labels in link-buttons (for URLs etc)
 
 Code changes:

File TODO

View file
 - gnome panel applets (account lookup, password generator etc)
   - show complete account tree as a popup-submenu of the applet
   - make library modules more independent, so only a few are imported
-- check all dialog buttons, and use better stock items where useful
 - run unit tests on built libraries instead of installed ones
 - only copy/paste entries with keyboard shortcut when tree has focus
   (ctrl-c should copy selected label in dataview when focused)

File src/lib/dialog.py

View file
 	def __init__(self, parent, password):
 		Password.__init__(
 			self, parent, "Enter password to unlock file",
-			"The current file has been locked, please enter the file password to unlock it."
+			"The current file has been locked, please enter the file password to unlock it.",
+			ui.STOCK_UNLOCK
 		)
 
 		self.get_button(1).destroy()
 	"A dialog for editing entries"
 
 	def __init__(self, parent, cfg, title, e = None):
+		if e == None:
+			stock = ui.STOCK_ADD
+
+		else:
+			stock = ui.STOCK_EDIT
+
 		Utility.__init__(
 			self, parent, title,
-			( ( gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL ), ( gtk.STOCK_OK, gtk.RESPONSE_OK ) )
+			( ( gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL ), ( stock, gtk.RESPONSE_OK ) )
 		)
 
 		self.config		= cfg
 		Error.__init__(
 			self, parent, "Unknown error",
 			"An unknown error occured. Please report the text below to the Revelation developers, along with what you were doing that may have caused the error. You may attempt to continue running Revelation, but it may behave unexpectedly.",
-			( ( gtk.STOCK_QUIT, gtk.RESPONSE_CANCEL ), ( "Continue", gtk.RESPONSE_OK ) )
+			( ( gtk.STOCK_QUIT, gtk.RESPONSE_CANCEL ), ( ui.STOCK_CONTINUE, gtk.RESPONSE_OK ) )
 		)
 
 		textview = ui.TextView(None, traceback)

File src/lib/ui.py

View file
 
 
 STOCK_ADD			= "revelation-add"
+STOCK_CONTINUE			= "revelation-continue"
 STOCK_DISCARD			= "revelation-discard"
 STOCK_EDIT			= "revelation-edit"
 STOCK_EXPORT			= "revelation-export"
 STOCK_RELOAD			= "revelation-reload"
 STOCK_REMOVE			= "revelation-remove"
 STOCK_UNKNOWN			= "revelation-unknown"
+STOCK_UNLOCK			= "revelation-unlock"
 
 
 STOCK_ENTRY_FOLDER		= "revelation-folder"
 
 		items = (
 			( STOCK_ADD,		"_Add Entry",	gtk.STOCK_ADD ),
+			( STOCK_CONTINUE,	"_Continue",	"stock_test-mode" ),
 			( STOCK_DISCARD,	"_Discard",	gtk.STOCK_DELETE ),
 			( STOCK_EDIT,		"_Edit",	"stock_edit" ),
 			( STOCK_EXPORT,		"_Export",	gtk.STOCK_EXECUTE ),
 			( STOCK_RELOAD,		"_Reload",	gtk.STOCK_REFRESH ),
 			( STOCK_REMOVE,		"Re_move",	gtk.STOCK_DELETE ),
 			( STOCK_UNKNOWN,	"Unknown",	gtk.STOCK_DIALOG_QUESTION ),
+			( STOCK_UNLOCK,		"_Unlock",	"stock_lock-open" ),
 		)
 
 		for id, name, icon in items: