mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-15 21:32:12 +00:00
Unix: Bump minimum GTK+ version to 2.6.4
GTK+ 1.2 is extremely outdated and no longer included in most distributions. By removing support for it we can replace old UI elements with more modern ones.
This commit is contained in:
parent
2fa17a0783
commit
0083bc7ea7
@ -1,28 +0,0 @@
|
||||
# serial 1
|
||||
dnl Additional macros for Basilisk II
|
||||
|
||||
dnl Check for libgnomeui
|
||||
dnl B2_PATH_GNOMEUI([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||
dnl Test to see if libgnomeui is installed, and define GNOMEUI_CFLAGS, LIBS
|
||||
AC_DEFUN([B2_PATH_GNOMEUI],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the gnome-config script
|
||||
dnl
|
||||
AC_ARG_WITH(gnome-config,
|
||||
[ --with-gnome-config=GNOME_CONFIG Location of gnome-config],
|
||||
GNOME_CONFIG="$withval")
|
||||
|
||||
AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
|
||||
AC_MSG_CHECKING(for libgnomeui)
|
||||
if test "$GNOME_CONFIG" = "no"; then
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
GNOMEUI_CFLAGS=`$GNOME_CONFIG --cflags gnomeui`
|
||||
GNOMEUI_LIBS=`$GNOME_CONFIG --libs gnomeui`
|
||||
ifelse([$1], , :, [$1])
|
||||
fi
|
||||
AC_SUBST(GNOMEUI_CFLAGS)
|
||||
AC_SUBST(GNOMEUI_LIBS)
|
||||
])
|
@ -75,12 +75,10 @@ dnl External packages.
|
||||
AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
|
||||
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]],
|
||||
[case "$withval" in
|
||||
gtk1) WANT_GTK="gtk";;
|
||||
gtk|gtk2) WANT_GTK="$withval";;
|
||||
yes) WANT_GTK="gtk2 gtk";;
|
||||
yes|gtk2) WANT_GTK="gtk2";;
|
||||
*) WANT_GTK="no";;
|
||||
esac],
|
||||
[WANT_GTK="gtk2 gtk"])
|
||||
[WANT_GTK="gtk2"])
|
||||
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=no]], [WANT_MON=$withval], [WANT_MON=no])
|
||||
|
||||
AC_ARG_WITH(bincue,
|
||||
@ -452,37 +450,13 @@ fi
|
||||
|
||||
dnl We use GTK+ if possible.
|
||||
UISRCS=../dummy/prefs_editor_dummy.cpp
|
||||
case "x$WANT_GTK" in
|
||||
xgtk2*)
|
||||
AM_PATH_GTK_2_0(1.3.15, [
|
||||
if [[ "x$WANT_GTK" = "xgtk2" ]]; then
|
||||
AM_PATH_GTK_2_0(2.6.4, [
|
||||
GUI_CFLAGS="$GTK_CFLAGS"
|
||||
GUI_LIBS="$GTK_LIBS"
|
||||
WANT_GTK=gtk2
|
||||
], [
|
||||
case "x${WANT_GTK}x" in
|
||||
*gtkx)
|
||||
AC_MSG_WARN([Could not find GTK+ 2.0, trying with GTK+ 1.2.])
|
||||
WANT_GTK=gtk
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([Could not find GTK+, disabling user interface.])
|
||||
WANT_GTK=no
|
||||
;;
|
||||
esac
|
||||
])
|
||||
;;
|
||||
esac
|
||||
if [[ "x$WANT_GTK" = "xgtk" ]]; then
|
||||
AM_PATH_GTK(1.2.0, [
|
||||
GUI_CFLAGS="$GTK_CFLAGS"
|
||||
GUI_LIBS="$GTK_LIBS"
|
||||
B2_PATH_GNOMEUI([
|
||||
AC_DEFINE(HAVE_GNOMEUI, 1, [Define if libgnomeui is available.])
|
||||
GUI_CFLAGS="$GUI_CFLAGS $GNOMEUI_CFLAGS"
|
||||
GUI_LIBS="$GUI_LIBS $GNOMEUI_LIBS"
|
||||
], [])
|
||||
], [
|
||||
AC_MSG_WARN([Could not find GTK+, disabling user interface.])
|
||||
AC_MSG_WARN([Could not find GTK+ 2.0, disabling user interface.])
|
||||
WANT_GTK=no
|
||||
])
|
||||
fi
|
||||
|
@ -64,9 +64,6 @@ struct sigstate {
|
||||
#ifdef ENABLE_GTK
|
||||
# include <gtk/gtk.h>
|
||||
# include <gdk/gdk.h>
|
||||
# ifdef HAVE_GNOMEUI
|
||||
# include <gnome.h>
|
||||
# endif
|
||||
# if !defined(GDK_WINDOWING_QUARTZ) && !defined(GDK_WINDOWING_WAYLAND)
|
||||
# include <X11/Xlib.h>
|
||||
# endif
|
||||
@ -520,16 +517,9 @@ int main(int argc, char **argv)
|
||||
|
||||
#ifdef ENABLE_GTK
|
||||
if (!gui_connection) {
|
||||
#ifdef HAVE_GNOMEUI
|
||||
// Init GNOME/GTK
|
||||
char version[16];
|
||||
sprintf(version, "%d.%d", VERSION_MAJOR, VERSION_MINOR);
|
||||
gnome_init("Basilisk II", version, argc, argv);
|
||||
#else
|
||||
// Init GTK
|
||||
gtk_set_locale();
|
||||
gtk_init(&argc, &argv);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -31,10 +31,6 @@
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
#ifdef HAVE_GNOMEUI
|
||||
#include <gnome.h>
|
||||
#endif
|
||||
|
||||
#include "user_strings.h"
|
||||
#include "version.h"
|
||||
#include "cdrom.h"
|
||||
@ -299,15 +295,8 @@ static GtkWidget *make_file_entry(GtkWidget *top, int label_id, const char *pref
|
||||
if (str == NULL)
|
||||
str = "";
|
||||
|
||||
#ifdef HAVE_GNOMEUI
|
||||
entry = gnome_file_entry_new(NULL, GetString(label_id));
|
||||
if (only_dirs)
|
||||
gnome_file_entry_set_directory(GNOME_FILE_ENTRY(entry), true);
|
||||
gtk_entry_set_text(GTK_ENTRY(gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(entry))), str);
|
||||
#else
|
||||
entry = gtk_entry_new();
|
||||
gtk_entry_set_text(GTK_ENTRY(entry), str);
|
||||
#endif
|
||||
gtk_widget_show(entry);
|
||||
gtk_box_pack_start(GTK_BOX(box), entry, TRUE, TRUE, 0);
|
||||
return entry;
|
||||
@ -315,11 +304,7 @@ static GtkWidget *make_file_entry(GtkWidget *top, int label_id, const char *pref
|
||||
|
||||
static const gchar *get_file_entry_path(GtkWidget *entry)
|
||||
{
|
||||
#ifdef HAVE_GNOMEUI
|
||||
return gnome_file_entry_get_full_path(GNOME_FILE_ENTRY(entry), false);
|
||||
#else
|
||||
return gtk_entry_get_text(GTK_ENTRY(entry));
|
||||
#endif
|
||||
}
|
||||
|
||||
static GtkWidget *make_checkbox(GtkWidget *top, int label_id, const char *prefs_item, GtkSignalFunc func)
|
||||
@ -405,21 +390,17 @@ static void dl_quit(GtkWidget *dialog)
|
||||
// "About" selected
|
||||
static void mn_about(...)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *dialog, *label, *button;
|
||||
|
||||
#ifdef HAVE_GNOMEUI
|
||||
|
||||
char version[32];
|
||||
sprintf(version, "Version %d.%d", VERSION_MAJOR, VERSION_MINOR);
|
||||
const char *authors[] = {
|
||||
"Christian Bauer",
|
||||
"Orlando Bassotto",
|
||||
"Gwenolé Beauchesne",
|
||||
"Gwenolé Beauchesne",
|
||||
"Marc Chabanas",
|
||||
"Marc Hellwig",
|
||||
"Biill Huey",
|
||||
"Brian J. Johnson",
|
||||
"Jürgen Lachmann",
|
||||
"Jürgen Lachmann",
|
||||
"Samuel Lander",
|
||||
"David Lawrence",
|
||||
"Lauri Pesonen",
|
||||
@ -427,21 +408,6 @@ static void mn_about(...)
|
||||
"and others",
|
||||
NULL
|
||||
};
|
||||
dialog = gnome_about_new(
|
||||
"Basilisk II",
|
||||
version,
|
||||
"Copyright (C) 1997-2008 Christian Bauer",
|
||||
authors,
|
||||
"Basilisk II comes with ABSOLUTELY NO WARRANTY."
|
||||
"This is free software, and you are welcome to redistribute it"
|
||||
"under the terms of the GNU General Public License.",
|
||||
NULL
|
||||
);
|
||||
gnome_dialog_set_parent(GNOME_DIALOG(dialog), GTK_WINDOW(win));
|
||||
|
||||
#else
|
||||
|
||||
GtkWidget *label, *button;
|
||||
|
||||
char str[512];
|
||||
sprintf(str,
|
||||
@ -473,8 +439,6 @@ static void mn_about(...)
|
||||
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default(button);
|
||||
|
||||
#endif
|
||||
|
||||
gtk_widget_show(dialog);
|
||||
}
|
||||
|
||||
@ -1725,16 +1689,10 @@ static void sigchld_handler(int sig, siginfo_t *sip, void *)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#ifdef HAVE_GNOMEUI
|
||||
// Init GNOME/GTK
|
||||
char version[16];
|
||||
sprintf(version, "%d.%d", VERSION_MAJOR, VERSION_MINOR);
|
||||
gnome_init("Basilisk II", version, argc, argv);
|
||||
#else
|
||||
|
||||
// Init GTK
|
||||
gtk_set_locale();
|
||||
gtk_init(&argc, &argv);
|
||||
#endif
|
||||
|
||||
// Read preferences
|
||||
PrefsInit(NULL, argc, argv);
|
||||
|
@ -39,12 +39,10 @@ AC_ARG_ENABLE(standalone-gui,[ --enable-standalone-gui enable a standalone GUI
|
||||
AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
|
||||
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]],
|
||||
[case "$withval" in
|
||||
gtk1) WANT_GTK="gtk";;
|
||||
gtk|gtk2) WANT_GTK="$withval";;
|
||||
yes) WANT_GTK="gtk2 gtk";;
|
||||
yes|gtk2) WANT_GTK="gtk2";;
|
||||
*) WANT_GTK="no";;
|
||||
esac],
|
||||
[WANT_GTK="gtk2 gtk"])
|
||||
[WANT_GTK="gtk2"])
|
||||
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=no])
|
||||
AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes or 'precompiled'], [DYNGEN_CC=$withval])
|
||||
|
||||
@ -336,35 +334,14 @@ fi
|
||||
|
||||
dnl We use GTK+ if possible.
|
||||
UISRCS=../dummy/prefs_editor_dummy.cpp
|
||||
case "x$WANT_GTK" in
|
||||
xgtk2*)
|
||||
WANT_GTK=no
|
||||
AM_PATH_GTK_2_0(1.3.15, [
|
||||
if [[ "x$WANT_GTK" = "xgtk2" ]]; then
|
||||
AM_PATH_GTK_2_0(2.6.4, [
|
||||
GUI_CFLAGS="$GTK_CFLAGS"
|
||||
GUI_LIBS="$GTK_LIBS"
|
||||
WANT_GTK=gtk2
|
||||
], [
|
||||
case "x${WANT_GTK}x" in
|
||||
*gtkx)
|
||||
AC_MSG_WARN([Could not find GTK+ 2.0, trying with GTK+ 1.2.])
|
||||
WANT_GTK=gtk
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([Could not find GTK+, disabling user interface.])
|
||||
WANT_GTK=no
|
||||
;;
|
||||
esac
|
||||
])
|
||||
;;
|
||||
esac
|
||||
if [[ "x$WANT_GTK" = "xgtk" ]]; then
|
||||
WANT_GTK=no
|
||||
AM_PATH_GTK(1.2.0, [
|
||||
GUI_CFLAGS="$GTK_CFLAGS"
|
||||
GUI_LIBS="$GTK_LIBS"
|
||||
WANT_GTK=gtk
|
||||
], [
|
||||
AC_MSG_WARN([Could not find GTK+, disabling user interface.])
|
||||
AC_MSG_WARN([Could not find GTK+ 2, disabling user interface.])
|
||||
WANT_GTK=no
|
||||
])
|
||||
fi
|
||||
if [[ "x$WANT_GTK" != "xno" -a "x$WANT_STANDALONE_GUI" = "xno" ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user