Author: masono
Date: 2005-08-31 11:09:09 -0400 (Wed, 31 Aug 2005)
New Revision: 49195

Modified:
   trunk/mono-tools/docbrowser/ChangeLog
   trunk/mono-tools/docbrowser/GeckoHtmlRender.cs
   trunk/mono-tools/docbrowser/browser.cs
Log:
2005-08-22 Mario Sopena Novales <[EMAIL PROTECTED]>
        * browser.cs:
                - Update the treeview everytime we change the tab
                - Added a new CurrentNode property to Tabs
                - update the save process to include the new NodeUrl property
                - dont set the browser mode to viewer every time a row is 
activated
                - added a new button Restore to delete contributions
        * GeckoHtmlRender.cs: cleaned
        


Modified: trunk/mono-tools/docbrowser/ChangeLog
===================================================================
--- trunk/mono-tools/docbrowser/ChangeLog       2005-08-31 15:08:32 UTC (rev 
49194)
+++ trunk/mono-tools/docbrowser/ChangeLog       2005-08-31 15:09:09 UTC (rev 
49195)
@@ -1,3 +1,12 @@
+2005-08-22 Mario Sopena Novales <[EMAIL PROTECTED]>
+       * browser.cs:
+               - Update the treeview everytime we change the tab
+               - Added a new CurrentNode property to Tabs
+               - update the save process to include the new NodeUrl property
+               - dont set the browser mode to viewer every time a row is 
activated
+               - added a new button Restore to delete contributions
+       * GeckoHtmlRender.cs: cleaned
+       
 2005-08-17 Mario Sopena Novales <[EMAIL PROTECTED]>
        * browser.cs: Added Menu Items for changing the font size when using 
        gecko. Also added a Reload function.

Modified: trunk/mono-tools/docbrowser/GeckoHtmlRender.cs
===================================================================
--- trunk/mono-tools/docbrowser/GeckoHtmlRender.cs      2005-08-31 15:08:32 UTC 
(rev 49194)
+++ trunk/mono-tools/docbrowser/GeckoHtmlRender.cs      2005-08-31 15:09:09 UTC 
(rev 49195)
@@ -48,7 +48,6 @@
        protected void OnOpenUri (object o, OpenUriArgs args)
        {
                url = CheckUrl (args.AURI);
-               System.Console.WriteLine ("Abriendo:{0}:{1}:", url, args.AURI);
                if (UrlClicked != null)
                        UrlClicked (this, new EventArgs());
                args.RetVal = true; //this prevents Gecko to continue processing

Modified: trunk/mono-tools/docbrowser/browser.cs
===================================================================
--- trunk/mono-tools/docbrowser/browser.cs      2005-08-31 15:08:32 UTC (rev 
49194)
+++ trunk/mono-tools/docbrowser/browser.cs      2005-08-31 15:09:09 UTC (rev 
49195)
@@ -307,6 +307,9 @@
                } else {
                        paste1.Sensitive = true;
                }
+               
+               if (tree_browser.SelectedNode != CurrentTab.CurrentNode)
+                       tree_browser.ShowNode (CurrentTab.CurrentNode);
        }
        //
        // Reload current page
@@ -451,6 +454,7 @@
        public void Render (string text, Node matched_node, string url)
        {
                CurrentUrl = url;
+               CurrentTab.CurrentNode = matched_node;
                CurrentTab.html.Render(text);
                if (matched_node != null) {
                        if (tree_browser.SelectedNode != matched_node)
@@ -1550,7 +1554,7 @@
        void RowActivated  (object sender, EventArgs a)
        {
 
-               browser.CurrentTab.SetMode (Mode.Viewer);
+               //browser.CurrentTab.SetMode (Mode.Viewer);
 
                if (IgnoreRowActivated)
                        return;
@@ -1896,6 +1900,7 @@
                set { titleLabel.Text = value; }
        }
        
+       public Node CurrentNode;
        public System.Xml.XmlNode edit_node;
        public string edit_url;
        
@@ -1903,6 +1908,7 @@
        {
 
                browser = br;
+               CurrentNode = br.help_tree;
                ShowTabs = false;
                ShowBorder = false;
                TabBorder = 0;
@@ -2009,17 +2015,20 @@
                //
                // Close and Save buttons
                //
-               HBox MainBots = new HBox(false, 2);
+               HBox MainBots = new HBox(false, 3);
                HBox Filling = new HBox(false, 0);
                Button close = new Button("C_lose");
                Button save = new Button("S_ave");
+               Button restore = new Button("_Restore");
                
                close.Clicked += new EventHandler (OnCancelEdits);
                save.Clicked += new EventHandler (OnSaveEdits);
+               restore.Clicked += new EventHandler (OnRestoreEdits);
                
                MainBots.PackStart(Filling);
                MainBots.PackStart(close, false, false, 0);
                MainBots.PackStart(save, false, false, 0);
+               MainBots.PackStart(restore, false, false, 0);
                
                vbox1.PackStart(MainPart);
                vbox1.PackStart(MainBots, false, false, 0);
@@ -2127,7 +2136,7 @@
                        browser.statusbar.Push (browser.context_id, e.Message);
                        return;
                }
-               EditingUtils.SaveChange (edit_url, browser.help_tree, 
edit_node);
+               EditingUtils.SaveChange (edit_url, browser.help_tree, 
edit_node, EcmaHelpSource.GetNiceUrl (browser.CurrentTab.CurrentNode));
                SetMode (Mode.Viewer);
                history.ActivateCurrent ();
        }
@@ -2137,6 +2146,14 @@
                SetMode (Mode.Viewer);
                history.ActivateCurrent ();
        }
+
+       void OnRestoreEdits (object sender, EventArgs a)
+       {
+               EditingUtils.RemoveChange (edit_url, browser.help_tree);
+               SetMode (Mode.Viewer);
+               history.ActivateCurrent ();
+       }
+               
        void EditedTextChanged (object sender, EventArgs args)
        {
                StringWriter sw = new StringWriter ();

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to