forked from AuroraMiddleware/gtk
gtk/tooltipwindow: Use gtk_tooltip_window_present() instead of GtkNative
This commit is contained in:
parent
517bc0db84
commit
9d3f497a21
@ -79,6 +79,7 @@
|
||||
#include "gtknative.h"
|
||||
#include "gtkpopover.h"
|
||||
#include "gtktexthandleprivate.h"
|
||||
#include "gtktooltipwindowprivate.h"
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
#define LAYOUT_MANAGER_WARN_NOT_IMPLEMENTED(m,method) G_STMT_START { \
|
||||
@ -369,6 +370,8 @@ allocate_native_children (GtkWidget *widget)
|
||||
gtk_popover_present (GTK_POPOVER (child));
|
||||
else if (GTK_IS_TEXT_HANDLE (child))
|
||||
gtk_text_handle_present (GTK_TEXT_HANDLE (child));
|
||||
else if (GTK_IS_TOOLTIP_WINDOW (child))
|
||||
gtk_tooltip_window_present (GTK_TOOLTIP_WINDOW (child));
|
||||
else if (GTK_IS_NATIVE (child))
|
||||
gtk_native_check_resize (GTK_NATIVE (child));
|
||||
}
|
||||
|
@ -1024,7 +1024,7 @@ gtk_tooltip_maybe_allocate (GtkNative *native)
|
||||
if (!tooltip || GTK_NATIVE (tooltip->native) != native)
|
||||
return;
|
||||
|
||||
gtk_native_check_resize (GTK_NATIVE (tooltip->window));
|
||||
gtk_tooltip_window_present (GTK_TOOLTIP_WINDOW (tooltip->window));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -142,8 +142,12 @@ gtk_tooltip_window_relayout (GtkTooltipWindow *window)
|
||||
static void
|
||||
gtk_tooltip_window_native_check_resize (GtkNative *native)
|
||||
{
|
||||
GtkTooltipWindow *window = GTK_TOOLTIP_WINDOW (native);
|
||||
GtkWidget *widget = GTK_WIDGET (native);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_tooltip_window_present (GtkTooltipWindow *window)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (window);
|
||||
|
||||
if (!_gtk_widget_get_alloc_needed (widget))
|
||||
{
|
||||
|
@ -37,6 +37,8 @@ G_DECLARE_FINAL_TYPE (GtkTooltipWindow, gtk_tooltip_window, GTK, TOOLTIP_WINDOW,
|
||||
|
||||
GtkWidget * gtk_tooltip_window_new (void);
|
||||
|
||||
void gtk_tooltip_window_present (GtkTooltipWindow *window);
|
||||
|
||||
void gtk_tooltip_window_set_label_markup (GtkTooltipWindow *window,
|
||||
const char *markup);
|
||||
void gtk_tooltip_window_set_label_text (GtkTooltipWindow *window,
|
||||
|
Loading…
Reference in New Issue
Block a user