-------------------------------------------------------------------------------
	Changelog: Time Machine File Manager
-------------------------------------------------------------------------------
	Author: Sandeep Dilip Ranade (sdr@jhu.edu)
-------------------------------------------------------------------------------
	28 March 2005:
	--------------
		Created my first GUI: A BMI calculator.
		Experimented with different approaches. 
		Used Text inputs, combo boxes, buttons, slot associations etc.
		Used the UI designer. Took something like 2 hours.
-------------------------------------------------------------------------------
	29 March 2005:
	--------------
	o	Created a bare bones main window for the file manager.
	o	Added some basic buttons: they dont do anything yet.
	o	Added menu items : they dont do anything yet.
	o	Added a Icon View. Was able to open home directory,
		and display all files/directories in it. 
		Was able to change the pixmap to the more fancier ones.
		Currently everything looks like a folder!
	o	added rudimentry file type distinguishing and changing icons
		for files/direcotrys/else
-------------------------------------------------------------------------------
	30 March 2005:
	--------------
	o	Added double click functionality to CD to a directory.
		Added code that recognizes a file and could in the future 
		invoke an application to open it.
	o	Added Home() function associated with the home button.
	o	Added Up() function associated with the Up button
	o	We now have a very very rudimenatry file browser. (not a manager yet)
	o	Adding status bar to show file size, creation time, and modification time
	o	Added human readable file size (bytes, KB, MB, GB etc)
-------------------------------------------------------------------------------
	31 March 2005:
	--------------
	o	Added a default status (%d items, %d files) when no item is selected.
	o	Added an editable combobox for the path specification
	o	Added a slider for the time. Added Zoom in and Zoom out buttons and stub handlers.
	o	Added a snapshot and time travel button, and stub handlers
	o	Added PDEBUG() for debugging o/p
	o	Added labels for slider. Added a status bar for other time stuff
	o	Added Find in time, Grep in time, Version View, Date View
	o	Added time selector
	o	ADded a file path selector/display.
	o	Added pixmaps for Date and Time edit.
-------------------------------------------------------------------------------
	1 April 2005:
	--------------
	o	Changed the position of the Now button.
	o	changed positions of zoom in and out.
	o	the time is now the current time, updated with every refresh
		and with every display update
	o	computing the high-date label and the low date label and the delta lable in a 
		human readable manner.
	o	added a visual seperator and a selected date label.
	o	computing the selected label based on the values of the low and high
		date and the decimation of the slider.
-------------------------------------------------------------------------------
	2 April 2005:
	--------------
	o	Added a Zoom in and Zoom out feature to the date.
	o	Added a Current time transition
-------------------------------------------------------------------------------
	3 April 2005:
	--------------
	o	Added file types and icons corresponding to those types (lots)
	o	added a test directory to see if the file type icon view works
	o	Added filters to directories so that Block devices, links, etc are seen.
	o	Added a hide/show files toggle button
-------------------------------------------------------------------------------
	9 April 2005:
	--------------
	o	added a time shifted path to the interface. this takes the time and
		shifts in the style of ext3cow
	o	added a color coded edit bar for the path (Red = error)
	o	added refresh on present time
	o	added dynamic continuous time changing and view updates
	o	
	o	played with Qt on the test machine ... failed to install properly
	o	RPM needs lots of libraries ... may install FC1 from scratch
	o	explored ext3cow interface for continuous dir time changes
		and ls file@ ... cant see files that are dead. versions only
		happen on a change (COW property)!!
-------------------------------------------------------------------------------
	10 April 2005:
	--------------
	o	made the show hidden files button a toggle button
	o	removed time travel button, as all updates to date and time
		sliders are made dynamic ... there is not permanent change,
		only the view changes! like the wizard of OZ...
	o	ADded a new button: Compare View 
		the idea is to show the diffence between past and next selected time
		with some visual markers ...
	o	Or, 2 different panels?
	o	Removed the date view button, as the date is inherent in the view itself.
	o	TODO: could add the modified time/created time/permissions to tooltip ...
	o	converted many printf;s to PDEBUGS... speeds up things considerably!		
	o	changed visual arrangement ... the present time button is where the
		time travel button was ..., moved time edit, and other buttons.
	o	added a quit button!
	o	added a time status bar. gives the time status (present time./ some
		time shifted directory ...)
	o	tried to set up the time edit so that it is coherent across
		edits (ie, if secs go from 59 -> 00, the minutes should go from
		x -> x + 1.) Cant happen .... so much for interface easiness!!
-------------------------------------------------------------------------------
	11 April 2005:
	--------------
	o	hit troubled water when i tried to install QT and kde on redhat 9
	o	spent time hunting a FC1 CD .... none! will have to burn it.
	o	developed the glue code to smoothly slide between the different times.
	o	finally got FC1, QT, ext3cow etc running.
	o	the gui ran nicely, sliding the path smoothly.
	o	added a global time shifted path for reporting status, etc.
	o	then hit bugs where the "." and '..' double click didnt work
		was not updating the global paht and global time shifted path
		together.
	o	added a maglens icon for the status bar.
-------------------------------------------------------------------------------
	12 April 2005:
	--------------
	o	modified the path to be /a/b/c/.@t 
	o	added a update for the global time shifted path,
	o	fixed the cd .. (or up) bug
	o	added the snapshot feature.
	o	added the status for the snapshot in the time status bar.
	o	added semantics for the a@t1/b@t2
	o	the time shifting seems to be working great!
	o	multilevel time shifting, up, etc are working nice.
	o	Added coherernt color coding to represent a color association
		with present(yellow) and past (purple), and error (reddish)
		This the present time button is yellow, shell in time is purple	
		and the path edit window changes it's background color to 
		denote the time or error.
	o	fixed the bug for single up level cd ..
	o	Fixed symantic issues of Present time button. It now not only
		goes to the present time, but also the default (home) directory.
	o	Added the string "In the past" to the time status bar.
	o	tested gui with variuos testcases...
		plain versions, traversing between versions,
		multishift time paths, shell in time, size changes within versions
		permission changes within versions, etc.
	o	Took backups for this is the alpha release!! Now there is only
		feature addition.
	o	if present time is pressed, in the present, then the current 
		working direcory is not changed.
	o	Cleaned up some code
	o	Wrote code to find versions in time. Hit a barrier!!
		Cant see deleted files, and takes an incredible amount of time!
		not usable as a feature, till the ls@ in shifted time is bugfree.
-------------------------------------------------------------------------------
	13 April 2005:
	--------------
	o	fixed a bug: shell in time blocks till quit! Added '&' to the commandline
	o	The alpha release demo went of well!!
	o	decided to present to Dr. Burns and zack.
-------------------------------------------------------------------------------
	15 April 2005:
	--------------
	o	Idea: capture the entire time shifted tree, as a normal file system tree,
		in an ext3 filesystem, with name mangling exactly like the cow fs.
		This allows us, to transfer this tree elsewhere, and still use the browser
		to explore back in time.
		We can archive the file structure too...
		this will allow someone without a ext3cow to use the time shift feature to
		explore.
	o	this may not seem like a terribly useful idea ... so, its future extension :)

-------------------------------------------------------------------------------
	19 April 2005:
	--------------
	o	added < and > buttons to traverse to the next and previous versions	
	o	added file launches with specific programs (eg pdf with xpdf... etc)
	o	added a QProcess for version enumeration. ls file@ and trap the output
		and parse it for timings, and then enumerate versions (as numbered) versions
		Could do the following:
		add the file@time to the version enumeration; will make life easier.
	o	Added the current version too... in version view.
	o	made version view a toggle: once the view is off, then the 
		current directory is shown once again.
-------------------------------------------------------------------------------
	22 April 2005:
	--------------
	o	added launch to versioned files.
	o	added compare view! this is interesting ...
	o	the interface is not too great, but if u select a version file and
	o	hit compare, it will give you the difference between the selected
		file and present time file.
	o	added mozilla as the browser, with file://path
-------------------------------------------------------------------------------
	23 April 2005:
	--------------
	o	Cleaned up code
	o	cleaned up error messages
	o	added status bar messages corresponding to the errors
	o	Added a "new window" functionality
	o	Added a nice about dialog box
	o	added an archival feature
-------------------------------------------------------------------------------
	15 August 2005
 	--------------
	o	cleaned up some code
	o	decided that the metaphor needs the slider to be at the right extreme
		instead of at the middle (due to issues with time travelling in the 
		future)
	o	changed the layout to accomodate the back and forward buttons
	o	shrunk the show/hide hidden files to "show" and"hide" in appropriate
		states
	o	discovered that the images directory is very important to the
		execution. its a relative path and hence the execution has to be done
		from the directory in which images directory exists.
	o	added a back and forward stacks that retain the path before it
		undergoes any change
	o	added back and forward buttons. tested correct for standard (not
		time shifted) paths
	o	fot time shited paths, the state machine differs as the slider
		does a continuous set path and there is no nice way to
		know when the slider is done
	o	one can possibly use the slider_released slot to do something...
-------------------------------------------------------------------------------
	16 August 2005
 	--------------
	o	added the slider_pressed handler to push the global time
		shifted path on the stack, before the value is changed
	o	need to also push the state.. (in past, current time, etc, on the
		stack. this way we can restore the slider, the timer, and
		the in_past colors on back/forward!
-------------------------------------------------------------------------------
	17 August 2005
 	--------------
	o	added a set of functions push_state_to_back_stack() and
		restore_state_from_back_stack().
	o	the push() pushes all state (temporal and spatial) including
		path (global, and time_shifted), low date, high date,
		selected date, is in past flag, selected time, etc.
	o	the restore restores the state perfectly, from the state that
		was pushed.
	o	the algorithm basically pushes all state before a change is
		made to the state, so we can go back to the change in state.
	o	the following things are being pushed and popped (restored)
		- the global path
		- the time shifted path
		- the past flag
		- the low date
		- the high date.
		most of these are duplicated, as QT uses shallow sharing (refrence
		counts to the same object, without duplicating it)
	
-------------------------------------------------------------------------------
	19 August 2005
 	--------------
	o	pushing and restoring of the selected date (slider value)
	o	pushing and restoring of the selected time
	o	added similar push and restore state for the forward direction too
	o 	added a way to diable the slider when the delta is one day.
		when the zoom is changed, then the slider should be enabled.
		This is to enable only the time edit to change time when the 
		date window is ~ 1 day wide.
	o	added a state push() for time change too.
		discovered that every refresh when the timer is set to current
		time, the signal slot is fired and the state is pushed!
		thats too much!

-------------------------------------------------------------------------------
	4 September 2005
 	----------------
	o	added a view bookmarks button, and removed the defunct archive button.
		view bookmarks just sets the current directory to the special
		bookmarks directory ~/.ttfm_bookmarks		
	o	added init logic to make sure that this dir exists.
	o	added a "clearSelection to make the add bookmark on selection/current/
		no selection work correctly.
	o	adding a bookmark is basically creating a soft link to the selected/current
		file or directory int the special bookmarks dir.
	o	added logic to create a bookmark. here there is a text string inputed
		and the link is named as that.
	o	added a bookmark form that pops up when the add button is clicked.
		the form shows the current path, takes the name of the link, and on "add",
		creates the link in the bookmarks directory.
	o	Added a validation for the bookmark name (no /*&%^$#@`|?)
	o	bookmarks tested. work nicely.
	o	removed the path in the time status bar .. that was too much information.
	o	changed the size of the time status bar to accomodate more info
	o	status bar now shows the link's target too.
	o	added lower limit to date for zoom ... epoch! Jan 1 1970.
	o	caught bug: not pushing state on stack when viewing bookmarks :)
	o	double click on the symbolic link to a file reads the file instead, both for
		executing an application to read it, and for the status bar.
	o	added error for failure of ln.
	
-------------------------------------------------------------------------------
	10 September 2005
 	----------------
	o	fixed the bug when we need to snapshot to slide back teh first tme.
	o	cleaning up code and comments	
	o	cleaned up about window text
	o	replaced printfs with PDEBUGS
-------------------------------------------------------------------------------
				TODO 
-------------------------------------------------------------------------------
	o	can we recursively compute the size of the directory for the status bar?
	o	add more fields? 
	o	add option of adding a bookmark in some directory in the bookmarks dir.
	o	add delete to bookmarks
	o	add delete to files
	o	is there a way to allow for listing versions by cleaning up the path
		and filtering versions that belong to time after the currently 
		selected time?
	o	could add the modified time/created time/permissions to tooltip ...
	o	add the icons to all the buttons at runtime (as the inline stuff is bad here!)
	o	somehow show visually when the file/dir properties change in one version
		to another.
	o	Fix the ls file@ in shifted time bug...
	o	look at porting issues for the kernel.
-------------------------------------------------------------------------------
			Feature wish list
-------------------------------------------------------------------------------
	o	context menu, 
	o	cut-copy-paste-move ...
	o	Add a < and > buttons to take to the next and previous versions.
	o	add a grep and find in time ... this depends upon version enumeration	
	o	make a settings and configuration file, for remembering stuff.
	o	tagging versions, and creating assosiative bookmarks, in the
		style of the Nautilus file manager.
	o	adding name scoping, file life lines, color coding files that die, etc
-------------------------------------------------------------------------------
				how to??
-------------------------------------------------------------------------------
	o	how to display versions in time? using the standard Qt components?
	o	how to show activity clustering? 
	o	what policy to use for automation of snapshots?
-------------------------------------------------------------------------------
