Merge branch 'matthiasc/for-main' into 'main'

Drop redundant GLib version check

See merge request GNOME/gtk!7334
This commit is contained in:
Matthias Clasen 2024-06-03 00:22:16 +00:00
commit 24eba7c4c1
2 changed files with 2 additions and 18 deletions

View File

@ -11903,7 +11903,7 @@ gtk_widget_create_render_node (GtkWidget *widget,
}
static void
gtk_widget_do_snapshot (GtkWidget *widget,
gtk_widget_do_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);

View File

@ -48,22 +48,6 @@ usage (void)
exit (1);
}
/* A simplified version of g_log_writer_default_would_drop(), to avoid
* bumping up the required version of GLib to 2.68
*/
static gboolean
would_drop (GLogLevelFlags level,
const char *domain)
{
#if GLIB_CHECK_VERSION (2, 68, 0)
return g_log_writer_default_would_drop (level, domain);
#else
return (level & (G_LOG_LEVEL_ERROR |
G_LOG_LEVEL_CRITICAL |
G_LOG_LEVEL_WARNING)) == 0;
#endif
}
static GLogWriterOutput
log_writer_func (GLogLevelFlags level,
const GLogField *fields,
@ -82,7 +66,7 @@ log_writer_func (GLogLevelFlags level,
message = fields[i].value;
}
if (message != NULL && !would_drop (level, domain))
if (message != NULL && !g_log_writer_would_drop (level, domain))
{
const char *prefix;
switch (level & G_LOG_LEVEL_MASK)