* the configuration file, we add some comments to help the user
* understand what can be done. */
if (config->is_new)
* the configuration file, we add some comments to help the user
* understand what can be done. */
if (config->is_new)
g_key_file_set_comment (config->key_file, NULL, NULL,
toplevel_config_comment, NULL);
g_key_file_set_comment (config->key_file, NULL, NULL,
toplevel_config_comment, NULL);
g_key_file_set_comment (config->key_file, "database", NULL,
database_config_comment, NULL);
g_key_file_set_comment (config->key_file, "database", NULL,
database_config_comment, NULL);
g_key_file_set_comment (config->key_file, "new", NULL,
new_config_comment, NULL);
g_key_file_set_comment (config->key_file, "new", NULL,
new_config_comment, NULL);
g_key_file_set_comment (config->key_file, "user", NULL,
user_config_comment, NULL);
g_key_file_set_comment (config->key_file, "user", NULL,
user_config_comment, NULL);
g_key_file_set_comment (config->key_file, "maildir", NULL,
maildir_config_comment, NULL);
g_key_file_set_comment (config->key_file, "maildir", NULL,
maildir_config_comment, NULL);
g_key_file_set_comment (config->key_file, "search", NULL,
search_config_comment, NULL);
g_key_file_set_comment (config->key_file, "search", NULL,
search_config_comment, NULL);
if (strcmp(item, "database.path") == 0) {
printf ("%s\n", notmuch_config_get_database_path (config));
} else if (strcmp(item, "user.name") == 0) {
if (strcmp(item, "database.path") == 0) {
printf ("%s\n", notmuch_config_get_database_path (config));
} else if (strcmp(item, "user.name") == 0) {
-notmuch_config_command_set (void *ctx, char *item, int argc, char *argv[])
+notmuch_config_command_set (notmuch_config_t *config, char *item, int argc, char *argv[])
} else if (strcmp (argv[0], "set") == 0) {
if (argc < 2) {
fprintf (stderr, "Error: notmuch config set requires at least "
"one argument.\n");
return 1;
}
} else if (strcmp (argv[0], "set") == 0) {
if (argc < 2) {
fprintf (stderr, "Error: notmuch config set requires at least "
"one argument.\n");
return 1;
}
- return notmuch_config_command_set (ctx, argv[1], argc - 2, argv + 2);
+ return notmuch_config_command_set (config, argv[1], argc - 2, argv + 2);