git-gui: Refactor our ui_status_value update technique

I'm really starting to dislike global variables.  The ui_status_value
global varible is just one of those that seems to appear in a lot of
code and in many cases we didn't even declare it "global" within the
proc that updates it so we haven't always been getting all of the
updates we expected to see.

This change introduces two new global procs:

  ui_status $msg;   # Sets the status bar to show $msg.
  ui_ready;         # Changes the status bar to show "Ready."

The second (special) form is used because we often update the area
with this message once we are done processing a block of work and
want the user to know we have completed it.

I'm not fixing the cases that appear in lib/branch.tcl right now
as I'm actually in the middle of a huge refactoring of that code
to support making a detached HEAD checkout.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
diff --git a/lib/merge.tcl b/lib/merge.tcl
index 889182f..f0a02ea 100644
--- a/lib/merge.tcl
+++ b/lib/merge.tcl
@@ -28,7 +28,7 @@
 The rescan will be automatically started now.
 }
 		unlock_index
-		rescan {set ui_status_value {Ready.}}
+		rescan ui_ready
 		return 0
 	}
 
@@ -79,7 +79,7 @@
 }
 
 proc _start {w list} {
-	global HEAD ui_status_value current_branch
+	global HEAD current_branch
 
 	set cmd [list git merge]
 	set names [_refs $w $list]
@@ -121,7 +121,7 @@
 	}
 
 	set msg "Merging $current_branch, [join $names {, }]"
-	set ui_status_value "$msg..."
+	ui_status "$msg..."
 	set cons [console::new "Merge" $msg]
 	console::exec $cons $cmd \
 		[namespace code [list _finish $revcnt $cons]]
@@ -150,14 +150,14 @@
 			fconfigure $fd -blocking 0 -translation binary
 			fileevent $fd readable \
 				[namespace code [list _reset_wait $fd]]
-			set ui_status_value {Aborting... please wait...}
+			ui_status {Aborting... please wait...}
 			return
 		}
 
 		set msg {Merge failed.  Conflict resolution is required.}
 	}
 	unlock_index
-	rescan [list set ui_status_value $msg]
+	rescan [list ui_status $msg]
 }
 
 proc dialog {} {
@@ -285,7 +285,7 @@
 		set fd [open "| git read-tree --reset -u HEAD" r]
 		fconfigure $fd -blocking 0 -translation binary
 		fileevent $fd readable [namespace code [list _reset_wait $fd]]
-		set ui_status_value {Aborting... please wait...}
+		ui_status {Aborting... please wait...}
 	} else {
 		unlock_index
 	}
@@ -308,7 +308,7 @@
 		catch {file delete [gitdir MERGE_MSG]}
 		catch {file delete [gitdir GITGUI_MSG]}
 
-		rescan {set ui_status_value {Abort completed.  Ready.}}
+		rescan {ui_status {Abort completed.  Ready.}}
 	}
 }