Toolbar handling restored.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/merge-with-vnc-4.1.1@556 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx
index 2d90730..d141e50 100644
--- a/vncviewer/CConn.cxx
+++ b/vncviewer/CConn.cxx
@@ -177,10 +177,8 @@
     window->setFullscreen(options.fullScreen);
     return true;
   case IDM_SHOW_TOOLBAR:
-    options.showToolbar = !options.showToolbar;
+    options.showToolbar = !window->isToolbarEnabled();
     window->setShowToolbar(options.showToolbar);
-    // FIXME: Update menu in DesktopWindow?
-    // FIXME: Actually show or hide the toolbar?
     return true;
   case IDM_CTRL_KEY:
     window->kbd.keyEvent(this, VK_CONTROL, 0, !window->kbd.keyPressed(VK_CONTROL));
@@ -283,8 +281,12 @@
   // Set the menu fullscreen option tick
   CheckMenuItem(menu, IDM_FULLSCREEN, (window->isFullscreen() ? MF_CHECKED : 0) | MF_BYCOMMAND);
 
+  // Set the menu toolbar option tick
+  int toolbarFlags = window->isToolbarEnabled() ? MF_CHECKED : 0;
+  CheckMenuItem(menu, IDM_SHOW_TOOLBAR, MF_BYCOMMAND | toolbarFlags);
+
   // In the full-screen mode, "Show toolbar" should be grayed.
-  int toolbarFlags = options.fullScreen ? MF_GRAYED : MF_ENABLED;
+  toolbarFlags = window->isFullscreen() ? MF_GRAYED : MF_ENABLED;
   EnableMenuItem(menu, IDM_SHOW_TOOLBAR, MF_BYCOMMAND | toolbarFlags);
 }