[Monodevelop-patches-list] r1691 - in trunk/MonoDevelop/src/Main/Base: . Commands/ProjectBrowserCommands Gui/Dialogs Gui/Pads/ProjectBrowser
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Wed Jun 2 18:24:08 EDT 2004
Author: tberman
Date: 2004-06-02 18:24:08 -0400 (Wed, 02 Jun 2004)
New Revision: 1691
Modified:
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs
trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs
trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs
Log:
fixing bug caused by workaround, by working around it. man, gotta love binary compatability... BEHAVIOUR IS LIKE API YOU BASTARDS!
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-06-02 21:26:57 UTC (rev 1690)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-06-02 22:24:08 UTC (rev 1691)
@@ -1,5 +1,12 @@
2004-06-02 Todd Berman <tberman at sevenl.net>
+ * Commands/ProjectBrowserCommands/FolderNodeCommands.cs: call new func.
+ * Gui/Dialogs/NewFileDialog.cs: remove dead code
+ * Gui/Pads/ProjectBrowser/ProjectBrowserView.cs: add function that
+ worksaround the gtk+ 2.4 regression workaround.
+
+2004-06-02 Todd Berman <tberman at sevenl.net>
+
* Gui/Dialogs/CommonAboutDialog.cs: This is actually how translator
credits are supposed to work. Update the po and go ahead and
translate the string "translator_credits" to include what you want
Modified: trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs 2004-06-02 21:26:57 UTC (rev 1690)
+++ trunk/MonoDevelop/src/Main/Base/Commands/ProjectBrowserCommands/FolderNodeCommands.cs 2004-06-02 22:24:08 UTC (rev 1691)
@@ -110,7 +110,6 @@
NewFileDialog nfd = new NewFileDialog ();
if (nfd.Run() == (int)Gtk.ResponseType.Ok) {
IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow;
-
int count = 1;
string baseName = Path.GetFileNameWithoutExtension(window.ViewContent.UntitledName);
@@ -146,6 +145,8 @@
parentNode.Project.ProjectFiles.Add(newFileInformation);
newNode.EnsureVisible();
+ browser.StealFocus ();
+ Console.WriteLine (((Gtk.Window)WorkbenchSingleton.Workbench).Focus);
browser.SelectedNode = newNode;
browser.StartLabelEdit();
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs 2004-06-02 21:26:57 UTC (rev 1690)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewFileDialog.cs 2004-06-02 22:24:08 UTC (rev 1691)
@@ -338,9 +338,6 @@
TreeViewColumn catColumn = new TreeViewColumn ();
catColumn.Title = "categories";
- //CellRendererPixbuf cat_pix_render = new CellRendererPixbuf ();
- //catColumn.PackStart (cat_pix_render, false);
- //catColumn.AddAttribute (cat_pix_render, "pixbuf", 3);
CellRendererText cat_text_render = new CellRendererText ();
catColumn.PackStart (cat_text_render, true);
@@ -355,11 +352,9 @@
templateColumn.AddAttribute (tmpl_text_render, "text", 0);
templateView.AppendColumn (templateColumn);
- //okButton = new Gtk.Button ("Create");
okButton = new Button (Gtk.Stock.New);
okButton.Clicked += new EventHandler (OpenEvent);
- //cancelButton = new Gtk.Button ("Cancel");
cancelButton = new Button (Gtk.Stock.Close);
cancelButton.Clicked += new EventHandler (cancelClicked);
@@ -388,33 +383,10 @@
cat_imglist.Add(iconService.GetBitmap("Icons.16x16.ClosedFolderBitmap"));
catView.Selection.Changed += new EventHandler (CategoryChange);
- //templateView.Selection.Changed += new EventHandler (SelectedIndexChange);
TemplateView.IconSelected += new EventHandler(SelectedIndexChange);
TemplateView.IconDoubleClicked += new EventHandler(OpenEvent);
-
- //ControlDictionary["openButton"].Click += new EventHandler(OpenEvent);
PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
- //((RadioButton)ControlDictionary["largeIconsRadioButton"]).Checked = propertyService.GetProperty("Dialogs.NewProjectDialog.LargeImages", true);
- //((RadioButton)ControlDictionary["largeIconsRadioButton"]).CheckedChanged += new EventHandler(CheckedChange);
- //((RadioButton)ControlDictionary["largeIconsRadioButton"]).FlatStyle = FlatStyle.Standard;
- //((RadioButton)ControlDictionary["largeIconsRadioButton"]).Image = IconService.GetBitmap("Icons.16x16.LargeIconsIcon");
-
- //((RadioButton)ControlDictionary["smallIconsRadioButton"]).Checked = !propertyService.GetProperty("Dialogs.NewProjectDialog.LargeImages", true);
- //((RadioButton)ControlDictionary["smallIconsRadioButton"]).CheckedChanged += new EventHandler(CheckedChange);
- //((RadioButton)ControlDictionary["smallIconsRadioButton"]).FlatStyle = FlatStyle.Standard;
- //((RadioButton)ControlDictionary["smallIconsRadioButton"]).Image = IconService.GetBitmap("Icons.16x16.SmallIconsIcon");
-
-
- //ToolTip tooltip = new ToolTip();
- //tooltip.SetToolTip(ControlDictionary["largeIconsRadioButton"], StringParserService.Parse("${res:Global.LargeIconToolTip}"));
- //tooltip.SetToolTip(ControlDictionary["smallIconsRadioButton"], StringParserService.Parse("${res:Global.SmallIconToolTip}"));
- //tooltip.Active = true;
- //Owner = (Form)WorkbenchSingleton.Workbench;
- //StartPosition = FormStartPosition.CenterParent;
- //Icon = null;
-
- //CheckedChange(this, EventArgs.Empty);
}
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs 2004-06-02 21:26:57 UTC (rev 1690)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs 2004-06-02 22:24:08 UTC (rev 1691)
@@ -76,22 +76,8 @@
EndUpdate();
}
- static ProjectBrowserView()
- {
- //projectBrowserImageList = new ImageList();
- //projectBrowserImageList.ColorDepth = ColorDepth.Depth32Bit;
- }
-
public ProjectBrowserView() : base (true, TreeNodeComparer.GtkProjectNode)
{
- //LabelEdit = true;
- //AllowDrop = true;
- //HideSelection = false;
- //Dock = DockStyle.Fill;
-
- //ImageList = projectBrowserImageList;
- //LabelEdit = false;
-
WorkbenchSingleton.Workbench.ActiveWorkbenchWindowChanged += new EventHandler(ActiveWindowChanged);
IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
@@ -99,12 +85,6 @@
projectService.CombineClosed += new CombineEventHandler(CloseCombine);
propertyService.PropertyChanged += new PropertyEventHandler (TrackPropertyChange);
- //PlainFont = new Font(Font, FontStyle.Regular);
- //boldFont = new Font(Font, FontStyle.Bold);
-
- //Font = boldFont;
- //contentPanel.Controls.Add(this);
-
Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow ();
sw.Add(this);
contentPanel = new Gtk.Frame();
@@ -266,11 +246,21 @@
if (null != cbn)
cbn.BeforeLabelEdit ();
if (selectedNode != null && selectedNode.CanLabelEdited) {
- //LabelEdit = true;
selectedNode.BeginEdit ();
}
}
+ public void StealFocus ()
+ {
+ Gtk.Timeout.Add (20, new Gtk.Function (wantFocus));
+ }
+ bool wantFocus ()
+ {
+ GrabFocus ();
+ ((AbstractBrowserNode)SelectedNode).BeginEdit ();
+ return false;
+ }
+
/// <summary>
/// Updates the combine tree, this method should be called, if the combine has
/// changed (added a project/combine)
More information about the Monodevelop-patches-list
mailing list