Author: mhutch
Date: 2007-11-01 14:13:50 -0500 (Thu, 01 Nov 2007)
New Revision: 88676

Modified:
   trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/ChangeLog
   
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs
   
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorDisplayBinding.cs
   
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorView.cs
   
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorWidget.cs
   
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml
Log:
* MonoDevelop.SourceEditor.Gui/SourceEditorWidget.cs,
  MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs,
  MonoDevelop.SourceEditor.Gui/SourceEditorView.cs,
  MonoDevelop.SourceEditor.Gui/SourceEditorDisplayBinding.cs,
  MonoDevelop.SourceEditor.addin.xml: Disable all the bookmarks and
  printing related code as GTKSV2 can't handle this stuff.

Modified: trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/ChangeLog        
2007-11-01 19:04:01 UTC (rev 88675)
+++ trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/ChangeLog        
2007-11-01 19:13:50 UTC (rev 88676)
@@ -1,5 +1,14 @@
 2007-11-01  Michael Hutchinson <[EMAIL PROTECTED]> 
 
+       * MonoDevelop.SourceEditor.Gui/SourceEditorWidget.cs,
+         MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs,
+         MonoDevelop.SourceEditor.Gui/SourceEditorView.cs,
+         MonoDevelop.SourceEditor.Gui/SourceEditorDisplayBinding.cs,
+         MonoDevelop.SourceEditor.addin.xml: Disable all the bookmarks and
+         printing related code as GTKSV2 can't handle this stuff.
+
+2007-11-01  Michael Hutchinson <[EMAIL PROTECTED]> 
+
        * MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs: Don't fire
          LineCountChanged when count hasn't changed.
        * MonoDevelop.SourceEditor.addin.xml: SourceViewService is now static, 
so

Modified: 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs
===================================================================
--- 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs
       2007-11-01 19:04:01 UTC (rev 88675)
+++ 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorBuffer.cs
       2007-11-01 19:13:50 UTC (rev 88676)
@@ -19,14 +19,14 @@
 using GtkSourceView;
        
 namespace MonoDevelop.SourceEditor.Gui
-{
+{/* FIXME GTKSV 2
        public enum SourceMarkerType
        {
                SourceEditorBookmark,
                BreakpointMark,
                ExecutionMark
        }
-
+*/
        // This gives us a nice way to avoid the try/finally
        // which is really long.
        struct NoUndo : IDisposable
@@ -168,7 +168,8 @@
                
                public void UnMarkupLine (int line)
                {
-                       ClearMarks (SourceMarkerType.ExecutionMark);
+                       //FIXME GTKSV2
+                       //ClearMarks (SourceMarkerType.ExecutionMark);
                        RemoveTag (markup, StartIter, EndIter);
                }
                
@@ -382,6 +383,7 @@
                //
                // http://bugzilla.gnome.org/show_bug.cgi?id=132525
                //
+               /* fixme gtksv 2.0
                [DllImport("libgtksourceview-1.0.so.0")]
                static extern IntPtr gtk_source_buffer_get_markers_in_region 
(IntPtr raw, ref Gtk.TextIter begin, ref Gtk.TextIter end);
                
@@ -510,8 +512,8 @@
                        }
 
                        gtk_source_buffer_create_marker (Handle, null, 
type.ToString (), ref begin_line);
-               }
-               
+               }*/
+               /* FIXME GTKSV 2.0
                [DllImport("libgtksourceview-1.0.so.0")]
                static extern IntPtr gtk_source_buffer_get_prev_marker(IntPtr 
raw, ref Gtk.TextIter iter);
                
@@ -553,8 +555,8 @@
                        }
                        
                        PlaceCursor (loc);
-               }
-               
+               }*/
+               /* FIXME GTKSV 2.0
                [DllImport("libgtksourceview-1.0.so.0")]
                static extern IntPtr gtk_source_buffer_get_first_marker (IntPtr 
raw);
                
@@ -597,7 +599,7 @@
                        
                        PlaceCursor (loc);
                }
-
+                
                public void ClearBookmarks ()
                {
                        ClearMarks (SourceMarkerType.SourceEditorBookmark);
@@ -623,7 +625,7 @@
                        
                        if (lst != IntPtr.Zero)
                                g_slist_free (lst);
-               }
+               }*/
 #endregion
 
 #region ITextBufferStrategy compat interface, this should be removed ASAP

Modified: 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorDisplayBinding.cs
===================================================================
--- 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorDisplayBinding.cs
       2007-11-01 19:04:01 UTC (rev 88675)
+++ 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorDisplayBinding.cs
       2007-11-01 19:13:50 UTC (rev 88676)
@@ -90,8 +90,8 @@
        }
        
        public class SourceEditorDisplayBindingWrapper : AbstractViewContent,
-               IExtensibleTextEditor, IPositionable, IBookmarkBuffer, 
IDebuggableEditor, ICodeStyleOperations,
-               IDocumentInformation, IEncodedTextContent, IViewHistory
+               IExtensibleTextEditor, IPositionable, ICodeStyleOperations,
+               IDocumentInformation, IEncodedTextContent, IViewHistory //FIXME 
GTKSV2 IDebuggableEditor, IBookmarkBuffer
        {
                VBox mainBox;
                VBox editorBar;
@@ -146,7 +146,7 @@
                                ShowFileChangedWarning ();
                        }
                }
-
+/* FIXME GTKSV2
                public void ExecutingAt (int line)
                {
                        se.ExecutingAt (line);
@@ -156,7 +156,7 @@
                {
                        se.ClearExecutingAt (line);
                }
-               
+               */
                public override Gtk.Widget Control {
                        get {
                                return mainBox;
@@ -266,7 +266,7 @@
                        fsw.Changed += (FileSystemEventHandler) 
DispatchService.GuiDispatch (new FileSystemEventHandler (OnFileChanged));
                        UpdateFSW (null, null);
                        mainBox.PackStart (se, true, true, 0);
-                       
+                       /* FIXME GTKSV 2
                        if (Services.DebuggingService != null) {
                                breakpointAddedHandler = 
(BreakpointEventHandler) DispatchService.GuiDispatch (new 
BreakpointEventHandler (OnBreakpointAdded));
                                breakpointRemovedHandler = 
(BreakpointEventHandler) DispatchService.GuiDispatch (new 
BreakpointEventHandler (OnBreakpointRemoved));
@@ -276,7 +276,7 @@
                                Services.DebuggingService.BreakpointRemoved += 
breakpointRemovedHandler;
                                
Services.DebuggingService.ExecutionLocationChanged += executionChangedHandler;
                        }
-                       
+                       */
                        
IdeApp.ProjectOperations.ParserDatabase.ParseInformationChanged += new 
ParseInformationEventHandler(UpdateClassBrowser);
                        
                        mainBox.ShowAll ();
@@ -427,14 +427,14 @@
                        ContentName = fileName;
                        lastSaveTime = File.GetLastWriteTime (ContentName);
                        InitializeFormatter ();
-                       
+                       /* FIXME GTKSV2
                        if (Services.DebuggingService != null) {
                                foreach (IBreakpoint b in 
Services.DebuggingService.GetBreakpointsAtFile (fileName))
                                        se.View.ShowBreakpointAt (b.Line - 1);
                                        
                                UpdateExecutionLocation ();
                        }
-                       
+                       */
                        IFileParserContext context = 
IdeApp.ProjectOperations.ParserDatabase.GetFileParserContext(fileName);
                        memberParseInfo = context.ParseFile(fileName);
                        BindClassCombo();
@@ -754,7 +754,7 @@
                        else
                                return (mem.Region != null && 
mem.Region.BeginLine <= line && line <= mem.Region.EndLine);
                }
-               
+               /* FIXME GTKSV2
                void OnBreakpointAdded (object sender, BreakpointEventArgs args)
                {
                        if (args.Breakpoint.FileName == ContentName)
@@ -790,7 +790,7 @@
                        else
                                currentExecutionLine = -1;
                }
-               
+               */
                void ShowFileChangedWarning ()
                {
                        if (reloadBar == null) {
@@ -1136,7 +1136,7 @@
                        else
                                return (char) 0;
                }
-
+/* FIXME GTKSV2
                public void SetBookmarked (int position, bool mark)
                {
                        int line = se.Buffer.GetIterAtOffset (position).Line;
@@ -1164,7 +1164,7 @@
                {
                        se.ClearBookmarks ();
                }
-               
+               */
 #region IDocumentInformation
                string IDocumentInformation.FileName {
                        get { return ContentName != null ? ContentName : 
UntitledName; }
@@ -1204,7 +1204,6 @@
                        se.View.ModifyFont (TextEditorProperties.Font);
                        se.View.ShowLineNumbers = 
TextEditorProperties.ShowLineNumbers;
                        se.Buffer.HighlightMatchingBrackets = 
TextEditorProperties.ShowMatchingBracket;
-                       //FIXME gtksv2
                        se.View.ShowRightMargin = 
TextEditorProperties.ShowVerticalRuler;
                        se.View.EnableCodeCompletion = 
TextEditorProperties.EnableCodeCompletion;
                        se.View.InsertSpacesInsteadOfTabs = 
TextEditorProperties.ConvertTabsToSpaces;
@@ -1216,7 +1215,6 @@
                        UpdateStyleScheme ();
 
                        if (TextEditorProperties.VerticalRulerRow > -1)
-                               //fixme gtksv2 left or right?
                                se.View.RightMarginPosition = (uint) 
TextEditorProperties.VerticalRulerRow;
                        else
                                se.View.RightMarginPosition = 80;

Modified: 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorView.cs
===================================================================
--- 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorView.cs
 2007-11-01 19:04:01 UTC (rev 88675)
+++ 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorView.cs
 2007-11-01 19:13:50 UTC (rev 88676)
@@ -427,7 +427,8 @@
                                buf.PlaceCursor (line);         
                                
                                if (e.Button == 1) {
-                                       buf.ToggleBookmark (line.Line);
+                                       //FIXME GTKSV2
+                                       //buf.ToggleBookmark (line.Line);
                                } else if (e.Button == 3) {
                                        CommandEntrySet cset = new 
CommandEntrySet ();
                                        cset.AddItem 
(EditorCommands.ToggleBookmark);
@@ -466,7 +467,7 @@
                        }
                        base.OnPopulatePopup (menu);
                }
-               
+               /* FIXME GTKSV2
                public void ShowBreakpointAt (int linenumber)
                {
                        if (!buf.IsMarked (linenumber, 
SourceMarkerType.BreakpointMark))
@@ -490,7 +491,7 @@
                        buf.ToggleMark (linenumber, 
SourceMarkerType.ExecutionMark);
                        buf.UnMarkupLine (linenumber);
                }
-
+*/
                public void SimulateKeyPress (ref Gdk.EventKey evnt)
                {
                        Global.PropagateEvent (this, evnt);

Modified: 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorWidget.cs
===================================================================
--- 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorWidget.cs
       2007-11-01 19:04:01 UTC (rev 88675)
+++ 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.Gui/SourceEditorWidget.cs
       2007-11-01 19:13:50 UTC (rev 88676)
@@ -64,7 +64,7 @@
                        Buffer.Dispose ();
                        base.Dispose ();
                }
-
+/* FIXME GTKSV2
                public void ExecutingAt (int linenumber)
                {
                        View.ExecutingAt (linenumber);
@@ -74,7 +74,7 @@
                {
                        View.ClearExecutingAt (linenumber);
                }
-
+*/
                public string Text
                {
                        get { return Buffer.Text; }
@@ -200,11 +200,9 @@
                        
                        return str.Substring (0, leftOffset) + delimiter + 
str.Substring (rightOffset);
                }
-               
+               /*FIXME GTKSV2
                protected void CreatePrintJob ()
                {
-                       //FIXME GTKSV2
-                       /*
                        if (printDialog == null  || printJob == null)
                        {
                                PrintConfig config = PrintConfig.Default ();
@@ -217,7 +215,7 @@
                                sourcePrintJob.SetFooterFormat 
(GettextCatalog.GetString ("MonoDevelop"), null, GettextCatalog.GetString 
("Page") + " %N/%Q", true);
                                sourcePrintJob.WrapMode = WrapMode.Word;
                                printJob = sourcePrintJob.Print ();
-                       }*/
+                       }
                }
                
                [CommandHandler (EditorCommands.PrintDocument)]
@@ -279,19 +277,17 @@
                                preview.TransientFor = 
IdeApp.Workbench.RootWindow;
 //                     preview.IconName = "gtk-print-preview";
                        preview.ShowAll ();
-               }
-               
+               }*/
+/* FIXME GTKSV2        
                [CommandHandler (EditorCommands.GotoMatchingBrace)]
                public void GotoMatchingBrace ()
                {
-                       //FIXME GTKSV2
-                       /*
                        TextIter iter = Buffer.GetIterAtMark 
(Buffer.InsertMark);
                        if (Source.IterFindMatchingBracket (ref iter)) {
                                iter.ForwardChar ();
                                Buffer.PlaceCursor (iter);
                                View.ScrollMarkOnscreen (Buffer.InsertMark);
-                       }*/
+                       }
                }
 
                [CommandHandler (EditorCommands.ToggleBookmark)]
@@ -336,6 +332,6 @@
                                info.Visible = false;
                        else
                                info.Enabled = DisplayBinding.ContentName != 
null;
-               }
+               }*/
        }
 }

Modified: 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml
===================================================================
--- 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml
       2007-11-01 19:04:01 UTC (rev 88675)
+++ 
trunk/monodevelop/Extras/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.addin.xml
       2007-11-01 19:13:50 UTC (rev 88676)
@@ -48,6 +48,7 @@
                <Command id = 
"MonoDevelop.SourceEditor.EditorCommands.ShowBufferOptions"
                                _label = "Buffer Options"
                                icon = "md-properties-icon" />
+               <!-- FIXME GTKSV2
                <Command id = 
"MonoDevelop.SourceEditor.EditorCommands.ToggleBookmark"
                                icon = "md-toggle-bookmark"
                                shortcut = "Control|F2"
@@ -66,12 +67,13 @@
                <Command id = 
"MonoDevelop.SourceEditor.EditorCommands.ClearBookmarks"
                                icon = "md-clear-all-bookmarks"
                                _description = "Clear bookmarks"
-                               _label = "Clear Bookmarks" />
+                               _label = "Clear Bookmarks" />-->
                <Command id = 
"MonoDevelop.SourceEditor.EditorCommands.GotoLineNumber"
                                _label = "_Go to Line..." 
                                description = "Go to line"
                                shortcut = "Control|G"
                                icon = "gtk-jump-to" />
+               <!--FIXME GTKSV2
                <Command id = 
"MonoDevelop.SourceEditor.EditorCommands.GotoMatchingBrace"
                                _label = "Go to Matching _Brace" 
                                description = "Go to Matching Brace" 
@@ -85,7 +87,7 @@
                                _label = "Print Previe_w" 
                                description = "Show print preview" 
                                icon  = "gtk-print-preview"
-                               shortcut = "Shift|Control|P" />
+                               shortcut = "Shift|Control|P" />-->
        </Extension>
 
        <Extension path = "/MonoDevelop/SourceEditor/ContextMenu/Editor">
@@ -109,11 +111,13 @@
                        <CommandItem id = 
"MonoDevelop.Ide.Commands.SearchCommands.Find" />
                        <CommandItem id = 
"MonoDevelop.Ide.Commands.SearchCommands.FindNext" />
                        <CommandItem id = 
"MonoDevelop.Ide.Commands.SearchCommands.Replace" />
+                       <!--FIXME GTKSV2
                        <SeparatorItem id = "SearchSeparator" />
                        <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.ToggleBookmark" />
                        <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.PrevBookmark" />
                        <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.NextBookmark" />
                        <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.ClearBookmarks" />
+                       -->
                </ItemSet>
        </Extension>
        
@@ -128,31 +132,37 @@
                <SeparatorItem id = "SearchSeparator" />
                <CommandItem id = 
"MonoDevelop.Ide.Commands.SearchCommands.FindInFiles" />
                <CommandItem id = 
"MonoDevelop.Ide.Commands.SearchCommands.ReplaceInFiles" />
-                       
+               <!--FIXME GTKSV2
                <SeparatorItem id = "SearchInFilesSeparator" />
                <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.ToggleBookmark" />
                <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.PrevBookmark" />
                <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.NextBookmark" />
                <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.ClearBookmarks" />
-
+               -->
                <SeparatorItem id = "Separator2" />
                <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.GotoLineNumber" />
+               <!--FIXME GTKSV2
                <SeparatorItem id = "Separator3" />
                <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.GotoMatchingBrace" />
+               -->
        </Extension>
        
        <Extension path = "/MonoDevelop/Ide/MainMenu/File">
+                       <!--FIXME GTKSV2
                        <SeparatorItem id = "PrintSeparator"  insertafter = 
"SaveSeparator" />
                        <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.PrintPreviewDocument"
                                                 insertafter = "SaveSeparator"
                                                 insertbefore = 
"PrintSeparator" />
                        <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.PrintDocument"
                                                 insertafter = 
"MonoDevelop.SourceEditor.EditorCommands.PrintPreviewDocument" />
+                       -->
        </Extension>
        
        <Extension path = "/MonoDevelop/Ide/Toolbar/Standard">
+               <!--FIXME GTKSV2
                <CommandItem id = 
"MonoDevelop.SourceEditor.EditorCommands.PrintDocument"
                                         insertafter = 
"MonoDevelop.Ide.Commands.FileCommands.SaveAll" />
+                                        -->
        </Extension>
 
        <Extension path = "/MonoDevelop/Ide/OptionsDialogPanels">
@@ -169,9 +179,11 @@
                        <DialogPanel id = "Behavior"
                                     _label = "Behavior"
                                     class = 
"MonoDevelop.SourceEditor.Gui.OptionPanels.BehaviorTextEditorPanel"/>
+                       <!--FIXME GTKSV2
                        <DialogPanel id = "SyntaxHighlighting"
                             _label = "Syntax Highlighting"
                             class = 
"MonoDevelop.SourceEditor.Gui.OptionPanels.SyntaxHighlightingPanel"/>
+                   -->
                </DialogPanel>
        </Extension>
 

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

Reply via email to