[Monodevelop-patches-list] r782 - in trunk/MonoDevelop: data/resources/glade src/AddIns/DisplayBindings/EditorBindings/Gui/OptionPanels

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Wed Feb 4 16:09:14 EST 2004


Author: dkor
Date: 2004-02-04 16:09:14 -0500 (Wed, 04 Feb 2004)
New Revision: 782

Modified:
   trunk/MonoDevelop/data/resources/glade/EditorBindings.glade
   trunk/MonoDevelop/src/AddIns/DisplayBindings/EditorBindings/Gui/OptionPanels/MarkersTextEditorPanel.cs
Log:
Glading of the MarkersTextEditorPanel

Modified: trunk/MonoDevelop/data/resources/glade/EditorBindings.glade
===================================================================
--- trunk/MonoDevelop/data/resources/glade/EditorBindings.glade	2004-02-04 06:28:59 UTC (rev 781)
+++ trunk/MonoDevelop/data/resources/glade/EditorBindings.glade	2004-02-04 21:09:14 UTC (rev 782)
@@ -640,5 +640,480 @@
   </child>
 </widget>
 
+<widget class="GtkWindow" id="MarkersTextEditorPanel">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">MarkersTextEditorPanel</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox45">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">12</property>
+
+      <child>
+	<widget class="GtkVBox" id="vbox47">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="markersLabel">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt; Markers- &lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox24">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label42">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox49">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="showInvalidLinesCheckBox">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Underline errors-</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="showLineNumberCheckBox">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Show _line numbers-</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="showBracketHighlighterCheckBox">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Highlight _matching bracket-</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox50">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">6</property>
+
+		      <child>
+			<widget class="GtkLabel" id="characterMarkersLabel">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Character Markers-</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox27">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label49">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">    </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkVBox" id="vbox52">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">6</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="showSpaceCharsCheckBox">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Show _spaces-</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="showTabCharsCheckBox">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Show _tabs-</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="showEOLMarkersCheckBox">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Show _EOL markers-</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckButton" id="showErrorsCheckBox">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Show _invalid lines-</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox46">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="rulersLabel">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt; Rulers-&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox23">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label41">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox48">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="showHRulerCheckBox">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Show _horizontal ruler-</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox26">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkCheckButton" id="showVRulerCheckBox">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Show _column ruler,-</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="atColumnLabel">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">at column- </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.49</property>
+			  <property name="xpad">1</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="vRulerRowTextBox">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">1</property>
+			  <property name="digits">0</property>
+			  <property name="numeric">True</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">85 0 1000 5 10 10</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
 </glade-interface>
-

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/EditorBindings/Gui/OptionPanels/MarkersTextEditorPanel.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/EditorBindings/Gui/OptionPanels/MarkersTextEditorPanel.cs	2004-02-04 06:28:59 UTC (rev 781)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/EditorBindings/Gui/OptionPanels/MarkersTextEditorPanel.cs	2004-02-04 21:09:14 UTC (rev 782)
@@ -17,129 +17,130 @@
 using ICSharpCode.SharpDevelop.Gui.Dialogs;
 
 using Gtk;
+using MonoDevelop.Gui.Widgets;
 
 namespace MonoDevelop.EditorBindings.Gui.OptionPanels
 {
 	/// <summary>
 	/// Summary description for Form9.
 	/// </summary>
+
 	public class MarkersTextEditorPanel : AbstractOptionPanel
 	{
-		// Gtk Controls
-		CheckButton showLineNumberCheckBox;
-		CheckButton showInvalidLinesCheckBox;
-		CheckButton showBracketHighlighterCheckBox;
-		CheckButton showErrorsCheckBox;
-		CheckButton showHRulerCheckBox;
-		CheckButton showEOLMarkersCheckBox;
-		CheckButton showVRulerCheckBox;
-		CheckButton showTabCharsCheckBox;
-		CheckButton showSpaceCharsCheckBox;
-		Entry vRulerRowTextBox;
-		OptionMenu lineMarkerStyleComboBox;
-		Menu lineMarkerStyleComboBoxMenu;
+		MarkersTextEditorPanelWidget widget;
 		
-		// Services
-		FileUtilityService FileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
-		StringParserService StringParserService = (StringParserService)ServiceManager.Services.GetService (typeof (StringParserService));
-		ResourceService ResourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
-		
 		public override void LoadPanelContents()
 		{
 			// set up the form controls instance
-			SetupPanelInstance();
-			
-			showLineNumberCheckBox.Active         = ((IProperties)CustomizationObject).GetProperty("ShowLineNumbers", true);
-			showInvalidLinesCheckBox.Active       = ((IProperties)CustomizationObject).GetProperty("ShowInvalidLines", true);
-			showBracketHighlighterCheckBox.Active = ((IProperties)CustomizationObject).GetProperty("ShowBracketHighlight", true);
-			showErrorsCheckBox.Active             = ((IProperties)CustomizationObject).GetProperty("ShowErrors", true);
-			showHRulerCheckBox.Active             = ((IProperties)CustomizationObject).GetProperty("ShowHRuler", false);
-			showEOLMarkersCheckBox.Active         = ((IProperties)CustomizationObject).GetProperty("ShowEOLMarkers", false);
-			showVRulerCheckBox.Active             = ((IProperties)CustomizationObject).GetProperty("ShowVRuler", false);
-			showTabCharsCheckBox.Active           = ((IProperties)CustomizationObject).GetProperty("ShowTabs", false);
-			showSpaceCharsCheckBox.Active         = ((IProperties)CustomizationObject).GetProperty("ShowSpaces", false);
-			
-			vRulerRowTextBox.Text = ((IProperties)CustomizationObject).GetProperty("VRulerRow", 80).ToString();
-			
-			lineMarkerStyleComboBoxMenu.Append(MenuItem.NewWithLabel(ResourceService.GetString("Dialog.Options.IDEOptions.TextEditor.Markers.LineViewerStyle.None")));
-			lineMarkerStyleComboBoxMenu.Append(MenuItem.NewWithLabel(ResourceService.GetString("Dialog.Options.IDEOptions.TextEditor.Markers.LineViewerStyle.FullRow")));
-			//lineMarkerStyleComboBox.SetHistory((uint)(LineViewerStyle)((IProperties)CustomizationObject).GetProperty("LineViewerStyle", LineViewerStyle.None));
+			Add (widget = new MarkersTextEditorPanelWidget ((IProperties) CustomizationObject));	
 		}
 		
 		public override bool StorePanelContents()
 		{
-			((IProperties)CustomizationObject).SetProperty("ShowInvalidLines",     showInvalidLinesCheckBox.Active);
-			((IProperties)CustomizationObject).SetProperty("ShowLineNumbers",      showLineNumberCheckBox.Active);
-			((IProperties)CustomizationObject).SetProperty("ShowBracketHighlight", showBracketHighlighterCheckBox.Active);
-			((IProperties)CustomizationObject).SetProperty("ShowErrors",           showErrorsCheckBox.Active);
-			((IProperties)CustomizationObject).SetProperty("ShowHRuler",           showHRulerCheckBox.Active);
-			((IProperties)CustomizationObject).SetProperty("ShowEOLMarkers",       showEOLMarkersCheckBox.Active);
-			((IProperties)CustomizationObject).SetProperty("ShowVRuler",           showVRulerCheckBox.Active);
-			((IProperties)CustomizationObject).SetProperty("ShowTabs",             showTabCharsCheckBox.Active);
-			((IProperties)CustomizationObject).SetProperty("ShowSpaces",           showSpaceCharsCheckBox.Active);
-			
-			try {
-				((IProperties)CustomizationObject).SetProperty("VRulerRow", Int32.Parse(vRulerRowTextBox.Text));
-			} catch (Exception) {
-			}
-			
-			//FIXME: This is commented out for right now
-			//((IProperties)CustomizationObject).SetProperty("LineViewerStyle", (LineViewerStyle)lineMarkerStyleComboBox.History);
-			
+			widget.Store ((IProperties) CustomizationObject);
 			return true;
 		}
-		
-		#region jba added methods
-		
-		private void SetupPanelInstance()
+
+		class MarkersTextEditorPanelWidget : GladeWidgetExtract 
 		{
-			Gtk.Frame frame1 = new Gtk.Frame(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.MarkersGroupBox}"));
-			//
-			// set up the Tab
-			//
-			// instantiate all the controls
-			Gtk.VBox vBox1 = new Gtk.VBox(false,2);
-			Gtk.Label label1 = new Gtk.Label(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.AtRowLabel}"));
-			Gtk.Label label2 = new Gtk.Label(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.LineMarkerLabel}"));
-			showLineNumberCheckBox = new CheckButton(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.LineNumberCheckBox}"));
-			showInvalidLinesCheckBox = new CheckButton(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.InvalidLinesCheckBox}"));
-			showBracketHighlighterCheckBox = new CheckButton(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.HiglightBracketCheckBox}"));
-			showErrorsCheckBox = new CheckButton(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.UnderLineErrorsCheckBox}"));
-			showHRulerCheckBox = new CheckButton(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.HorizontalRulerCheckBox}"));
-			showEOLMarkersCheckBox = new CheckButton(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.EOLMarkersCheckBox}"));
-			showVRulerCheckBox = new CheckButton(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.VerticalRulerCheckBox}"));
-			showTabCharsCheckBox = new CheckButton(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.TabsCheckBox}"));
-			showSpaceCharsCheckBox = new CheckButton(StringParserService.Parse("${res:Dialog.Options.IDEOptions.TextEditor.Markers.SpacesCheckBox}"));
-			vRulerRowTextBox = new Entry();
-			lineMarkerStyleComboBox = new OptionMenu();
-			lineMarkerStyleComboBoxMenu = new Menu();
-			lineMarkerStyleComboBox.Menu = lineMarkerStyleComboBoxMenu;	
+			// Services
+			FileUtilityService FileUtilityService = (
+				FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+			StringParserService StringParserService = (
+				StringParserService)ServiceManager.Services.GetService (typeof (StringParserService));
+			ResourceService ResourceService = (
+				ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
 			
-				// table to pack the tab settings options 
-				Table table1 = new Table(3, 2, false);
-				//pack the table
-				table1.Attach(showHRulerCheckBox, 0, 1, 0, 1);
-				table1.Attach(showVRulerCheckBox, 0, 1, 1, 2);
-				table1.Attach(label1, 1, 2, 1, 2);
-				table1.Attach(vRulerRowTextBox, 2, 3, 1, 2);
+			// Gtk Controls
+			[Glade.Widget] Label markersLabel;
+			[Glade.Widget] Label characterMarkersLabel;
+			[Glade.Widget] Label rulersLabel;
+			[Glade.Widget] Label atColumnLabel;
+			[Glade.Widget] CheckButton showLineNumberCheckBox;
+			[Glade.Widget] CheckButton showInvalidLinesCheckBox;
+			[Glade.Widget] CheckButton showBracketHighlighterCheckBox;
+			[Glade.Widget] CheckButton showErrorsCheckBox;
+			[Glade.Widget] CheckButton showHRulerCheckBox;
+			[Glade.Widget] CheckButton showEOLMarkersCheckBox;
+			[Glade.Widget] CheckButton showVRulerCheckBox;
+			[Glade.Widget] CheckButton showTabCharsCheckBox;
+			[Glade.Widget] CheckButton showSpaceCharsCheckBox;
+			[Glade.Widget] SpinButton  vRulerRowTextBox;
+
+			public MarkersTextEditorPanelWidget (IProperties CustomizationObject) :  
+				base ("EditorBindings.glade", "MarkersTextEditorPanel")
+			{
+				// Load Text
+
+				// FIXME i8n the following labels:
+				markersLabel.Markup =  "<b>Markers</b> ";
+				rulersLabel.Markup =  "<b>Rulers</b> ";
+				characterMarkersLabel.TextWithMnemonic =  "Character Markers";
+
+				atColumnLabel.TextWithMnemonic = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.TextEditor.Markers.AtRowLabel}") + ", ";
+				showLineNumberCheckBox.Label = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.TextEditor.Markers.LineNumberCheckBox}");
+				showInvalidLinesCheckBox.Label = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.TextEditor.Markers.InvalidLinesCheckBox}");
+				showBracketHighlighterCheckBox.Label = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.TextEditor.Markers.HiglightBracketCheckBox}");
+				showErrorsCheckBox.Label = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.TextEditor.Markers.UnderLineErrorsCheckBox}");
+ 				showHRulerCheckBox.Label = StringParserService.Parse(
+ 					"${res:Dialog.Options.IDEOptions.TextEditor.Markers.HorizontalRulerCheckBox}");
+ 				showEOLMarkersCheckBox.Label = StringParserService.Parse(
+ 					"${res:Dialog.Options.IDEOptions.TextEditor.Markers.EOLMarkersCheckBox}");
+ 				showVRulerCheckBox.Label = StringParserService.Parse(
+ 					"${res:Dialog.Options.IDEOptions.TextEditor.Markers.VerticalRulerCheckBox}");
+ 				showTabCharsCheckBox.Label = StringParserService.Parse(
+ 					"${res:Dialog.Options.IDEOptions.TextEditor.Markers.TabsCheckBox}");
+ 				showSpaceCharsCheckBox.Label = StringParserService.Parse(
+					"${res:Dialog.Options.IDEOptions.TextEditor.Markers.SpacesCheckBox}");
+
+				// Load Values
+
+				showLineNumberCheckBox.Active         = ((IProperties)CustomizationObject).GetProperty(
+					"ShowLineNumbers", true);
+				showInvalidLinesCheckBox.Active       = ((IProperties)CustomizationObject).GetProperty(
+					"ShowInvalidLines", true);
+				showBracketHighlighterCheckBox.Active = ((IProperties)CustomizationObject).GetProperty(
+					"ShowBracketHighlight", true);
+				showErrorsCheckBox.Active             = ((IProperties)CustomizationObject).GetProperty(
+					"ShowErrors", true);
+				showHRulerCheckBox.Active             = ((IProperties)CustomizationObject).GetProperty(
+					"ShowHRuler", false);
+				showEOLMarkersCheckBox.Active         = ((IProperties)CustomizationObject).GetProperty(
+					"ShowEOLMarkers", false);
+				showVRulerCheckBox.Active             = ((IProperties)CustomizationObject).GetProperty(
+					"ShowVRuler", false);
+				showTabCharsCheckBox.Active           = ((IProperties)CustomizationObject).GetProperty(
+					"ShowTabs", false);
+				showSpaceCharsCheckBox.Active         = ((IProperties)CustomizationObject).GetProperty(
+					"ShowSpaces", false);
+			
+				vRulerRowTextBox.Value = ((IProperties)CustomizationObject).GetProperty("VRulerRow", 80);
+
+			}
+
+			public void Store (IProperties CustomizationObject)
+			{
+				((IProperties)CustomizationObject).SetProperty("ShowInvalidLines",     showInvalidLinesCheckBox.Active);
+				((IProperties)CustomizationObject).SetProperty("ShowLineNumbers",      showLineNumberCheckBox.Active);
+				((IProperties)CustomizationObject).SetProperty("ShowBracketHighlight", showBracketHighlighterCheckBox.Active);
+				((IProperties)CustomizationObject).SetProperty("ShowErrors",           showErrorsCheckBox.Active);
+				((IProperties)CustomizationObject).SetProperty("ShowHRuler",           showHRulerCheckBox.Active);
+				((IProperties)CustomizationObject).SetProperty("ShowEOLMarkers",       showEOLMarkersCheckBox.Active);
+				((IProperties)CustomizationObject).SetProperty("ShowVRuler",           showVRulerCheckBox.Active);
+				((IProperties)CustomizationObject).SetProperty("ShowTabs",             showTabCharsCheckBox.Active);
+				((IProperties)CustomizationObject).SetProperty("ShowSpaces",           showSpaceCharsCheckBox.Active);
 				
-			// pack them all
-			vBox1.PackStart(label1, false, false, 2);
-			vBox1.PackStart(table1, false, false, 2);
-			vBox1.PackStart(label2, false, false, 2);
-			vBox1.PackStart(lineMarkerStyleComboBox, false, false, 2);
-			vBox1.PackStart(showLineNumberCheckBox, false, false, 2);
-			vBox1.PackStart(showErrorsCheckBox, false, false, 2);
-			vBox1.PackStart(showBracketHighlighterCheckBox, false, false, 2);
-			vBox1.PackStart(showInvalidLinesCheckBox, false, false, 2);
-			vBox1.PackStart(showEOLMarkersCheckBox, false, false, 2);
-			vBox1.PackStart(showSpaceCharsCheckBox, false, false, 2);
-			vBox1.PackStart(showTabCharsCheckBox, false, false, 2);
-			frame1.Add(vBox1);
-			
-			this.Add(frame1);
+				try {
+					((IProperties)CustomizationObject).SetProperty("VRulerRow", vRulerRowTextBox.Value);
+				} 
+				catch (Exception) {
+				}
+			}
 		}
-		
-		#endregion
 	}
 }




More information about the Monodevelop-patches-list mailing list