AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
-dnl Checks for Gtk+-2.0
+dnl Checks for Gtk+-3.0
AC_ARG_ENABLE(gui,
[ --enable-gui Enable building the GUI (default=yes)],
[ac_cv_enable_gui=$enableval], [ac_cv_enable_gui=yes])
AC_MSG_CHECKING([whether to build GUI])
if test x$ac_cv_enable_gui = xyes; then
AC_MSG_RESULT(yes)
- PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4.0, [], dnl
+ PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.0, [], dnl
ac_cv_enable_gui=no)
if test x$ac_cv_enable_gui = xyes; then
AC_DEFINE([HAVE_GTK],1,[Set to 1 to enable GTK+ support for building GUI.])
-
- GTK_CFLAGS="${GTK_CFLAGS} -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
-
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
fi
src/gtk/Makefile
data/Makefile
doc/Makefile
- tests/Makefile)
+ tests/Makefile
+)
}
static void
-file_open_event(GtkObject *object, gpointer data)
+file_open_event(GObject *object, gpointer data)
{
GtkWidget *file_dialog;
char *dir;
/* Create a new file selection widget. */
file_dialog = gtk_file_chooser_dialog_new(
FILENAME_DESCRIPTION, NULL, GTK_FILE_CHOOSER_ACTION_OPEN,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
+ "_Cancel", GTK_RESPONSE_CANCEL,
+ "_Open", GTK_RESPONSE_ACCEPT, NULL);
if (strlen(previous_folder) == 0) {
/* Opening file chooser to current working directory. */
GtkWidget *button;
/* The buttons of the hbox are NOT given equal space in the box. */
- button_hbox = gtk_hbox_new(FALSE, 0);
+ button_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
/* Creating the RESET button. */
button = button_add_pix(button_hbox, reset_xpm);
/* Creating STOP button. */
button = button_add_pix(button_hbox, stop_xpm);
- g_signal_connect(GTK_OBJECT(button), "clicked",
+ g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(emugtk_stop_event),
NULL);
/* Creating STEP button. */
button = button_add_pix(button_hbox, step_xpm);
- g_signal_connect(GTK_OBJECT(button), "clicked",
+ g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(emugtk_step_event),
NULL);
{
/* Create vpaned (memory windows) only if necessary. */
if (cfg->view_int_memory || cfg->view_ext_memory) {
- vpaned1 = gtk_vpaned_new();
+ vpaned1 = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
gtk_paned_set_position(GTK_PANED(vpaned1), cfg->vpane_pos);
g_signal_connect(G_OBJECT(vpaned1), "notify::position",
}
/* hpaned will contain registers and disassembly windows. */
- hpaned = gtk_hpaned_new();
+ hpaned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
gtk_paned_set_position(GTK_PANED(hpaned), cfg->hpane_pos);
g_signal_connect(G_OBJECT(hpaned), "notify::position",
G_CALLBACK(hpaned_notify_event), hpaned);
* group2: memory windows
*/
if (cfg->layout == UI_LAYOUT1)
- main_paned = gtk_vpaned_new();
+ main_paned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
else
- main_paned = gtk_hpaned_new();
+ main_paned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
gtk_paned_set_position(GTK_PANED(main_paned), cfg->main_pane_pos);
g_signal_connect(G_OBJECT(main_paned), "notify::position",
* vbox contains the menu bar and body_vbox (for all remaining
* items).
*/
- vbox = gtk_vbox_new(FALSE, 1);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 1);
gtk_box_pack_start(GTK_BOX(vbox), menu_bar, FALSE, FALSE, 1);
gtk_box_pack_start(GTK_BOX(vbox), buttons_bar, FALSE, FALSE, 1);
gtk_box_pack_start(GTK_BOX(vbox), main_paned, true, true, 1);
/* Create the button. */
if (display_label) {
/* By default, a label is appended to stock buttons. */
- button = gtk_button_new_from_stock(stock_id);
+ button = gtk_button_new_from_icon_name(
+ stock_id, GTK_ICON_SIZE_SMALL_TOOLBAR);
} else {
GtkWidget *icon;
button = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NORMAL);
- icon = gtk_image_new_from_stock(stock_id,
- GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name(stock_id,
+ GTK_ICON_SIZE_MENU /*SMALL_TOOLBAR*/);
gtk_container_add(GTK_CONTAINER(button), icon);
}
frame = gtk_frame_new(title);
/* The items of the hbox are NOT given equal space in the box. */
- hbox = gtk_hbox_new(false, 0);
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
/*
* If the button was added directly to the hbox, it would be as high
* as the frame widget (ugly). Adding it first to a vbox makes it have
* a box shape.
*/
- vbox = gtk_vbox_new(true, 0);
- timer_reset_button = button_add_stock(vbox, GTK_STOCK_REFRESH, false);
+ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+ timer_reset_button = button_add_stock(vbox, "view-refresh", false);
g_signal_connect(G_OBJECT(timer_reset_button), "clicked",
G_CALLBACK(timer_reset_callback), GINT_TO_POINTER(id));
gtk_box_pack_start(GTK_BOX(hbox), vbox, false, false, 3);