From 9bbd268aa412769d03aa4cc0f4eecb041fa4fbf3 Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Sat, 29 Mar 2025 09:18:04 +0100 Subject: [PATCH] Port to new GtkTooltip --- src/dvdisaster.h | 4 ++-- src/main-window.c | 4 ---- src/menubar.c | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/dvdisaster.h b/src/dvdisaster.h index 2041b38..9446d44 100644 --- a/src/dvdisaster.h +++ b/src/dvdisaster.h @@ -87,7 +87,7 @@ typedef void GtkNotebook; typedef int GtkMessageType; typedef void GtkScrolledWindow; typedef void GtkTextBuffer; -typedef void GtkTooltips; +typedef void GtkTooltip; typedef void GtkWidget; typedef void GtkWindow; @@ -348,7 +348,7 @@ typedef struct _GlobalClosure /*** Widgets of the main window */ GtkWindow *window; /* main window */ - GtkTooltips *tooltips; /* our global tooltips structure */ + GtkTooltip *tooltips; /* our global tooltips structure */ GdkPixbuf *windowIcon; /* main window icon */ GdkPixbuf *tooltipOn; /* pixbuf of the tooltip icon */ GdkPixbuf *tooltipOff; /* pixbuf of a fully transparent icon */ diff --git a/src/main-window.c b/src/main-window.c index a7788cf..62d165c 100644 --- a/src/main-window.c +++ b/src/main-window.c @@ -439,10 +439,6 @@ void GuiCreateMainWindow(int *argc, char ***argv) g_signal_connect(window, "destroy", G_CALLBACK(destroy_cb), NULL); - /*** Initialize the tooltips struct */ - - Closure->tooltips = gtk_tooltips_new(); - /*** Create the sub parts of the GUI */ outer_box = gtk_vbox_new(FALSE, 0); diff --git a/src/menubar.c b/src/menubar.c index c7f72f5..93bd9a5 100644 --- a/src/menubar.c +++ b/src/menubar.c @@ -291,7 +291,7 @@ void GuiAttachTooltip(GtkWidget *widget, char *short_descr, char *long_descr) g_signal_connect(G_OBJECT(widget), "enter_notify_event", G_CALLBACK(tooltip_cb), (gpointer)long_copy); g_signal_connect(G_OBJECT(widget), "leave_notify_event", G_CALLBACK(tooltip_cb), (gpointer)long_copy); - gtk_tooltips_set_tip(Closure->tooltips, widget, short_copy, long_copy); + gtk_widget_set_tooltip_text(widget, short_copy); g_free(short_copy); FORGET(long_copy); /* long_copy must be kept during programs life */