forked from enlightenment/enlightenment
efm - option for display of dates explicitly and not in nice-human form
This commit is contained in:
parent
b288373ee6
commit
7ca3f8f612
|
@ -997,6 +997,7 @@ _e_config_edd_init(Eina_Bool old)
|
|||
//E_CONFIG_VAL(D, T, xkb.cur_group, INT);
|
||||
|
||||
E_CONFIG_VAL(D, T, exe_always_single_instance, UCHAR);
|
||||
E_CONFIG_VAL(D, T, explicit_date_time, UCHAR);
|
||||
}
|
||||
|
||||
/* externally accessible functions */
|
||||
|
|
|
@ -441,6 +441,7 @@ struct _E_Config
|
|||
|
||||
Eina_List *menu_applications;
|
||||
unsigned char exe_always_single_instance; // GUI
|
||||
unsigned char explicit_date_time; // GUI
|
||||
Eina_List *screen_profiles;
|
||||
};
|
||||
|
||||
|
|
|
@ -584,6 +584,18 @@ e_util_file_time_get(time_t ftime)
|
|||
ltime = time(NULL);
|
||||
diff = ltime - ftime;
|
||||
buf[0] = 0;
|
||||
if (e_config->explicit_date_time)
|
||||
{
|
||||
struct tm tm;
|
||||
|
||||
if (localtime_r(&ftime, &tm))
|
||||
{
|
||||
s = eina_strftime("%F %T", &tm);
|
||||
if (s) return s;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ftime > ltime)
|
||||
snprintf(buf, sizeof(buf), _("In the future"));
|
||||
else
|
||||
|
@ -621,6 +633,7 @@ e_util_file_time_get(time_t ftime)
|
|||
snprintf(buf, sizeof(buf), P_("A minute ago", "%li Minutes ago", test), test);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (buf[0])
|
||||
s = strdup(buf);
|
||||
|
|
|
@ -49,6 +49,7 @@ struct _E_Config_Dialog_Data
|
|||
const char *key_hint;
|
||||
int max_thumb_size;
|
||||
} icon;
|
||||
int explicit_date_time;
|
||||
/* how to sort files */
|
||||
struct
|
||||
{
|
||||
|
@ -171,6 +172,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
cfdata->dbus.desktop = e_config->device_desktop;
|
||||
cfdata->dbus.auto_mount = e_config->device_auto_mount;
|
||||
cfdata->dbus.auto_open = e_config->device_auto_open;
|
||||
cfdata->explicit_date_time = e_config->explicit_date_time;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -222,6 +224,7 @@ _basic_apply(E_Config_Dialog *cfd EINA_UNUSED,
|
|||
|
||||
e_config->device_auto_mount = cfdata->dbus.auto_mount;
|
||||
e_config->device_auto_open = cfdata->dbus.auto_open;
|
||||
e_config->explicit_date_time = cfdata->explicit_date_time;
|
||||
|
||||
e_config_save_queue();
|
||||
|
||||
|
@ -263,7 +266,9 @@ _basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED,
|
|||
(fileman_config->list.sort.no_case != !(cfdata->list.sort.case_sen)) ||
|
||||
(e_config->device_desktop != cfdata->dbus.desktop) ||
|
||||
(e_config->device_auto_mount != cfdata->dbus.auto_mount) ||
|
||||
(e_config->device_auto_open != cfdata->dbus.auto_open);
|
||||
(e_config->device_auto_open != cfdata->dbus.auto_open) ||
|
||||
(e_config->explicit_date_time != cfdata->explicit_date_time)
|
||||
;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -354,6 +359,9 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED,
|
|||
ob = e_widget_check_add(evas, _("Sidebar"),
|
||||
&(cfdata->view.show_sidebar));
|
||||
e_widget_list_object_append(o, ob, 1, 1, 0.5);
|
||||
ob = e_widget_check_add(evas, _("Show Detailed Time and Date"),
|
||||
&(cfdata->explicit_date_time));
|
||||
e_widget_list_object_append(o, ob, 1, 1, 0.5);
|
||||
/* FIXME: this sucks
|
||||
ob = e_widget_check_add(evas, _("Regular Files In Menu (SLOW)"),
|
||||
&(cfdata->view.menu_shows_files));
|
||||
|
|
Loading…
Reference in New Issue