E_CONFIG_VAL(D, T, view_mode, INT);
E_CONFIG_VAL(D, T, view_zoom, INT);
E_CONFIG_VAL(D, T, cycle_mode, INT);
+ E_CONFIG_VAL(D, T, history_sort_mode, INT);
E_CONFIG_LIST(D, T, conf_subjects, conf_item_edd);
E_CONFIG_LIST(D, T, conf_actions, conf_item_edd);
E_CONFIG_LIST(D, T, conf_objects, conf_item_edd);
evry_conf->view_mode = 0;
evry_conf->view_zoom = 0;
evry_conf->cycle_mode = 0;
+ evry_conf->history_sort_mode = 0;
}
/* TODO: remove - fix old configs */
int view_mode;
int view_zoom;
int cycle_mode;
+
+ int history_sort_mode;
Evas_Object *l_subject;
Evas_Object *l_action;
C(view_mode);
C(view_zoom);
C(cycle_mode);
+ C(history_sort_mode);
#undef C
EINA_LIST_FOREACH(evry_conf->plugins, l, p)
C(view_mode);
C(view_zoom);
C(cycle_mode);
+ C(history_sort_mode);
#undef C
evry_conf->plugins = eina_list_sort(evry_conf->plugins, -1,
ob = e_widget_check_add(evas, _("Up/Down select next item in icon view"),
&(cfdata->cycle_mode));
e_widget_framelist_object_append(of, ob);
-
+ e_widget_list_object_append(o, of, 1, 1, 0.5);
+
+ of = e_widget_framelist_add(evas, _("History Sort"), 0);
+ rg = e_widget_radio_group_new(&cfdata->history_sort_mode);
+ ob = e_widget_radio_add(evas, "By usage", 0, rg);
+ e_widget_radio_toggle_set(ob, (cfdata->history_sort_mode == 0));
+ e_widget_framelist_object_append(of, ob);
+ ob = e_widget_radio_add(evas, "Most used", 1, rg);
+ e_widget_radio_toggle_set(ob, (cfdata->history_sort_mode == 1));
+ e_widget_framelist_object_append(of, ob);
+ ob = e_widget_radio_add(evas, "Last used", 2, rg);
+ e_widget_radio_toggle_set(ob, (cfdata->history_sort_mode == 2));
+ e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Commands"), 0);
{
if (hi->plugin != it->plugin->name)
continue;
-
+ if (evry_conf->history_sort_mode == 0)
+ {
+
if (!input || !hi->input)
{
it->usage += hi->usage * hi->count;
if (hi->context == ctxt)
it->usage += hi->usage * hi->count * 2;
}
+ }
+ else if (evry_conf->history_sort_mode == 1)
+ {
+ it->usage = hi->count * (hi->last_used / 10000000000.0);
+
+ }
+ else if (evry_conf->history_sort_mode == 2)
+ {
+ it->usage = hi->last_used;
+ }
}
if (it->usage > 0.0)