This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository efm2.
View the commit online.
commit e757de715153aab6ae932579dd458c59bd408d6b
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
AuthorDate: Tue Oct 3 20:37:48 2023 +0100
add a bunch of comments
---
src/efm/efm_util.c | 32 ++++++++++++++++++++------------
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/src/efm/efm_util.c b/src/efm/efm_util.c
index 40cef18..06bce58 100644
--- a/src/efm/efm_util.c
+++ b/src/efm/efm_util.c
@@ -1247,7 +1247,7 @@ _icon_detail_add(Icon *icon, Smart_Data *sd, Evas *e,
char buf[128];
if (!detail) detail = "";
- if (!strcmp(format, "text"))
+ if (!strcmp(format, "text")) // format: just the string as-is
_icon_detail_rectangle_add(icon, sd, e, col, detail);
else if (!strcmp(format, "size"))
{
@@ -1257,7 +1257,7 @@ _icon_detail_add(Icon *icon, Smart_Data *sd, Evas *e,
plist = eina_str_split(detail, "/", 2);
if (plist[0] && plist[1])
- {
+ { // format: "13/28 - value/max_value
size = atoll(plist[0]);
size_max = atoll(plist[1]);
@@ -1280,7 +1280,7 @@ _icon_detail_add(Icon *icon, Smart_Data *sd, Evas *e,
free(plist);
}
else if (!strcmp(format, "timestamp"))
- {
+ { // format: 1284924 - time_in_seconds_since_epoch
time_t tmpt = atoll(detail);
struct tm *info;
@@ -1364,7 +1364,7 @@ _icon_object_add(Icon *icon, Smart_Data *sd, Evas *e,
else if (sd->config.view_mode == EFM_VIEW_MODE_ICONS_CUSTOM)
edje_object_file_set(o, theme_edj_file, "e/fileman/desktop/icon/fixed");
else if (sd->config.view_mode == EFM_VIEW_MODE_LIST)
- {
+ { // odd/even coloring with different group
if (num & 0x1)
edje_object_file_set(o, theme_edj_file,
"e/fileman/default/list_odd/fixed");
@@ -1375,15 +1375,19 @@ _icon_object_add(Icon *icon, Smart_Data *sd, Evas *e,
{
const char *s;
+ // odd/even coloring with different group
if (num & 0x1)
edje_object_file_set(o, theme_edj_file,
"e/fileman/default/list_odd/detailed");
else
edje_object_file_set(o, theme_edj_file,
"e/fileman/default/list/detailed");
+ // is this a special detail format item?
s = cmd_key_find(icon->cmd, "detail-format");
if (s)
- {
+ { // fromat: fmt,fmt,fmt,fmt,fmt,fmt
+ // where fmt is the format of 6 detail columns and is one of:
+ // text,size,timestamp,...
char **plist, **p;
plist = eina_str_split(s, ",", 6);
@@ -1397,11 +1401,10 @@ _icon_object_add(Icon *icon, Smart_Data *sd, Evas *e,
free(plist);
}
else
- {
+ { // regular detail mode with file properties
s = cmd_key_find(icon->cmd, "size");
-
if (s)
- {
+ { // special sze object
unsigned long long size = atoll(s);
o2 = _icon_detail_grid_add(icon, sd, 0);
@@ -1419,7 +1422,7 @@ _icon_object_add(Icon *icon, Smart_Data *sd, Evas *e,
}
s = cmd_key_find(icon->cmd, "mtime");
if (s)
- {
+ { // special time + date object
time_t tmpt = atoll(s);
struct tm *info;
@@ -1445,7 +1448,7 @@ _icon_object_add(Icon *icon, Smart_Data *sd, Evas *e,
if (s) edje_object_part_text_set(icon->o_base, "e.text.detail5", s);
s = cmd_key_find(icon->cmd, "mode");
if (s)
- {
+ { // special mode info display obj
int mode = _xtoi(s);
icon->o_list_detail_swallow[5] = o2
@@ -1503,6 +1506,7 @@ _icon_object_add(Icon *icon, Smart_Data *sd, Evas *e,
edje_object_signal_emit(o2, "e,perm,other,execute", "e");
edje_object_message_signal_process(o2);
}
+ // other columns - fill with sizing rect to set min size on
for (i = 2; i < 5; i++)
_icon_detail_rectangle_add(icon, sd, e, i, NULL);
}
@@ -1542,17 +1546,20 @@ _icon_object_add(Icon *icon, Smart_Data *sd, Evas *e,
evas_object_clip_set(icon->o_base, sd->o_clip);
}
+ // selected or not state for base edje
if (icon->selected)
edje_object_signal_emit(icon->o_base, "e,state,selected", "e");
else edje_object_signal_emit(icon->o_base, "e,state,unselected", "e");
+ // is it a link or broken link?
if (icon->info.broken)
edje_object_signal_emit(icon->o_base, "e,state,broken", "e");
else if (icon->info.link)
edje_object_signal_emit(icon->o_base, "e,state,link", "e");
+ // is it a special file type?
if (icon->info.special)
edje_object_signal_emit(icon->o_base, "e,type,special", "e");
if (icon->info.thumb)
- {
+ { // it's a thumb - is it a mono or full color thumb?
if (efm_icon_mono_get(icon->o_icon))
{
edje_object_signal_emit(icon->o_base, "e,type,thumb,mono", "e");
@@ -1563,6 +1570,7 @@ _icon_object_add(Icon *icon, Smart_Data *sd, Evas *e,
else edje_object_signal_emit(icon->o_base, "e,type,thumb", "e");
}
+ // listen to mouse events
evas_object_event_callback_add(icon->o_base, EVAS_CALLBACK_MOUSE_DOWN,
_cb_icon_mouse_down, icon);
evas_object_event_callback_add(icon->o_base, EVAS_CALLBACK_MOUSE_UP,
@@ -1578,7 +1586,7 @@ _icon_object_add(Icon *icon, Smart_Data *sd, Evas *e,
evas_object_raise(sd->o_sel);
}
if (icon->renaming)
- {
+ { // in rename mode - begin rename mode
icon->sd->rename_icon = NULL;
_icon_rename_begin(icon);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.