[Monodevelop-patches-list] r1051 - trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/FileBrowser
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Feb 27 19:00:09 EST 2004
Author: jluke
Date: 2004-02-27 19:00:08 -0500 (Fri, 27 Feb 2004)
New Revision: 1051
Modified:
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/FileBrowser/FileBrowser.cs
Log:
turns out you need both
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/FileBrowser/FileBrowser.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/FileBrowser/FileBrowser.cs 2004-02-27 23:46:26 UTC (rev 1050)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/FileBrowser/FileBrowser.cs 2004-02-28 00:00:08 UTC (rev 1051)
@@ -45,7 +45,6 @@
homebutton = new Gtk.Button ();
homebutton.Add (new Gtk.Image (Stock.Home, Gtk.IconSize.SmallToolbar));
- // homebuttonpix.ScaleSimple (20, 20, Gdk.InterpType.Bilinear)));
homebutton.Relief = Gtk.ReliefStyle.None;
homebutton.Clicked += new EventHandler (OnHomeClicked);
@@ -86,6 +85,7 @@
tv.Model = store;
tv.RowActivated += new RowActivatedHandler (OnRowActivated);
+ tv.ButtonReleaseEvent += new ButtonReleaseEventHandler (OnButtonRelease);
tv.PopupMenu += new PopupMenuHandler (OnPopupMenu);
scrolledwindow.Add (tv);
@@ -210,8 +210,21 @@
}
}
+ private void OnButtonRelease (object o, ButtonReleaseEventArgs args)
+ {
+ if (args.Event.Button == 3)
+ {
+ ShowPopup ();
+ }
+ }
+
private void OnPopupMenu (object o, PopupMenuArgs args)
{
+ ShowPopup ();
+ }
+
+ private void ShowPopup ()
+ {
Menu menu = new Menu ();
MenuItem openfilebrowser = new MenuItem ("Open with file browser");
openfilebrowser.Activated += new EventHandler (OpenFileBrowser);
More information about the Monodevelop-patches-list
mailing list