mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
GtkPopover: Deprecate transitions-enabled
The effect of transitions-enabled=true can now be achieved using gtk_popover_popup/popdown and the effect of transitions-enabled=false can be achieved using gtk_widget_show/hide. https://bugzilla.gnome.org/show_bug.cgi?id=769706
This commit is contained in:
parent
1f7b6c1d6f
commit
a6b9b3648d
@ -439,5 +439,14 @@
|
|||||||
changed to (again) match the behavior in #GtkBox and in GTK+ 2.x. These
|
changed to (again) match the behavior in #GtkBox and in GTK+ 2.x. These
|
||||||
options don't cause the table itself to expand.
|
options don't cause the table itself to expand.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The way GtkPopover behaved during a call to gtk_widget_hide() violated
|
||||||
|
some of the internal assumptions GTK+ makes about widget visibility.
|
||||||
|
gtk_popover_popup() and gtk_popover_popdown() have been introduced to
|
||||||
|
show or hide the popover with a transition, while gtk_widget_show()
|
||||||
|
and gtk_widget_hide() on a GtkPopover now work the same way they do
|
||||||
|
on any other widget and immediately hide (or show) the popover.
|
||||||
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
@ -243,8 +243,10 @@ gtk_popover_set_property (GObject *object,
|
|||||||
g_value_get_boolean (value));
|
g_value_get_boolean (value));
|
||||||
break;
|
break;
|
||||||
case PROP_TRANSITIONS_ENABLED:
|
case PROP_TRANSITIONS_ENABLED:
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||||
gtk_popover_set_transitions_enabled (GTK_POPOVER (object),
|
gtk_popover_set_transitions_enabled (GTK_POPOVER (object),
|
||||||
g_value_get_boolean (value));
|
g_value_get_boolean (value));
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||||
break;
|
break;
|
||||||
case PROP_CONSTRAIN_TO:
|
case PROP_CONSTRAIN_TO:
|
||||||
gtk_popover_set_constrain_to (GTK_POPOVER (object),
|
gtk_popover_set_constrain_to (GTK_POPOVER (object),
|
||||||
@ -1743,7 +1745,7 @@ gtk_popover_class_init (GtkPopoverClass *klass)
|
|||||||
P_("Transitions enabled"),
|
P_("Transitions enabled"),
|
||||||
P_("Whether show/hide transitions are enabled or not"),
|
P_("Whether show/hide transitions are enabled or not"),
|
||||||
TRUE,
|
TRUE,
|
||||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkPopover:constrain-to:
|
* GtkPopover:constrain-to:
|
||||||
@ -2334,6 +2336,9 @@ gtk_popover_get_modal (GtkPopover *popover)
|
|||||||
* Sets whether show/hide transitions are enabled on this popover
|
* Sets whether show/hide transitions are enabled on this popover
|
||||||
*
|
*
|
||||||
* Since: 3.16
|
* Since: 3.16
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: You can show or hide the popover without transitions
|
||||||
|
* using gtk_widget_show() and gtk_widget_hide().
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_popover_set_transitions_enabled (GtkPopover *popover,
|
gtk_popover_set_transitions_enabled (GtkPopover *popover,
|
||||||
@ -2362,6 +2367,9 @@ gtk_popover_set_transitions_enabled (GtkPopover *popover,
|
|||||||
* popover are enabled, #FALSE otherwise.
|
* popover are enabled, #FALSE otherwise.
|
||||||
*
|
*
|
||||||
* Since: 3.16
|
* Since: 3.16
|
||||||
|
*
|
||||||
|
* Deprecated: 3.22: You can show or hide the popover without transitions
|
||||||
|
* using gtk_widget_show() and gtk_widget_hide().
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gtk_popover_get_transitions_enabled (GtkPopover *popover)
|
gtk_popover_get_transitions_enabled (GtkPopover *popover)
|
||||||
|
@ -97,10 +97,10 @@ void gtk_popover_bind_model (GtkPopover *popover,
|
|||||||
GMenuModel *model,
|
GMenuModel *model,
|
||||||
const gchar *action_namespace);
|
const gchar *action_namespace);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_DEPRECATED_IN_3_22
|
||||||
void gtk_popover_set_transitions_enabled (GtkPopover *popover,
|
void gtk_popover_set_transitions_enabled (GtkPopover *popover,
|
||||||
gboolean transitions_enabled);
|
gboolean transitions_enabled);
|
||||||
GDK_AVAILABLE_IN_3_16
|
GDK_DEPRECATED_IN_3_22
|
||||||
gboolean gtk_popover_get_transitions_enabled (GtkPopover *popover);
|
gboolean gtk_popover_get_transitions_enabled (GtkPopover *popover);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_3_18
|
GDK_AVAILABLE_IN_3_18
|
||||||
|
Loading…
Reference in New Issue
Block a user