Port to new GtkTooltip
This commit is contained in:
committed by
Stéphane Lesimple
parent
3be61f4b7b
commit
9bbd268aa4
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user