Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2011-11-17 03:44:24 +0400
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2011-11-17 19:39:47 +0400
commitfeff890b6d7570a6676d54f42623b40c6a4e4090 (patch)
treece75efeb41bd4097807ce521925e4e2a29fe85c2 /main/src/addins/MonoDevelop.MacDev
parentc8b60757713a28d0384fcaf77e6ea1922b904ee0 (diff)
Work around GTK context menu bug
Triggering context menu from a button press event (which is the correct thing to do) on mac is problematic because the release event sometimes causes the menu to hide again (e.g. sln pad but only when docked on left side). Work around this by triggering it on the release event instead.
Diffstat (limited to 'main/src/addins/MonoDevelop.MacDev')
-rw-r--r--main/src/addins/MonoDevelop.MacDev/MonoDevelop.MacDev.PlistEditor/CustomPropertiesWidget.cs20
1 files changed, 2 insertions, 18 deletions
diff --git a/main/src/addins/MonoDevelop.MacDev/MonoDevelop.MacDev.PlistEditor/CustomPropertiesWidget.cs b/main/src/addins/MonoDevelop.MacDev/MonoDevelop.MacDev.PlistEditor/CustomPropertiesWidget.cs
index fb6a86a48e..ae9f59ff97 100644
--- a/main/src/addins/MonoDevelop.MacDev/MonoDevelop.MacDev.PlistEditor/CustomPropertiesWidget.cs
+++ b/main/src/addins/MonoDevelop.MacDev/MonoDevelop.MacDev.PlistEditor/CustomPropertiesWidget.cs
@@ -94,31 +94,15 @@ namespace MonoDevelop.MacDev.PlistEditor
return new PString ("<error>");
}
- class PopupTreeView : Gtk.TreeView
+ class PopupTreeView : MonoDevelop.Components.ContextMenuTreeView
{
CustomPropertiesWidget widget;
public PopupTreeView (CustomPropertiesWidget widget)
{
this.widget = widget;
+ this.DoPopupMenu += ShowPopup;
}
-
- protected override bool OnPopupMenu ()
- {
- ShowPopup (null);
- return true;
- }
-
- protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
- {
- var ret = base.OnButtonPressEvent (evnt);
- if (evnt.TriggersContextMenu ()) {
- ShowPopup (evnt);
- return true;
- }
- return ret;
- }
-
void ShowPopup (Gdk.EventButton evnt)
{
Gtk.TreeIter iter;