Replace --save with --no-save
The former has shown to be confusing to users, and is rarely desired.
This commit is contained in:
parent
78d1e56b40
commit
1619b4656c
@ -235,7 +235,7 @@ save_configuration (GtkBuilder *builder)
|
|||||||
|
|
||||||
gchar *argv[] = { "pkexec", PROJECT_INSTALL_BINDIR "/" PROJECT_NAME,
|
gchar *argv[] = { "pkexec", PROJECT_INSTALL_BINDIR "/" PROJECT_NAME,
|
||||||
"--polling", polling, "--cpi-on", cpi_on, "--cpi-off", cpi_off,
|
"--polling", polling, "--cpi-on", cpi_on, "--cpi-off", cpi_off,
|
||||||
"--pulsation", pulsation, "--intensity", intensity, "--save", NULL };
|
"--pulsation", pulsation, "--intensity", intensity, NULL };
|
||||||
|
|
||||||
gchar *out;
|
gchar *out;
|
||||||
if (spawn_ctl (argv, &out, builder))
|
if (spawn_ctl (argv, &out, builder))
|
||||||
|
@ -303,7 +303,7 @@ sensei_display_config (const struct sensei_config *config)
|
|||||||
struct options
|
struct options
|
||||||
{
|
{
|
||||||
unsigned show_config : 1;
|
unsigned show_config : 1;
|
||||||
unsigned save_to_rom : 1;
|
unsigned do_not_save_to_rom : 1;
|
||||||
unsigned set_pulsation : 1;
|
unsigned set_pulsation : 1;
|
||||||
unsigned set_mode : 1;
|
unsigned set_mode : 1;
|
||||||
unsigned set_intensity : 1;
|
unsigned set_intensity : 1;
|
||||||
@ -329,7 +329,7 @@ show_usage (const char *program_name)
|
|||||||
" (steady, slow, medium, fast, trigger)\n");
|
" (steady, slow, medium, fast, trigger)\n");
|
||||||
printf (" --intensity X Set the backlight intensity"
|
printf (" --intensity X Set the backlight intensity"
|
||||||
" (off, low, medium, high)\n");
|
" (off, low, medium, high)\n");
|
||||||
printf (" --save Save the current configuration to ROM\n");
|
printf (" --no-save Do not save changes in configuration to ROM\n");
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,7 +369,7 @@ parse_options (int argc, char *argv[],
|
|||||||
{ "help", no_argument, 0, 'h' },
|
{ "help", no_argument, 0, 'h' },
|
||||||
{ "version", no_argument, 0, 'V' },
|
{ "version", no_argument, 0, 'V' },
|
||||||
{ "show", no_argument, 0, 's' },
|
{ "show", no_argument, 0, 's' },
|
||||||
{ "save", no_argument, 0, 'S' },
|
{ "no-save", no_argument, 0, 'S' },
|
||||||
{ "mode", required_argument, 0, 'm' },
|
{ "mode", required_argument, 0, 'm' },
|
||||||
{ "polling", required_argument, 0, 'p' },
|
{ "polling", required_argument, 0, 'p' },
|
||||||
{ "cpi-on", required_argument, 0, 'c' },
|
{ "cpi-on", required_argument, 0, 'c' },
|
||||||
@ -400,7 +400,7 @@ parse_options (int argc, char *argv[],
|
|||||||
options->show_config = true;
|
options->show_config = true;
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
options->save_to_rom = true;
|
options->do_not_save_to_rom = true;
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
if (!strcasecmp (optarg, "legacy"))
|
if (!strcasecmp (optarg, "legacy"))
|
||||||
@ -518,7 +518,7 @@ apply_options (libusb_device_handle *device,
|
|||||||
if ((result = sensei_set_cpi (device, new_config->cpi_on, true)))
|
if ((result = sensei_set_cpi (device, new_config->cpi_on, true)))
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if (options->save_to_rom)
|
if (options->do_not_save_to_rom == false)
|
||||||
if ((result = sensei_save_to_rom (device)))
|
if ((result = sensei_save_to_rom (device)))
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user