[Monodevelop-patches-list] r916 - in trunk/MonoDevelop: . build/bin libmonodevelop src/AddIns/DisplayBindings/SourceEditor/Gui src/AddIns/DisplayBindings/SourceEditor/InsightWindow src/Libraries/MonoDevelop.Gui.Utils
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat Feb 14 21:10:36 EST 2004
Author: tberman
Date: 2004-02-14 21:10:35 -0500 (Sat, 14 Feb 2004)
New Revision: 916
Added:
trunk/MonoDevelop/libmonodevelop/
trunk/MonoDevelop/libmonodevelop/Makefile.am
trunk/MonoDevelop/libmonodevelop/lmd-key-propagate.c
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/Glue.cs
Modified:
trunk/MonoDevelop/Makefile.am
trunk/MonoDevelop/build/bin/
trunk/MonoDevelop/configure.in
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/Makefile.am
Log:
yum, fixed the broken event propogation stuff
Modified: trunk/MonoDevelop/Makefile.am
===================================================================
--- trunk/MonoDevelop/Makefile.am 2004-02-15 02:03:35 UTC (rev 915)
+++ trunk/MonoDevelop/Makefile.am 2004-02-15 02:10:35 UTC (rev 916)
@@ -1,4 +1,4 @@
-SUBDIRS=gdldock gtkmozembed-sharp src build data
+SUBDIRS=libmonodevelop gdldock gtkmozembed-sharp src build data
bin_SCRIPTS=monodevelop
Property changes on: trunk/MonoDevelop/build/bin
___________________________________________________________________
Name: svn:ignore
- *.exe
*.dll
*.png
libgdldock.so
+ *.exe
*.dll
*.png
libgdldock.so
libmonodevelop.so
Modified: trunk/MonoDevelop/configure.in
===================================================================
--- trunk/MonoDevelop/configure.in 2004-02-15 02:03:35 UTC (rev 915)
+++ trunk/MonoDevelop/configure.in 2004-02-15 02:10:35 UTC (rev 916)
@@ -48,6 +48,7 @@
AC_OUTPUT([
Makefile
+libmonodevelop/Makefile
gdldock/Makefile
gdldock/gdl/Makefile
gdldock/sources/Makefile
Property changes on: trunk/MonoDevelop/libmonodevelop
___________________________________________________________________
Name: svn:ignore
+ libmonodevelop.so
*.o
Makefile
Makefile.in
Added: trunk/MonoDevelop/libmonodevelop/Makefile.am
===================================================================
--- trunk/MonoDevelop/libmonodevelop/Makefile.am 2004-02-15 02:03:35 UTC (rev 915)
+++ trunk/MonoDevelop/libmonodevelop/Makefile.am 2004-02-15 02:10:35 UTC (rev 916)
@@ -0,0 +1,46 @@
+srcdir = .
+
+CFLAGS = -g -Wall -O2
+LDFLAGS = -g -shared
+
+MDL_REQUIREMENTS = gtk+-2.0
+MDL_DEPENDENCIES_CFLAGS = $(shell pkg-config --cflags $(MDL_REQUIREMENTS))
+MDL_DEPENDENCIES_LIBS = $(shell pkg-config --libs $(MDL_REQUIREMENTS))
+
+INCLUDES = \
+ -DG_LOG_DOMAIN=\"LibMonoDevelop\" -I.. -I. \
+ $(MDL_DEPENDENCIES_CFLAGS)
+
+libmonodevelop_headers =
+
+libmonodevelop_SOURCE = \
+ $(libmonodevelop_headers) \
+ lmd-key-propagate.c
+
+libmonodevelop_OBJECTS = $(filter-out %.h,$(patsubst %.c,%.o,$(libmonodevelop_SOURCE)))
+
+all: libmonodevelop.so
+
+$(libmonodevelop_OBJECTS): $(libmonodevelop_headers)
+
+libmonodevelop.so: $(libmonodevelop_OBJECTS)
+ $(CC) $(LDFLAGS) -shared -fPIC -o libmonodevelop.so $+ && \
+ cp libmonodevelop.so ../build/bin
+
+%.o: %.c
+ $(CC) $(CFLAGS) $(INCLUDES) -c $<
+
+monodeveloplibdir = $(prefix)/lib/monodevelop
+
+install-data-local: libmonodevelop.so
+ $(mkinstalldirs) $(DESTDIR)$(monodeveloplibdir)/bin
+ $(INSTALL_DATA) libgdldock.so $(DESTDIR)$(monodevelopdir)/bin/libmonodevelop.so
+
+clean:
+ rm -f libmonodevelop.so $(libmonodevelop_OBJECTS)
+
+CLEANFILES= ../build/bin/libmonodevelop.so
+
+.PHONY: clean
+
+EXTRA_DIST = $(libmonodevelop_SOURCE) $(libmonodevelop_headers)
Added: trunk/MonoDevelop/libmonodevelop/lmd-key-propagate.c
===================================================================
--- trunk/MonoDevelop/libmonodevelop/lmd-key-propagate.c 2004-02-15 02:03:35 UTC (rev 915)
+++ trunk/MonoDevelop/libmonodevelop/lmd-key-propagate.c 2004-02-15 02:10:35 UTC (rev 916)
@@ -0,0 +1,15 @@
+/*
+ *
+ * Workaround for the inability to propagate keypresses
+ *
+ */
+
+#include <gtk/gtk.h>
+#include <gtk/gtkwidget.h>
+#include <gdk/gdkevents.h>
+
+void
+lmd_propagate_eventkey (GtkWidget *widget, GdkEventKey *key)
+{
+ gtk_propagate_event (widget, (GdkEvent *)key);
+}
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2004-02-15 02:03:35 UTC (rev 915)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs 2004-02-15 02:10:35 UTC (rev 916)
@@ -11,6 +11,7 @@
using MonoDevelop.SourceEditor.InsightWindow;
using MonoDevelop.EditorBindings.Properties;
using MonoDevelop.EditorBindings.FormattingStrategy;
+using MonoDevelop.Gui.Utils;
namespace MonoDevelop.SourceEditor.Gui {
public class SourceEditorView : SourceView, IFormattableDocument {
@@ -38,6 +39,11 @@
ShowLineNumbers = true;
ShowLineMarkers = true;
}
+
+ public void SimulateKeyPress (ref Gdk.EventKey evnt)
+ {
+ Glue.SimulateKeyPress (Handle, ref evnt);
+ }
protected override bool OnKeyPressEvent (ref Gdk.EventKey evnt)
{
@@ -74,7 +80,7 @@
completionWindow.ShowCompletionWindow ((char)key);
return retVal;
case '(':
- /*try {
+ try {
InsightWindow insightWindow = new InsightWindow(this, ParentEditor.DisplayBinding.ContentName);
insightWindow.AddInsightDataProvider(new MethodInsightDataProvider());
@@ -82,10 +88,10 @@
} catch (Exception e) {
Console.WriteLine("EXCEPTION: " + e);
}
- break;*/
+ break;
case '[':
break;
- /*try {
+ try {
InsightWindow insightWindow = new InsightWindow(this, ParentEditor.DisplayBinding.ContentName);
insightWindow.AddInsightDataProvider(new IndexerInsightDataProvider());
@@ -93,7 +99,7 @@
} catch (Exception e) {
Console.WriteLine("EXCEPTION: " + e);
}
- break;*/
+ break;
}
return base.OnKeyPressEvent (ref evnt);
Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs 2004-02-15 02:03:35 UTC (rev 915)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/InsightWindow/InsightWindow.cs 2004-02-15 02:10:35 UTC (rev 916)
@@ -176,7 +176,8 @@
//}
char val = (char)e.Key;
if (ProcessTextAreaKey (e.Key) == false) {
- control.Buffer.InsertAtCursor (val.ToString ());
+ //control.Buffer.InsertAtCursor (val.ToString ());
+ control.SimulateKeyPress (ref e);
return true;
} else {
return base.OnKeyPressEvent (ref e);
Added: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/Glue.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/Glue.cs 2004-02-15 02:03:35 UTC (rev 915)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/Glue.cs 2004-02-15 02:10:35 UTC (rev 916)
@@ -0,0 +1,24 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace MonoDevelop.Gui.Utils
+{
+
+ public class Glue
+ {
+
+ private Glue ()
+ {
+ }
+
+ [DllImport ("monodevelop")]
+ static extern void lmd_propagate_eventkey (IntPtr Handle, ref Gdk.EventKey key);
+
+ public static void SimulateKeyPress (IntPtr Handle, ref Gdk.EventKey key)
+ {
+ lmd_propagate_eventkey (Handle, ref key);
+ }
+
+ }
+
+}
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/Makefile.am 2004-02-15 02:03:35 UTC (rev 915)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Utils/Makefile.am 2004-02-15 02:10:35 UTC (rev 916)
@@ -3,7 +3,8 @@
SOURCES = ./FileIcons/FileIconLoader.cs \
./AssemblyInfo.cs \
-./VFS/Vfs.cs
+./VFS/Vfs.cs \
+./Glue.cs
all: $(DLL)
More information about the Monodevelop-patches-list
mailing list