Commits

Erik Grinaker committed cd39bf4

use stock gtk icon sizes instead of custom ones

Comments (0)

Files changed (4)

 	* use icons instead of colors in password entries to indicate
 	strength
 
+	* use stock gtk icon sizes instead of custom ones
+
 2006-01-20  Erik Grinaker <erikg@codepoet.no>
 
 	* strip xml entities from password on clipboard copy or
 - changed button "Edit" to "Update" in edit entry dialog
 - remove GNOME_RevelationApplet.server during make clean
 
+Code changes:
+- use stock gtk icon sizes instead of custom ones
+
+
 2005-08-25: Revelation 0.4.5
 ============================
 
 - sorting of the tree
 - add binary entropy check to password checker
 - make result label in password checker wrap when text overflows
-- use normal gtk icon sizes when possible (aliased by internal names)
 - next / prev buttons in searchbar
 - replace find dialog with searchbar?
 
 STOCK_REVELATION_LOCKED		= "revelation-revelation-locked"
 
 
-ICON_SIZE_APPLET		= gtk.icon_size_from_name("revelation-applet")
-ICON_SIZE_DATAVIEW		= gtk.icon_size_from_name("revelation-dataview")
-ICON_SIZE_DROPDOWN		= gtk.icon_size_from_name("revelation-dropdown")
-ICON_SIZE_LABEL			= gtk.icon_size_from_name("revelation-label")
-ICON_SIZE_LOGO			= gtk.icon_size_from_name("revelation-logo")
-ICON_SIZE_TREEVIEW		= gtk.icon_size_from_name("revelation-treeview")
-
-if ICON_SIZE_APPLET == gtk.ICON_SIZE_INVALID:
-	ICON_SIZE_APPLET	= gtk.icon_size_register("revelation-applet", 24, 24)
-
-if ICON_SIZE_DATAVIEW == gtk.ICON_SIZE_INVALID:
-	ICON_SIZE_DATAVIEW	= gtk.icon_size_register("revelation-dataview", 24, 24)
-
-if ICON_SIZE_DROPDOWN == gtk.ICON_SIZE_INVALID:
-	ICON_SIZE_DROPDOWN	= gtk.icon_size_register("revelation-dropdown", 18, 18)
-
-if ICON_SIZE_LABEL == gtk.ICON_SIZE_INVALID:
-	ICON_SIZE_LABEL		= gtk.icon_size_register("revelation-label", 24, 24)
-
-if ICON_SIZE_LOGO == gtk.ICON_SIZE_INVALID:
-	ICON_SIZE_LOGO		= gtk.icon_size_register("revelation-logo", 32, 32)
-
-if ICON_SIZE_TREEVIEW == gtk.ICON_SIZE_INVALID:
-	ICON_SIZE_TREEVIEW	= gtk.icon_size_register("revelation-treeview", 18, 18)
+ICON_SIZE_APPLET		= gtk.ICON_SIZE_LARGE_TOOLBAR
+ICON_SIZE_DATAVIEW		= gtk.ICON_SIZE_LARGE_TOOLBAR
+ICON_SIZE_DROPDOWN		= gtk.ICON_SIZE_SMALL_TOOLBAR
+ICON_SIZE_ENTRY			= gtk.ICON_SIZE_MENU
+ICON_SIZE_LABEL			= gtk.ICON_SIZE_LARGE_TOOLBAR
+ICON_SIZE_LOGO			= gtk.ICON_SIZE_DND
+ICON_SIZE_TREEVIEW		= gtk.ICON_SIZE_SMALL_TOOLBAR
 
 
 
 		if stock == None:
 			return
 
-		self.icon = Image(stock, gtk.ICON_SIZE_MENU)
+		self.icon = Image(stock, ICON_SIZE_ENTRY)
 		self.iconebox.add(self.icon)
 		self.hbox.pack_start(self.iconebox, False, False)
 		self.hbox.show_all()
 			icons[STOCK_ENTRY_FOLDER_OPEN] = "revelation-fallback-folder-open"
 
 		for id, name in icons.items():
-			self.load_stock_icon(id, name, ( gtk.ICON_SIZE_MENU, ICON_SIZE_DATAVIEW, ICON_SIZE_DROPDOWN, ICON_SIZE_TREEVIEW ))
+			self.load_stock_icon(id, name, ( ICON_SIZE_DATAVIEW, ICON_SIZE_DROPDOWN, ICON_SIZE_ENTRY, ICON_SIZE_TREEVIEW ))
 
 
 	def __init_items(self):
 		iconset = gtk.IconSet()
 
 		if self.theme.has_icon(icon):
-			for size in sizes:
+			for size in dict.fromkeys(sizes).keys():
 				pixelsize = gtk.icon_size_lookup(size)[0]
 
 				source = gtk.IconSource()