comparison src/rcfile.c @ 348:3514f4d49447

Add a note in the rc file about special editor slots.
author zas_
date Sat, 12 Apr 2008 23:32:08 +0000
parents 6dc0eaa0fcea
children 452a4c25da22
comparison
equal deleted inserted replaced
347:6dc0eaa0fcea 348:3514f4d49447
448 secure_fputc(ssi, '\n'); 448 secure_fputc(ssi, '\n');
449 write_int_option(ssi, "color_profile.screen_type", options->color_profile.screen_type); 449 write_int_option(ssi, "color_profile.screen_type", options->color_profile.screen_type);
450 write_char_option(ssi, "color_profile.screen_file", options->color_profile.screen_file); 450 write_char_option(ssi, "color_profile.screen_file", options->color_profile.screen_file);
451 451
452 secure_fprintf(ssi, "\n##### External Programs #####\n"); 452 secure_fprintf(ssi, "\n##### External Programs #####\n");
453 secure_fprintf(ssi, "# Maximum of 10 programs (external_1 through external_10)\n"); 453 secure_fprintf(ssi, "# Maximum of %d programs (external_1 through external_%d)\n", GQ_EDITOR_GENERIC_SLOTS, GQ_EDITOR_GENERIC_SLOTS);
454 secure_fprintf(ssi, "# external_%d through external_%d are used for file ops\n", GQ_EDITOR_GENERIC_SLOTS + 1, GQ_EDITOR_SLOTS);
454 secure_fprintf(ssi, "# format: external_n: \"menu name\" \"command line\"\n\n"); 455 secure_fprintf(ssi, "# format: external_n: \"menu name\" \"command line\"\n\n");
455 456
456 for (i = 0; i < GQ_EDITOR_SLOTS; i++) 457 for (i = 0; i < GQ_EDITOR_SLOTS; i++)
457 { 458 {
459 if (i == GQ_EDITOR_GENERIC_SLOTS) secure_fputc(ssi, '\n');
458 gchar *qname = escquote_value(options->editor_name[i]); 460 gchar *qname = escquote_value(options->editor_name[i]);
459 gchar *qcommand = escquote_value(options->editor_command[i]); 461 gchar *qcommand = escquote_value(options->editor_command[i]);
460 secure_fprintf(ssi, "external_%d: %s %s\n", i+1, qname, qcommand); 462 secure_fprintf(ssi, "external_%d: %s %s\n", i+1, qname, qcommand);
461 g_free(qname); 463 g_free(qname);
462 g_free(qcommand); 464 g_free(qcommand);