54
54
* @add_penalty: the penalty incurred by a character in the search term
55
55
* that does not exist in the item being matched
56
* @add_penalty_pre: the penalty incurred by a character in the search
57
* term that does not exist in the item being matched when that
58
* character comes at the beginning of the term
59
56
* @drop_penalty: the penalty incurred by a character missing from the
60
57
* search string as compared to the item being matched
61
* @drop_penalty_end: the penalty incurred by a character missing from
58
* @end_drop_penalty: the penalty incurred by a character missing from
62
59
* the search string as compared to the item being matched when the
63
60
* character is at the end of the item (ie: the search term is a
64
61
* prefix of the item)
65
* @transpose_penalty: the penalty incurred for transposed characters
66
62
* @swap_penalty: the penalty incurred for the substitution of one
67
63
* character for another
68
* @swap_penalty_case: the penalty incurred for the substitution of one
69
* character for another when the characters differ only in case
71
65
* This structure contains the value of several tunable parameters that
72
66
* affect the behaviour of various components of the HUD.
101
95
hud_settings.indicator_penalty = g_settings_get_uint (settings, "indicator-penalty");
102
96
hud_settings.max_distance = g_settings_get_uint (settings, "max-distance");
103
97
hud_settings.add_penalty = g_settings_get_uint (settings, "add-penalty");
104
hud_settings.add_penalty_pre = g_settings_get_uint (settings, "add-penalty-pre");
105
98
hud_settings.drop_penalty = g_settings_get_uint (settings, "drop-penalty");
106
hud_settings.drop_penalty_end = g_settings_get_uint (settings, "drop-penalty-end");
107
hud_settings.transpose_penalty = g_settings_get_uint (settings, "transpose-penalty");
99
hud_settings.end_drop_penalty = g_settings_get_uint (settings, "end-drop-penalty");
108
100
hud_settings.swap_penalty = g_settings_get_uint (settings, "swap-penalty");
109
hud_settings.swap_penalty_case = g_settings_get_uint (settings, "swap-penalty-case");
111
102
g_debug ("indicator penalty: %u, max distance: %u",
112
103
hud_settings.indicator_penalty, hud_settings.max_distance);
113
g_debug ("penalties: add:%u add-pre:%u drop:%u drop-end:%u trans:%u swap:%u swap-case:%u",
114
hud_settings.add_penalty, hud_settings.add_penalty_pre, hud_settings.drop_penalty,
115
hud_settings.drop_penalty_end, hud_settings.transpose_penalty, hud_settings.swap_penalty,
116
hud_settings.swap_penalty_case);
104
g_debug ("penalties: add:%u drop:%u end-drop:%u swap:%u", hud_settings.add_penalty,
105
hud_settings.drop_penalty, hud_settings.end_drop_penalty, hud_settings.swap_penalty);