Skip to content

Commit

Permalink
Implement Feature Request #2840: Don't print the d-bus WARNING if dis…
Browse files Browse the repository at this point in the history
…able_notifications is set on cmd line or in config (#2841)

* Implement Feature Request: Don't print the d-bus WARNING if disable_notifications is set on cmd line or in config
  • Loading branch information
abraunegg authored Sep 21, 2024
1 parent fb35508 commit 710d451
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/config.d
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,6 @@ class ApplicationConfig {
// outcome of setting defaultHomePath
addLogEntry("runtime_environment: Calculated defaultHomePath: " ~ defaultHomePath, ["debug"]);

// If logging was compiled in, we need to ensure that these variables are actually available before we enable GUI Notifications
flagEnvironmentVariablesAvailable(validateGUINotificationEnvironmentVariables());
// Attempt to enable GUI Notifications
validateDBUSServerAvailability();

// DEVELOPER OPTIONS
// display_memory = true | false
// - It may be desirable to display the memory usage of the application to assist with diagnosing memory issues with the application
Expand Down
8 changes: 8 additions & 0 deletions src/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ int main(string[] cliArgs) {
// Update the current runtime application configuration (default or 'config' fileread-in options) from any passed in command line arguments
appConfig.updateFromArgs(cliArgs);

// If --disable-notifications has not been used, check if everything exists to enable notifications
if (!appConfig.getValueBool("disable_notifications")) {
// If notifications was compiled in, we need to ensure that these variables are actually available before we enable GUI Notifications
flagEnvironmentVariablesAvailable(appConfig.validateGUINotificationEnvironmentVariables());
// Attempt to enable GUI Notifications
validateDBUSServerAvailability();
}

// In a debug scenario, to assist with understanding the run-time configuration, ensure this flag is set
if (debugLogging) {
appConfig.setValueBool("display_running_config", true);
Expand Down

0 comments on commit 710d451

Please sign in to comment.