aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gtk/ScintillaGTK.cxx8
-rw-r--r--gtk/makefile8
2 files changed, 11 insertions, 5 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index a75586140..22ecf347b 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -45,6 +45,9 @@
#include "gtk/gtksignal.h"
#include "gtk/gtkmarshal.h"
+#if GTK_MAJOR_VERSION >= 2
+#include "scintilla-marshal.h"
+#endif
#ifdef SCI_LEXER
#include <glib.h>
@@ -2307,11 +2310,10 @@ void ScintillaGTK::ClassInit(GtkObjectClass* object_class, GtkWidgetClass *widge
#if GTK_MAJOR_VERSION < 2
#define GTK_CLASS_TYPE(c) (c->type)
#define SIG_MARSHAL gtk_marshal_NONE__INT_POINTER
-#define MARSHAL_ARGUMENTS GTK_TYPE_INT, GTK_TYPE_POINTER
#else
-#define SIG_MARSHAL gtk_marshal_NONE__INT_INT
-#define MARSHAL_ARGUMENTS GTK_TYPE_INT, GTK_TYPE_INT
+#define SIG_MARSHAL scintilla_marshal_NONE__INT_POINTER
#endif
+#define MARSHAL_ARGUMENTS GTK_TYPE_INT, GTK_TYPE_POINTER
static void scintilla_class_init(ScintillaClass *klass) {
GtkObjectClass *object_class = (GtkObjectClass*) klass;
diff --git a/gtk/makefile b/gtk/makefile
index ba93f8dfc..a31c9a9de 100644
--- a/gtk/makefile
+++ b/gtk/makefile
@@ -7,8 +7,9 @@
# To force GTK+ 2 build, define GTK2 on the make command line.
# To force GTK+ 1 build, define GTK1 on the make command line.
-.SUFFIXES: .cxx .o .h .a
+.SUFFIXES: .cxx .c .o .h .a
CC = g++
+CCOMP = gcc
AR = ar
RANLIB = touch
@@ -40,6 +41,7 @@ endif
# pkg-config which is an OK indication that GTK2 is available
ifdef GTK2
CONFIGFLAGS=pkg-config --cflags gtk+-2.0
+MARSHALLER=scintilla-marshal.o
else
ifdef GTK1
CONFIGFLAGS=gtk-config --cflags
@@ -54,6 +56,8 @@ endif
.cxx.o:
$(CC) `$(CONFIGFLAGS)` $(CXXFLAGS) -c $<
+.c.o:
+ $(CCOMP) `$(CONFIGFLAGS)` $(CXXFLAGS) -w -c $<
#++Autogenerated -- run src/LexGen.py to regenerate
#**LEXOBJS=\\\n\(\*.o \)
@@ -79,7 +83,7 @@ $(COMPLIB): DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o Docume
ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.o PlatGTK.o \
KeyMap.o LineMarker.o ScintillaGTK.o CellBuffer.o ViewStyle.o \
RESearch.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
- $(LEXOBJS)
+ $(MARSHALLER) $(LEXOBJS)
$(AR) rc $@ $^
$(RANLIB) $@