< prev index next >
modules/javafx.graphics/src/main/native-glass/gtk/launcher.c
Print this page
rev 10880 : 8198654: Switch FX's default GTK version to 3
Reviewed-by:
*** 1,7 ****
/*
! * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 127,137 ****
if (gtk_versionDebug) {
printf("checking GTK version %d\n",wantVersion);
}
int success = 1;
! char *** use_chain = two_to_three;
int i, found = 0;
//at first try to detect already loaded GTK version
for (i = 0; use_chain[i] && !found; i++) {
found = try_libraries_noload(use_chain[i]);
--- 127,137 ----
if (gtk_versionDebug) {
printf("checking GTK version %d\n",wantVersion);
}
int success = 1;
! char *** use_chain = three_to_two;
int i, found = 0;
//at first try to detect already loaded GTK version
for (i = 0; use_chain[i] && !found; i++) {
found = try_libraries_noload(use_chain[i]);
*** 139,159 ****
printf("found already loaded GTK library %s\n", use_chain[i][1]);
}
}
if (!found) {
! if (wantVersion == 0 || wantVersion == 2) {
! use_chain = two_to_three;
! } else if (wantVersion == 3) {
use_chain = three_to_two;
} else {
// Note, this should never happen, java should be protecting us
if (gtk_versionDebug) {
! printf("bad GTK version specified, assuming 2\n");
}
! wantVersion = 2;
! use_chain = two_to_three;
}
for (i = 0; use_chain[i] && !found; i++) {
if (gtk_versionDebug) {
printf("trying GTK library %s\n", use_chain[i][1]);
--- 139,159 ----
printf("found already loaded GTK library %s\n", use_chain[i][1]);
}
}
if (!found) {
! if (wantVersion == 0 || wantVersion == 3) {
use_chain = three_to_two;
+ } else if (wantVersion == 2) {
+ use_chain = two_to_three;
} else {
// Note, this should never happen, java should be protecting us
if (gtk_versionDebug) {
! printf("bad GTK version specified, assuming 3\n");
}
! wantVersion = 3;
! use_chain = three_to_two;
}
for (i = 0; use_chain[i] && !found; i++) {
if (gtk_versionDebug) {
printf("trying GTK library %s\n", use_chain[i][1]);
< prev index next >