Kaydet (Commit) d80ee820 authored tarafından Colomban Wendling's avatar Colomban Wendling

Select the default scheme in the Color Scheme dialog by default

Always select the default scheme by default in the Color Scheme dialog
not to end up selecting none in case of broken or nonexistent
configuration.  This matches which scheme is actually used, and fixes
use of an uninitialized iter when no scheme would be selected.
üst d6601cba
......@@ -1249,7 +1249,10 @@ static void add_color_scheme_item(GtkListStore *store,
SCHEME_FILE, fn, -1);
g_free(markup);
if (utils_str_equal(fn, editor_prefs.color_scheme) && current_iter)
/* select the current iter if the the color scheme matches, or if it's the
* default (fn == NULL), in case of bad config file. the default theme is
* first anyway so if a later scheme matches it will override default */
if ((! fn || utils_str_equal(fn, editor_prefs.color_scheme)) && current_iter)
*current_iter = iter;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment