gdk/popup: Remove the popup-layout-changed signal
It was replaced with GdkSurface::layout.
This commit is contained in:
@@ -38,15 +38,6 @@
|
||||
|
||||
G_DEFINE_INTERFACE (GdkPopup, gdk_popup, GDK_TYPE_SURFACE)
|
||||
|
||||
enum
|
||||
{
|
||||
POPUP_LAYOUT_CHANGED,
|
||||
|
||||
N_SIGNALS
|
||||
};
|
||||
|
||||
static guint signals[N_SIGNALS] = { 0 };
|
||||
|
||||
static gboolean
|
||||
gdk_popup_default_present (GdkPopup *popup,
|
||||
int width,
|
||||
@@ -101,25 +92,6 @@ gdk_popup_default_init (GdkPopupInterface *iface)
|
||||
P_("Whether to hide on outside clicks"),
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* GdkPopup::popup-layout-changed
|
||||
* @popup: the #GdkSurface that was laid out
|
||||
*
|
||||
* Emitted when the layout of a popup surface has changed, e.g. if the popup
|
||||
* layout was reactive and after the parent moved causing the popover to end
|
||||
* up partially off-screen.
|
||||
*/
|
||||
signals[POPUP_LAYOUT_CHANGED] =
|
||||
g_signal_new (g_intern_static_string ("popup-layout-changed"),
|
||||
GDK_TYPE_POPUP,
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
G_TYPE_NONE,
|
||||
0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -85,7 +85,7 @@ _gdk_macos_surface_reposition_children (GdkMacosSurface *self)
|
||||
}
|
||||
|
||||
if (GDK_IS_POPUP (self) && self->did_initial_present)
|
||||
g_signal_emit_by_name (self, "popup-layout-changed");
|
||||
gdk_surface_request_layout (GDK_SURFACE (self));
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -766,16 +766,6 @@ surface_event (GdkSurface *surface,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
popup_layout_changed (GdkSurface *surface,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkPopover *popover = GTK_POPOVER (widget);
|
||||
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
|
||||
|
||||
update_popover_layout (popover, gdk_popup_layout_ref (priv->layout));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_popover_activate_default (GtkPopover *popover)
|
||||
{
|
||||
@@ -894,7 +884,6 @@ gtk_popover_realize (GtkWidget *widget)
|
||||
g_signal_connect_swapped (priv->surface, "notify::mapped", G_CALLBACK (surface_mapped_changed), widget);
|
||||
g_signal_connect (priv->surface, "render", G_CALLBACK (surface_render), widget);
|
||||
g_signal_connect (priv->surface, "event", G_CALLBACK (surface_event), widget);
|
||||
g_signal_connect (priv->surface, "popup-layout-changed", G_CALLBACK (popup_layout_changed), widget);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_popover_parent_class)->realize (widget);
|
||||
|
||||
@@ -919,7 +908,6 @@ gtk_popover_unrealize (GtkWidget *widget)
|
||||
g_signal_handlers_disconnect_by_func (priv->surface, surface_mapped_changed, widget);
|
||||
g_signal_handlers_disconnect_by_func (priv->surface, surface_render, widget);
|
||||
g_signal_handlers_disconnect_by_func (priv->surface, surface_event, widget);
|
||||
g_signal_handlers_disconnect_by_func (priv->surface, popup_layout_changed, widget);
|
||||
gdk_surface_set_widget (priv->surface, NULL);
|
||||
gdk_surface_destroy (priv->surface);
|
||||
g_clear_object (&priv->surface);
|
||||
|
||||
Reference in New Issue
Block a user