Subject: [patch] gnu: add tiemu

From: Christopher Howard <[email-masked]>
Date: Fri, 24 Apr 2020 20:54:44 -0800

Attached is another patch to add tiemu package definition.

Note that there is a significant bug included: the pedrom files
included with tiemu mysteriously cannot be loaded in tiemu itself,
which is quickly noticed because one of the main menu options is to
load these files. However, I know tiemu itself is working because I was
able to load pre-built pedrom images from the original pedrom package.

I could maybe work on fixing that problem someday, though I don't know
if Guix likes the idea of having any pre-built images in a package,
even though the source is included with them. Maybe those could just be
removed some day along with the menu option to load them.

In any case, we could not include pedrom images from the original
packages as those are built with one non-free component, a standard
library which I think has some kind of modification restriction.

-- 
Christopher Howard
p: +1 (907) 374-0257
w: https://librehacker.com
social: https://gnusocial.club/librehacker
gpg: ADDEAADE5D607C8D (keys.gnupg.net)
From d81280124f7ae8d703048bcf001d1c3ba8c5649f Mon Sep 17 00:00:00 2001
From: Christopher Howard <[email-masked]>
Date: Fri, 24 Apr 2020 20:34:07 -0800
Subject: [PATCH] gnu: add tiemu

includes patch for
- updating code to newer glib/gtk+
- fixes conflict with newer standard library
---
 gnu/packages/emulators.scm                   |  46 ++
 gnu/packages/patches/tiemu-build-fixes.patch | 515 +++++++++++++++++++
 2 files changed, 561 insertions(+)
 create mode 100644 gnu/packages/patches/tiemu-build-fixes.patch

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 2c707b7105..d2a77ca438 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -46,6 +46,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages backup)
+  #:use-module (gnu packages commencement)
   #:use-module (gnu packages cdrom)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
@@ -59,6 +60,7 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages libedit)
@@ -1787,3 +1789,47 @@ A part of the TiLP project")
 use with all TI graphing calculators (TI73 to V200PLT).")
     (home-page "http://lpg.ticalc.org/prj_tilp/")
     (license license:gpl2+)))
+
+(define-public tiemu
+  (package
+    (name "tiemu")
+    (version "3.03")
+    (source (origin
+              (method url-fetch)
+              (uri "https://www.ticalc.org/pub/unix/tiemu.tar.gz")
+              (sha256
+               (base32
+                "14m5p1ani7pz23z77h2hibl38sz0i5dpywdhkbr8v2i788487llj"))
+              (patches
+               (search-patches "tiemu-build-fixes.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list "--without-kde" "--with-gnu-ld" "--disable-gdb")
+       #:tests? #f))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("gcc-toolchain" ,gcc-toolchain)
+       ("gettext" ,gnu-gettext)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)
+       ("gtk+-2" ,gtk+-2)
+       ("libarchive", libarchive)
+       ("libglade", libglade)
+       ("libticables2" ,libticables2)
+       ("libticalcs2" ,libticalcs2)
+       ("libticonv" ,libticonv)
+       ("libtifiles2" ,libtifiles2)
+       ("sdl" ,sdl)
+       ("xorgproto" ,xorgproto)
+       ("xorg-server" ,xorg-server)))
+    (synopsis "Full-featured TI89/Titanium/92/92+/V200 multi-platform
+emulator")
+    (description
+     "TiEmu is a full-featured TI89 /Titanium/92/92+/V200 multi-platform
+emulator with an html manual.  It offers: popup menu, screenshots, ASM/C
+debugger, link port, saving state and some other stuffs.")
+    (home-page "http://lpg.ticalc.org/prj_tiemu/")
+    (license license:gpl2+)))
diff --git a/gnu/packages/patches/tiemu-build-fixes.patch b/gnu/packages/patches/tiemu-build-fixes.patch
new file mode 100644
index 0000000000..10917d1c35
--- /dev/null
+++ b/gnu/packages/patches/tiemu-build-fixes.patch
@@ -0,0 +1,515 @@
+diff -u -r a/src/core/uae/Makefile b/src/core/uae/Makefile
+--- a/src/core/uae/Makefile	2006-01-06 14:30:04.000000000 -0900
++++ b/src/core/uae/Makefile	2020-04-22 20:37:19.420709314 -0800
+@@ -29,11 +29,11 @@
+ # Build generators and files to generate
+ build68k: build68k_host.o
+ 	@echo "-> Compiling 68k builder..."
+-	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc $(LDFLAGS) -o $@ $?
++	C_INCLUDE_PATH="" gcc $(LDFLAGS) -o $@ $?
+ 
+ gencpu: gencpu_host.o readcpu_host.o cpudefs_host.o missing_host.o xmalloc_host.o
+ 	@echo "-> Compiling CPU generator..."
+-	C_INCLUDE_PATH="" LIBRARY_PATH="" gcc $(LDFLAGS) -o $@ gencpu_host.o readcpu_host.o cpudefs_host.o missing_host.o xmalloc_host.o
++	C_INCLUDE_PATH="" gcc $(LDFLAGS) -o $@ gencpu_host.o readcpu_host.o cpudefs_host.o missing_host.o xmalloc_host.o
+ 
+ cpudefs.c: build68k table68k
+ 	@echo "-> Building CPU definitions..."
+diff -u -r a/src/core/uae/sysdeps.h b/src/core/uae/sysdeps.h
+--- a/src/core/uae/sysdeps.h	2007-06-23 21:05:05.000000000 -0800
++++ b/src/core/uae/sysdeps.h	2020-04-22 21:18:29.860711224 -0800
+@@ -138,11 +138,11 @@
+ #define ENUMNAME(name) name
+ 
+ /* While we're here, make abort more useful.  */
+-#define abort() \
+-  do { \
+-    fprintf (stderr, "UAE: Internal error; file %s, line %d\n", __FILE__, __LINE__); \
+-    (abort) (); \
+-} while (0)
++/* #define abort() \ */
++/*   do { \ */
++/*     fprintf (stderr, "UAE: Internal error; file %s, line %d\n", __FILE__, __LINE__); \ */
++/*     (abort) (); \ */
++/* } while (0) */
+ #else
+ #define ENUMDECL enum
+ #define ENUMNAME(name) ; typedef int name
+diff -u -r a/src/gui/calc/calc.c b/src/gui/calc/calc.c
+--- a/src/gui/calc/calc.c	2007-12-16 06:29:16.000000000 -0900
++++ b/src/gui/calc/calc.c	2020-04-23 04:58:13.992732550 -0800
+@@ -313,7 +313,7 @@
+ {
+     gdk_draw_pixmap(
+         widget->window,
+-		widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
++		widget->style->fg_gc[gtk_widget_get_state (widget)],
+ 		pixmap,
+ 		event->area.x, event->area.y,
+ 		event->area.x, event->area.y,
+@@ -465,7 +465,7 @@
+ extern volatile int lcd_flag;
+ extern volatile int debugger;
+ 
+-static gint hid_refresh (gpointer data)
++static gboolean hid_refresh (gpointer data)
+ {
+     if(lcd_flag || (tihw.hw_type >= HW2))
+     {
+@@ -586,7 +586,7 @@
+ 
+     // Install LCD refresh: 100 FPS (10 ms)
+     tid = g_timeout_add((params.lcd_rate == -1) ? 50 : params.lcd_rate, 
+-		(GtkFunction)hid_refresh, NULL);
++		(GSourceFunc)hid_refresh, NULL);
+ 
+ 	explicit_destroy = 0;
+ 	gtk_widget_show(main_wnd);	// show wnd here
+@@ -640,7 +640,7 @@
+ 	g_source_remove(tid);
+ 
+ 	tid = g_timeout_add((params.lcd_rate == -1) ? 50 : params.lcd_rate, 
+-		(GtkFunction)hid_refresh, NULL);
++		(GSourceFunc)hid_refresh, NULL);
+ }
+ 
+ int hid_switch_with_skin(void)
+diff -u -r a/src/gui/calc/screen.c b/src/gui/calc/screen.c
+--- a/src/gui/calc/screen.c	2006-11-06 08:18:51.000000000 -0900
++++ b/src/gui/calc/screen.c	2020-04-23 04:58:13.992732550 -0800
+@@ -187,7 +187,7 @@
+ 	skin_infos.image = gdk_pixbuf_scale_simple(skin_infos.raw, wr.wr.w, wr.wr.h, GDK_INTERP_NEAREST);
+ 
+ 	// and draw image into pixmap (next, into window on expose event)
+-    gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[GTK_WIDGET_STATE(main_wnd)],
++    gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[gtk_widget_get_state(main_wnd)],
+ 		  skin_infos.image, 0, 0, 0, 0, -1, -1, GDK_RGB_DITHER_NONE, 0, 0);
+ 	gdk_window_invalidate_rect(main_wnd->window, &wr.gr, FALSE);
+ }
+@@ -204,7 +204,7 @@
+ 		gdk_pixbuf_scale_simple(skin_infos.raw, sr.w, sr.h, GDK_INTERP_NEAREST);
+ 
+ 	// and draw
+-	gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[GTK_WIDGET_STATE(main_wnd)],
++	gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[gtk_widget_get_state(main_wnd)],
+ 		  skin_infos.image, ls.x, ls.y, lr.x, lr.y, lr.w, lr.h, GDK_RGB_DITHER_NONE, 0, 0);
+ 	gtk_widget_queue_draw_area(area, lr.x, lr.y, lr.w, lr.h);
+ }
+@@ -324,7 +324,7 @@
+ 			skin_infos.image = gdk_pixbuf_scale_simple(lcd, lr.w, lr.h, GDK_INTERP_NEAREST);
+ 
+ 			// and draw image into pixmap (next, into window on expose event)
+-			gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[GTK_WIDGET_STATE(main_wnd)],
++			gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[gtk_widget_get_state(main_wnd)],
+ 			 skin_infos.image, src.x, src.y, lr.x, lr.y, src.w, src.h,
+ 			  GDK_RGB_DITHER_NONE, 0, 0);
+ 			gtk_widget_queue_draw_area(area, lr.x, lr.y, src.w, src.h);
+@@ -332,7 +332,7 @@
+ 		else
+ 		{
+ 			// and draw image into pixmap (next, into window on expose event)
+-			gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[GTK_WIDGET_STATE(main_wnd)],
++			gdk_draw_pixbuf(pixmap, main_wnd->style->fg_gc[gtk_widget_get_state(main_wnd)],
+ 			  lcd_mem, src.x, src.y, lr.x, lr.y, src.w, src.h,
+ 			  GDK_RGB_DITHER_NONE, 0, 0);
+ 			gtk_widget_queue_draw_area(area, lr.x, lr.y, src.w, src.h);
+diff -u -r a/src/gui/debugger/dbg_all.c b/src/gui/debugger/dbg_all.c
+--- a/src/gui/debugger/dbg_all.c	2009-05-08 02:56:40.000000000 -0800
++++ b/src/gui/debugger/dbg_all.c	2020-04-23 04:58:13.996732550 -0800
+@@ -90,21 +90,21 @@
+ {	
+ 	WND_TMR_START();
+ 
+-	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.regs))
++	if(options3.dbg_dock || gtk_widget_get_visible(dbgw.regs))
+ 		dbgregs_refresh_window();
+-	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.mem))
++	if(options3.dbg_dock || gtk_widget_get_visible(dbgw.mem))
+ 		dbgmem_refresh_window();
+-	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.bkpts))
++	if(options3.dbg_dock || gtk_widget_get_visible(dbgw.bkpts))
+ 		dbgbkpts_refresh_window();
+-	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.pclog))
++	if(options3.dbg_dock || gtk_widget_get_visible(dbgw.pclog))
+ 		dbgpclog_refresh_window();
+-	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.code))
++	if(options3.dbg_dock || gtk_widget_get_visible(dbgw.code))
+ 		dbgcode_refresh_window();
+-    if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.stack))
++    if(options3.dbg_dock || gtk_widget_get_visible(dbgw.stack))
+ 		dbgstack_refresh_window();
+-	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.heap))
++	if(options3.dbg_dock || gtk_widget_get_visible(dbgw.heap))
+ 		dbgheap_refresh_window();
+-	if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.iop))
++	if(options3.dbg_dock || gtk_widget_get_visible(dbgw.iop))
+ 		dbgiop_refresh_window();
+ 
+ 	WND_TMR_STOP("Debugger Refresh Time");
+@@ -163,7 +163,7 @@
+ 	gtk_debugger_refresh();
+ 
+ 	// enable the debugger if GDB disabled it
+-	if (!options3.dbg_dock && !GTK_WIDGET_SENSITIVE(dbgw.regs))
++	if (!options3.dbg_dock && !gtk_widget_get_sensitive(dbgw.regs))
+ 		gtk_debugger_enable();
+ 
+ 	// handle automatic debugging requests
+@@ -180,7 +180,7 @@
+ 
+ 			ti68k_bkpt_get_pgmentry_offset(id, &handle, &offset);
+ 			ti68k_bkpt_del_pgmentry(handle);
+-			if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.bkpts))
++			if(options3.dbg_dock || gtk_widget_get_visible(dbgw.bkpts))
+ 				dbgbkpts_refresh_window();
+ 
+ 			delete_command(NULL, 0);
+diff -u -r a/src/gui/debugger/dbg_bkpts.c b/src/gui/debugger/dbg_bkpts.c
+--- a/src/gui/debugger/dbg_bkpts.c	2009-05-06 11:48:47.000000000 -0800
++++ b/src/gui/debugger/dbg_bkpts.c	2020-04-23 04:58:13.992732550 -0800
+@@ -388,7 +388,7 @@
+ 		gtk_window_iconify(GTK_WINDOW(wnd));
+ #endif
+ 
+-	if(!GTK_WIDGET_VISIBLE(dbgw.bkpts) && !options3.bkpts.closed)
++	if(!gtk_widget_get_visible(dbgw.bkpts) && !options3.bkpts.closed)
+ 		gtk_widget_show(wnd);
+ 
+ 	return wnd;
+diff -u -r a/src/gui/debugger/dbg_code.c b/src/gui/debugger/dbg_code.c
+--- a/src/gui/debugger/dbg_code.c	2009-05-06 11:48:47.000000000 -0800
++++ b/src/gui/debugger/dbg_code.c	2020-04-23 04:58:13.992732550 -0800
+@@ -1117,7 +1117,7 @@
+ 
+ int dbgcode_quit_enabled(void)
+ {
+-	return GTK_WIDGET_SENSITIVE(mi.m8);
++	return gtk_widget_get_sensitive(mi.m8);
+ }
+ 
+ static int close_debugger_wrapper(gpointer data)
+diff -u -r a/src/gui/debugger/dbg_dock.c b/src/gui/debugger/dbg_dock.c
+--- a/src/gui/debugger/dbg_dock.c	2008-05-26 08:48:30.000000000 -0800
++++ b/src/gui/debugger/dbg_dock.c	2020-04-23 04:58:13.992732550 -0800
+@@ -151,22 +151,22 @@
+ 
+ void dbgdock_show_all(int all)
+ {
+-	if(!GTK_WIDGET_VISIBLE(dbgw.dock) && all)
++	if(!gtk_widget_get_visible(dbgw.dock) && all)
+         gtk_widget_show(dbgw.dock);
+ 
+-	if(GTK_WIDGET_VISIBLE(dbgw.iop))
++	if(gtk_widget_get_visible(dbgw.iop))
+         gtk_window_iconify(GTK_WINDOW(dbgw.iop));
+-	if(GTK_WIDGET_VISIBLE(dbgw.pclog))
++	if(gtk_widget_get_visible(dbgw.pclog))
+         gtk_window_iconify(GTK_WINDOW(dbgw.pclog));
+ }
+ 
+ void dbgdock_hide_all(int all)
+ {
+-	if(GTK_WIDGET_VISIBLE(dbgw.dock) && all)
++	if(gtk_widget_get_visible(dbgw.dock) && all)
+         gtk_widget_hide(dbgw.dock);
+ 
+-    if(GTK_WIDGET_VISIBLE(dbgw.pclog))
++    if(gtk_widget_get_visible(dbgw.pclog))
+         gtk_widget_hide(dbgw.pclog);
+-	if(GTK_WIDGET_VISIBLE(dbgw.iop))
++	if(gtk_widget_get_visible(dbgw.iop))
+         gtk_widget_hide(dbgw.iop);
+ }
+diff -u -r a/src/gui/debugger/dbg_heap.c b/src/gui/debugger/dbg_heap.c
+--- a/src/gui/debugger/dbg_heap.c	2009-05-06 11:48:47.000000000 -0800
++++ b/src/gui/debugger/dbg_heap.c	2020-04-23 04:58:13.992732550 -0800
+@@ -171,7 +171,7 @@
+ 		gtk_window_iconify(GTK_WINDOW(dbgw.heap));
+ #endif
+ 
+-	if(!GTK_WIDGET_VISIBLE(dbgw.heap) && !options3.heap.closed)
++	if(!gtk_widget_get_visible(dbgw.heap) && !options3.heap.closed)
+ 		gtk_widget_show(dbgw.heap);
+ 
+ 	return dbgw.heap;
+diff -u -r a/src/gui/debugger/dbg_iop.c b/src/gui/debugger/dbg_iop.c
+--- a/src/gui/debugger/dbg_iop.c	2009-05-02 11:46:04.000000000 -0800
++++ b/src/gui/debugger/dbg_iop.c	2020-04-23 04:58:13.996732550 -0800
+@@ -455,7 +455,7 @@
+ 		gtk_window_iconify(GTK_WINDOW(dbgw.iop));
+ #endif
+     
+-	if(!GTK_WIDGET_VISIBLE(dbgw.iop) && !options3.iop.closed)
++	if(!gtk_widget_get_visible(dbgw.iop) && !options3.iop.closed)
+ 		gtk_widget_show(dbgw.iop);
+ 
+ 	return dbgw.iop;
+diff -u -r a/src/gui/debugger/dbg_mem.c b/src/gui/debugger/dbg_mem.c
+--- a/src/gui/debugger/dbg_mem.c	2009-05-06 11:48:47.000000000 -0800
++++ b/src/gui/debugger/dbg_mem.c	2020-04-23 04:58:13.992732550 -0800
+@@ -435,7 +435,7 @@
+ 		gtk_window_iconify(GTK_WINDOW(dbgw.mem));
+ #endif
+ 
+-	if(!GTK_WIDGET_VISIBLE(dbgw.mem) && !options3.mem.closed)
++	if(!gtk_widget_get_visible(dbgw.mem) && !options3.mem.closed)
+ 		gtk_widget_show(dbgw.mem);
+ 
+     return dbgw.mem;
+@@ -603,14 +603,14 @@
+ 	gtk_widget_show(menu);
+ }
+ 
+-GLADE_CB void
+-on_notebook1_switch_page               (GtkNotebook     *notebook,
+-                                        GtkNotebookPage *page,
+-                                        guint            page_num,
+-                                        gpointer         user_data)
+-{
+-	refresh_page(page_num, 0);
+-}
++/* GLADE_CB void */
++/* on_notebook1_switch_page               (GtkNotebook     *notebook, */
++/*                                         GtkNotebookPage *page, */
++/*                                         guint            page_num, */
++/*                                         gpointer         user_data) */
++/* { */
++/* 	refresh_page(page_num, 0); */
++/* } */
+ 
+ /***** Misc *****/
+ 
+diff -u -r a/src/gui/debugger/dbg_pclog.c b/src/gui/debugger/dbg_pclog.c
+--- a/src/gui/debugger/dbg_pclog.c	2009-05-02 11:46:04.000000000 -0800
++++ b/src/gui/debugger/dbg_pclog.c	2020-04-23 04:58:13.992732550 -0800
+@@ -163,7 +163,7 @@
+ 		gtk_window_iconify(GTK_WINDOW(dbgw.pclog));
+ #endif
+ 
+-	if(!GTK_WIDGET_VISIBLE(dbgw.pclog) && !options3.pclog.closed)
++	if(!gtk_widget_get_visible(dbgw.pclog) && !options3.pclog.closed)
+ 		gtk_widget_show(dbgw.pclog);
+ 
+ 	return dbgw.pclog;
+diff -u -r a/src/gui/debugger/dbg_regs.c b/src/gui/debugger/dbg_regs.c
+--- a/src/gui/debugger/dbg_regs.c	2009-05-06 11:48:47.000000000 -0800
++++ b/src/gui/debugger/dbg_regs.c	2020-04-23 04:58:13.996732550 -0800
+@@ -302,7 +302,7 @@
+ 		gtk_window_iconify(GTK_WINDOW(dbgw.regs));
+ #endif
+ 
+-	if(!GTK_WIDGET_VISIBLE(dbgw.regs) && !options3.regs.closed)
++	if(!gtk_widget_get_visible(dbgw.regs) && !options3.regs.closed)
+ 		gtk_widget_show(dbgw.regs);
+ 
+ 	return dbgw.regs;
+diff -u -r a/src/gui/debugger/dbg_romcall.c b/src/gui/debugger/dbg_romcall.c
+--- a/src/gui/debugger/dbg_romcall.c	2007-07-05 03:36:10.000000000 -0800
++++ b/src/gui/debugger/dbg_romcall.c	2020-04-23 05:02:22.092732742 -0800
+@@ -163,7 +163,7 @@
+ 
+ 	// and set storage
+ 	gtk_combo_box_set_model(combo, model);
+-	gtk_combo_box_entry_set_text_column(GTK_COMBO_BOX_ENTRY(combo), COL_FULL);
++	gtk_combo_box_set_entry_text_column(combo, COL_FULL);
+ 
+ 	/* --- */
+ 
+diff -u -r a/src/gui/debugger/dbg_stack.c b/src/gui/debugger/dbg_stack.c
+--- a/src/gui/debugger/dbg_stack.c	2009-05-06 11:48:47.000000000 -0800
++++ b/src/gui/debugger/dbg_stack.c	2020-04-23 04:58:13.996732550 -0800
+@@ -197,7 +197,7 @@
+ 		gtk_window_iconify(GTK_WINDOW(dbgw.stack));
+ #endif
+ 
+-	if(!GTK_WIDGET_VISIBLE(dbgw.stack) && !options3.stack.closed)
++	if(!gtk_widget_get_visible(dbgw.stack) && !options3.stack.closed)
+ 		gtk_widget_show(dbgw.stack);
+ 
+ 	return dbgw.stack;
+diff -u -r a/src/gui/debugger/dbg_wnds.c b/src/gui/debugger/dbg_wnds.c
+--- a/src/gui/debugger/dbg_wnds.c	2009-05-06 23:18:02.000000000 -0800
++++ b/src/gui/debugger/dbg_wnds.c	2020-04-23 04:58:13.992732550 -0800
+@@ -74,21 +74,21 @@
+ 	if(options3.dbg_dock)
+ 		return;
+ 
+-    if(GTK_WIDGET_VISIBLE(dbgw.regs))
++    if(gtk_widget_get_visible(dbgw.regs))
+         gtk_window_iconify(GTK_WINDOW(dbgw.regs));
+-    if(GTK_WIDGET_VISIBLE(dbgw.bkpts))
++    if(gtk_widget_get_visible(dbgw.bkpts))
+         gtk_window_iconify(GTK_WINDOW(dbgw.bkpts));
+-    if(GTK_WIDGET_VISIBLE(dbgw.mem))
++    if(gtk_widget_get_visible(dbgw.mem))
+         gtk_window_iconify(GTK_WINDOW(dbgw.mem));
+-    if(GTK_WIDGET_VISIBLE(dbgw.pclog))
++    if(gtk_widget_get_visible(dbgw.pclog))
+         gtk_window_iconify(GTK_WINDOW(dbgw.pclog));
+-    if(GTK_WIDGET_VISIBLE(dbgw.code) & all)
++    if(gtk_widget_get_visible(dbgw.code) & all)
+         gtk_window_iconify(GTK_WINDOW(dbgw.code));
+-    if(GTK_WIDGET_VISIBLE(dbgw.stack))
++    if(gtk_widget_get_visible(dbgw.stack))
+         gtk_window_iconify(GTK_WINDOW(dbgw.stack));
+-	if(GTK_WIDGET_VISIBLE(dbgw.heap))
++	if(gtk_widget_get_visible(dbgw.heap))
+         gtk_window_iconify(GTK_WINDOW(dbgw.heap));
+-	if(GTK_WIDGET_VISIBLE(dbgw.iop))
++	if(gtk_widget_get_visible(dbgw.iop))
+         gtk_window_iconify(GTK_WINDOW(dbgw.iop));
+ }
+ 
+@@ -98,21 +98,21 @@
+ 	if(options3.dbg_dock)
+ 		return;
+ 
+-    if(GTK_WIDGET_VISIBLE(dbgw.regs))
++    if(gtk_widget_get_visible(dbgw.regs))
+         gtk_window_deiconify(GTK_WINDOW(dbgw.regs));
+-    if(GTK_WIDGET_VISIBLE(dbgw.bkpts))
++    if(gtk_widget_get_visible(dbgw.bkpts))
+         gtk_window_deiconify(GTK_WINDOW(dbgw.bkpts));
+-    if(GTK_WIDGET_VISIBLE(dbgw.mem))
++    if(gtk_widget_get_visible(dbgw.mem))
+         gtk_window_deiconify(GTK_WINDOW(dbgw.mem));
+-    if(GTK_WIDGET_VISIBLE(dbgw.pclog))
++    if(gtk_widget_get_visible(dbgw.pclog))
+         gtk_window_deiconify(GTK_WINDOW(dbgw.pclog));
+-    if(GTK_WIDGET_VISIBLE(dbgw.code) & all)
++    if(gtk_widget_get_visible(dbgw.code) & all)
+         gtk_window_deiconify(GTK_WINDOW(dbgw.code));
+-    if(GTK_WIDGET_VISIBLE(dbgw.stack))
++    if(gtk_widget_get_visible(dbgw.stack))
+         gtk_window_deiconify(GTK_WINDOW(dbgw.stack));
+-	if(GTK_WIDGET_VISIBLE(dbgw.heap))
++	if(gtk_widget_get_visible(dbgw.heap))
+         gtk_window_deiconify(GTK_WINDOW(dbgw.heap));
+-	if(GTK_WIDGET_VISIBLE(dbgw.iop))
++	if(gtk_widget_get_visible(dbgw.iop))
+         gtk_window_deiconify(GTK_WINDOW(dbgw.iop));
+ }
+ 
+@@ -122,21 +122,21 @@
+     if(options3.dbg_dock)
+ 		return;
+ 
+-    if(!GTK_WIDGET_VISIBLE(dbgw.regs))
++    if(!gtk_widget_get_visible(dbgw.regs))
+         gtk_widget_show(dbgw.regs);
+-    if(!GTK_WIDGET_VISIBLE(dbgw.bkpts))
++    if(!gtk_widget_get_visible(dbgw.bkpts))
+         gtk_widget_show(dbgw.bkpts);
+-    if(!GTK_WIDGET_VISIBLE(dbgw.mem))
++    if(!gtk_widget_get_visible(dbgw.mem))
+         gtk_widget_show(dbgw.mem);
+-    if(!GTK_WIDGET_VISIBLE(dbgw.pclog))
++    if(!gtk_widget_get_visible(dbgw.pclog))
+         gtk_widget_show(dbgw.pclog);
+-    if(!GTK_WIDGET_VISIBLE(dbgw.code) && all)
++    if(!gtk_widget_get_visible(dbgw.code) && all)
+         gtk_widget_show(dbgw.code);
+-    if(!GTK_WIDGET_VISIBLE(dbgw.stack))
++    if(!gtk_widget_get_visible(dbgw.stack))
+         gtk_widget_show(dbgw.stack);
+-	if(!GTK_WIDGET_VISIBLE(dbgw.heap))
++	if(!gtk_widget_get_visible(dbgw.heap))
+         gtk_widget_show(dbgw.heap);
+-	if(!GTK_WIDGET_VISIBLE(dbgw.iop))
++	if(!gtk_widget_get_visible(dbgw.iop))
+         gtk_widget_show(dbgw.iop);
+ }
+ 
+@@ -146,21 +146,21 @@
+     if(options3.dbg_dock)
+ 		return;
+ 
+-    if(GTK_WIDGET_VISIBLE(dbgw.regs))
++    if(gtk_widget_get_visible(dbgw.regs))
+         gtk_widget_hide(dbgw.regs);
+-    if(GTK_WIDGET_VISIBLE(dbgw.bkpts))
++    if(gtk_widget_get_visible(dbgw.bkpts))
+         gtk_widget_hide(dbgw.bkpts);
+-    if(GTK_WIDGET_VISIBLE(dbgw.mem))
++    if(gtk_widget_get_visible(dbgw.mem))
+         gtk_widget_hide(dbgw.mem);
+-    if(GTK_WIDGET_VISIBLE(dbgw.pclog))
++    if(gtk_widget_get_visible(dbgw.pclog))
+         gtk_widget_hide(dbgw.pclog);
+-    if(GTK_WIDGET_VISIBLE(dbgw.code) && all)
++    if(gtk_widget_get_visible(dbgw.code) && all)
+         gtk_widget_hide(dbgw.code);
+-    if(GTK_WIDGET_VISIBLE(dbgw.stack))
++    if(gtk_widget_get_visible(dbgw.stack))
+         gtk_widget_hide(dbgw.stack);
+-	if(GTK_WIDGET_VISIBLE(dbgw.heap))
++	if(gtk_widget_get_visible(dbgw.heap))
+         gtk_widget_hide(dbgw.heap);
+-	if(GTK_WIDGET_VISIBLE(dbgw.iop))
++	if(gtk_widget_get_visible(dbgw.iop))
+         gtk_widget_hide(dbgw.iop);
+ }
+ 
+@@ -338,7 +338,7 @@
+ 	if(!options3.dbg_dock)
+ 	{
+ 		g_signal_handlers_block_by_func(GTK_OBJECT(item), on_registers1_activate, NULL);
+-		gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.regs));
++		gtk_check_menu_item_set_active(item, gtk_widget_get_visible(dbgw.regs));
+ 		g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_registers1_activate, NULL);
+ 	}
+ 	else
+@@ -350,7 +350,7 @@
+ 	if(!options3.dbg_dock)
+ 	{
+ 		g_signal_handlers_block_by_func(GTK_OBJECT(item), on_breakpoints1_activate, NULL);
+-		gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.bkpts));
++		gtk_check_menu_item_set_active(item, gtk_widget_get_visible(dbgw.bkpts));
+ 		g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_breakpoints1_activate, NULL);
+ 	}
+ 	else
+@@ -362,7 +362,7 @@
+ 	if(!options3.dbg_dock)
+ 	{
+ 		g_signal_handlers_block_by_func(GTK_OBJECT(item), on_memory1_activate, NULL);
+-		gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.mem));
++		gtk_check_menu_item_set_active(item, gtk_widget_get_visible(dbgw.mem));
+ 		g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_memory1_activate, NULL);
+ 	}
+ 	else
+@@ -372,7 +372,7 @@
+     elt = g_list_nth(list, 3);
+     item = GTK_CHECK_MENU_ITEM(elt->data);
+     g_signal_handlers_block_by_func(GTK_OBJECT(item), on_pc_log1_activate, NULL);
+-    gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.pclog));
++    gtk_check_menu_item_set_active(item, gtk_widget_get_visible(dbgw.pclog));
+     g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_pc_log1_activate, NULL);
+ 
+     // stack
+@@ -381,7 +381,7 @@
+ 	if(!options3.dbg_dock)
+ 	{
+ 		g_signal_handlers_block_by_func(GTK_OBJECT(item), on_stack_frame1_activate, NULL);
+-		gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.stack));
++		gtk_check_menu_item_set_active(item, gtk_widget_get_visible(dbgw.stack));
+ 		g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_stack_frame1_activate, NULL);
+ 	}
+ 	else
+@@ -393,7 +393,7 @@
+ 	if(!options3.dbg_dock)
+ 	{
+ 		g_signal_handlers_block_by_func(GTK_OBJECT(item), on_heap_frame1_activate, NULL);
+-		gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.heap));
++		gtk_check_menu_item_set_active(item, gtk_widget_get_visible(dbgw.heap));
+ 		g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_heap_frame1_activate, NULL);
+ 	}
+ 	else
+@@ -403,7 +403,7 @@
+ 	elt = g_list_nth(list, 6);
+     item = GTK_CHECK_MENU_ITEM(elt->data);
+     g_signal_handlers_block_by_func(GTK_OBJECT(item), on_ioports_frame1_activate, NULL);
+-    gtk_check_menu_item_set_active(item, GTK_WIDGET_VISIBLE(dbgw.iop));
++    gtk_check_menu_item_set_active(item, gtk_widget_get_visible(dbgw.iop));
+     g_signal_handlers_unblock_by_func(GTK_OBJECT(item), on_ioports_frame1_activate, NULL);
+ 
+ 	// dock/multi mode
-- 
2.26.2