Commit fc56d0d1 authored by Christian Hergert's avatar Christian Hergert
Browse files

shortcuts: supress some deprecation warnings

All this code will have to be revamped for Gtk4, so no need to keep track
of things here. We will just update them whole-sale for gtk4 in the future.
parent 66bc0703
......@@ -435,7 +435,12 @@ dzl_shortcuts_section_init (DzlShortcutsSection *self)
gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (self->switcher)), GTK_STYLE_CLASS_LINKED);
self->show_all = gtk_button_new_with_mnemonic (_("_Show All"));
/* We'll update this with gtk4 in the future, so fine
* to ignore deprecations.
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_widget_set_no_show_all (self->show_all, TRUE);
G_GNUC_END_IGNORE_DEPRECATIONS;
g_signal_connect_swapped (self->show_all, "clicked",
G_CALLBACK (dzl_shortcuts_section_show_all), self);
......
......@@ -265,12 +265,19 @@ update_visible_from_direction (DzlShortcutsShortcut *self)
self->direction == gtk_widget_get_direction (GTK_WIDGET (self)))
{
gtk_widget_set_visible (GTK_WIDGET (self), TRUE);
/* When porting to gtk4, we'll have to update all this
* code anyway, so fine to disable warnings.
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_widget_set_no_show_all (GTK_WIDGET (self), FALSE);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
else
{
gtk_widget_set_visible (GTK_WIDGET (self), FALSE);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_widget_set_no_show_all (GTK_WIDGET (self), TRUE);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment