Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipse.c22
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c20
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/gtk/make_linux.mak6
3 files changed, 20 insertions, 28 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipse.c b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
index 12bbf317c..467ca84d7 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipse.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
@@ -216,6 +216,9 @@ static _TCHAR* startupMsg =
_T_ECLIPSE("The %s executable launcher was unable to locate its \n\
companion launcher jar.");
+static _TCHAR* gtk2Msg =
+_T_ECLIPSE("The %s executable launcher no longer supports running with GTK + 2.x. Continuing using GTK+ 3.x.");
+
static _TCHAR* homeMsg =
_T_ECLIPSE("The %s executable launcher was unable to locate its \n\
home directory.");
@@ -521,12 +524,12 @@ static int _run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
_stscanf(gtkVersionString, _T_ECLIPSE("%d"), &gtkVersion);
if (gtkVersion == 2) {
- setenv("SWT_GTK3","0",1);
- } else {
- setenv("SWT_GTK3","1",1);
+ errorMsg = malloc( (_tcslen(gtk2Msg) + _tcslen(officialName) + 10) * sizeof(_TCHAR) );
+ _stprintf( errorMsg, gtk2Msg, officialName );
+ _ftprintf(stderr, _T_ECLIPSE("%s:\n%s\n"), officialName, errorMsg);
}
}
-
+
char *overlayScrollbar = getenv("LIBOVERLAY_SCROLLBAR");
if (overlayScrollbar == NULL) {
setenv("LIBOVERLAY_SCROLLBAR", "0", 0);
@@ -535,13 +538,10 @@ static int _run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
if (oxygenGtkHack == NULL) {
setenv("OXYGEN_DISABLE_INNER_SHADOWS_HACK", "1", 0);
}
- char *gtk3 = getenv("SWT_GTK3");
- if (gtk3 == NULL || strcmp(gtk3,"1") == 0) {
- /* Work around for https://bugzilla.gnome.org/show_bug.cgi?id=677329, see Eclipse bug 435742 */
- char *gdkCoreDeviceEvents = getenv("GDK_CORE_DEVICE_EVENTS");
- if (gdkCoreDeviceEvents == NULL) {
- setenv("GDK_CORE_DEVICE_EVENTS", "1", 0);
- }
+ /* Work around for https://bugzilla.gnome.org/show_bug.cgi?id=677329, see Eclipse bug 435742 */
+ char *gdkCoreDeviceEvents = getenv("GDK_CORE_DEVICE_EVENTS");
+ if (gdkCoreDeviceEvents == NULL) {
+ setenv("GDK_CORE_DEVICE_EVENTS", "1", 0);
}
#endif
#endif
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
index 8c914c781..42b6c8e4a 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
@@ -26,12 +26,12 @@ static _TCHAR* minVerTitle = _T_ECLIPSE("Unsupported GTK+ version");
static _TCHAR* gtkInitFail = _T_ECLIPSE("Unable to initialize GTK+\n");
static _TCHAR* upgradeWarning1 = _T_ECLIPSE("\nPlease upgrade GTK+ to minimum version");
static _TCHAR* upgradeWarning2 = _T_ECLIPSE("\nor use an older version of Eclipse.\nClick OK to Exit.");
-static int minGtkMajorVersion = 2;
-static int minGtkMinorVersion = 24;
+static int minGtkMajorVersion = 3;
+static int minGtkMinorVersion = 0;
static int minGtkMicroVersion = 0;
/* tables to help initialize the function pointers */
-/* functions from libgtk-x11-2.0 or libgtk-3.so.0*/
+/* functions from libgtk-3.so.0*/
static FN_TABLE gtkFunctions[] = {
FN_TABLE_ENTRY(gtk_container_add, 1),
FN_TABLE_ENTRY(gtk_dialog_run, 1),
@@ -49,7 +49,7 @@ static FN_TABLE gtkFunctions[] = {
FN_TABLE_ENTRY(gtk_window_set_position, 1),
{ NULL, NULL }
};
-/* functions from libgdk-x11-2.0 or libgdk-3.so.0*/
+/* functions from libgdk-3.so.0*/
static FN_TABLE gdkFunctions[] = {
FN_TABLE_ENTRY(gdk_display_get_default, 1),
FN_TABLE_ENTRY(gdk_screen_get_default, 1),
@@ -116,16 +116,10 @@ int loadGtk() {
void *gioLib = NULL, *glibLib = NULL, *gdkLib = NULL, *gtkLib = NULL, *objLib = NULL, *pixLib = NULL;
- char *gtk3 = getenv("SWT_GTK3");
- if (gtk3 == NULL || strcmp(gtk3,"1") == 0) {
- gdkLib = dlopen(GDK3_LIB, DLFLAGS);
- gtkLib = dlopen(GTK3_LIB, DLFLAGS);
- }
- if (!gtkLib || !gdkLib) { //if GTK+ 2
- gdkLib = dlopen(GDK_LIB, DLFLAGS);
- gtkLib = dlopen(GTK_LIB, DLFLAGS);
- setenv("SWT_GTK3","0",1);
+ gdkLib = dlopen(GDK3_LIB, DLFLAGS);
+ gtkLib = dlopen(GTK3_LIB, DLFLAGS);
+ if (!gtkLib || !gdkLib) {
const char * (*func)(int, int, int);
dlerror();
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/make_linux.mak b/features/org.eclipse.equinox.executable.feature/library/gtk/make_linux.mak
index 26c60b5a2..09cde4b53 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/make_linux.mak
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/make_linux.mak
@@ -86,11 +86,9 @@ EXEC = $(PROGRAM_OUTPUT)
# DLL == 'eclipse_XXXX.so'
DLL = $(PROGRAM_LIBRARY)
-#LIBS = `pkg-config --libs-only-L gtk+-2.0` -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgdk-x11-2.0 -lpthread -ldl
LIBS = -lpthread -ldl
GTK_LIBS = \
- -DGTK_LIB="\"libgtk-x11-2.0.so.0\"" -DGDK_LIB="\"libgdk-x11-2.0.so.0\"" \
- -DGTK3_LIB="\"libgtk-3.so.0\"" -DGDK3_LIB="\"libgdk-3.so.0\"" \
+ -DGTK3_LIB="\"libgtk-4.so.0\"" -DGDK3_LIB="\"libgdk-4.so.0\"" \
-DPIXBUF_LIB="\"libgdk_pixbuf-2.0.so.0\"" -DGOBJ_LIB="\"libgobject-2.0.so.0\"" \
-DGIO_LIB="\"libgio-2.0.so.0\"" -DGLIB_LIB="\"libglib-2.0.so.0\""
LFLAGS = ${M_ARCH} -shared -fpic -Wl,--export-dynamic
@@ -105,7 +103,7 @@ CFLAGS = ${M_CFLAGS} ${M_ARCH} -g -s -Wall\
-I. \
-I.. \
-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
- `pkg-config --cflags gtk+-2.0`
+ `pkg-config --cflags gtk+-3.0`
all: $(EXEC) $(DLL)

Back to the top