Changed debug option names
* --debug-json -> --debug * --debug-modules -> --debug-icons
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -28,11 +28,11 @@ struct CommandlineArgs {
|
||||
|
||||
/// Show JSON data returned by query
|
||||
#[arg(short = 'D', long)]
|
||||
debug_json: bool,
|
||||
debug: bool,
|
||||
|
||||
/// Show ICON debug information
|
||||
#[arg(short = 'I', long)]
|
||||
debug_modules: bool,
|
||||
debug_icons: bool,
|
||||
}
|
||||
|
||||
//
|
||||
@@ -46,7 +46,7 @@ struct Unibar {
|
||||
impl Unibar {
|
||||
// --------------------
|
||||
fn run(&self) {
|
||||
if self.opts.debug_json {
|
||||
if self.opts.debug {
|
||||
self.debug_msg("Debugging ...");
|
||||
}
|
||||
self.check_options();
|
||||
@@ -80,7 +80,7 @@ impl Unibar {
|
||||
}
|
||||
|
||||
// Show module debug information if enabled
|
||||
if self.opts.debug_modules {
|
||||
if self.opts.debug_icons {
|
||||
let bar_modules_debugged: Vec<Box<dyn bar_modules::BarModuleDebug>> = vec! [
|
||||
Box::new(bar_modules::bar_module_weather::UnibarModuleWeather::new(self.opts.clone())),
|
||||
Box::new(bar_modules::bar_module_music::UnibarModuleMusic::new(self.opts.clone())),
|
||||
@@ -124,8 +124,8 @@ fn main() {
|
||||
else { common::TemperatureUnits::Imperial },
|
||||
weather_station: cmd_args.weather_station,
|
||||
music_progress: cmd_args.music_progress,
|
||||
debug_json: cmd_args.debug_json,
|
||||
debug_modules: cmd_args.debug_modules
|
||||
debug: cmd_args.debug,
|
||||
debug_icons: cmd_args.debug_icons
|
||||
},
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user