Miguel de Icaza wrote:

Hey guys,

Some ideas I had this morning while doing my line at the embassy:

* Support a `[Revert]' button.

* We need an Edit/Toggle menu item, the MONODOC_EDITING hack is not what we want; It was just a quick early-hack.


Attached is a patch that adds an Edit toggle menu, and also a collapse all menu (for the treeview). I didn't see an obvious way to make the ecma-provider aware of the status of the menuitem, however, it left me wondering if this should be done in another place so other providers can also have editing. Any thoughts?

        * "Compare" button to render the pristine versus edited
          versions.

At this point, am seriously thinking `we really should get some
GtkHTML2 bindings, just to use CSS2'.


Is there a reason not to use Mozilla? (Except for we don't want to have Mozilla as a dependency)

Miguel.


_______________________________________________
Mono-docs-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-docs-list


? browser.gladep
? editmenu.diff
? match.diff
? test.diff
Index: ChangeLog
===================================================================
RCS file: /cvs/public/monodoc/browser/ChangeLog,v
retrieving revision 1.86
diff -u -r1.86 ChangeLog
--- ChangeLog   8 Sep 2003 03:48:04 -0000       1.86
+++ ChangeLog   13 Sep 2003 01:58:51 -0000
@@ -1,3 +1,9 @@
+2003-09-12  John Luke  <[EMAIL PROTECTED]>
+       
+       * browser.cs: add IsEditable property, OnEditingActivated and
+       OnCollapseActivated events
+       * browser.glade: add Collapse All, Settings, Editing menu items
+
 2003-09-08  Alp Toker <[EMAIL PROTECTED]>
 
        * Makefile.am: csc fixes
Index: browser.cs
===================================================================
RCS file: /cvs/public/monodoc/browser/browser.cs,v
retrieving revision 1.62
diff -u -r1.62 browser.cs
--- browser.cs  7 Sep 2003 16:36:44 -0000       1.62
+++ browser.cs  13 Sep 2003 01:58:51 -0000
@@ -87,6 +87,7 @@
        Glade.XML ui;
        Gtk.Window MainWindow;
        Style bar_style;
+       private bool editable = false;
 
        [Glade.Widget] public Window window1;
        [Glade.Widget] TreeView reference_tree;
@@ -209,6 +210,11 @@
        public enum Mode {
                Viewer, Editor
        }
+       
+       public bool IsEditable
+       {
+               get { return editable; }
+       }
 
        public Mode BrowserMode {
                get {
@@ -386,6 +392,17 @@
        void delete_event_cb (object o, DeleteEventArgs args)
        {
                Application.Quit ();
+       }
+       
+       void OnEditingActivate (object o, EventArgs args)
+       {
+               editable = !editable;
+       }
+       
+       void OnCollapseActivate (object o, EventArgs args)
+       {
+               reference_tree.CollapseAll ();
+               reference_tree.ExpandRow (new TreePath ("0"), false);
        }
 
        //
Index: browser.glade
===================================================================
RCS file: /cvs/public/monodoc/browser/browser.glade,v
retrieving revision 1.28
diff -u -r1.28 browser.glade
--- browser.glade       7 Sep 2003 16:36:44 -0000       1.28
+++ browser.glade       13 Sep 2003 01:58:51 -0000
@@ -127,6 +127,43 @@
              <property name="visible">True</property>
              <property name="label" translatable="yes">_View</property>
              <property name="use_underline">True</property>
+
+             <child>
+               <widget class="GtkMenu" id="view1_menu">
+
+                 <child>
+                   <widget class="GtkMenuItem" id="collapse">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Collapse All</property>
+                     <property name="use_underline">True</property>
+                     <signal name="activate" handler="OnCollapseActivate" 
last_modification_time="Sat, 13 Sep 2003 00:14:16 GMT"/>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+
+         <child>
+           <widget class="GtkMenuItem" id="settings1">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">_Settings</property>
+                 <property name="use_underline">True</property>
+                 
+             <child>
+               <widget class="GtkMenu" id="settings1_menu">
+
+                 <child>
+                   <widget class="GtkCheckMenuItem" id="editing1">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">Editing</property>
+                     <property name="use_underline">True</property>
+                     <property name="active">False</property>
+                     <signal name="activate" handler="OnEditingActivate" 
last_modification_time="Sat, 13 Sep 2003 00:14:16 GMT"/>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
            </widget>
          </child>
 

Reply via email to