stardict get_user_config_dir

Rate this post

std::string get_user_config_dir()
{
const gchar *config_path_from_env = g_getenv(“STARDICT_CONFIG_PATH”);
if (config_path_from_env)
return config_path_from_env;
#ifdef _WIN32
std::string res = g_get_user_config_dir();
res += G_DIR_SEPARATOR_S “StarDict”;
return res;
#else
std::string res;
gchar *tmp = g_build_filename(g_get_home_dir(), “.stardict”, NULL);
res=tmp;
g_free(tmp);
return res;
#endif
}

這個函式應該滿單純的!

本站部分內容包含聯盟行銷連結。當您透過連結購買商品或服務時,本站將獲得微薄的佣金,這並不會影響您的購買價格,但能支持本站的運作,感謝您的支持。問題詢問

點我分享到Facebook

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *