Cache explorer UI changes
commit7837ba976c36716210bab83db4f699435f47d383
authorgfxmonk <tim@gfxmonk.net>
Sat, 19 Mar 2011 12:17:33 +0000 (19 23:17 +1100)
committergfxmonk <tim@gfxmonk.net>
Mon, 21 Mar 2011 09:15:31 +0000 (21 20:15 +1100)
tree0965d00022370ebc10e04a8fa26c7eb90380a406
parent824d504a65cffcd753b9dcfb6a4aad15ef6a03a8
Cache explorer UI changes

UI Changes:
 - Show the name of each package in bold (as well as the URI)
 - Tooltip is now just the description, and is implemented by setting the tooltip column (I'm not sure if the old query_tooltip method provided anything extra, but if it does I couldn't detect it)
 - Sort options - URI, Name and Size
 - Filter options: feeds with/without impls, local / remote feeds
 - 0 size is represented as "-"
 - Leave error and unknown interfaces collapsed on load
 - Remote Interfaces (but not local ones) can be deleted - this will delete all cached implementations (not touching local impls) and the interface itself.
 - Interactive search works (always searches on name)
 - Right-click context menu for interfaces with actions:
   - Launch in GUI
   - copy interface URI
   - delete

Code stuff:
 - Column indexes are replaced with column objects (that know their type, index, name, etc)
 - Sections are replaced with section objects
 - get_children(model, iter) helper method
 - model values are set with a call to extract_columns(), making use of named paramaters (so that order doesn't matter, and all non-provided values can be sensibly defaulted)
 - added SORT_OPTIONS and FILTER_OPTIONS, which do what you might expect.
 - tooltips are implemented by setting the tooltip column in the .ui file. It doesn't appear that `query_tooltip` did anything more fancy.
 - CacheExplorer.model has been replaced with raw_model(for setting data) and view_model.get_model() (for getting / updating data). There is a convenience getter on CacheExplorer (.model) to get view_model.get_model(). This is required for filtered views to work.
 - ValidInterface now has two concrete sub-classes, LocalInterface and RemoteInterface. The split is based on whether the URI exists as a path. This will treat now-missing local feeds as a remote feed, but that seems reasonable (it's no longer present, so it should be deletable).
 - added a SAFE_MODE flag to just print out file deletions, instead of doing so (for development)
Added names to the cache view; tweaked UI a bunch
zeroinstall/gtkui/cache.py
zeroinstall/gtkui/cache.ui