Skip to content

Commit

Permalink
application: Guard a new GLib log function with a version check.
Browse files Browse the repository at this point in the history
The g_log_writer_default_set_debug_domains function was only
added in glib 2.80, which isn't in LMDE6/bookworm.
  • Loading branch information
mtwebster committed May 12, 2024
1 parent a362848 commit d1d6bd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/nemo-desktop-application.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,12 @@ nemo_desktop_application_local_command_line (GApplication *application,
}

if (debug) {
#if (GLIB_CHECK_VERSION(2,80,0))
const gchar* const domains[] = { "Nemo", NULL };
g_log_writer_default_set_debug_domains (domains);
#else
g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
#endif
}

if (nemo_user_is_root () && !nemo_treating_root_as_normal ()) {
Expand Down
4 changes: 4 additions & 0 deletions src/nemo-main-application.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,12 @@ nemo_main_application_local_command_line (GApplication *application,
}

if (debug) {
#if (GLIB_CHECK_VERSION(2,80,0))
const gchar* const domains[] = { "Nemo", NULL };
g_log_writer_default_set_debug_domains (domains);
#else
g_setenv ("G_MESSAGES_DEBUG", "all", TRUE);
#endif
}

if (!do_cmdline_sanity_checks (self, perform_self_check,
Expand Down

0 comments on commit d1d6bd6

Please sign in to comment.