[EGIT] [apps/evisum] master 01/01: proclist: ...

2021-05-14 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=775572f7708af12ae677b0af4fc5cebf7c246918

commit 775572f7708af12ae677b0af4fc5cebf7c246918
Author: Alastair Poole 
Date:   Fri May 14 21:04:17 2021 +0100

proclist: ...
---
 src/bin/ui/ui_process_list.c | 19 +--
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 01c0fc6..248988e 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -13,7 +13,6 @@
 #include 
 
 #define DIRTY_GENLIST_HACK1
-#define SIZING_ADJUST_PERIOD  3
 
 extern int EVISUM_EVENT_CONFIG_CHANGED;
 
@@ -651,6 +650,7 @@ _item_create(Evas_Object *obj)
 elm_progressbar_unit_format_set(pb, "%1.1f %%");
 elm_box_pack_end(hbx, pb);
 evas_object_show(hbx);
+evas_object_show(pb);
 
 rec = evas_object_rectangle_add(evas_object_evas_get(tb));
 evas_object_data_set(pb, "rec", rec);
@@ -929,7 +929,6 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
  snprintf(buf, sizeof(buf), "%1.1f %%", proc->cpu_usage);
  elm_object_part_text_set(pb, "elm.text.status", buf);
   }
-evas_object_show(pb);
  }
 
return it->obj;
@@ -1225,10 +1224,7 @@ _process_list(void *data, Ecore_Thread *thread)
proc_info_free(proc);
   }
 wd->skip_update = 0;
-if (wd->poll_count > SIZING_ADJUST_PERIOD)
-  delay = ui->proc.poll_delay;
-else
-  delay = 1;
+delay = ui->proc.poll_delay;
  }
 }
 
@@ -1615,14 +1611,8 @@ _glist_scrolled_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 {
Win_Data *wd = data;
 
-   // Update regularly on launch to allow for alignment.
-   if (wd->poll_count > SIZING_ADJUST_PERIOD)
- wd->skip_update = 1;
-   else
- {
-wd->skip_update = 0;
-wd->skip_wait = 1;
- }
+   wd->skip_update = 1;
+   wd->skip_wait = 0;
 }
 
 static void
@@ -1640,6 +1630,7 @@ _glist_scroll_stopped_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
if (oy != prev_oy)
  {
 wd->skip_wait = 1;
+wd->skip_update = 0;
 elm_genlist_realized_items_update(wd->glist);
  }
prev_oy = oy;

-- 




[EGIT] [apps/evisum] master 01/01: proclist: fix small bug.

2021-04-19 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=8a20a228ee69168e78d86ee46f65a70a2caea883

commit 8a20a228ee69168e78d86ee46f65a70a2caea883
Author: Alastair Poole 
Date:   Mon Apr 19 09:31:29 2021 +0100

proclist: fix small bug.
---
 src/bin/ui/ui_process_list.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 809c26a..88fd201 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -252,21 +252,21 @@ _field_menu_check_changed_cb(void *data, Evas_Object 
*obj, void *event_info)
 
wd = _wd;
ui = wd->ui;
-
-   wd->skip_update = 1;
f = data;
-   // Updating here is far too expensive. Maybe in 10 years time. :)
-   // f->enabled = !f->enabled;
-   // _content_reset(wd);
+
ui->proc.fields ^= (1 << f->id);
 
+   wd->skip_update = 1;
wd->fields_changed = (ui->proc.fields != config()->proc.fields);
 
ic = evas_object_data_get(obj, "icon");
if (!wd->fields_changed)
  evas_object_hide(ic);
else
- evas_object_show(ic);
+ {
+evisum_ui_config_save(ui);
+evas_object_show(ic);
+ }
 }
 
 static void

-- 




[EGIT] [apps/evisum] master 01/01: proclist: Adjustment increase poll.

2021-03-31 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=a8cf2de6db888216e591162706e44d02d05a57ca

commit a8cf2de6db888216e591162706e44d02d05a57ca
Author: Alastair Poole 
Date:   Wed Mar 31 09:50:06 2021 +0100

proclist: Adjustment increase poll.

When an alignment change is needed, increase the poll intensity
and force all items to update...it's crude...but it works...

Really need to only update items when they really need updating,
else scrolling is going to hurt...s...
---
 src/bin/ui/ui_process_list.c | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index b2c57d5..f58df2b 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -13,7 +13,7 @@
 #include 
 
 #define DIRTY_GENLIST_HACK1
-#define GENLIST_SCROLL_BY 512
+#define SIZING_ADJUST_PERIOD  3
 
 extern int EVISUM_EVENT_CONFIG_CHANGED;
 
@@ -609,6 +609,7 @@ _alignment_fix(Win_Data *wd)
 {
wd->update_every_item = 1;
wd->skip_wait = 1;
+   wd->poll_count = 0;
 }
 
 static Evas_Object *
@@ -1101,7 +1102,10 @@ _process_list(void *data, Ecore_Thread *thread)
proc_info_free(proc);
   }
 wd->skip_update = 0;
-delay = ui->proc.poll_delay;
+if (wd->poll_count > SIZING_ADJUST_PERIOD)
+  delay = ui->proc.poll_delay;
+else
+  delay = 1;
  }
 }
 
@@ -1482,7 +1486,7 @@ _glist_scrolled_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
Win_Data *wd = data;
 
// Update regularly on launch to allow for alignment.
-   if (wd->poll_count > 3)
+   if (wd->poll_count > SIZING_ADJUST_PERIOD)
  wd->skip_update = 1;
else
  {
@@ -1975,9 +1979,9 @@ _win_key_down_cb(void *data, Evas *e, Evas_Object *obj, 
void *event_info)
 return;
  }
else if (!strcmp(ev->keyname, "Prior"))
- elm_scroller_region_bring_in(wd->glist, x, y - GENLIST_SCROLL_BY, w, h);
+ elm_scroller_region_bring_in(wd->glist, x, y - 512, w, h);
else if (!strcmp(ev->keyname, "Next"))
- elm_scroller_region_bring_in(wd->glist, x, y + GENLIST_SCROLL_BY, w, h);
+ elm_scroller_region_bring_in(wd->glist, x, y + 512, w, h);
else
  _win_key_down_search(wd, ev);
 

-- 




[EGIT] [apps/evisum] master 01/01: proclist: indent.

2021-03-29 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=682d209b3d6f576b56a3fe26effa4ed04445b303

commit 682d209b3d6f576b56a3fe26effa4ed04445b303
Author: Alastair Poole 
Date:   Mon Mar 29 07:36:41 2021 +0100

proclist: indent.
---
 src/bin/ui/ui_process_list.c | 52 ++--
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index eec7b95..9ccd3a4 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -996,33 +996,33 @@ _process_list_search_trim(Eina_List *list, Data *pd)
 
EINA_LIST_FOREACH_SAFE(list, l, l_next, proc)
  {
-   if (_process_ignore(pd, proc))
- {
-proc_info_free(proc);
-list = eina_list_remove_list(list, l);
- }
+if (_process_ignore(pd, proc))
+  {
+ proc_info_free(proc);
+ list = eina_list_remove_list(list, l);
+  }
 else
- {
-int64_t *cpu_time, id = proc->pid;
-
-if ((cpu_time = eina_hash_find(pd->cpu_times, )))
-  {
- if (*cpu_time)
-   proc->cpu_usage = (double) (proc->cpu_time - *cpu_time) /
-   pd->ui->proc.poll_delay;
- *cpu_time = proc->cpu_time;
-  }
-else
-  {
- cpu_time = malloc(sizeof(int64_t));
- if (cpu_time)
-   {
-  *cpu_time = proc->cpu_time;
-  eina_hash_add(pd->cpu_times, , cpu_time);
-   }
-  }
-_summary_total(pd, proc);
- }
+  {
+ int64_t *cpu_time, id = proc->pid;
+
+ if ((cpu_time = eina_hash_find(pd->cpu_times, )))
+   {
+  if (*cpu_time)
+proc->cpu_usage = (double) (proc->cpu_time - *cpu_time) /
+pd->ui->proc.poll_delay;
+  *cpu_time = proc->cpu_time;
+   }
+ else
+   {
+  cpu_time = malloc(sizeof(int64_t));
+  if (cpu_time)
+{
+   *cpu_time = proc->cpu_time;
+   eina_hash_add(pd->cpu_times, , cpu_time);
+}
+   }
+ _summary_total(pd, proc);
+  }
  }
 
 return list;

-- 




[EGIT] [apps/evisum] master 01/01: proclist: time align.

2021-03-28 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=b51675cde2b741257b428fb74deca414bbe1a465

commit b51675cde2b741257b428fb74deca414bbe1a465
Author: Alastair Poole 
Date:   Sun Mar 28 17:21:30 2021 +0100

proclist: time align.
---
 src/bin/ui/ui_process_list.c | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 217b4e6..eec7b95 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -547,7 +547,7 @@ _item_create(Evas_Object *obj)
if (_field_enabled(PROC_FIELD_TIME))
  {
 lb = _item_column_add(tb, "time", i++);
-evas_object_size_hint_align_set(lb, 1.0, FILL);
+evas_object_size_hint_align_set(lb, 0.5, FILL);
  }
 
if (_field_enabled(PROC_FIELD_CPU_USAGE))
@@ -604,6 +604,13 @@ _field_adjust(Data *pd, Proc_Field id, Evas_Object *obj, 
Evas_Coord w)
  }
 }
 
+static void
+_alignment_fix(Data *pd)
+{
+   pd->update_every_item = 1;
+   pd->skip_wait = 1;
+}
+
 static Evas_Object *
 _content_get(void *data, Evas_Object *obj, const char *source)
 {
@@ -638,8 +645,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
if (ow > w)
  {
 evas_object_size_hint_min_set(pd->btn_cmd, ow, 1);
-pd->update_every_item = 1;
-pd->skip_wait = 1;
+_alignment_fix(pd);
  }
rec = evas_object_data_get(lb, "rec");
evas_object_size_hint_min_set(rec, w, 1);
@@ -671,8 +677,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 if (ow > w)
   {
  evas_object_size_hint_min_set(pd->btn_uid, ow, 1);
- pd->update_every_item = 1;
- pd->skip_wait = 1;
+ _alignment_fix(pd);
   }
 _field_adjust(pd, PROC_FIELD_UID, lb, w);
  }

-- 




[EGIT] [apps/evisum] master 01/01: proclist: done.

2021-03-28 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=ff96ecee07928598d459f3a67783de307fe7714e

commit ff96ecee07928598d459f3a67783de307fe7714e
Author: Alastair Poole 
Date:   Sun Mar 28 11:35:36 2021 +0100

proclist: done.
---
 data/themes/evisum.edc   | 11 +++
 src/bin/ui/ui_process_list.c | 13 +++--
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/data/themes/evisum.edc b/data/themes/evisum.edc
index 7a907f1..4b6a566 100644
--- a/data/themes/evisum.edc
+++ b/data/themes/evisum.edc
@@ -32,6 +32,11 @@ collections {
   name: "joke" COMP;
   source: "badjoke.wav";
}
+   sample
+   {
+  name: "cockerel" COMP;
+  source: "cockerel.wav";
+   }
 }
 group
 {
@@ -165,6 +170,12 @@ collections {
source: "evisum/indicator";
action: PLAY_SAMPLE "joke" 1.0 INPUT;
 }
+program
+{
+   signal: "process,kill";
+   source: "evisum/indicator";
+   action: PLAY_SAMPLE "cockerel" 1.0 INPUT;
+}
 }
 }
 }
diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 0bfcce5..a951359 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1171,7 +1171,7 @@ _btn_clicked_state_save(Data *pd, Evas_Object *btn)
  if (evisum_ui_effects_enabled_get(pd->ui))
elm_object_signal_emit(pd->indicator, "fields,change", 
"evisum/indicator");
  _content_reset(pd);
- }
+   }
 return;
  }
_btn_icon_state_update(btn, ui->proc.sort_reverse, 0);
@@ -1237,6 +1237,8 @@ _item_menu_kill_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 {
Data *pd = data;
 
+   if (evisum_ui_effects_enabled_get(pd->ui))
+ elm_object_signal_emit(pd->indicator, "process,kill", "evisum/indicator");
kill(pd->selected_pid, SIGKILL);
 }
 
@@ -1439,7 +1441,14 @@ _glist_scrolled_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 {
Data *pd = data;
 
-   pd->skip_update = 1;
+   // Update regularly on launch to allow for alignment.
+   if (pd->poll_count > 3)
+ pd->skip_update = 1;
+   else
+ {
+pd->skip_update = 0;
+pd->skip_wait = 1;
+ }
 }
 
 static void

-- 




[EGIT] [apps/evisum] master 01/01: proclist: update less.

2021-03-28 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=9ac6c6105cad28fcd49c5f310bbadf7e557eb8f7

commit 9ac6c6105cad28fcd49c5f310bbadf7e557eb8f7
Author: Alastair Poole 
Date:   Sun Mar 28 11:18:59 2021 +0100

proclist: update less.

Far too heavily updating.
---
 src/bin/ui/ui_process_list.c | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 87bd399..0bfcce5 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1074,6 +1074,7 @@ _process_list(void *data, Ecore_Thread *thread)
  EINA_LIST_FREE(list, proc)
proc_info_free(proc);
   }
+pd->skip_update = 0;
 delay = ui->proc.poll_delay;
  }
 }
@@ -1165,10 +1166,12 @@ _btn_clicked_state_save(Data *pd, Evas_Object *btn)
 evas_object_del(pd->fields_menu);
 pd->fields_menu = NULL;
 // Postpone field changes until the user dismisses the popup.
-if (evisum_ui_effects_enabled_get(pd->ui))
-  elm_object_signal_emit(pd->indicator, "fields,change", 
"evisum/indicator");
 if (pd->fields_changed)
-  _content_reset(pd);
+  {
+ if (evisum_ui_effects_enabled_get(pd->ui))
+   elm_object_signal_emit(pd->indicator, "fields,change", 
"evisum/indicator");
+ _content_reset(pd);
+ }
 return;
  }
_btn_icon_state_update(btn, ui->proc.sort_reverse, 0);
@@ -1436,8 +1439,7 @@ _glist_scrolled_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 {
Data *pd = data;
 
-   if (pd->poll_count < 10)
- pd->skip_update = 1;
+   pd->skip_update = 1;
 }
 
 static void
@@ -1452,7 +1454,6 @@ _glist_scroll_stopped_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 
elm_scroller_region_get(pd->glist, NULL, , NULL, NULL);
 
-   pd->skip_update = 0;
if (oy != prev_oy)
  {
 pd->skip_wait = 1;

-- 




[EGIT] [apps/evisum] master 01/01: proclist: more testing

2021-03-27 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=74e6a58fa85530ecc1e896b67aa4b790736cd63b

commit 74e6a58fa85530ecc1e896b67aa4b790736cd63b
Author: Alastair Poole 
Date:   Sat Mar 27 09:06:32 2021 +

proclist: more testing
---
 src/bin/ui/ui_process_list.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 879a192..a32058a 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -869,7 +869,7 @@ _bring_in(void *data)
elm_scroller_gravity_set(pd->glist, 0.0, 0.0);
elm_scroller_last_page_get(pd->glist, _page, _page);
elm_scroller_page_bring_in(pd->glist, h_page, v_page);
-   elm_genlist_realized_items_update(pd->glist);
+//   elm_genlist_realized_items_update(pd->glist);
evas_object_show(pd->glist);
 
return 0;
@@ -1140,7 +1140,7 @@ _process_list_feedback_cb(void *data, Ecore_Thread 
*thread EINA_UNUSED,
eina_list_count(pd->cache->inactive), n);
 #endif
if (!pd->poll_count)
- ecore_timer_add(1.0, _bring_in, pd);
+ ecore_timer_add(2.0, _bring_in, pd);
pd->poll_count++;
 
if (evisum_ui_effects_enabled_get(pd->ui))
@@ -1460,7 +1460,10 @@ _glist_scroll_stopped_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 
pd->skip_update = 0;
if (oy != prev_oy)
- pd->skip_wait = 1;
+ {
+pd->skip_wait = 1;
+elm_genlist_realized_items_update(pd->glist);
+ }
prev_oy = oy;
 }
 

-- 




[EGIT] [apps/evisum] master 01/01: proclist: initial alignment.

2021-03-27 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=77bb88de049d3c3d6493c5e984aeae24001fb379

commit 77bb88de049d3c3d6493c5e984aeae24001fb379
Author: Alastair Poole 
Date:   Sat Mar 27 08:55:50 2021 +

proclist: initial alignment.
---
 src/bin/ui/ui_process_list.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 15fb4b7..879a192 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -31,6 +31,7 @@ typedef struct
Eina_Hash *cpu_times;
Eina_Bool  skip_wait;
Eina_Bool  skip_update;
+   Eina_Bool  update_every_item;
Sorter sorters[PROC_SORT_BY_MAX];
pid_t  selected_pid;
intpoll_count;
@@ -609,7 +610,6 @@ _field_adjust(Data *pd, Proc_Field id, Evas_Object *obj, 
Evas_Coord w)
 evas_object_size_hint_weight_set(rec, EXPAND, EXPAND);
 evas_object_size_hint_weight_set(obj, EXPAND, EXPAND);
  }
-   evas_object_show(obj);
 }
 
 static Evas_Object *
@@ -646,6 +646,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
if (ow > w)
  {
 evas_object_size_hint_min_set(pd->btn_cmd, ow, 1);
+pd->update_every_item = 1;
 pd->skip_wait = 1;
  }
rec = evas_object_data_get(lb, "rec");
@@ -678,6 +679,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 if (ow > w)
   {
  evas_object_size_hint_min_set(pd->btn_uid, ow, 1);
+ pd->update_every_item = 1;
  pd->skip_wait = 1;
   }
 _field_adjust(pd, PROC_FIELD_UID, lb, w);
@@ -1109,11 +,15 @@ _process_list_feedback_cb(void *data, Ecore_Thread 
*thread EINA_UNUSED,
   proc_info_free(prev);
 
 elm_object_item_data_set(it, proc);
+if (pd->update_every_item)
+  elm_genlist_item_update(it);
 
 it = elm_genlist_item_next_get(it);
  }
 
-   elm_genlist_realized_items_update(pd->glist);
+   if (!pd->update_every_item)
+ elm_genlist_realized_items_update(pd->glist);
+   pd->update_every_item = 0;
 
_summary_update(pd);
 

-- 




[EGIT] [apps/evisum] master 01/01: proclist: inital cache size.

2021-03-27 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=2324dd5cc46436bd79e14552e49c4eeba319e15c

commit 2324dd5cc46436bd79e14552e49c4eeba319e15c
Author: Alastair Poole 
Date:   Sat Mar 27 07:10:37 2021 +

proclist: inital cache size.

30 is about right...
---
 src/bin/ui/ui_process_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index bcdc6fe..15fb4b7 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -2206,7 +2206,7 @@ ui_process_list_win_add(Evisum_Ui *ui)
elm_win_resize_object_add(win, tb);
elm_object_content_set(win, tb);
 
-   pd->cache = evisum_ui_item_cache_new(pd->glist, _item_create, 40);
+   pd->cache = evisum_ui_item_cache_new(pd->glist, _item_create, 30);
pd->cpu_times = eina_hash_int64_new(_cpu_times_free_cb);
 
evas_object_event_callback_add(win, EVAS_CALLBACK_DEL,

-- 




[EGIT] [apps/evisum] master 01/01: proclist: scroll

2021-03-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=fa9b6353051d224c8936c7967789813222e610cd

commit fa9b6353051d224c8936c7967789813222e610cd
Author: Alastair Poole 
Date:   Fri Mar 26 18:20:58 2021 +

proclist: scroll
---
 src/bin/ui/ui_process_list.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 3b64a00..bcdc6fe 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1436,7 +1436,8 @@ _glist_scrolled_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 {
Data *pd = data;
 
-   pd->skip_update = 1;
+   if (pd->poll_count < 10)
+ pd->skip_update = 1;
 }
 
 static void
@@ -1471,8 +1472,10 @@ _glist_mouse_wheel_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNU
 
elm_scroller_region_get(pd->glist, , , , );
 
-   if (ev->z == 1) movement = (GENLIST_SCROLL_BY);
-   else if (ev->z == -1) movement = -(GENLIST_SCROLL_BY);
+   h *= 1.2;
+
+   if (ev->z == 1) movement = (h < GENLIST_SCROLL_BY ? h : GENLIST_SCROLL_BY);
+   else if (ev->z == -1) movement = (h < GENLIST_SCROLL_BY ? -h : 
-GENLIST_SCROLL_BY);
 
elm_scroller_region_bring_in(pd->glist, x, y + movement, w, h);
 }

-- 




[EGIT] [apps/evisum] master 01/01: proclist: key/mouse scroll

2021-03-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=390f3ec34d4a10ed297914eb0c2292b03fbd5c13

commit 390f3ec34d4a10ed297914eb0c2292b03fbd5c13
Author: Alastair Poole 
Date:   Fri Mar 26 17:11:10 2021 +

proclist: key/mouse scroll
---
 src/bin/ui/ui_process_list.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 0a735a9..3b64a00 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -12,7 +12,8 @@
 #include 
 #include 
 
-#define DIRTY_GENLIST_HACK 1
+#define DIRTY_GENLIST_HACK1
+#define GENLIST_SCROLL_BY 512
 
 extern int EVISUM_EVENT_CONFIG_CHANGED;
 
@@ -1470,8 +1471,8 @@ _glist_mouse_wheel_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNU
 
elm_scroller_region_get(pd->glist, , , , );
 
-   if (ev->z == 1) movement = (h / 2);
-   else if (ev->z == -1) movement = -(h / 2);
+   if (ev->z == 1) movement = (GENLIST_SCROLL_BY);
+   else if (ev->z == -1) movement = -(GENLIST_SCROLL_BY);
 
elm_scroller_region_bring_in(pd->glist, x, y + movement, w, h);
 }
@@ -1942,9 +1943,9 @@ _win_key_down_cb(void *data, Evas *e, Evas_Object *obj, 
void *event_info)
 return;
  }
else if (!strcmp(ev->keyname, "Prior"))
- elm_scroller_region_bring_in(pd->glist, x, y - h, w, h);
+ elm_scroller_region_bring_in(pd->glist, x, y - GENLIST_SCROLL_BY, w, h);
else if (!strcmp(ev->keyname, "Next"))
- elm_scroller_region_bring_in(pd->glist, x, y + h, w, h);
+ elm_scroller_region_bring_in(pd->glist, x, y + GENLIST_SCROLL_BY, w, h);
else
  _win_key_down_search(pd, ev);
 

-- 




[EGIT] [apps/evisum] master 01/01: proclist: handle mouse wheel ourselves.

2021-03-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=734662b86ef17186ef6ec667dab61c5631e282ed

commit 734662b86ef17186ef6ec667dab61c5631e282ed
Author: Alastair Poole 
Date:   Fri Mar 26 16:57:38 2021 +

proclist: handle mouse wheel ourselves.

This can be too much...
---
 src/bin/ui/ui_process_list.c | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index d21d340..0a735a9 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1456,6 +1456,26 @@ _glist_scroll_stopped_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
prev_oy = oy;
 }
 
+static void
+_glist_mouse_wheel_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED,
+  void *event_info)
+{
+   Evas_Event_Mouse_Wheel *ev;
+   Data *pd;
+   Evas_Coord x, y, w, h;
+   Evas_Coord movement = 0;
+
+   pd = data;
+   ev = event_info;
+
+   elm_scroller_region_get(pd->glist, , , , );
+
+   if (ev->z == 1) movement = (h / 2);
+   else if (ev->z == -1) movement = -(h / 2);
+
+   elm_scroller_region_bring_in(pd->glist, x, y + movement, w, h);
+}
+
 static Eina_Bool
 _main_menu_timer_cb(void *data)
 {
@@ -1719,6 +1739,7 @@ _content_add(Data *pd, Evas_Object *parent)
pd->glist = glist = elm_genlist_add(parent);
elm_genlist_homogeneous_set(glist, 1);
elm_scroller_gravity_set(glist, 0.0, 1.0);
+   elm_scroller_wheel_disabled_set(glist, 1);
elm_object_focus_allow_set(glist, 1);
elm_scroller_policy_set(glist, ELM_SCROLLER_POLICY_AUTO,
(ui->proc.show_scroller ?
@@ -1746,6 +1767,8 @@ _content_add(Data *pd, Evas_Object *parent)
   _glist_scroll_stopped_cb, pd);
evas_object_smart_callback_add(glist, "scroll,drag,stop",
   _glist_scroll_stopped_cb, pd);
+   evas_object_event_callback_add(glist, EVAS_CALLBACK_MOUSE_WHEEL,
+  _glist_mouse_wheel_cb, pd);
 
pd->summary.fr = fr = elm_frame_add(parent);
elm_object_style_set(fr, "pad_small");

-- 




[EGIT] [apps/evisum] master 01/01: proclist: gettext.

2021-03-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=82f22e6e49a5062bc5ad29d2817bbfa4983aedd3

commit 82f22e6e49a5062bc5ad29d2817bbfa4983aedd3
Author: Alastair Poole 
Date:   Fri Mar 26 13:46:28 2021 +

proclist: gettext.
---
 src/bin/ui/ui_process_list.c | 75 ++--
 1 file changed, 52 insertions(+), 23 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 76e7f64..d21d340 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -103,7 +103,7 @@ static Data *_pd = NULL;
 typedef struct
 {
Proc_Field   id;
-   const char  *name;
+   const char  *desc;
Eina_Boolenabled;
Evas_Object *btn;
 } Field;
@@ -111,7 +111,7 @@ typedef struct
 static Field _fields[PROC_FIELD_MAX];
 
 static const char *
-_field_name(Proc_Field id)
+_field_desc(Proc_Field id)
 {
   switch (id)
{
@@ -120,7 +120,7 @@ _field_name(Proc_Field id)
   case PROC_FIELD_UID:
 return _("User");
   case PROC_FIELD_PID:
-return _("PID");
+return _("Process ID");
   case PROC_FIELD_THREADS:
 return _("Threads");
   case PROC_FIELD_CPU:
@@ -151,6 +151,47 @@ _field_name(Proc_Field id)
   return "BUG";
 }
 
+static const char *
+_field_name(Proc_Field id)
+{
+  switch (id)
+   {
+  case PROC_FIELD_CMD:
+return _("command");
+  case PROC_FIELD_UID:
+return _("user");
+  case PROC_FIELD_PID:
+return _("pid");
+  case PROC_FIELD_THREADS:
+return _("thr");
+  case PROC_FIELD_CPU:
+return _("cpu");
+  case PROC_FIELD_PRI:
+return _("pri");
+  case PROC_FIELD_NICE:
+return _("nice");
+  case PROC_FIELD_FILES:
+return _("files");
+  case PROC_FIELD_SIZE:
+return _("size");
+  case PROC_FIELD_VIRT:
+return _("virt");
+  case PROC_FIELD_RSS:
+return _("res");
+  case PROC_FIELD_SHARED:
+return _("shr");
+  case PROC_FIELD_STATE:
+return _("state");
+  case PROC_FIELD_TIME:
+return _("time");
+  case PROC_FIELD_CPU_USAGE:
+return _("cpu %");
+  default:
+ break;
+   }
+  return "BUG";
+}
+
 static Eina_Bool
 _field_enabled(Proc_Field id)
 {
@@ -230,7 +271,7 @@ _field_menu_create(Data *pd, Evas_Object *parent)
 ck = elm_check_add(parent);
 evas_object_size_hint_weight_set(ck, EXPAND, EXPAND);
 evas_object_size_hint_align_set(ck, FILL, FILL);
-elm_object_text_set(ck, _fields[i].name);
+elm_object_text_set(ck, _fields[i].desc);
 elm_check_state_set(ck, _fields[i].enabled);
 evas_object_smart_callback_add(ck, "changed",
_field_menu_check_changed_cb, 
&_fields[i]);
@@ -279,16 +320,19 @@ _fields_init(Data *pd)
for (int i = PROC_FIELD_CMD; i < PROC_FIELD_MAX; i++)
  {
 Evas_Object *btn;
-const char *name = _field_name(i);
-btn = _fields[i].btn;
+const char *name, *desc;
+name = _field_name(i);
+desc = _field_desc(i);
+btn  = _fields[i].btn;
 
 _fields[i].id = i;
-_fields[i].name = name;
+_fields[i].desc = desc;
 _fields[i].enabled = 1;
 if ((i != PROC_FIELD_CMD) && (!(pd->ui->proc.fields & (1UL << i
   _fields[i].enabled = 0;
 
-elm_object_tooltip_text_set(btn, name);
+elm_object_tooltip_text_set(btn, desc);
+elm_object_text_set(btn, name);
 evas_object_event_callback_add(btn, EVAS_CALLBACK_MOUSE_UP,
_field_mouse_up_cb, pd);
  }
@@ -1499,7 +1543,6 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_size_hint_weight_set(btn, 1.0, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_CMD);
-   elm_object_text_set(btn, _("command"));
evas_object_show(btn);
evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_CMD].btn = btn;
@@ -1512,7 +1555,6 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_size_hint_weight_set(btn, 1.0, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_UID);
-   elm_object_text_set(btn, _("user"));
evas_object_show(btn);
evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_UID].btn = btn;
@@ -1525,7 +1567,6 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_size_hint_weight_set(btn, 1.0, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_PID);
-   elm_object_text_set(btn, _("pid"));
evas_object_show(btn);
evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_PID].btn = btn;
@@ 

[EGIT] [apps/evisum] master 01/01: proclist: avoid updating at boundary

2021-03-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=a93683a83a9218cea2f4880011b422543c00bb19

commit a93683a83a9218cea2f4880011b422543c00bb19
Author: Alastair Poole 
Date:   Fri Mar 26 12:56:50 2021 +

proclist: avoid updating at boundary
---
 src/bin/ui/ui_process_list.c | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 907b8e2..76e7f64 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1398,10 +1398,18 @@ static void
 _glist_scroll_stopped_cb(void *data, Evas_Object *obj EINA_UNUSED,
  void *event_info EINA_UNUSED)
 {
-   Data *pd = data;
+   Data *pd;
+   Evas_Coord oy;
+   static Evas_Coord prev_oy;
+
+   pd = data;
+
+   elm_scroller_region_get(pd->glist, NULL, , NULL, NULL);
 
pd->skip_update = 0;
-   pd->skip_wait = 1;
+   if (oy != prev_oy)
+ pd->skip_wait = 1;
+   prev_oy = oy;
 }
 
 static Eina_Bool

-- 




[EGIT] [apps/evisum] master 01/01: proclist: finally.

2021-03-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=b05e25f281277830b90f41d0e42a5c69f4f467b9

commit b05e25f281277830b90f41d0e42a5c69f4f467b9
Author: Alastair Poole 
Date:   Fri Mar 26 11:58:35 2021 +

proclist: finally.
---
 src/bin/ui/ui_process_list.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index bac3663..907b8e2 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -372,7 +372,7 @@ _item_column_add(Evas_Object *tb, const char *text, int col)
elm_box_pack_end(hbx, lb);
 
rec = evas_object_rectangle_add(evas_object_evas_get(tb));
-   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(2), 1);
+   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(6), 1);
elm_box_pack_end(hbx, rec);
 
rec = evas_object_rectangle_add(evas_object_evas_get(tb));
@@ -501,7 +501,7 @@ _item_create(Evas_Object *obj)
if (_field_enabled(PROC_FIELD_TIME))
  {
 lb = _item_column_add(tb, "time", i++);
-evas_object_size_hint_align_set(lb, 0.5, FILL);
+evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
 
if (_field_enabled(PROC_FIELD_CPU_USAGE))

-- 




[EGIT] [apps/evisum] master 01/01: proclist: less block.

2021-03-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=ebff44be08e09ddbc1919b0acbfdd6a206f8f988

commit ebff44be08e09ddbc1919b0acbfdd6a206f8f988
Author: Alastair Poole 
Date:   Fri Mar 26 11:29:53 2021 +

proclist: less block.
---
 src/bin/ui/ui_process_list.c | 43 +--
 1 file changed, 33 insertions(+), 10 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 0b375ea..bac3663 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -591,7 +591,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 
evas_object_geometry_get(pd->btn_menu, NULL, NULL, , NULL);
evas_object_geometry_get(pd->btn_cmd, NULL, NULL, , NULL);
-   w = bw + ow - ELM_SCALE_SIZE(8);
+   w = bw + ow;
lb = evas_object_data_get(it->obj, "cmd");
snprintf(buf, sizeof(buf), "%s", proc->command);
if (strcmp(buf, elm_object_text_get(lb)))
@@ -1096,12 +1096,6 @@ _process_list_feedback_cb(void *data, Ecore_Thread 
*thread EINA_UNUSED,
  elm_object_signal_emit(pd->indicator, "indicator,show", 
"evisum/indicator");
 }
 
-static void
-_process_list_update(Data *pd)
-{
-   pd->skip_wait = 1;
-}
-
 static void
 _btn_icon_state_update(Evas_Object *btn, Eina_Bool reverse,
Eina_Bool selected EINA_UNUSED)
@@ -1134,8 +1128,6 @@ _btn_clicked_state_save(Data *pd, Evas_Object *btn)
  }
_btn_icon_state_update(btn, ui->proc.sort_reverse, 0);
 
-   _process_list_update(pd);
-
elm_scroller_page_bring_in(pd->glist, 0, 0);
 }
 
@@ -1158,6 +1150,8 @@ _btn_clicked_cb(void *data, Evas_Object *obj,
  ui->proc.sort_reverse = !ui->proc.sort_reverse;
ui->proc.sort_type = type;
_btn_clicked_state_save(pd, obj);
+   pd->skip_update = 0;
+   pd->skip_wait = 1;
 }
 
 static void
@@ -1391,6 +1385,25 @@ _item_pid_clicked_cb(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info)
ui_process_view_win_add(proc->pid, PROC_VIEW_DEFAULT);
 }
 
+static void
+_glist_scrolled_cb(void *data, Evas_Object *obj EINA_UNUSED,
+   void *event_info EINA_UNUSED)
+{
+   Data *pd = data;
+
+   pd->skip_update = 1;
+}
+
+static void
+_glist_scroll_stopped_cb(void *data, Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+   Data *pd = data;
+
+   pd->skip_update = 0;
+   pd->skip_wait = 1;
+}
+
 static Eina_Bool
 _main_menu_timer_cb(void *data)
 {
@@ -1690,6 +1703,12 @@ _content_add(Data *pd, Evas_Object *parent)
   _item_pid_secondary_clicked_cb, pd);
evas_object_smart_callback_add(glist, "unrealized",
   _item_unrealized_cb, pd);
+   evas_object_smart_callback_add(glist, "scroll",
+  _glist_scrolled_cb, pd);
+   evas_object_smart_callback_add(glist, "scroll,anim,stop",
+  _glist_scroll_stopped_cb, pd);
+   evas_object_smart_callback_add(glist, "scroll,drag,stop",
+  _glist_scroll_stopped_cb, pd);
 
pd->summary.fr = fr = elm_frame_add(parent);
elm_object_style_set(fr, "pad_small");
@@ -1719,13 +1738,15 @@ _search_empty_cb(void *data)
 elm_object_focus_allow_set(pd->search.entry, 0);
 pd->search.visible = 0;
 pd->search.timer = NULL;
+pd->skip_update = 0;
 pd->skip_wait = 1;
 return 0;
  }
 
if (pd->search.keytime &&
-   ((ecore_loop_time_get() - pd->search.keytime) > 0.1))
+   ((ecore_loop_time_get() - pd->search.keytime) > 0.2))
  {
+pd->skip_update = 0;
 pd->skip_wait = 1;
 pd->search.keytime = 0;
  }
@@ -1740,6 +1761,7 @@ _search_clear(Data *pd)
  free(pd->search.text);
pd->search.text = NULL;
pd->search.len = 0;
+   pd->skip_update = 0;
 }
 
 static void
@@ -1758,6 +1780,7 @@ _search_key_down_cb(void *data, Evas *e, Evas_Object 
*obj, void *event_info)
text = elm_object_text_get(obj);
if (text)
  {
+pd->skip_update = 1;
 pd->search.keytime = ecore_loop_time_get();
 _search_clear(pd);
 pd->search.text = strdup(text);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: lesser still intensity on update.

2021-03-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=cafda5c51d67e3ee6dda069c6271b2fefee66384

commit cafda5c51d67e3ee6dda069c6271b2fefee66384
Author: Alastair Poole 
Date:   Fri Mar 26 10:35:50 2021 +

proclist: lesser still intensity on update.
---
 src/bin/ui/ui_process_list.c | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index a1d6af5..0b375ea 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -29,6 +29,7 @@ typedef struct
Ecore_Event_Handler   *handler;
Eina_Hash *cpu_times;
Eina_Bool  skip_wait;
+   Eina_Bool  skip_update;
Sorter sorters[PROC_SORT_BY_MAX];
pid_t  selected_pid;
intpoll_count;
@@ -73,6 +74,7 @@ typedef struct
Evas_Object*btn_time;
Evas_Object*btn_cpu_usage;
 
+   Eina_Bool   fields_changed;
Proc_Field  field_max;
Evas_Object*fields_menu;
Ecore_Timer*fields_timer;
@@ -161,6 +163,7 @@ _fields_update_timer_cb(void *data)
Data *pd = data;
 
pd->skip_wait = 1;
+   pd->skip_update = 0;
pd->fields_timer = NULL;
 
return 0;
@@ -198,6 +201,8 @@ _field_menu_check_changed_cb(void *data, Evas_Object *obj, 
void *event_info)
pd = _pd;
ui = pd->ui;
 
+   pd->skip_update = 1;
+   pd->fields_changed = 1;
f = data;
// Updating here is far too expensive. Maybe in 10 years time. :)
// f->enabled = !f->enabled;
@@ -319,6 +324,7 @@ _content_reset(Data *pd)
evas_object_show(pd->summary.fr);
elm_genlist_clear(pd->glist);
evisum_ui_item_cache_reset(pd->cache, _cache_reset_done_cb, pd);
+   pd->fields_changed = 0;
 }
 
 static void
@@ -1014,7 +1020,6 @@ _process_list(void *data, Ecore_Thread *thread)
 for (int i = 0; i < delay * 8; i++)
   {
  if (ecore_thread_check(thread)) return;
-
  if (pd->skip_wait)
{
   pd->skip_wait = 0;
@@ -1023,10 +1028,8 @@ _process_list(void *data, Ecore_Thread *thread)
  usleep(125000);
   }
 list = _process_list_get(pd);
-if (!pd->skip_wait)
-  {
- ecore_thread_feedback(thread, list);
-  }
+if (!pd->skip_update)
+  ecore_thread_feedback(thread, list);
 else
   {
  EINA_LIST_FREE(list, proc)
@@ -1125,7 +1128,8 @@ _btn_clicked_state_save(Data *pd, Evas_Object *btn)
 evas_object_del(pd->fields_menu);
 pd->fields_menu = NULL;
 // Postpone field changes until the user dismisses the popup.
-_content_reset(pd);
+if (pd->fields_changed)
+  _content_reset(pd);
 return;
  }
_btn_icon_state_update(btn, ui->proc.sort_reverse, 0);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: slight change

2021-03-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=5e5a9c2ce9a87e8d89dfd677d59384883e9aa2c4

commit 5e5a9c2ce9a87e8d89dfd677d59384883e9aa2c4
Author: Alastair Poole 
Date:   Fri Mar 26 09:08:06 2021 +

proclist: slight change
---
 src/bin/ui/ui_process_list.c | 17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 38a1734..a1d6af5 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -566,9 +566,9 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 {
Proc_Info *proc;
struct passwd *pwd_entry;
-   Evas_Object *rec, *lb, *o, *hbx, *pb;
+   Evas_Object *rec, *lb, *o, *pb;
char buf[128];
-   Evas_Coord w, ow;
+   Evas_Coord w, ow, bw;
Data *pd = _pd;
 
proc = (void *) data;
@@ -583,24 +583,23 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 exit(-1);
  }
 
-   evas_object_geometry_get(pd->btn_menu, NULL, NULL, , NULL);
-   evas_object_geometry_get(pd->btn_cmd, NULL, NULL, , NULL);
-   w += (ow - 8);
+   evas_object_geometry_get(pd->btn_menu, NULL, NULL, , NULL);
+   evas_object_geometry_get(pd->btn_cmd, NULL, NULL, , NULL);
+   w = bw + ow - ELM_SCALE_SIZE(8);
lb = evas_object_data_get(it->obj, "cmd");
snprintf(buf, sizeof(buf), "%s", proc->command);
if (strcmp(buf, elm_object_text_get(lb)))
  elm_object_text_set(lb, buf);
-   hbx = evas_object_data_get(lb, "hbx");
-   evas_object_geometry_get(hbx, NULL, NULL, , NULL);
+   evas_object_geometry_get(lb, NULL, NULL, , NULL);
+   ow += bw;
if (ow > w)
  {
-evas_object_size_hint_min_set(pd->btn_cmd, ow , 1);
+evas_object_size_hint_min_set(pd->btn_cmd, ow, 1);
 pd->skip_wait = 1;
  }
rec = evas_object_data_get(lb, "rec");
evas_object_size_hint_min_set(rec, w, 1);
evas_object_show(lb);
-   elm_box_recalculate(hbx);
 
const char *new = evisum_icon_path_get(evisum_icon_cache_find(proc));
const char *old = NULL;

-- 




[EGIT] [apps/evisum] master 01/01: proclist: Actually defer field changes.

2021-03-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=9ca8502015076a36ba4dc450db11b64990a1317c

commit 9ca8502015076a36ba4dc450db11b64990a1317c
Author: Alastair Poole 
Date:   Fri Mar 26 08:35:32 2021 +

proclist: Actually defer field changes.

Extremely expensive to "DO IT LIVE!" Defer until the popup is
dismissed.
---
 src/bin/ui/ui_process_list.c | 66 
 1 file changed, 42 insertions(+), 24 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index bbb3c4c..38a1734 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -177,32 +177,15 @@ _cache_reset_done_cb(void *data)
  pd->fields_timer = ecore_timer_add(1.0, _fields_update_timer_cb, pd);
 }
 
-// Updating fields is a heavy exercise. We both offset the
-// cache clearing and delay the initial update for a better
-// experience.
 static void
-_content_reset(Data *pd)
+_fields_update(Data *pd)
 {
-   int j = 0;
-   elm_table_clear(pd->tb_main, 0);
-   elm_table_pack(pd->tb_main, pd->btn_menu, j++, 0, 1, 1);
-   for (int i = j; i < PROC_FIELD_MAX; i++)
+   for (int i = PROC_FIELD_CMD; i < PROC_FIELD_MAX; i++)
  {
-Field *f = &_fields[i];
-if (!f->enabled)
-  {
- evas_object_hide(f->btn);
- continue;
-  }
-pd->field_max = i;
-elm_table_pack(pd->tb_main, f->btn, j++, 0, 1, 1);
-evas_object_show(f->btn);
+_fields[i].enabled = 1;
+if ((i != PROC_FIELD_CMD) && (!(pd->ui->proc.fields & (1UL << i
+  _fields[i].enabled = 0;
  }
-   elm_table_pack(pd->tb_main, pd->glist, 0, 1, j, 1);
-   elm_table_pack(pd->tb_main, pd->summary.fr, 0, 2, j, 1);
-   evas_object_show(pd->summary.fr);
-   elm_genlist_clear(pd->glist);
-   evisum_ui_item_cache_reset(pd->cache, _cache_reset_done_cb, pd);
 }
 
 static void
@@ -216,8 +199,9 @@ _field_menu_check_changed_cb(void *data, Evas_Object *obj, 
void *event_info)
ui = pd->ui;
 
f = data;
-   f->enabled = !f->enabled;
-   _content_reset(pd);
+   // Updating here is far too expensive. Maybe in 10 years time. :)
+   // f->enabled = !f->enabled;
+   // _content_reset(pd);
ui->proc.fields ^= (1 << f->id);
 }
 
@@ -305,6 +289,38 @@ _fields_init(Data *pd)
  }
 }
 
+// Updating fields is a heavy exercise. We both offset the
+// cache clearing and delay the initial update for a better
+// experience.
+static void
+_content_reset(Data *pd)
+{
+   int j = 0;
+
+   // Update fields from bitmask.
+   _fields_update(pd);
+
+   elm_table_clear(pd->tb_main, 0);
+   elm_table_pack(pd->tb_main, pd->btn_menu, j++, 0, 1, 1);
+   for (int i = j; i < PROC_FIELD_MAX; i++)
+ {
+Field *f = &_fields[i];
+if (!f->enabled)
+  {
+ evas_object_hide(f->btn);
+ continue;
+  }
+pd->field_max = i;
+elm_table_pack(pd->tb_main, f->btn, j++, 0, 1, 1);
+evas_object_show(f->btn);
+ }
+   elm_table_pack(pd->tb_main, pd->glist, 0, 1, j, 1);
+   elm_table_pack(pd->tb_main, pd->summary.fr, 0, 2, j, 1);
+   evas_object_show(pd->summary.fr);
+   elm_genlist_clear(pd->glist);
+   evisum_ui_item_cache_reset(pd->cache, _cache_reset_done_cb, pd);
+}
+
 static void
 _item_unrealized_cb(void *data, Evas_Object *obj EINA_UNUSED,
 void *event_info EINA_UNUSED)
@@ -1109,6 +1125,8 @@ _btn_clicked_state_save(Data *pd, Evas_Object *btn)
  {
 evas_object_del(pd->fields_menu);
 pd->fields_menu = NULL;
+// Postpone field changes until the user dismisses the popup.
+_content_reset(pd);
 return;
  }
_btn_icon_state_update(btn, ui->proc.sort_reverse, 0);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: turn off debug.

2021-03-23 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=9618fb77d79dae6de31eb513e8ef12aaae02ddde

commit 9618fb77d79dae6de31eb513e8ef12aaae02ddde
Author: Alastair Poole 
Date:   Tue Mar 23 11:27:02 2021 +

proclist: turn off debug.
---
 src/bin/ui/ui_process_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index af196e8..bbb3c4c 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1065,7 +1065,7 @@ _process_list_feedback_cb(void *data, Ecore_Thread 
*thread EINA_UNUSED,
eina_list_free(real);
 #endif
 
-#if 1
+#if 0
printf("active %d and inactive %d => %d (realized)\n",
eina_list_count(pd->cache->active),
eina_list_count(pd->cache->inactive), n);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: WCHAN for Open/FreeBSD.

2021-03-20 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=8c2d84560588f71e1a1771905f1a54f90c79b845

commit 8c2d84560588f71e1a1771905f1a54f90c79b845
Author: Alastair Poole 
Date:   Sat Mar 20 10:05:13 2021 +

proclist: WCHAN for Open/FreeBSD.

Don't know of any distribution actually exposing /proc//wchan
reliably.
---
 src/bin/ui/evisum_ui.c   | 3 +++
 src/bin/ui/evisum_ui.h   | 1 +
 src/bin/ui/ui_process_list.c | 7 ++-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/evisum_ui.c b/src/bin/ui/evisum_ui.c
index 1c4a1b2..cdb6786 100644
--- a/src/bin/ui/evisum_ui.c
+++ b/src/bin/ui/evisum_ui.c
@@ -656,6 +656,9 @@ _ui_init_system_probe(Evisum_Ui *ui)
 #if defined(__FreeBSD__)
ui->mem.zfs_mounted = file_system_in_use("ZFS");
 #endif
+#if !defined(__linux__)
+   ui->proc.has_wchan = 1;
+#endif
 }
 
 void
diff --git a/src/bin/ui/evisum_ui.h b/src/bin/ui/evisum_ui.h
index 9d8ebe3..b6bffc1 100644
--- a/src/bin/ui/evisum_ui.h
+++ b/src/bin/ui/evisum_ui.h
@@ -32,6 +32,7 @@ typedef struct _Evisum_Ui
   Eina_Bool restart;
 
   Eina_Bool has_kthreads;
+  Eina_Bool has_wchan;
 
   int   poll_delay;
   int   sort_type;
diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index ed9aa63..af196e8 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -719,9 +719,14 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 
if (_field_enabled(PROC_FIELD_STATE))
  {
+Evisum_Ui *ui = pd->ui;
+
 evas_object_geometry_get(pd->btn_state, NULL, NULL, , NULL);
 lb = evas_object_data_get(it->obj, "state");
-snprintf(buf, sizeof(buf), "%s", proc->state);
+if ((ui->proc.has_wchan) && (proc->state[0] == 's' && proc->state[1] 
== 'l'))
+  snprintf(buf, sizeof(buf), "%s", proc->wchan);
+else
+  snprintf(buf, sizeof(buf), "%s", proc->state);
 if (strcmp(buf, elm_object_text_get(lb)))
   elm_object_text_set(lb, buf);
 _field_adjust(pd, PROC_FIELD_STATE, lb, w);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: oops

2021-03-16 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=b818c13449a4434637ce45f1391e604cbe8dea6e

commit b818c13449a4434637ce45f1391e604cbe8dea6e
Author: Alastair Poole 
Date:   Tue Mar 16 12:41:47 2021 +

proclist: oops
---
 src/bin/ui/ui_process_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index d7aaebb..de8bdc6 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1124,7 +1124,7 @@ _btn_clicked_cb(void *data, Evas_Object *obj,
ui = pd->ui;
 
t = (intptr_t) evas_object_data_get(obj, "type");
-   type = t & PROC_SORT_BY_MAX;
+   type = (t & 0xff);
 
if (ui->proc.sort_type == type)
  ui->proc.sort_reverse = !ui->proc.sort_reverse;

-- 




[EGIT] [apps/evisum] master 01/01: proclist: resize

2021-03-16 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=bdb5b2d2426a47c39784e7cf581bf70ec112adce

commit bdb5b2d2426a47c39784e7cf581bf70ec112adce
Author: Alastair Poole 
Date:   Tue Mar 16 11:52:32 2021 +

proclist: resize
---
 src/bin/ui/ui_process_list.c | 29 +
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index b826d94..d7aaebb 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -409,66 +409,79 @@ _item_create(Evas_Object *obj)
 lb = _item_column_add(tb, "uid", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_PID))
  {
 lb = _item_column_add(tb, "pid", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_THREADS))
  {
 lb = _item_column_add(tb, "thr", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_CPU))
  {
 lb = _item_column_add(tb, "cpu", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_PRI))
  {
 lb = _item_column_add(tb, "prio", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_NICE))
  {
 lb = _item_column_add(tb, "nice", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_FILES))
  {
 lb = _item_column_add(tb, "files", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_SIZE))
  {
 lb = _item_column_add(tb, "size", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_VIRT))
  {
 lb = _item_column_add(tb, "virt", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_RSS))
  {
 lb = _item_column_add(tb, "rss", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_SHARED))
  {
 lb = _item_column_add(tb, "share", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_STATE))
  {
 lb = _item_column_add(tb, "state", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
+
if (_field_enabled(PROC_FIELD_TIME))
  {
 lb = _item_column_add(tb, "time", i++);
 evas_object_size_hint_align_set(lb, 0.5, FILL);
  }
+
if (_field_enabled(PROC_FIELD_CPU_USAGE))
  {
 hbx = elm_box_add(tb);
@@ -565,7 +578,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
evas_object_geometry_get(hbx, NULL, NULL, , NULL);
if (ow > w)
  {
-evas_object_size_hint_min_set(pd->btn_cmd, w, 1);
+evas_object_size_hint_min_set(pd->btn_cmd, ow , 1);
 pd->skip_wait = 1;
  }
rec = evas_object_data_get(lb, "rec");
@@ -593,14 +606,13 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 else
   snprintf(buf, sizeof(buf), "%i", proc->uid);
 if (strcmp(buf, elm_object_text_get(lb)))
+  elm_object_text_set(lb, buf);
+
+evas_object_geometry_get(lb, NULL, NULL, , NULL);
+if (ow > w)
   {
- elm_object_text_set(lb, buf);
- evas_object_geometry_get(lb, NULL, NULL, , NULL);
- if (ow > w)
-   {
-  evas_object_size_hint_min_set(pd->btn_uid, w, 1);
-  pd->skip_wait = 1;
-   }
+ evas_object_size_hint_min_set(pd->btn_uid, ow, 1);
+ pd->skip_wait = 1;
   }
 _field_adjust(pd, PROC_FIELD_UID, lb, w);
  }
@@ -2076,6 +2088,7 @@ ui_process_list_win_add(Evisum_Ui *ui)
  elm_win_center(win, 1, 1);
 
pd->tb_main = tb = _content_add(pd, win);
+   elm_win_resize_object_add(win, tb);
elm_object_content_set(win, tb);
 
pd->cache = evisum_ui_item_cache_new(pd->glist, _item_create, 40);

-- 




[EGIT] [apps/evisum] master 01/01: proclist:

2021-03-15 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=0e2bf85669c8b1310a29195de1feb5295191eac1

commit 0e2bf85669c8b1310a29195de1feb5295191eac1
Author: Alastair Poole 
Date:   Mon Mar 15 12:22:48 2021 +

proclist:
---
 AUTHORS  |  3 ++-
 CREDITS  |  5 
 src/bin/ui/ui_process_list.c | 57 +++-
 3 files changed, 42 insertions(+), 23 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index cdfd4be..01595db 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,4 +1,5 @@
 Alastair Roy Poole 
 
 Icons:
-Apostolos Bartziokas 
+
+See CREDITS file.
diff --git a/CREDITS b/CREDITS
index 843f15a..b95ffd3 100644
--- a/CREDITS
+++ b/CREDITS
@@ -19,6 +19,11 @@ Generic License. See, 
https://creativecommons.org/licenses/by-sa/2.0/.
 An aerial photograph of the city, modified heavily from the original by the
 software author.
 
+# Icons
+
+Mostly from the flat theme by Carsten Haitzler.
+Original icon by Apostolos Bartziokas.
+All public-domain.
 
 # Thanks
 
diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index fcd38ef..b826d94 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -208,10 +208,16 @@ _content_reset(Data *pd)
 static void
 _field_menu_check_changed_cb(void *data, Evas_Object *obj, void *event_info)
 {
-   Field *f = data;
+   Evisum_Ui *ui;
+   Data *pd;
+   Field *f;
+
+   pd = _pd;
+   ui = pd->ui;
+
+   f = data;
f->enabled = !f->enabled;
-   Evisum_Ui *ui = _pd->ui;
-   _content_reset(_pd);
+   _content_reset(pd);
ui->proc.fields ^= (1 << f->id);
 }
 
@@ -336,7 +342,6 @@ _item_column_add(Evas_Object *tb, const char *text, int col)
elm_box_horizontal_set(hbx, 1);
evas_object_size_hint_align_set(hbx, FILL, FILL);
evas_object_size_hint_weight_set(hbx, 1.0, 1.0);
-   evas_object_show(hbx);
 
lb = elm_label_add(tb);
evas_object_data_set(tb, text, lb);
@@ -352,6 +357,7 @@ _item_column_add(Evas_Object *tb, const char *text, int col)
evas_object_data_set(lb, "rec", rec);
elm_table_pack(tb, rec, col, 0, 1, 1);
elm_table_pack(tb, hbx, col, 0, 1, 1);
+   evas_object_show(hbx);
evas_object_show(lb);
 
return lb;
@@ -500,7 +506,7 @@ _run_time_set(char *buf, size_t n, int64_t secs)
 {
int rem;
 
-if (secs < 86400)
+   if (secs < 86400)
  snprintf(buf, n, "%02" PRIi64 ":%02"PRIi64, secs / 60, secs % 60);
else
  {
@@ -512,7 +518,9 @@ _run_time_set(char *buf, size_t n, int64_t secs)
 static void
 _field_adjust(Data *pd, Proc_Field id, Evas_Object *obj, Evas_Coord w)
 {
-   Evas_Object *rec = evas_object_data_get(obj, "rec");
+   Evas_Object *rec;
+
+   rec = evas_object_data_get(obj, "rec");
if (id != pd->field_max)
  evas_object_size_hint_min_set(rec, w, 1);
else
@@ -964,14 +972,14 @@ _process_list(void *data, Ecore_Thread *thread)
Eina_List *list;
Evisum_Ui *ui;
Proc_Info *proc;
-   int i, delay = 1;
+   int delay = 1;
 
pd = data;
ui = pd->ui;
 
while (!ecore_thread_check(thread))
  {
-for (i = 0; i < delay * 8; i++)
+for (int i = 0; i < delay * 8; i++)
   {
  if (ecore_thread_check(thread)) return;
 
@@ -1016,18 +1024,13 @@ _process_list_feedback_cb(void *data, Ecore_Thread 
*thread EINA_UNUSED,
it = elm_genlist_first_item_get(pd->glist);
EINA_LIST_FREE(list, proc)
  {
-if (!it)
-  proc_info_free(proc);
-else
-  {
- Proc_Info *prev = elm_object_item_data_get(it);
- if (prev)
-   proc_info_free(prev);
+Proc_Info *prev = elm_object_item_data_get(it);
+if (prev)
+  proc_info_free(prev);
 
- elm_object_item_data_set(it, proc);
+elm_object_item_data_set(it, proc);
 
- it = elm_genlist_item_next_get(it);
-  }
+it = elm_genlist_item_next_get(it);
  }
 
elm_genlist_realized_items_update(pd->glist);
@@ -1103,11 +1106,13 @@ _btn_clicked_cb(void *data, Evas_Object *obj,
Data *pd;
Evisum_Ui *ui;
Proc_Sort type;
+   int t;
 
pd = data;
ui = pd->ui;
 
-   type = (Proc_Sort) (int *) evas_object_data_get(obj, "type");
+   t = (intptr_t) evas_object_data_get(obj, "type");
+   type = t & PROC_SORT_BY_MAX;
 
if (ui->proc.sort_type == type)
  ui->proc.sort_reverse = !ui->proc.sort_reverse;
@@ -1131,6 +1136,7 @@ _item_menu_start_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 void *event_info EINA_UNUSED)
 {
Data *pd = data;
+
kill(pd->selected_pid, SIGCONT);
 }
 
@@ -1139,6 +1145,7 @@ _item_menu_stop_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
void *event_info EINA_UNUSED)
 {
Data *pd = data;
+
kill(pd->selected_pid, SIGSTOP);
 }
 
@@ -1147,6 +1154,7 @@ _item_menu_kill_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
void *event_info EINA_UNUSED)
 {
Data *pd = data;
+

[EGIT] [apps/evisum] master 01/01: proclist: padding.

2021-03-15 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=a27aba5966a3ad1ee97cfea090d22495d4ed7bcf

commit a27aba5966a3ad1ee97cfea090d22495d4ed7bcf
Author: Alastair Poole 
Date:   Mon Mar 15 10:24:04 2021 +

proclist: padding.
---
 src/bin/system/machine/sensors.bogox |  5 -
 src/bin/ui/ui_process_list.c | 31 +++
 2 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/src/bin/system/machine/sensors.bogox 
b/src/bin/system/machine/sensors.bogox
index c80afeb..c4d76db 100644
--- a/src/bin/system/machine/sensors.bogox
+++ b/src/bin/system/machine/sensors.bogox
@@ -89,7 +89,8 @@ system_sensors_thermal_get(int *sensor_count)
size_t slen = sizeof(struct sensor);
size_t sdlen = sizeof(struct sensordev);
 
-   for (devn = 0;; devn++) {
+   for (devn = 0;; devn++)
+  {
 mibs[2] = devn;
 
 if (sysctl(mibs, 3, , , NULL, 0) == -1)
@@ -264,6 +265,8 @@ _power_battery_count_get(power_t *power)
  power->batteries = t;
  power->batteries[i] = calloc(1, sizeof(bat_t));
  power->batteries[i]->name = strdup(snsrdev.xname);
+ power->batteries[i]->model = strdup("Unknown");
+ power->batteries[i]->vendor = strdup("Unknown");
  power->batteries[i]->present = true;
  power->batteries[i]->mibs[0] = mibs[0];
  power->batteries[i]->mibs[1] = mibs[1];
diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index c39c98d..5be81d1 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -330,17 +330,28 @@ _item_del(void *data, Evas_Object *obj EINA_UNUSED)
 static Evas_Object *
 _item_column_add(Evas_Object *tb, const char *text, int col)
 {
-   Evas_Object *rec, *lb;
+   Evas_Object *hbx, *rec, *lb;
+
+   hbx = elm_box_add(tb);
+   elm_box_horizontal_set(hbx, 1);
+   evas_object_size_hint_align_set(hbx, FILL, FILL);
+   evas_object_size_hint_weight_set(hbx, 1.0, 1.0);
+   evas_object_show(hbx);
 
lb = elm_label_add(tb);
evas_object_data_set(tb, text, lb);
evas_object_size_hint_align_set(lb, FILL, FILL);
evas_object_size_hint_weight_set(lb, EXPAND, EXPAND);
+   elm_box_pack_end(hbx, lb);
+
rec = evas_object_rectangle_add(evas_object_evas_get(tb));
-   evas_object_data_set(lb, "rec", rec);
+   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(2), 1);
+   elm_box_pack_end(hbx, rec);
 
+   rec = evas_object_rectangle_add(evas_object_evas_get(tb));
+   evas_object_data_set(lb, "rec", rec);
elm_table_pack(tb, rec, col, 0, 1, 1);
-   elm_table_pack(tb, lb, col, 0, 1, 1);
+   elm_table_pack(tb, hbx, col, 0, 1, 1);
evas_object_show(lb);
 
return lb;
@@ -454,14 +465,26 @@ _item_create(Evas_Object *obj)
  }
if (_field_enabled(PROC_FIELD_CPU_USAGE))
  {
+hbx = elm_box_add(tb);
+elm_box_horizontal_set(hbx, 1);
+evas_object_size_hint_weight_set(hbx, 1.0, 1.0);
+evas_object_size_hint_align_set(hbx, FILL, FILL);
+
 rec = evas_object_rectangle_add(evas_object_evas_get(tb));
+evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(2), 1);
+elm_box_pack_end(hbx, rec);
+
 pb = elm_progressbar_add(hbx);
 evas_object_size_hint_weight_set(pb, 0, EXPAND);
 evas_object_size_hint_align_set(pb, FILL, FILL);
 elm_progressbar_unit_format_set(pb, "%1.1f %%");
+elm_box_pack_end(hbx, pb);
+evas_object_show(hbx);
+
+rec = evas_object_rectangle_add(evas_object_evas_get(tb));
 evas_object_data_set(pb, "rec", rec);
 elm_table_pack(tb, rec, i, 0, 1, 1);
-elm_table_pack(tb, pb, i++, 0, 1, 1);
+elm_table_pack(tb, hbx, i++, 0, 1, 1);
 evas_object_data_set(tb, "cpu_u", pb);
  }
 

-- 




[EGIT] [apps/evisum] master 01/01: proclist: purge.

2021-03-14 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=ca0f3e8de9efb30d27318b918c56cdd94cc0654b

commit ca0f3e8de9efb30d27318b918c56cdd94cc0654b
Author: Alastair Poole 
Date:   Mon Mar 15 00:07:42 2021 +

proclist: purge.

Why not..
---
 src/bin/ui/ui_process_list.c | 53 +++-
 1 file changed, 18 insertions(+), 35 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 7e82518..c39c98d 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -26,7 +26,7 @@ typedef struct
 {
Ecore_Thread  *thread;
Evisum_Ui_Cache   *cache;
-   Ecore_Event_Handler   *handler[2];
+   Ecore_Event_Handler   *handler;
Eina_Hash *cpu_times;
Eina_Bool  skip_wait;
Sorter sorters[PROC_SORT_BY_MAX];
@@ -175,9 +175,6 @@ _cache_reset_done_cb(void *data)
  ecore_timer_reset(pd->fields_timer);
else
  pd->fields_timer = ecore_timer_add(1.0, _fields_update_timer_cb, pd);
-#if 0
-   puts("DONE");
-#endif
 }
 
 // Updating fields is a heavy exercise. We both offset the
@@ -1405,8 +1402,7 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_CMD);
elm_object_text_set(btn, _("command"));
evas_object_show(btn);
-   evas_object_smart_callback_add(btn, "clicked",
-  _btn_clicked_cb, pd);
+   evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_CMD].btn = btn;
 
pd->btn_uid = btn = elm_button_add(parent);
@@ -1419,8 +1415,7 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_UID);
elm_object_text_set(btn, _("user"));
evas_object_show(btn);
-   evas_object_smart_callback_add(btn, "clicked",
-  _btn_clicked_cb, pd);
+   evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_UID].btn = btn;
 
pd->btn_pid = btn = elm_button_add(parent);
@@ -1433,8 +1428,7 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_PID);
elm_object_text_set(btn, _("pid"));
evas_object_show(btn);
-   evas_object_smart_callback_add(btn, "clicked",
-  _btn_clicked_cb, pd);
+   evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_PID].btn = btn;
 
pd->btn_threads = btn = elm_button_add(parent);
@@ -1447,8 +1441,7 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_THREADS);
elm_object_text_set(btn, _("thr"));
evas_object_show(btn);
-   evas_object_smart_callback_add(btn, "clicked",
-  _btn_clicked_cb, pd);
+   evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_THREADS].btn = btn;
 
pd->btn_cpu = btn = elm_button_add(parent);
@@ -1461,8 +1454,7 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_CPU);
elm_object_text_set(btn, _("cpu"));
evas_object_show(btn);
-   evas_object_smart_callback_add(btn, "clicked",
-  _btn_clicked_cb, pd);
+   evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_CPU].btn = btn;
 
pd->btn_pri = btn = elm_button_add(parent);
@@ -1475,8 +1467,7 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_PRI);
elm_object_text_set(btn, _("prio"));
evas_object_show(btn);
-   evas_object_smart_callback_add(btn, "clicked",
-  _btn_clicked_cb, pd);
+   evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_PRI].btn = btn;
 
pd->btn_nice = btn = elm_button_add(parent);
@@ -1503,8 +1494,7 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_FILES);
elm_object_text_set(btn, _("files"));
evas_object_show(btn);
-   evas_object_smart_callback_add(btn, "clicked",
-  _btn_clicked_cb, pd);
+   evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_FILES].btn = btn;
 
pd->btn_size = btn = elm_button_add(parent);
@@ -1517,8 +1507,7 @@ _content_add(Data *pd, Evas_Object *parent)
evas_object_data_set(btn, "type", (void *) (int) PROC_SORT_BY_SIZE);
elm_object_text_set(btn, _("size"));
evas_object_show(btn);
-   evas_object_smart_callback_add(btn, "clicked",
-  _btn_clicked_cb, pd);
+   evas_object_smart_callback_add(btn, "clicked", _btn_clicked_cb, pd);
_fields[PROC_FIELD_SIZE].btn = btn;
 
pd->btn_virt = btn = 

[EGIT] [apps/evisum] master 01/01: proclist: name

2021-03-14 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=158cbd390bed938895f80861d12ff16b7bd1ee87

commit 158cbd390bed938895f80861d12ff16b7bd1ee87
Author: Alastair Poole 
Date:   Sun Mar 14 22:36:50 2021 +

proclist: name
---
 src/bin/ui/ui_process_list.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index b3bbecc..7e82518 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -51,7 +51,7 @@ typedef struct
   double  keytime;
} search;
 
-   Evas_Object   *tb_content;
+   Evas_Object   *tb_main;
 
Evas_Object   *glist;
Elm_Genlist_Item_Class itc;
@@ -187,8 +187,8 @@ static void
 _content_reset(Data *pd)
 {
int j = 0;
-   elm_table_clear(pd->tb_content, 0);
-   elm_table_pack(pd->tb_content, pd->btn_menu, j++, 0, 1, 1);
+   elm_table_clear(pd->tb_main, 0);
+   elm_table_pack(pd->tb_main, pd->btn_menu, j++, 0, 1, 1);
for (int i = j; i < PROC_FIELD_MAX; i++)
  {
 Field *f = &_fields[i];
@@ -198,11 +198,11 @@ _content_reset(Data *pd)
  continue;
   }
 pd->field_max = i;
+elm_table_pack(pd->tb_main, f->btn, j++, 0, 1, 1);
 evas_object_show(f->btn);
-elm_table_pack(pd->tb_content, f->btn, j++, 0, 1, 1);
  }
-   elm_table_pack(pd->tb_content, pd->glist, 0, 1, j, 1);
-   elm_table_pack(pd->tb_content, pd->summary.fr, 0, 2, j, 1);
+   elm_table_pack(pd->tb_main, pd->glist, 0, 1, j, 1);
+   elm_table_pack(pd->tb_main, pd->summary.fr, 0, 2, j, 1);
evas_object_show(pd->summary.fr);
elm_genlist_clear(pd->glist);
evisum_ui_item_cache_reset(pd->cache, _cache_reset_done_cb, pd);
@@ -1870,12 +1870,12 @@ _win_alpha_set(Data *pd)
 r = b = g = 128; a = 255;
 evas_object_color_set(bg, r * fade, g * fade, b * fade, fade * a);
 r = b = g = a = 255;
-evas_object_color_set(pd->tb_content, r * fade, g * fade, b * fade, 
fade * a);
+evas_object_color_set(pd->tb_main, r * fade, g * fade, b * fade, fade 
* a);
  }
else
  {
 r = b = g = a = 255;
-evas_object_color_set(pd->tb_content, r, g, b, a);
+evas_object_color_set(pd->tb_main, r, g, b, a);
 r = b = g = 128;  a = 255;
 evas_object_color_set(bg, r, g, b, a);
  }
@@ -2052,7 +2052,7 @@ ui_process_list_win_add(Evisum_Ui *ui)
else
  elm_win_center(win, 1, 1);
 
-   pd->tb_content = tb = _content_add(pd, win);
+   pd->tb_main = tb = _content_add(pd, win);
elm_object_content_set(win, tb);
 
pd->cache = evisum_ui_item_cache_new(pd->glist, _item_create, 40);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: dont need these.

2021-03-14 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=e191a55b04ae8885a3e1490a47c341b67f8d6382

commit e191a55b04ae8885a3e1490a47c341b67f8d6382
Author: Alastair Poole 
Date:   Sun Mar 14 22:16:40 2021 +

proclist: dont need these.
---
 src/bin/ui/ui_process_list.c | 243 ---
 1 file changed, 41 insertions(+), 202 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 3a16e96..b3bbecc 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1073,198 +1073,22 @@ _btn_clicked_state_save(Data *pd, Evas_Object *btn)
 }
 
 static void
-_btn_cmd_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
-{
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_CMD)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_CMD;
-   _btn_clicked_state_save(pd, pd->btn_cmd);
-}
-
-static void
-_btn_uid_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
-{
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_UID)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_UID;
-   _btn_clicked_state_save(pd, pd->btn_uid);
-}
-
-static void
-_btn_pid_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
-{
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_PID)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_PID;
-   _btn_clicked_state_save(pd, pd->btn_pid);
-}
-
-static void
-_btn_threads_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
-{
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_THREADS)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_THREADS;
-   _btn_clicked_state_save(pd, pd->btn_threads);
-}
-
-static void
-_btn_cpu_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
-{
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_CPU)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_CPU;
-   _btn_clicked_state_save(pd, pd->btn_cpu);
-}
-
-static void
-_btn_pri_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
-{
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_PRI)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_PRI;
-   _btn_clicked_state_save(pd, pd->btn_pri);
-}
-
-static void
-_btn_nice_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
- void *event_info EINA_UNUSED)
-{
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_NICE)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_NICE;
-   _btn_clicked_state_save(pd, pd->btn_nice);
-}
-
-static void
-_btn_files_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
-  void *event_info EINA_UNUSED)
-{
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_FILES)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_FILES;
-   _btn_clicked_state_save(pd, pd->btn_files);
-}
-
-static void
-_btn_size_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
- void *event_info EINA_UNUSED)
+_btn_clicked_cb(void *data, Evas_Object *obj,
+void *event_info EINA_UNUSED)
 {
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_SIZE)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_SIZE;
-   _btn_clicked_state_save(pd, pd->btn_size);
-}
-
-static void
-_btn_virt_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
- void *event_info EINA_UNUSED)
-{
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_VIRT)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_VIRT;
-   _btn_clicked_state_save(pd, pd->btn_virt);
-}
-
-static void
-_btn_rss_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
-{
-   Data *pd = data;
-   Evisum_Ui *ui = pd->ui;
-
-   if (ui->proc.sort_type == PROC_SORT_BY_RSS)
- ui->proc.sort_reverse = !ui->proc.sort_reverse;
-   ui->proc.sort_type = PROC_SORT_BY_RSS;
-   _btn_clicked_state_save(pd, pd->btn_rss);
-}
-
-static void

[EGIT] [apps/evisum] master 01/01: proclist: ..

2021-03-14 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=a725bed237e036886b15ec179a3959b3a4a8f05f

commit a725bed237e036886b15ec179a3959b3a4a8f05f
Author: Alastair Poole 
Date:   Sun Mar 14 17:15:20 2021 +

proclist: ..
---
 src/bin/ui/ui_process_list.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 67e8de9..3a16e96 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -865,9 +865,8 @@ _process_ignore(Data *pd, Proc_Info *proc)
 
if (!pd->search.len) return 0;
 
-   if (strncasecmp(proc->command, pd->search.text, pd->search.len))
- return 1;
-   if (!strstr(proc->command, pd->search.text))
+   if ((strncasecmp(proc->command, pd->search.text, pd->search.len)) &&
+   (!strstr(proc->command, pd->search.text)))
  return 1;
 
return 0;

-- 




[EGIT] [apps/evisum] master 01/01: proclist: field update smoother yet.

2021-03-14 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=fac8b328e1b96912a32ff6ec150bc53b9352c43b

commit fac8b328e1b96912a32ff6ec150bc53b9352c43b
Author: Alastair Poole 
Date:   Sun Mar 14 09:31:17 2021 +

proclist: field update smoother yet.
---
 src/bin/ui/ui_process_list.c | 21 -
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 08dd5ec..0120ab6 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -75,6 +75,7 @@ typedef struct
 
Proc_Field  field_max;
Evas_Object*fields_menu;
+   Ecore_Timer*fields_timer;
 
struct
{
@@ -154,16 +155,34 @@ _field_enabled(Proc_Field id)
return _fields[id].enabled;
 }
 
+static Eina_Bool
+_fields_update_timer_cb(void *data)
+{
+   Data *pd = data;
+
+   pd->skip_wait = 1;
+   pd->fields_timer = NULL;
+
+   return 0;
+}
+
 static void
 _cache_reset_done_cb(void *data)
 {
Data *pd = data;
-   pd->skip_wait = 1;
+
+   if (pd->fields_timer)
+ ecore_timer_reset(pd->fields_timer);
+   else
+ pd->fields_timer = ecore_timer_add(1.0, _fields_update_timer_cb, pd);
 #if 0
puts("DONE");
 #endif
 }
 
+// Updating fields is a heavy exercise. We both offset the
+// cache clearing and delay the initial update for a better
+// experience.
 static void
 _content_reset(Data *pd)
 {

-- 




[EGIT] [apps/evisum] master 01/01: proclist: dont fight the theme

2021-03-13 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=0a8b5f503d91b5af7813bb43420c606acfb2d3aa

commit 0a8b5f503d91b5af7813bb43420c606acfb2d3aa
Author: Alastair Poole 
Date:   Sat Mar 13 18:10:43 2021 +

proclist:  dont fight the theme
---
 src/bin/ui/ui_process_list.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 5b1f216..08dd5ec 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -167,12 +167,8 @@ _cache_reset_done_cb(void *data)
 static void
 _content_reset(Data *pd)
 {
-   Evas_Object *rec;
int j = 0;
elm_table_clear(pd->tb_content, 0);
-   rec = evas_object_rectangle_add(evas_object_evas_get(pd->win));
-   evas_object_size_hint_min_set(rec, 1, ELM_SCALE_SIZE(BTN_HEIGHT));
-   elm_table_pack(pd->tb_content, rec, j, 0, 1, 1);
elm_table_pack(pd->tb_content, pd->btn_menu, j++, 0, 1, 1);
for (int i = j; i < PROC_FIELD_MAX; i++)
  {
@@ -210,13 +206,13 @@ _field_menu_create(Data *pd, Evas_Object *parent)
 
fr = elm_frame_add(parent);
elm_object_style_set(fr, "pad_small");
-   evas_object_show(fr);
 
bx = elm_box_add(parent);
evas_object_size_hint_weight_set(bx, EXPAND, EXPAND);
evas_object_size_hint_align_set(bx, FILL, FILL);
evas_object_show(bx);
elm_object_content_set(fr, bx);
+   evas_object_show(fr);
 
for (int i = PROC_FIELD_UID; i < PROC_FIELD_MAX; i++)
  {
@@ -227,8 +223,8 @@ _field_menu_create(Data *pd, Evas_Object *parent)
 elm_check_state_set(ck, _fields[i].enabled);
 evas_object_smart_callback_add(ck, "changed",
_field_menu_check_changed_cb, 
&_fields[i]);
-evas_object_show(ck);
 elm_box_pack_end(bx, ck);
+evas_object_show(ck);
  }
 
o = elm_ctxpopup_add(parent);
@@ -946,7 +942,9 @@ _process_list(void *data, Ecore_Thread *thread)
   }
 list = _process_list_get(pd);
 if (!pd->skip_wait)
-  ecore_thread_feedback(thread, list);
+  {
+ ecore_thread_feedback(thread, list);
+  }
 else
   {
  EINA_LIST_FREE(list, proc)

-- 




[EGIT] [apps/evisum] master 01/01: proclist: key names were too long.

2021-03-12 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=01718b1cdfb911e9e2c75cf80d245ebf1905d1cd

commit 01718b1cdfb911e9e2c75cf80d245ebf1905d1cd
Author: Alastair Poole 
Date:   Sat Mar 13 05:33:23 2021 +

proclist: key names were too long.
---
 src/bin/ui/ui_process_list.c | 60 ++--
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 9a39e8b..7fceb03 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -361,74 +361,74 @@ _item_create(Evas_Object *obj)
 
lb = elm_label_add(tb);
evas_object_size_hint_weight_set(lb, 0, EXPAND);
-   evas_object_data_set(tb, "proc_cmd", lb);
+   evas_object_data_set(tb, "cmd", lb);
evas_object_data_set(lb, "hbx", hbx);
elm_box_pack_end(hbx, lb);
evas_object_show(lb);
 
if (_field_enabled(PROC_FIELD_UID))
  {
-lb = _item_column_add(tb, "proc_uid", i++);
+lb = _item_column_add(tb, "uid", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_PID))
  {
-lb = _item_column_add(tb, "proc_pid", i++);
+lb = _item_column_add(tb, "pid", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_THREADS))
  {
-lb = _item_column_add(tb, "proc_threads", i++);
+lb = _item_column_add(tb, "thr", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_CPU))
  {
-lb = _item_column_add(tb, "proc_cpu", i++);
+lb = _item_column_add(tb, "cpu", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_PRI))
  {
-lb = _item_column_add(tb, "proc_prio", i++);
+lb = _item_column_add(tb, "prio", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_NICE))
  {
-lb = _item_column_add(tb, "proc_nice", i++);
+lb = _item_column_add(tb, "nice", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_FILES))
  {
-lb = _item_column_add(tb, "proc_files", i++);
+lb = _item_column_add(tb, "files", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_SIZE))
  {
-lb = _item_column_add(tb, "proc_size", i++);
+lb = _item_column_add(tb, "size", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_VIRT))
  {
-lb = _item_column_add(tb, "proc_virt", i++);
+lb = _item_column_add(tb, "virt", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_RSS))
  {
-lb = _item_column_add(tb, "proc_rss", i++);
+lb = _item_column_add(tb, "rss", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_SHARED))
  {
-lb = _item_column_add(tb, "proc_shared", i++);
+lb = _item_column_add(tb, "share", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_STATE))
  {
-lb = _item_column_add(tb, "proc_state", i++);
+lb = _item_column_add(tb, "state", i++);
 evas_object_size_hint_align_set(lb, 1.0, FILL);
  }
if (_field_enabled(PROC_FIELD_TIME))
  {
-lb = _item_column_add(tb, "proc_time", i++);
+lb = _item_column_add(tb, "time", i++);
 evas_object_size_hint_align_set(lb, 0.5, FILL);
  }
if (_field_enabled(PROC_FIELD_CPU_USAGE))
@@ -441,7 +441,7 @@ _item_create(Evas_Object *obj)
 evas_object_data_set(pb, "rec", rec);
 elm_table_pack(tb, rec, i, 0, 1, 1);
 elm_table_pack(tb, pb, i++, 0, 1, 1);
-evas_object_data_set(tb, "proc_cpu_usage", pb);
+evas_object_data_set(tb, "cpu_u", pb);
  }
 
return tb;
@@ -501,7 +501,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
evas_object_geometry_get(pd->btn_menu, NULL, NULL, , NULL);
evas_object_geometry_get(pd->btn_cmd, NULL, NULL, , NULL);
w += (ow - 8);
-   lb = evas_object_data_get(it->obj, "proc_cmd");
+   lb = evas_object_data_get(it->obj, "cmd");
snprintf(buf, sizeof(buf), "%s", proc->command);
if (strcmp(buf, elm_object_text_get(lb)))
  elm_object_text_set(lb, buf);
@@ -530,7 +530,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
if (_field_enabled(PROC_FIELD_UID))
  {
 evas_object_geometry_get(pd->btn_uid, NULL, NULL, , NULL);
-lb = evas_object_data_get(it->obj, "proc_uid");
+lb = evas_object_data_get(it->obj, "uid");
 pwd_entry = getpwuid(proc->uid);
 if (pwd_entry)
   snprintf(buf, sizeof(buf), "%s", 

[EGIT] [apps/evisum] master 01/01: proclist: make it readable

2021-03-12 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=3b31cd43901e9b56be578929ed691e8bda681487

commit 3b31cd43901e9b56be578929ed691e8bda681487
Author: Alastair Poole 
Date:   Sat Mar 13 04:57:01 2021 +

proclist: make it readable
---
 src/bin/ui/ui_process_list.c | 26 +++---
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 18cc66f..9a39e8b 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -89,7 +89,7 @@ typedef struct
   int  zombie;
   int  dsleep;
} summary;
- 
+
Elm_Layout *indicator;
Evisum_Ui  *ui;
 
@@ -832,22 +832,34 @@ _cpu_times_free_cb(void *data)
free(cpu_time);
 }
 
+static Eina_Bool
+_process_ignore(Data *pd, Proc_Info *proc)
+{
+   Evisum_Ui *ui = pd->ui;
+
+   if (proc->pid == ui->program_pid) return 1;
+
+   if (!pd->search.len) return 0;
+
+   if (strncasecmp(proc->command, pd->search.text, pd->search.len))
+ return 1;
+   if (!strstr(proc->command, pd->search.text))
+ return 1;
+
+   return 0;
+}
+
 static Eina_List *
 _process_list_search_trim(Eina_List *list, Data *pd)
 {
Eina_List *l, *l_next;
Proc_Info *proc;
-   Evisum_Ui *ui = pd->ui;
 
_summary_reset(pd);
 
EINA_LIST_FOREACH_SAFE(list, l, l_next, proc)
  {
-if ((proc->pid == ui->program_pid) ||
-((pd->search.len) &&
- (strncasecmp(proc->command, pd->search.text, pd->search.len) &&
- (!strstr(proc->command, pd->search.text
-   )
+   if (_process_ignore(pd, proc))
  {
 proc_info_free(proc);
 list = eina_list_remove_list(list, l);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: Enough.

2021-03-12 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=1e43ce3888c2a13fd474d60b83b35dea5898b61e

commit 1e43ce3888c2a13fd474d60b83b35dea5898b61e
Author: Alastair Poole 
Date:   Fri Mar 12 21:44:34 2021 +

proclist: Enough.
---
 src/bin/ui/ui_process_list.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 0bade60..18cc66f 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1968,7 +1968,8 @@ _win_resize_cb(void *data, Evas *e, Evas_Object *obj, 
void *event_info)
 >proc.width, >proc.height);
 
if (!evisum_ui_effects_enabled_get(ui)) return;
-   evas_object_move(pd->indicator, ui->proc.width - 32, ui->proc.height - 32);
+   evas_object_move(pd->indicator, ui->proc.width - ELM_SCALE_SIZE(32),
+ui->proc.height - ELM_SCALE_SIZE(32));
evas_object_show(pd->indicator);
 }
 

-- 




[EGIT] [apps/evisum] master 01/01: proclist: save

2021-03-10 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=8161fac2bf620c4bd1ba71b15a1a13a3a8e66784

commit 8161fac2bf620c4bd1ba71b15a1a13a3a8e66784
Author: Alastair Poole 
Date:   Wed Mar 10 18:00:35 2021 +

proclist: save
---
 src/bin/ui/ui_process_list.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 8a76dcd..ac8c61f 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -2057,6 +2057,8 @@ _win_del_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
 
ui = pd->ui;
 
+   evisum_ui_config_save(ui);
+
if (pd->search.timer)
  ecore_timer_del(pd->search.timer);
 

-- 




[EGIT] [apps/evisum] master 01/01: proclist: delayed del.

2021-03-03 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=eca697853df17896c2f17cba9c90d904abc08734

commit eca697853df17896c2f17cba9c90d904abc08734
Author: Alastair Poole 
Date:   Wed Mar 3 16:43:06 2021 +

proclist: delayed del.
---
 src/bin/ui/ui_cache.c| 30 ++
 src/bin/ui/ui_cache.h|  5 +
 src/bin/ui/ui_process_list.c |  4 +++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_cache.c b/src/bin/ui/ui_cache.c
index 4d2bd80..170709e 100644
--- a/src/bin/ui/ui_cache.c
+++ b/src/bin/ui/ui_cache.c
@@ -11,6 +11,8 @@ evisum_ui_item_cache_new(Evas_Object *parent,
cache->item_create_cb = create_cb;
cache->inactive = cache->active = NULL;
cache->size = size;
+   cache->pending = NULL;
+   cache->pending_timer = NULL;
 
for (int i = 0; i < size; i++)
  {
@@ -61,6 +63,23 @@ evisum_ui_item_cache_steal(Evisum_Ui_Cache *cache, Eina_List 
*objs)
  }
 }
 
+static Eina_Bool
+_pending_triggered_cb(void *data)
+{
+
+   Eina_List *l, *l_next;
+   Evas_Object *o;
+   Evisum_Ui_Cache *cache = data;
+
+   EINA_LIST_FOREACH_SAFE(cache->pending, l, l_next, o)
+ {
+cache->pending = eina_list_remove_list(cache->pending, l);
+evas_object_del(o);
+ }
+   cache->pending_timer = NULL;
+   return 0;
+}
+
 Item_Cache *
 evisum_ui_item_cache_item_get(Evisum_Ui_Cache *cache)
 {
@@ -91,10 +110,12 @@ evisum_ui_item_cache_reset(Evisum_Ui_Cache *cache)
 
EINA_LIST_FREE(cache->active, it)
  {
+cache->pending = eina_list_append(cache->pending, it->obj);
 free(it);
  }
EINA_LIST_FREE(cache->inactive, it)
  {
+cache->pending = eina_list_append(cache->pending, it->obj);
 free(it);
  }
for (int i = 0; i < cache->size; i++)
@@ -108,6 +129,13 @@ evisum_ui_item_cache_reset(Evisum_Ui_Cache *cache)
  }
 }
 
+void
+evisum_ui_item_cache_pending_del(Evisum_Ui_Cache *cache)
+{
+   if (!cache->pending_timer)
+ cache->pending_timer = ecore_timer_add(0.5, _pending_triggered_cb, cache);
+}
+
 Eina_Bool
 evisum_ui_item_cache_item_release(Evisum_Ui_Cache *cache, Evas_Object *obj)
 {
@@ -153,5 +181,7 @@ evisum_ui_item_cache_free(Evisum_Ui_Cache *cache)
  free(it);
EINA_LIST_FREE(cache->inactive, it)
  free(it);
+   eina_list_free(cache->pending);
+
free(cache);
 }
diff --git a/src/bin/ui/ui_cache.h b/src/bin/ui/ui_cache.h
index 5d595c2..2bdcc0d 100644
--- a/src/bin/ui/ui_cache.h
+++ b/src/bin/ui/ui_cache.h
@@ -3,6 +3,7 @@
 
 #include 
 #include 
+#include 
 
 typedef struct _Evisum_Ui_Cache {
Eina_List   *inactive;
@@ -10,6 +11,8 @@ typedef struct _Evisum_Ui_Cache {
Evas_Object *parent;
Evas_Object *(*item_create_cb)(Evas_Object *);
int  size;
+   Ecore_Timer *pending_timer;
+   Eina_List   *pending;
 } Evisum_Ui_Cache;
 
 typedef struct _Item_Cache {
@@ -34,5 +37,7 @@ evisum_ui_item_cache_reset(Evisum_Ui_Cache *cache);
 void
 evisum_ui_item_cache_steal(Evisum_Ui_Cache *cache, Eina_List *objs);
 
+void
+evisum_ui_item_cache_pending_del(Evisum_Ui_Cache *cache);
 
 #endif
diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 8639870..fc4fb4e 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -176,9 +176,9 @@ _content_reset(Ui_Data *pd)
  }
elm_table_pack(pd->tb_content, pd->glist, 0, 1, j, 1);
elm_table_pack(pd->tb_content, pd->summary.fr, 0, 2, j, 1);
+   elm_genlist_clear(pd->glist);
if (pd->cache)
  evisum_ui_item_cache_reset(pd->cache);
-   elm_genlist_clear(pd->glist);
 }
 
 static void
@@ -991,6 +991,7 @@ _process_list_feedback_cb(void *data, Ecore_Thread *thread 
EINA_UNUSED,
if (!pd->poll_count)
  ecore_timer_add(1.0, _bring_in, pd);
pd->poll_count++;
+
 }
 
 static void
@@ -1020,6 +1021,7 @@ _btn_clicked_state_save(Ui_Data *pd, Evas_Object *btn)
 
if (pd->fields_menu)
  {
+evisum_ui_item_cache_pending_del(pd->cache);
 evas_object_del(pd->fields_menu);
 pd->fields_menu = NULL;
 return;

-- 




[EGIT] [apps/evisum] master 01/01: proclist: deal with the phat scroller.

2021-03-03 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=0cc32d24f01535e1b7b675b70be869cd7ba5265e

commit 0cc32d24f01535e1b7b675b70be869cd7ba5265e
Author: Alastair Poole 
Date:   Wed Mar 3 13:48:30 2021 +

proclist: deal with the phat scroller.
---
 src/bin/ui/ui_process_list.c | 78 +++-
 1 file changed, 34 insertions(+), 44 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 6dc2c8f..8639870 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -75,6 +75,7 @@ typedef struct
Evas_Object*btn_time;
Evas_Object*btn_cpu_usage;
 
+   Proc_Field  field_max;
Evas_Object*fields_menu;
 
struct
@@ -169,6 +170,7 @@ _content_reset(Ui_Data *pd)
  evas_object_hide(f->btn);
  continue;
   }
+pd->field_max = i;
 evas_object_show(f->btn);
 elm_table_pack(pd->tb_content, f->btn, j++, 0, 1, 1);
  }
@@ -449,7 +451,7 @@ _run_time_set(char *buf, size_t n, int64_t secs)
 {
int rem;
 
-   if (secs < 86400)
+if (secs < 86400)
  snprintf(buf, n, "%02" PRIi64 ":%02"PRIi64, secs / 60, secs % 60);
else
  {
@@ -458,6 +460,21 @@ _run_time_set(char *buf, size_t n, int64_t secs)
  }
 }
 
+static void
+_field_adjust(Ui_Data *pd, Proc_Field id, Evas_Object *obj, Evas_Coord w)
+{
+   Evas_Object *rec = evas_object_data_get(obj, "rec");
+   if (id != pd->field_max)
+ evas_object_size_hint_min_set(rec, w, 1);
+   else
+ {
+evas_object_size_hint_min_set(rec, 1, 1);
+evas_object_size_hint_weight_set(rec, EXPAND, EXPAND);
+evas_object_size_hint_weight_set(obj, EXPAND, EXPAND);
+ }
+   evas_object_show(obj);
+}
+
 static Evas_Object *
 _content_get(void *data, Evas_Object *obj, const char *source)
 {
@@ -499,11 +516,11 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
evas_object_show(lb);
elm_box_recalculate(hbx);
 
-   o = evas_object_data_get(it->obj, "icon");
const char *new = evisum_icon_path_get(evisum_icon_cache_find(proc));
const char *old = NULL;
+   o = evas_object_data_get(it->obj, "icon");
elm_image_file_get(o, , NULL);
-   if (!old || strcmp(old, new))
+   if ((!old) || (strcmp(old, new)))
  elm_icon_standard_set(o, new);
rec = evas_object_data_get(o, "rec");
evas_object_size_hint_min_set(rec, w, 1);
@@ -528,9 +545,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
   pd->skip_wait = 1;
}
   }
-rec = evas_object_data_get(lb, "rec");
-evas_object_size_hint_min_set(rec, w, 1);
-evas_object_show(lb);
+_field_adjust(pd, PROC_FIELD_UID, lb, w);
  }
 
if (_field_enabled(PROC_FIELD_PID))
@@ -540,9 +555,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 snprintf(buf, sizeof(buf), "%d", proc->pid);
 if (strcmp(buf, elm_object_text_get(lb)))
   elm_object_text_set(lb, buf);
-rec = evas_object_data_get(lb, "rec");
-evas_object_size_hint_min_set(rec, w, 1);
-evas_object_show(lb);
+_field_adjust(pd, PROC_FIELD_PID, lb, w);
  }
 
if (_field_enabled(PROC_FIELD_THREADS))
@@ -552,9 +565,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 snprintf(buf, sizeof(buf), "%d", proc->numthreads);
 if (strcmp(buf, elm_object_text_get(lb)))
   elm_object_text_set(lb, buf);
-rec = evas_object_data_get(lb, "rec");
-evas_object_size_hint_min_set(rec, w, 1);
-evas_object_show(lb);
+_field_adjust(pd, PROC_FIELD_THREADS, lb, w);
  }
 
if (_field_enabled(PROC_FIELD_CPU))
@@ -564,9 +575,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 snprintf(buf, sizeof(buf), "%d", proc->cpu_id);
 if (strcmp(buf, elm_object_text_get(lb)))
   elm_object_text_set(lb, buf);
-rec = evas_object_data_get(lb, "rec");
-evas_object_size_hint_min_set(rec, w, 1);
-evas_object_show(lb);
+_field_adjust(pd, PROC_FIELD_CPU, lb, w);
  }
 
if (_field_enabled(PROC_FIELD_PRI))
@@ -576,9 +585,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 snprintf(buf, sizeof(buf), "%d", proc->priority);
 if (strcmp(buf, elm_object_text_get(lb)))
   elm_object_text_set(lb, buf);
-rec = evas_object_data_get(lb, "rec");
-evas_object_size_hint_min_set(rec, w, 1);
-evas_object_show(lb);
+_field_adjust(pd, PROC_FIELD_PRI, lb, w);
  }
 
if (_field_enabled(PROC_FIELD_NICE))
@@ -588,9 +595,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 snprintf(buf, sizeof(buf), "%d", proc->nice);
 if (strcmp(buf, elm_object_text_get(lb)))
   elm_object_text_set(lb, buf);
-rec = 

[EGIT] [apps/evisum] master 01/01: proclist: fields menu.

2021-03-02 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=86957f061006c18c46f69284c14e9a3f96570645

commit 86957f061006c18c46f69284c14e9a3f96570645
Author: Alastair Poole 
Date:   Tue Mar 2 20:46:23 2021 +

proclist: fields menu.

This is faster.
---
 src/bin/ui/ui_process_list.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 6d30867..d887806 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1047,7 +1047,7 @@ _btn_clicked_state_save(Ui_Data *pd, Evas_Object *btn)
 
if (pd->fields_menu)
  {
-elm_ctxpopup_dismiss(pd->fields_menu);
+evas_object_del(pd->fields_menu);
 pd->fields_menu = NULL;
 return;
  }
@@ -2082,9 +2082,6 @@ _win_del_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
 
ui = pd->ui;
 
-   if (pd->fields_menu)
- elm_ctxpopup_dismiss(pd->fields_menu);
-
evisum_ui_config_save(ui);
 
if (pd->search.timer)

-- 




[EGIT] [apps/evisum] master 01/01: proclist: label

2021-03-02 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=403e5ffc180b8096414e8e385d8185320015f713

commit 403e5ffc180b8096414e8e385d8185320015f713
Author: Alastair Poole 
Date:   Tue Mar 2 17:22:54 2021 +

proclist: label
---
 src/bin/ui/ui_process_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 7eee145..6d30867 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -124,7 +124,7 @@ _field_name(Proc_Field id)
   case PROC_FIELD_NICE:
 return _("Nice");
   case PROC_FIELD_FILES:
-return _("Open files");
+return _("Open Files");
   case PROC_FIELD_SIZE:
 return _("Memory Size");
   case PROC_FIELD_VIRT:

-- 




[EGIT] [apps/evisum] master 01/01: proclist: align

2021-02-27 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=f321a4700698246847e921fdfb205974e74aafbb

commit f321a4700698246847e921fdfb205974e74aafbb
Author: Alastair Poole 
Date:   Sat Feb 27 22:41:59 2021 +

proclist: align

Missed those
---
 src/bin/ui/ui_process_list.c | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 19471c7..33f2aea 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -430,10 +430,13 @@ _item_create(Evas_Object *obj)
  }
if (_field_enabled(PROC_FIELD_CPU_USAGE))
  {
+rec = evas_object_rectangle_add(evas_object_evas_get(tb));
 pb = elm_progressbar_add(hbx);
-evas_object_size_hint_weight_set(pb, EXPAND, EXPAND);
+evas_object_size_hint_weight_set(pb, 0, EXPAND);
 evas_object_size_hint_align_set(pb, FILL, FILL);
 elm_progressbar_unit_format_set(pb, "%1.1f %%");
+evas_object_data_set(pb, "rec", rec);
+elm_table_pack(tb, rec, i, 0, 1, 1);
 elm_table_pack(tb, pb, i++, 0, 1, 1);
 evas_object_data_set(tb, "proc_cpu_usage", pb);
  }
@@ -592,7 +595,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 
if (_field_enabled(PROC_FIELD_FILES))
  {
-evas_object_geometry_get(pd->btn_nice, NULL, NULL, , NULL);
+evas_object_geometry_get(pd->btn_files, NULL, NULL, , NULL);
 lb = evas_object_data_get(it->obj, "proc_files");
 snprintf(buf, sizeof(buf), "%d", proc->numfiles);
 if (strcmp(buf, elm_object_text_get(lb)))
@@ -616,7 +619,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 
if (_field_enabled(PROC_FIELD_VIRT))
  {
-evas_object_geometry_get(pd->btn_rss, NULL, NULL, , NULL);
+evas_object_geometry_get(pd->btn_virt, NULL, NULL, , NULL);
 lb = evas_object_data_get(it->obj, "proc_virt");
 snprintf(buf, sizeof(buf), "%s", evisum_size_format(proc->mem_virt));
 if (strcmp(buf, elm_object_text_get(lb)))
@@ -640,7 +643,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 
if (_field_enabled(PROC_FIELD_SHARED))
  {
-evas_object_geometry_get(pd->btn_rss, NULL, NULL, , NULL);
+evas_object_geometry_get(pd->btn_shared, NULL, NULL, , NULL);
 lb = evas_object_data_get(it->obj, "proc_shared");
 snprintf(buf, sizeof(buf), "%s", evisum_size_format(proc->mem_shared));
 if (strcmp(buf, elm_object_text_get(lb)))
@@ -680,6 +683,10 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 double value = proc->cpu_usage / 100.0;
 double last = elm_progressbar_value_get(pb);
 
+evas_object_geometry_get(pd->btn_cpu_usage, NULL, NULL, , NULL);
+rec = evas_object_data_get(pb, "rec");
+evas_object_size_hint_min_set(rec, w, 1);
+
 if (!EINA_DBL_EQ(value, last))
   {
  elm_progressbar_value_set(pb, proc->cpu_usage / 100.0);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: pedantic

2021-02-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=0a65da0b1b6f8e100f25aca8fb5879a866d7d1b9

commit 0a65da0b1b6f8e100f25aca8fb5879a866d7d1b9
Author: Alastair Poole 
Date:   Fri Feb 26 20:21:59 2021 +

proclist: pedantic
---
 src/bin/ui/ui.h  | 2 +-
 src/bin/ui/ui_process_list.c | 9 -
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/bin/ui/ui.h b/src/bin/ui/ui.h
index 21f7e10..d6b0cf7 100644
--- a/src/bin/ui/ui.h
+++ b/src/bin/ui/ui.h
@@ -13,7 +13,7 @@
 
 #define _(STR) gettext(STR)
 
-#define EVISUM_WIN_WIDTH  600
+#define EVISUM_WIN_WIDTH  800
 #define EVISUM_WIN_HEIGHT 600
 
 typedef struct Ui
diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 6510a18..19471c7 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -428,7 +428,6 @@ _item_create(Evas_Object *obj)
 lb = _item_column_add(tb, "proc_time", i++);
 evas_object_size_hint_align_set(lb, 0.5, FILL);
  }
-
if (_field_enabled(PROC_FIELD_CPU_USAGE))
  {
 pb = elm_progressbar_add(hbx);
@@ -1131,7 +1130,7 @@ _btn_pri_clicked_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 
 static void
 _btn_nice_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
+ void *event_info EINA_UNUSED)
 {
Ui_Data *pd = data;
Ui *ui = pd->ui;
@@ -1144,7 +1143,7 @@ _btn_nice_clicked_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 
 static void
 _btn_files_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
-void *event_info EINA_UNUSED)
+  void *event_info EINA_UNUSED)
 {
Ui_Data *pd = data;
Ui *ui = pd->ui;
@@ -2156,13 +2155,13 @@ ui_process_list_win_add(Ui *ui)
elm_win_icon_object_set(win, icon);
evisum_ui_background_add(win);
 
-   if (ui->proc.width > 1 && ui->proc.height > 1)
+   if ((ui->proc.width > 1) && (ui->proc.height > 1))
  evas_object_resize(win, ui->proc.width, ui->proc.height);
else
  evas_object_resize(win, EVISUM_WIN_WIDTH * elm_config_scale_get(),
 EVISUM_WIN_HEIGHT * elm_config_scale_get());
 
-   if (ui->proc.x > 0 && ui->proc.y > 0)
+   if ((ui->proc.x) > 0 && (ui->proc.y > 0))
  evas_object_move(win, ui->proc.x, ui->proc.y);
else
  elm_win_center(win, 1, 1);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: tooltip.

2021-02-25 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=18c752f79382ba61c8bd4a3e07d738d67fa7333e

commit 18c752f79382ba61c8bd4a3e07d738d67fa7333e
Author: Alastair Poole 
Date:   Thu Feb 25 17:22:55 2021 +

proclist: tooltip.

Change the text later
---
 src/bin/ui/ui_process_list.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 1ce8277..8f99ac4 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -254,12 +254,18 @@ _fields_init(Ui_Data *pd)
 {
for (int i = PROC_FIELD_CMD; i < PROC_FIELD_MAX; i++)
  {
+Evas_Object *btn;
+const char *name = _field_name(i);
+btn = _fields[i].btn;
+
 _fields[i].id = i;
-_fields[i].name = _field_name(i);
+_fields[i].name = name;
 _fields[i].enabled = 1;
 if ((i != PROC_FIELD_CMD) && (!(pd->ui->proc.fields & (1UL << i
   _fields[i].enabled = 0;
-evas_object_event_callback_add(_fields[i].btn, EVAS_CALLBACK_MOUSE_UP,
+
+elm_object_tooltip_text_set(btn, name);
+evas_object_event_callback_add(btn, EVAS_CALLBACK_MOUSE_UP,
_field_mouse_up_cb, pd);
  }
 }

-- 




[EGIT] [apps/evisum] master 01/01: proclist: fix that leak.

2021-02-24 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=f4a6fb8166216a07756882044d82ce3feb1654bf

commit f4a6fb8166216a07756882044d82ce3feb1654bf
Author: Alastair Poole 
Date:   Wed Feb 24 22:27:11 2021 +

proclist: fix that leak.

custom callback pointer is being leaked in elm_progressbar.
2 pointers / 16 bytes. This is ... not leaking
---
 src/bin/ui/ui_process_list.c | 38 ++
 1 file changed, 6 insertions(+), 32 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 4c7ed5b..0407e7c 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -12,7 +12,6 @@
 #include 
 #include 
 
-#define PROGRESS_CUSTOM_FORMAT 1
 #define DIRTY_GENLIST_HACK 1
 
 extern int EVISUM_EVENT_CONFIG_CHANGED;
@@ -94,10 +93,6 @@ typedef struct
 
 static Ui_Data *_pd = NULL;
 
-#if PROGRESS_CUSTOM_FORMAT
-static double _cpu_usage = 0.0;
-#endif
-
 typedef struct
 {
Proc_Field   id;
@@ -317,24 +312,6 @@ _item_column_add(Evas_Object *tb, const char *text, int 
col)
return lb;
 }
 
-#if PROGRESS_CUSTOM_FORMAT
-static char *
-_pb_format_cb(double val)
-{
-   static char buf[32];
-
-   snprintf(buf, sizeof(buf), "%1.1f %%", _cpu_usage);
-
-   return strdup(buf);
-}
-
-static void
-_pb_format_free_cb(char *str)
-{
-   free(str);
-}
-#endif
-
 static Evas_Object *
 _item_create(Evas_Object *obj)
 {
@@ -444,11 +421,6 @@ _item_create(Evas_Object *obj)
 evas_object_size_hint_weight_set(pb, EXPAND, EXPAND);
 evas_object_size_hint_align_set(pb, FILL, FILL);
 elm_progressbar_unit_format_set(pb, "%1.1f %%");
-#if PROGRESS_CUSTOM_FORMAT
-elm_progressbar_unit_format_function_set(pb,
- _pb_format_cb,
- _pb_format_free_cb);
-#endif
 elm_table_pack(tb, pb, i++, 0, 1, 1);
 evas_object_data_set(tb, "proc_cpu_usage", pb);
  }
@@ -680,13 +652,15 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
if (_field_enabled(PROC_FIELD_CPU_USAGE))
  {
 pb = evas_object_data_get(it->obj, "proc_cpu_usage");
-#if PROGRESS_CUSTOM_FORMAT
-_cpu_usage = proc->cpu_usage;
-#endif
 double value = proc->cpu_usage / 100.0;
 double last = elm_progressbar_value_get(pb);
+
 if (!EINA_DBL_EQ(value, last))
-  elm_progressbar_value_set(pb, proc->cpu_usage / 100.0);
+  {
+ elm_progressbar_value_set(pb, proc->cpu_usage / 100.0);
+ snprintf(buf, sizeof(buf), "%1.1f %%", proc->cpu_usage);
+ elm_object_part_text_set(pb, "elm.text.status", buf);
+  }
 evas_object_show(pb);
  }
 

-- 




[EGIT] [apps/evisum] master 01/01: proclist: one too many calls

2021-02-24 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=9dfe05747899be31eda7305971a9422a5debfaa9

commit 9dfe05747899be31eda7305971a9422a5debfaa9
Author: Alastair Poole 
Date:   Wed Feb 24 12:12:19 2021 +

proclist: one too many calls
---
 src/bin/ui/ui_process_list.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 10f0a3c..3e890e4 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1665,7 +1665,6 @@ _content_add(Ui_Data *pd, Evas_Object *parent)
elm_object_content_set(fr, lb);
 
_fields_init(pd);
-   _content_reset(pd);
 
return tb;
 }

-- 




[EGIT] [apps/evisum] master 01/01: proclist: sizing

2021-02-24 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=961e7b913e60729dc6f8128274558d4fcc595259

commit 961e7b913e60729dc6f8128274558d4fcc595259
Author: Alastair Poole 
Date:   Wed Feb 24 11:49:43 2021 +

proclist: sizing
---
 src/bin/ui/ui_process_list.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 8f77b5c..10f0a3c 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -150,8 +150,12 @@ _field_enabled(Proc_Field id)
 static void
 _content_reset(Ui_Data *pd)
 {
+   Evas_Object *rec;
int j = 0;
elm_table_clear(pd->tb_content, 0);
+   rec = evas_object_rectangle_add(evas_object_evas_get(pd->win));
+   evas_object_size_hint_min_set(rec, 1, ELM_SCALE_SIZE(BTN_HEIGHT));
+   elm_table_pack(pd->tb_content, rec, j, 0, 1, 1);
elm_table_pack(pd->tb_content, pd->btn_menu, j++, 0, 1, 1);
for (int i = j; i < PROC_FIELD_MAX; i++)
  {

-- 




[EGIT] [apps/evisum] master 01/01: proclist: fields

2021-02-24 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=3db0623bfebab54142aac23acbb1397cc3f2d0e2

commit 3db0623bfebab54142aac23acbb1397cc3f2d0e2
Author: Alastair Poole 
Date:   Wed Feb 24 11:32:21 2021 +

proclist: fields
---
 VERSION  |   2 +-
 meson.build  |   2 +-
 src/bin/evisum_config.c  |   1 +
 src/bin/evisum_config.h  |   3 +-
 src/bin/ui/ui.c  |   4 +-
 src/bin/ui/ui.h  |   1 +
 src/bin/ui/ui_process_list.c | 824 +++
 src/bin/ui/ui_process_list.h |  46 ++-
 8 files changed, 564 insertions(+), 319 deletions(-)

diff --git a/VERSION b/VERSION
index 69626fb..9d6c175 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.5.11
+0.5.12
diff --git a/meson.build b/meson.build
index 160deab..5ffa0cc 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
 # Project
 project('evisum', 'c',
-version   : '0.5.11',
+version   : '0.5.12',
 meson_version : '>= 0.40.0')
 
 efl_version = '>= 1.22.0'
diff --git a/src/bin/evisum_config.c b/src/bin/evisum_config.c
index 070eb8b..b4c9a9a 100644
--- a/src/bin/evisum_config.c
+++ b/src/bin/evisum_config.c
@@ -54,6 +54,7 @@ _config_init()
cfg->proc.poll_delay = 3;
cfg->proc.show_kthreads = 1;
cfg->proc.transparant = 0;
+   cfg->proc.fields = 0x;
cfg->proc.alpha = 100;
 
return cfg;
diff --git a/src/bin/evisum_config.h b/src/bin/evisum_config.h
index e055779..67e0867 100644
--- a/src/bin/evisum_config.h
+++ b/src/bin/evisum_config.h
@@ -3,7 +3,7 @@
 
 #include "ui/ui.h"
 
-#define CONFIG_VERSION 0x000e
+#define CONFIG_VERSION 0x000f
 
 typedef struct _Evisum_Config
 {
@@ -25,6 +25,7 @@ typedef struct _Evisum_Config
   unsigned char sort_type;
   Eina_Bool sort_reverse;
   unsigned char poll_delay;
+  unsigned int  fields;
 
   Eina_Bool show_scroller;
   Eina_Bool transparant;
diff --git a/src/bin/ui/ui.c b/src/bin/ui/ui.c
index c1b66da..d8955f5 100644
--- a/src/bin/ui/ui.c
+++ b/src/bin/ui/ui.c
@@ -55,6 +55,7 @@ evisum_ui_config_save(Ui *ui)
 _evisum_config->proc.show_scroller = ui->proc.show_scroller;
 _evisum_config->proc.transparant = ui->proc.transparant;
 _evisum_config->proc.alpha = ui->proc.alpha;
+   _evisum_config->proc.fields = ui->proc.fields;
 proc_info_kthreads_show_set(ui->proc.show_kthreads);
  }
 
@@ -117,6 +118,7 @@ evisum_ui_config_load(Ui *ui)
ui->proc.sort_reverse = _evisum_config->proc.sort_reverse;
ui->proc.poll_delay   = _evisum_config->proc.poll_delay;
ui->proc.show_kthreads = _evisum_config->proc.show_kthreads;
+   ui->proc.fields = _evisum_config->proc.fields;
proc_info_kthreads_show_set(ui->proc.show_kthreads);
ui->proc.show_user = _evisum_config->proc.show_user;
ui->proc.show_scroller = _evisum_config->proc.show_scroller;
@@ -700,7 +702,7 @@ evisum_ui_init(void)
 
ui->proc.poll_delay = 3;
ui->proc.sort_reverse = 0;
-   ui->proc.sort_type = SORT_BY_PID;
+   ui->proc.sort_type = PROC_SORT_BY_PID;
 
ui->program_pid = getpid();
 
diff --git a/src/bin/ui/ui.h b/src/bin/ui/ui.h
index 33d792d..21f7e10 100644
--- a/src/bin/ui/ui.h
+++ b/src/bin/ui/ui.h
@@ -33,6 +33,7 @@ typedef struct Ui
 
   int   poll_delay;
   int   sort_type;
+  unsigned int  fields;
   Eina_Bool sort_reverse;
   Eina_Bool show_self;
   Eina_Bool show_kthreads;
diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 1e0e8d6..8f77b5c 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -19,7 +19,7 @@ extern int EVISUM_EVENT_CONFIG_CHANGED;
 
 typedef struct
 {
-   Sort_Type type;
+   Proc_Sort type;
int   (*sort_cb)(const void *p1, const void *p2);
 } Sorter;
 
@@ -30,7 +30,7 @@ typedef struct
Ecore_Event_Handler   *handler[2];
Eina_Hash *cpu_times;
Eina_Bool  skip_wait;
-   Sorter sorters[SORT_BY_MAX];
+   Sorter sorters[PROC_SORT_BY_MAX];
pid_t  selected_pid;
intpoll_count;
 
@@ -54,17 +54,17 @@ typedef struct
   double  keytime;
} search;
 
-   Evas_Object   *content;
+   Evas_Object   *tb_content;
 
-   Evas_Object   *genlist;
+   Evas_Object   *glist;
Elm_Genlist_Item_Class itc;
 
Evas_Object*btn_menu;
-   Eina_List  *headers;
Evas_Object*btn_cmd;
Evas_Object*btn_uid;
Evas_Object*btn_pid;
Evas_Object*btn_threads;
+   Evas_Object*btn_cpu;
Evas_Object*btn_pri;
Evas_Object*btn_nice;
Evas_Object*btn_size;
@@ -73,8 +73,11 @@ typedef struct
Evas_Object*btn_time;
Evas_Object*btn_cpu_usage;
 
+   

[EGIT] [apps/evisum] master 01/01: proclist: menu fade away...

2021-02-09 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=538058f147e234e6c253ad2e7b858b3601389727

commit 538058f147e234e6c253ad2e7b858b3601389727
Author: Alastair Poole 
Date:   Tue Feb 9 20:23:23 2021 +

proclist: menu fade away...

Like my dreams :)
---
 src/bin/ui/ui_process_list.c | 19 ---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 605b498..1e0e8d6 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -39,6 +39,7 @@ typedef struct
Ecore_Timer   *resize_timer;
Evas_Object   *win;
Evas_Object   *main_menu;
+   Ecore_Timer   *main_menu_timer;
Evas_Object   *menu;
Eina_Bool  transparant;
 
@@ -1128,6 +1129,17 @@ _item_pid_clicked_cb(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info)
ui_process_view_win_add(proc->pid, PROC_VIEW_DEFAULT);
 }
 
+static Eina_Bool
+_main_menu_timer_cb(void *data)
+{
+   Ui_Data *pd = data;
+   evas_object_del(pd->main_menu);
+   pd->main_menu_timer = NULL;
+   pd->main_menu = NULL;
+
+   return 0;
+}
+
 static void
 _main_menu_dismissed_cb(void *data, Evas_Object *obj EINA_UNUSED,
 void *ev EINA_UNUSED)
@@ -1135,9 +1147,10 @@ _main_menu_dismissed_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
Ui_Data *pd = data;
 
elm_ctxpopup_dismiss(pd->main_menu);
-   evas_object_del(pd->main_menu);
-
-   pd->main_menu = NULL;
+   if (pd->main_menu_timer)
+ _main_menu_timer_cb(pd);
+   else
+ pd->main_menu_timer = ecore_timer_add(0.2, _main_menu_timer_cb, pd);
 }
 
 static Evas_Object *

-- 




[EGIT] [apps/evisum] master 01/01: proclist

2021-02-08 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=3050e97a007521c3d7ea3d12f2818c3b12542a8b

commit 3050e97a007521c3d7ea3d12f2818c3b12542a8b
Author: Alastair Poole 
Date:   Mon Feb 8 13:24:30 2021 +

proclist
---
 src/bin/ui/ui_process_list.c | 13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 4253080..4825c2e 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -80,8 +80,6 @@ typedef struct
   int  dead;
   int  zombie;
   int  dsleep;
-  int  waiting;
-  int  locked;
} summary;
 } Ui_Data;
 
@@ -456,8 +454,7 @@ _summary_reset(Ui_Data *pd)
 {
pd->summary.total = pd->summary.running = pd->summary.sleeping = 0;
pd->summary.stopped = pd->summary.idle  = pd->summary.zombie = 0;
-   pd->summary.dead = pd->summary.dsleep = pd->summary.waiting = 0;
-   pd->summary.locked = 0;
+   pd->summary.dsleep = pd->summary.dead = 0;
 }
 
 static void
@@ -480,10 +477,6 @@ _summary_update(Ui_Data *pd)
  eina_strbuf_append_printf(buf, "%i dsleep, ", pd->summary.dsleep);
if (pd->summary.zombie)
  eina_strbuf_append_printf(buf, "%i zombie, ", pd->summary.zombie);
-   if (pd->summary.waiting)
- eina_strbuf_append_printf(buf, "%i waiting, ", pd->summary.waiting);
-   if (pd->summary.locked)
- eina_strbuf_append_printf(buf, "%i locked, ", pd->summary.locked);
 
eina_strbuf_replace_last(buf, ",", ".");
 
@@ -509,10 +502,6 @@ _summary_total(Ui_Data *pd, Proc_Info *proc)
  pd->summary.dead++;
if (!strcmp(proc->state, "dsleep"))
  pd->summary.dsleep++;
-   if (!strcmp(proc->state, "wait"))
- pd->summary.waiting++;
-   if (!strcmp(proc->state, "lock"))
- pd->summary.locked++;
 }
 
 static Eina_List *

-- 




[EGIT] [apps/evisum] master 01/01: proclist: summary

2021-02-08 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=e99d68ead1cf893988c58955304e2485bf17cbc6

commit e99d68ead1cf893988c58955304e2485bf17cbc6
Author: Alastair Poole 
Date:   Mon Feb 8 13:12:09 2021 +

proclist: summary
---
 src/bin/ui/ui_process_list.c | 83 
 1 file changed, 68 insertions(+), 15 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 01c8583..4253080 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -76,6 +76,12 @@ typedef struct
   int  running;
   int  sleeping;
   int  stopped;
+  int  idle;
+  int  dead;
+  int  zombie;
+  int  dsleep;
+  int  waiting;
+  int  locked;
} summary;
 } Ui_Data;
 
@@ -446,14 +452,67 @@ _bring_in(void *data)
 }
 
 static void
-_update_summary(Ui_Data *pd)
+_summary_reset(Ui_Data *pd)
 {
-   const char *txt =
-  eina_slstr_printf("%i processes: %i running, %i sleeping, %i stopped.",
-pd->summary.total, pd->summary.running,
-pd->summary.sleeping, pd->summary.stopped);
+   pd->summary.total = pd->summary.running = pd->summary.sleeping = 0;
+   pd->summary.stopped = pd->summary.idle  = pd->summary.zombie = 0;
+   pd->summary.dead = pd->summary.dsleep = pd->summary.waiting = 0;
+   pd->summary.locked = 0;
+}
+
+static void
+_summary_update(Ui_Data *pd)
+{
+   Eina_Strbuf *buf = eina_strbuf_new();
+
+   eina_strbuf_append_printf(buf, "%i processes: ", pd->summary.total);
+   if (pd->summary.running)
+ eina_strbuf_append_printf(buf, "%i running, ", pd->summary.running);
+   if (pd->summary.sleeping)
+ eina_strbuf_append_printf(buf, "%i sleeping, ", pd->summary.sleeping);
+   if (pd->summary.stopped)
+ eina_strbuf_append_printf(buf, "%i stopped, ", pd->summary.stopped);
+   if (pd->summary.idle)
+ eina_strbuf_append_printf(buf, "%i idle, ", pd->summary.idle);
+   if (pd->summary.dead)
+ eina_strbuf_append_printf(buf, "%i dead, ", pd->summary.dead);
+   if (pd->summary.dsleep)
+ eina_strbuf_append_printf(buf, "%i dsleep, ", pd->summary.dsleep);
+   if (pd->summary.zombie)
+ eina_strbuf_append_printf(buf, "%i zombie, ", pd->summary.zombie);
+   if (pd->summary.waiting)
+ eina_strbuf_append_printf(buf, "%i waiting, ", pd->summary.waiting);
+   if (pd->summary.locked)
+ eina_strbuf_append_printf(buf, "%i locked, ", pd->summary.locked);
 
-   elm_object_text_set(pd->summary.lb, txt);
+   eina_strbuf_replace_last(buf, ",", ".");
+
+   elm_object_text_set(pd->summary.lb, eina_strbuf_string_get(buf));
+
+   eina_strbuf_free(buf);
+}
+
+static void
+_summary_total(Ui_Data *pd, Proc_Info *proc)
+{
+   pd->summary.total++;
+   if (!strcmp(proc->state, "run"))
+ pd->summary.running++;
+   pd->summary.sleeping += proc->ssleep;
+   if (!strcmp(proc->state, "stop"))
+ pd->summary.stopped++;
+   if (!strcmp(proc->state, "idle"))
+ pd->summary.idle++;
+   if (!strcmp(proc->state, "zombie"))
+ pd->summary.zombie++;
+   if (!strcmp(proc->state, "dead"))
+ pd->summary.dead++;
+   if (!strcmp(proc->state, "dsleep"))
+ pd->summary.dsleep++;
+   if (!strcmp(proc->state, "wait"))
+ pd->summary.waiting++;
+   if (!strcmp(proc->state, "lock"))
+ pd->summary.locked++;
 }
 
 static Eina_List *
@@ -505,8 +564,7 @@ _process_list_search_trim(Eina_List *list, Ui_Data *pd)
Proc_Info *proc;
Ui *ui = pd->ui;
 
-   pd->summary.total = pd->summary.running = pd->summary.sleeping = 0;
-   pd->summary.stopped = 0;
+   _summary_reset(pd);
 
EINA_LIST_FOREACH_SAFE(list, l, l_next, proc)
  {
@@ -539,12 +597,7 @@ _process_list_search_trim(Eina_List *list, Ui_Data *pd)
   eina_hash_add(pd->cpu_times, , cpu_time);
}
   }
-   pd->summary.total++;
-   if ((!strcmp(proc->state, "run")) || (!strcmp(proc->state, 
"onproc")))
-  pd->summary.running++;
-   pd->summary.sleeping += proc->ssleep;
-   if (!strcmp(proc->state, "stop"))
-  pd->summary.stopped++;
+_summary_total(pd, proc);
  }
  }
 
@@ -643,7 +696,7 @@ _process_list_feedback_cb(void *data, Ecore_Thread *thread 
EINA_UNUSED,
 
elm_genlist_realized_items_update(pd->genlist);
 
-   _update_summary(pd);
+   _summary_update(pd);
 
 #if DIRTY_GENLIST_HACK
Eina_List *real = elm_genlist_realized_items_get(pd->genlist);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: summerly

2021-02-07 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=38a6c470d6d71b2583a9cd369e7c0d98d854674c

commit 38a6c470d6d71b2583a9cd369e7c0d98d854674c
Author: Alastair Poole 
Date:   Sun Feb 7 14:59:20 2021 +

proclist: summerly
---
 src/bin/ui/ui_process_list.c | 92 +++-
 1 file changed, 23 insertions(+), 69 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index a246c73..adfa478 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -68,15 +68,6 @@ typedef struct
Evas_Object*btn_state;
Evas_Object*btn_time;
Evas_Object*btn_cpu_usage;
-
-   struct
-   {
-  Evas_Object *lb;
-  int  total;
-  int  running;
-  int  sleeping;
-  int  stopped;
-   } summary;
 } Ui_Data;
 
 static Ui_Data *_pd = NULL;
@@ -161,14 +152,13 @@ _item_create(Evas_Object *obj)
int i = 0;
 
tb = elm_table_add(obj);
-   evas_object_size_hint_align_set(tb, FILL, FILL);
-   evas_object_size_hint_weight_set(tb, EXPAND, 0);
-
+   evas_object_size_hint_align_set(tb, FILL, 0);
+   evas_object_size_hint_weight_set(tb, EXPAND, EXPAND);
 
hbx = elm_box_add(tb);
elm_box_horizontal_set(hbx, 1);
evas_object_size_hint_align_set(hbx, 0.0, FILL);
-   evas_object_size_hint_weight_set(hbx, EXPAND, 0);
+   evas_object_size_hint_weight_set(hbx, EXPAND, EXPAND);
evas_object_show(hbx);
 
ic = elm_icon_add(tb);
@@ -213,7 +203,7 @@ _item_create(Evas_Object *obj)
lb = _item_column_add(tb, "proc_state", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tb, "proc_time", i++);
-   evas_object_size_hint_align_set(lb, 0.5, FILL);
+   evas_object_size_hint_align_set(lb, 1.0, FILL);
 
pb = elm_progressbar_add(hbx);
evas_object_size_hint_weight_set(pb, EXPAND, EXPAND);
@@ -445,17 +435,6 @@ _bring_in(void *data)
return 0;
 }
 
-static void
-_update_summary(Ui_Data *pd)
-{
-   const char *txt =
-  eina_slstr_printf("%i processes: %i running, %i sleeping, %i stopped.",
-pd->summary.total, pd->summary.running,
-pd->summary.sleeping, pd->summary.stopped);
-
-   elm_object_text_set(pd->summary.lb, txt);
-}
-
 static Eina_List *
 _process_list_sort(Eina_List *list, Ui_Data *pd)
 {
@@ -505,9 +484,6 @@ _process_list_search_trim(Eina_List *list, Ui_Data *pd)
Proc_Info *proc;
Ui *ui = pd->ui;
 
-   pd->summary.total = pd->summary.running = pd->summary.sleeping = 0;
-   pd->summary.stopped = 0;
-
EINA_LIST_FOREACH_SAFE(list, l, l_next, proc)
  {
 if ((proc->pid == ui->program_pid) ||
@@ -539,12 +515,6 @@ _process_list_search_trim(Eina_List *list, Ui_Data *pd)
   eina_hash_add(pd->cpu_times, , cpu_time);
}
   }
-   pd->summary.total++;
-   if ((!strcmp(proc->state, "run")) || (!strcmp(proc->state, 
"onproc")))
-  pd->summary.running++;
-   pd->summary.sleeping += proc->ssleep;
-   if (!strcmp(proc->state, "stop"))
-  pd->summary.stopped++;
  }
  }
 
@@ -615,14 +585,11 @@ _process_list_feedback_cb(void *data, Ecore_Thread 
*thread EINA_UNUSED,
Eina_List *list;
Proc_Info *proc;
Elm_Object_Item *it;
-   int n;
 
pd = data;
list = msg;
 
-   n = eina_list_count(list);
-
-   _genlist_ensure_n_items(pd->genlist, n, >itc);
+   _genlist_ensure_n_items(pd->genlist, eina_list_count(list), >itc);
 
it = elm_genlist_first_item_get(pd->genlist);
EINA_LIST_FREE(list, proc)
@@ -643,11 +610,9 @@ _process_list_feedback_cb(void *data, Ecore_Thread *thread 
EINA_UNUSED,
 
elm_genlist_realized_items_update(pd->genlist);
 
-   _update_summary(pd);
-
 #if DIRTY_GENLIST_HACK
Eina_List *real = elm_genlist_realized_items_get(pd->genlist);
-   n = eina_list_count(pd->cache->active);
+   int n = eina_list_count(pd->cache->active);
if (n > eina_list_count(real) * 2)
  {
 evisum_ui_item_cache_steal(pd->cache, real);
@@ -1160,7 +1125,6 @@ static Evas_Object *
 _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 {
Evas_Object *tb, *btn, *list, *rec;
-   Evas_Object *fr, *lb;
Ui *ui = pd->ui;
int i = 0;
 
@@ -1170,12 +1134,16 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
evas_object_show(tb);
 
rec = evas_object_rectangle_add(evas_object_evas_get(parent));
-   evas_object_size_hint_min_set(rec, 1, ELM_SCALE_SIZE(LIST_BTN_HEIGHT));
-   evas_object_size_hint_max_set(rec, 1, ELM_SCALE_SIZE(LIST_BTN_HEIGHT));
+   evas_object_size_hint_min_set(rec, 1, ELM_SCALE_SIZE(24));
+   evas_object_size_hint_max_set(rec, 1, ELM_SCALE_SIZE(24));
elm_table_pack(tb, rec, i, 1, 1, 1);
 
pd->btn_menu = btn = _btn_create(tb, "menu", _("Menu"),
 

[EGIT] [apps/evisum] master 01/01: proclist: line

2021-02-06 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=8fb97e3b506054a56f3569d60315cbcdf0571bf6

commit 8fb97e3b506054a56f3569d60315cbcdf0571bf6
Author: Alastair Poole 
Date:   Sat Feb 6 13:00:54 2021 +

proclist: line
---
 src/bin/ui/ui_process_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index b55709a..14ba852 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -203,7 +203,7 @@ _item_create(Evas_Object *obj)
lb = _item_column_add(tb, "proc_state", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tb, "proc_time", i++);
-   evas_object_size_hint_align_set(lb, 1.0, FILL);
+   evas_object_size_hint_align_set(lb, 0.5, FILL);
 
pb = elm_progressbar_add(hbx);
evas_object_size_hint_weight_set(pb, EXPAND, EXPAND);

-- 




[EGIT] [apps/evisum] master 01/01: proclist:...

2021-02-05 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=8e73f67df92e176955aa158fffcfef568f8d9c0c

commit 8e73f67df92e176955aa158fffcfef568f8d9c0c
Author: Alastair Poole 
Date:   Fri Feb 5 11:07:05 2021 +

proclist:...
---
 src/bin/ui/ui_process_list.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 65511f5..b941965 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1321,6 +1321,10 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 
pd->btn_menu = btn = _btn_create(tbl, "menu", _("Menu"),
 _btn_menu_clicked_cb, pd);
+   rec = evas_object_rectangle_add(evas_object_evas_get(parent));
+   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(20),  1);
+   evas_object_size_hint_max_set(rec, ELM_SCALE_SIZE(20), -1);
+   elm_table_pack(tbl, rec, i, 1, 1, 1);
elm_table_pack(tbl, btn, i++, 1, 1, 1);
 
pd->btn_cmd = btn = elm_button_add(parent);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: ok

2021-02-05 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=cf70b5c6cd8420ee70b024c6e92c664e1dc4e0dd

commit cf70b5c6cd8420ee70b024c6e92c664e1dc4e0dd
Author: Alastair Poole 
Date:   Fri Feb 5 10:42:09 2021 +

proclist: ok
---
 src/bin/ui/ui_process_list.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 863541b..65511f5 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1291,7 +1291,7 @@ static Evas_Object
 *_btn_min_size(Ui_Data *pd, Evas_Object *btn)
 {
Evas_Object *rec = evas_object_rectangle_add(evas_object_evas_get(btn));
-   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(64), 1);
+   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(68), 1);
evas_object_size_hint_weight_set(rec, EXPAND, 0);
 
List_Header *hdr = malloc(sizeof(List_Header));
@@ -1497,6 +1497,7 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
elm_object_text_set(btn, _("cpu %"));
evas_object_show(btn);
rec = _btn_min_size(pd, btn);
+   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(80), 1);
elm_table_pack(tbl, rec, i, 1, 1, 1);
elm_table_pack(tbl, btn, i++, 1, 1, 1);
evas_object_smart_callback_add(btn, "clicked",

-- 




[EGIT] [apps/evisum] master 01/01: proclist: enough

2021-02-05 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=5cc4e28ab19eb47fcb4509bb067a166826255b72

commit 5cc4e28ab19eb47fcb4509bb067a166826255b72
Author: Alastair Poole 
Date:   Fri Feb 5 10:19:53 2021 +

proclist: enough
---
 src/bin/ui/ui_process_list.c | 31 ---
 1 file changed, 4 insertions(+), 27 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 3c29017..863541b 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1292,6 +1292,7 @@ static Evas_Object
 {
Evas_Object *rec = evas_object_rectangle_add(evas_object_evas_get(btn));
evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(64), 1);
+   evas_object_size_hint_weight_set(rec, EXPAND, 0);
 
List_Header *hdr = malloc(sizeof(List_Header));
hdr->rec = rec;
@@ -1344,6 +1345,9 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("user"));
evas_object_show(btn);
+   rec = _btn_min_size(pd, btn);
+   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(90), 1);
+   elm_table_pack(tbl, rec, i, 1, 1, 1);
elm_table_pack(tbl, btn, i++, 1, 1, 1);
evas_object_smart_callback_add(btn, "clicked",
   _btn_uid_clicked_cb, pd);
@@ -1694,33 +1698,6 @@ _resize_cb(void *data)
pd->skip_wait = 0;
pd->resize_timer = NULL;
 
-   int ww, w;
-   ww = pd->ui->proc.width;
-   evas_object_geometry_get(pd->btn_menu, NULL, NULL, , NULL);
-   ww -= w;
-   evas_object_geometry_get(pd->btn_cmd, NULL, NULL, , NULL);
-   ww -= w;
-   evas_object_geometry_get(pd->btn_uid, NULL, NULL, , NULL);
-   ww -= w;
-   w = ww / eina_list_count(pd->headers);
-   Eina_List *l; List_Header *h;
-
-   int expand = w > 72 ? 1 : 0;
-   EINA_LIST_FOREACH(pd->headers, l, h)
- {
-if (expand)
-  {
- evas_object_size_hint_min_set(h->rec, -1, 1);
- evas_object_size_hint_max_set(h->rec, -1, -1);
- evas_object_size_hint_weight_set(h->rec, EXPAND, 0);
-  }
-else
-  {
- evas_object_size_hint_weight_set(h->rec, EXPAND, 0);
- evas_object_size_hint_min_set(h->rec, 72, 1);
- evas_object_size_hint_max_set(h->rec, 72, -1);
-  }
- }
return 0;
 }
 

-- 




[EGIT] [apps/evisum] master 01/01: proclist: remove

2021-02-05 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=f2dcc451483ad882a9cc5ef180e21d069cceb365

commit f2dcc451483ad882a9cc5ef180e21d069cceb365
Author: Alastair Poole 
Date:   Fri Feb 5 09:21:52 2021 +

proclist: remove
---
 src/bin/ui/ui_process_list.c | 193 ++-
 1 file changed, 117 insertions(+), 76 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 1bc80de..0329364 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -26,40 +26,38 @@ typedef struct
Ecore_Thread  *thread;
Evisum_Ui_Cache   *cache;
Ecore_Event_Handler   *handler[2];
+   Eina_Hash *cpu_times;
Eina_Bool  skip_wait;
-
Sorter sorters[SORT_BY_MAX];
-   Eina_Hash *cpu_times;
-
-   int   poll_count;
+   pid_t  selected_pid;
+   intpoll_count;
 
Ui*ui;
 
Ecore_Timer   *resize_timer;
-
Evas_Object   *win;
Evas_Object   *main_menu;
Evas_Object   *menu;
 
-   pid_t  selected_pid;
-
-   char  *search_text;
-   size_t search_len;
-   Ecore_Timer   *search_timer;
-   Evas_Object   *search_pop;
-   Evas_Object   *search_entry;
-   Eina_Bool  search_visible;
-   double search_keytime;
+   struct
+   {
+  char   *text;
+  size_t  len;
+  Ecore_Timer*timer;
+  Evas_Object*pop;
+  Evas_Object*entry;
+  Eina_Bool   visible;
+  double  keytime;
+   } search;
 
-   Evas_Object   *scroller;
Evas_Object   *genlist;
Elm_Genlist_Item_Class itc;
 
Evas_Object*btn_menu;
-
-   Evas_Object*btn_pid;
-   Evas_Object*btn_uid;
+   Eina_List  *headers;
Evas_Object*btn_cmd;
+   Evas_Object*btn_uid;
+   Evas_Object*btn_pid;
Evas_Object*btn_pri;
Evas_Object*btn_nice;
Evas_Object*btn_size;
@@ -359,11 +357,11 @@ _item_create(Evas_Object *obj)
lb = _item_column_add(tbl, "proc_cpuid", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_time", i++);
-   evas_object_size_hint_align_set(lb, 1.0, FILL);
+   evas_object_size_hint_align_set(lb, 0.5, FILL);
rec = evas_object_rectangle_add(evas_object_evas_get(tbl));
elm_table_pack(tbl, rec, i++, 0, 1, 1);
lb = _item_column_add(tbl, "proc_state", i++);
-   evas_object_size_hint_align_set(lb, 1.0, FILL);
+   evas_object_size_hint_align_set(lb, 0.5, FILL);
elm_table_pack(tbl, rec, i++, 0, 1, 1);
 
pb = elm_progressbar_add(hbx);
@@ -596,9 +594,9 @@ _bring_in(void *data)
int h_page, v_page;
 
pd = data;
-   elm_scroller_gravity_set(pd->scroller, 0.0, 0.0);
-   elm_scroller_last_page_get(pd->scroller, _page, _page);
-   elm_scroller_page_bring_in(pd->scroller, h_page, v_page);
+   elm_scroller_gravity_set(pd->genlist, 0.0, 0.0);
+   elm_scroller_last_page_get(pd->genlist, _page, _page);
+   elm_scroller_page_bring_in(pd->genlist, h_page, v_page);
elm_genlist_realized_items_update(pd->genlist);
evas_object_show(pd->genlist);
 
@@ -660,9 +658,9 @@ _process_list_search_trim(Eina_List *list, Ui_Data *pd)
EINA_LIST_FOREACH_SAFE(list, l, l_next, proc)
  {
 if ((proc->pid == ui->program_pid) ||
-((pd->search_len) &&
- (strncasecmp(proc->command, pd->search_text, pd->search_len) &&
- (!strstr(proc->command, pd->search_text
+((pd->search.len) &&
+ (strncasecmp(proc->command, pd->search.text, pd->search.len) &&
+ (!strstr(proc->command, pd->search.text
)
  {
 proc_info_free(proc);
@@ -847,7 +845,7 @@ _btn_clicked_state_save(Ui_Data *pd, Evas_Object *btn)
 
_process_list_update(pd);
 
-   elm_scroller_page_bring_in(pd->scroller, 0, 0);
+   elm_scroller_page_bring_in(pd->genlist, 0, 0);
 }
 
 static void
@@ -1283,6 +1281,24 @@ _btn_menu_clicked_cb(void *data, Evas_Object *obj,
  _main_menu_dismissed_cb(pd, NULL, NULL);
 }
 
+typedef struct
+{
+   Evas_Object *btn;
+   Evas_Object *rec;
+} List_Header;
+
+static Evas_Object
+*_btn_min_size(Ui_Data *pd, Evas_Object *parent)
+{
+   Evas_Object *rec = evas_object_rectangle_add(evas_object_evas_get(parent));
+   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(64), 1);
+
+   List_Header *hdr = malloc(sizeof(List_Header));
+   pd->headers = eina_list_append(pd->headers, hdr);
+
+   return rec;
+}
+
 static Evas_Object *
 _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 {
@@ -1326,6 +1342,8 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)

[EGIT] [apps/evisum] master 01/01: proclist: no

2021-02-04 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=834368930d3657126bb1ce5037381617e9d56072

commit 834368930d3657126bb1ce5037381617e9d56072
Author: Alastair Poole 
Date:   Thu Feb 4 21:28:08 2021 +

proclist: no
---
 src/bin/ui/ui_process_list.c | 106 +--
 1 file changed, 32 insertions(+), 74 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index cdcd414..e37dd07 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -57,7 +57,6 @@ typedef struct
 
Evas_Object*btn_menu;
 
-   Eina_List  *btn_list;
Evas_Object*btn_pid;
Evas_Object*btn_uid;
Evas_Object*btn_cmd;
@@ -448,6 +447,27 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
evas_object_size_hint_min_set(rec, w, 1);
evas_object_show(o);
 
+   evas_object_geometry_get(pd->btn_uid, NULL, NULL, , NULL);
+   lb = evas_object_data_get(it->obj, "proc_uid");
+   pwd_entry = getpwuid(proc->uid);
+   if (pwd_entry)
+ snprintf(buf, sizeof(buf), "%s", pwd_entry->pw_name);
+   else
+ snprintf(buf, sizeof(buf), "%i", proc->uid);
+   if (strcmp(buf, elm_object_text_get(lb)))
+ {
+elm_object_text_set(lb, buf);
+evas_object_geometry_get(lb, NULL, NULL, , NULL);
+if (ow > w)
+  {
+ evas_object_size_hint_min_set(pd->btn_uid, w, 1);
+ pd->skip_wait = 1;
+  }
+ }
+   rec = evas_object_data_get(lb, "rec");
+   evas_object_size_hint_min_set(rec, w, 1);
+   evas_object_show(lb);
+
evas_object_geometry_get(pd->btn_pid, NULL, NULL, , NULL);
lb = evas_object_data_get(it->obj, "proc_pid");
snprintf(buf, sizeof(buf), "%d", proc->pid);
@@ -475,27 +495,6 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
evas_object_size_hint_min_set(rec, w, 1);
evas_object_show(lb);
 
-   evas_object_geometry_get(pd->btn_uid, NULL, NULL, , NULL);
-   lb = evas_object_data_get(it->obj, "proc_uid");
-   pwd_entry = getpwuid(proc->uid);
-   if (pwd_entry)
- snprintf(buf, sizeof(buf), "%s", pwd_entry->pw_name);
-   else
- snprintf(buf, sizeof(buf), "%i", proc->uid);
-   if (strcmp(buf, elm_object_text_get(lb)))
- {
-elm_object_text_set(lb, buf);
-evas_object_geometry_get(lb, NULL, NULL, , NULL);
-if (ow > w)
-  {
- evas_object_size_hint_min_set(pd->btn_uid, w, 1);
- pd->skip_wait = 1;
-  }
- }
-   rec = evas_object_data_get(lb, "rec");
-   evas_object_size_hint_min_set(rec, w, 1);
-   evas_object_show(lb);
-
evas_object_geometry_get(pd->btn_size, NULL, NULL, , NULL);
lb = evas_object_data_get(it->obj, "proc_size");
snprintf(buf, sizeof(buf), "%s", evisum_size_format(proc->mem_size));
@@ -1285,17 +1284,6 @@ _btn_menu_clicked_cb(void *data, Evas_Object *obj,
  _main_menu_dismissed_cb(pd, NULL, NULL);
 }
 
-static Evas_Object *
-_pad(Ui_Data *pd, int w)
-{
-   Evas_Object *rec, *parent = pd->win;
-   rec = evas_object_rectangle_add(evas_object_evas_get(parent));
-   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(w), 1); 
-   evas_object_size_hint_max_set(rec, ELM_SCALE_SIZE(w), -1);
-   pd->btn_list = eina_list_append(pd->btn_list, rec);
-   return rec;
-}
-
 static Evas_Object *
 _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 {
@@ -1335,12 +1323,10 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 (ui->proc.sort_type == SORT_BY_UID ?
 ui->proc.sort_reverse : 0),
 ui->proc.sort_type == SORT_BY_UID);
-   evas_object_size_hint_weight_set(btn, 0, 0);
+   evas_object_size_hint_weight_set(btn, 1.0, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("user"));
evas_object_show(btn);
-   rec = _pad(pd, 1);
-   elm_table_pack(tbl, rec, i, 1, 1, 1);
elm_table_pack(tbl, btn, i++, 1, 1, 1);
evas_object_smart_callback_add(btn, "clicked",
   _btn_uid_clicked_cb, pd);
@@ -1350,12 +1336,10 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 (ui->proc.sort_type == SORT_BY_PID ?
 ui->proc.sort_reverse : 0),
 ui->proc.sort_type == SORT_BY_PID);
-   evas_object_size_hint_weight_set(btn, 0, 0);
+   evas_object_size_hint_weight_set(btn, 1.0, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("pid"));
evas_object_show(btn);
-   rec = _pad(pd, 1);
-   elm_table_pack(tbl, rec, i, 1, 1, 1);
elm_table_pack(tbl, btn, i++, 1, 1, 1);
evas_object_smart_callback_add(btn, "clicked",
   _btn_pid_clicked_cb, pd);
@@ -1365,12 +1349,10 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 (ui->proc.sort_type == SORT_BY_PRI ?
 ui->proc.sort_reverse : 0),
 

[EGIT] [apps/evisum] master 01/01: proclist: line.

2021-02-04 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=8aab23513be0246944e02c22aebe83474cb78591

commit 8aab23513be0246944e02c22aebe83474cb78591
Author: Alastair Poole 
Date:   Thu Feb 4 11:51:12 2021 +

proclist: line.
---
 src/bin/ui/ui_process_list.c | 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index ce252b5..89b4d55 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -360,7 +360,6 @@ _item_create(Evas_Object *obj)
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_time", i++);
evas_object_size_hint_align_set(lb, 0.5, FILL);
-
lb = _item_column_add(tbl, "proc_state", i++);
evas_object_size_hint_align_set(lb, 0.5, FILL);
 
@@ -426,7 +425,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
   evas_object_size_hint_min_set(pd->btn_pid, w, 1);
  }
rec = evas_object_data_get(lb, "rec");
-   evas_object_size_hint_min_set(rec, w, 1);
+   evas_object_size_hint_min_set(rec, w + 1, 1);
evas_object_show(lb);
 
evas_object_geometry_get(pd->btn_pri, NULL, NULL, , NULL);
@@ -435,7 +434,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
if (strcmp(buf, elm_object_text_get(lb)))
  elm_object_text_set(lb, buf);
rec = evas_object_data_get(lb, "rec");
-   evas_object_size_hint_min_set(rec, w, 1);
+   evas_object_size_hint_min_set(rec, w + 1, 1);
evas_object_show(lb);
 
evas_object_geometry_get(pd->btn_nice, NULL, NULL, , NULL);
@@ -511,7 +510,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 pd->skip_wait = 1;
  }
rec = evas_object_data_get(lb, "rec");
-   evas_object_size_hint_min_set(rec, w, 1);
+   evas_object_size_hint_min_set(rec, w + 1, 1);
evas_object_show(lb);
elm_box_recalculate(hbx);
 
@@ -540,7 +539,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
if (strcmp(buf, elm_object_text_get(lb)))
  elm_object_text_set(lb, buf);
rec = evas_object_data_get(lb, "rec");
-   evas_object_size_hint_min_set(rec, w, 1);
+   evas_object_size_hint_min_set(rec, w + 1, 1);
evas_object_show(lb);
 
evas_object_geometry_get(pd->btn_time, NULL, NULL, , NULL);
@@ -550,17 +549,16 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
if (strcmp(buf, elm_object_text_get(lb)))
  elm_object_text_set(lb, buf);
rec = evas_object_data_get(lb, "rec");
-   evas_object_size_hint_min_set(rec, w, 1);
+   evas_object_size_hint_min_set(rec, w + 1, 1);
evas_object_show(lb);
 
-   pb = evas_object_data_get(it->obj, "proc_cpu_usage");
evas_object_geometry_get(pd->btn_state, NULL, NULL, , NULL);
lb = evas_object_data_get(it->obj, "proc_state");
snprintf(buf, sizeof(buf), "%s", proc->state);
if (strcmp(buf, elm_object_text_get(lb)))
  elm_object_text_set(lb, buf);
rec = evas_object_data_get(lb, "rec");
-   evas_object_size_hint_min_set(rec, w, 1);
+   evas_object_size_hint_min_set(rec, w + 1, 1);
evas_object_show(lb);
 
pb = evas_object_data_get(it->obj, "proc_cpu_usage");
@@ -1407,9 +1405,9 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 
pd->btn_threads = btn = elm_button_add(parent);
_btn_icon_state_init(btn,
-(ui->proc.sort_type == SORT_BY_STATE ?
+(ui->proc.sort_type == SORT_BY_THREADS ?
 ui->proc.sort_reverse : 0),
-ui->proc.sort_type == SORT_BY_STATE);
+ui->proc.sort_type == SORT_BY_THREADS);
evas_object_size_hint_weight_set(btn, 0, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("thr"));
@@ -1449,7 +1447,7 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 (ui->proc.sort_type == SORT_BY_STATE ?
 ui->proc.sort_reverse : 0),
 ui->proc.sort_type == SORT_BY_STATE);
-   evas_object_size_hint_weight_set(btn, EXPAND, 0);
+   evas_object_size_hint_weight_set(btn, 0, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("state"));
evas_object_show(btn);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: think

2021-02-03 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=1d44cd83fd621413ed8e8baa8ba37abf97fca516

commit 1d44cd83fd621413ed8e8baa8ba37abf97fca516
Author: Alastair Poole 
Date:   Wed Feb 3 11:22:04 2021 +

proclist: think
---
 src/bin/ui/ui_process_list.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index d945f1a..f5e1feb 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -328,7 +328,7 @@ _item_create(Evas_Object *obj)
elm_table_pack(tbl, hbx, i, 0, 1, 1);
 
rec = evas_object_rectangle_add(tbl);
-   evas_object_size_hint_min_set(rec, 6, 1);
+   evas_object_size_hint_min_set(rec, ELM_SCALE_SIZE(4), 1);
elm_box_pack_end(hbx, rec);
 
rec = evas_object_rectangle_add(tbl);
@@ -343,7 +343,7 @@ _item_create(Evas_Object *obj)
elm_box_pack_end(hbx, lb);
 
lb = _item_column_add(tbl, "proc_pid", i++);
-   evas_object_size_hint_align_set(lb, 1.0, FILL);
+   evas_object_size_hint_align_set(lb, 0.0, FILL);
lb = _item_column_add(tbl, "proc_prio", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_nice", i++);
@@ -359,7 +359,7 @@ _item_create(Evas_Object *obj)
lb = _item_column_add(tbl, "proc_cpuid", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_time", i++);
-   evas_object_size_hint_align_set(lb, 1.0, FILL);
+   evas_object_size_hint_align_set(lb, 0.5, FILL);
 
lb = _item_column_add(tbl, "proc_state", i++);
evas_object_size_hint_align_set(lb, 0.5, FILL);
@@ -1332,7 +1332,7 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 (ui->proc.sort_type == SORT_BY_PID ?
 ui->proc.sort_reverse : 0),
 ui->proc.sort_type == SORT_BY_PID);
-   evas_object_size_hint_weight_set(btn, EXPAND, 0);
+   evas_object_size_hint_weight_set(btn, 0, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("pid"));
evas_object_show(btn);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: btn

2021-02-03 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=f36b7426cadae30f06c2190be383480c4a0d720b

commit f36b7426cadae30f06c2190be383480c4a0d720b
Author: Alastair Poole 
Date:   Wed Feb 3 10:17:40 2021 +

proclist: btn
---
 src/bin/ui/ui_process_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index e3d82ed..d945f1a 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1005,7 +1005,7 @@ _btn_time_clicked_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
if (ui->proc.sort_type == SORT_BY_TIME)
  ui->proc.sort_reverse = !ui->proc.sort_reverse;
ui->proc.sort_type = SORT_BY_TIME;
-   _btn_clicked_state_save(pd, pd->btn_state);
+   _btn_clicked_state_save(pd, pd->btn_time);
 }
 
 static void

-- 




[EGIT] [apps/evisum] master 01/01: proclist: that will do.

2021-02-03 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=221771fb18988f3264b4a9e3aa789a277813dc0a

commit 221771fb18988f3264b4a9e3aa789a277813dc0a
Author: Alastair Poole 
Date:   Wed Feb 3 10:15:04 2021 +

proclist: that will do.

Need to rethink this "custom" widget
---
 src/bin/ui/ui_process_list.c | 17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 1b7dc66..e3d82ed 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -360,12 +360,9 @@ _item_create(Evas_Object *obj)
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_time", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
+
lb = _item_column_add(tbl, "proc_state", i++);
-   evas_object_size_hint_align_set(lb, 1.0, FILL);
-   rec = evas_object_rectangle_add(evas_object_evas_get(obj));
-   evas_object_size_hint_min_set(rec, 4, 1);
-   evas_object_size_hint_max_set(rec, 4, -1);
-   elm_table_pack(tbl, rec, i++, 0, 1, 1);
+   evas_object_size_hint_align_set(lb, 0.5, FILL);
 
pb = elm_progressbar_add(hbx);
evas_object_size_hint_weight_set(pb, EXPAND, EXPAND);
@@ -1335,7 +1332,7 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 (ui->proc.sort_type == SORT_BY_PID ?
 ui->proc.sort_reverse : 0),
 ui->proc.sort_type == SORT_BY_PID);
-   evas_object_size_hint_weight_set(btn, 0, 0);
+   evas_object_size_hint_weight_set(btn, EXPAND, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("pid"));
evas_object_show(btn);
@@ -1436,10 +1433,10 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 
pd->btn_time = btn = elm_button_add(parent);
_btn_icon_state_init(btn,
-(ui->proc.sort_type == SORT_BY_CPU ?
+(ui->proc.sort_type == SORT_BY_TIME ?
 ui->proc.sort_reverse : 0),
-ui->proc.sort_type == SORT_BY_CPU);
-   evas_object_size_hint_weight_set(btn, 0, 0);
+ui->proc.sort_type == SORT_BY_TIME);
+   evas_object_size_hint_weight_set(btn, EXPAND, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("time"));
evas_object_show(btn);
@@ -1452,7 +1449,7 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 (ui->proc.sort_type == SORT_BY_STATE ?
 ui->proc.sort_reverse : 0),
 ui->proc.sort_type == SORT_BY_STATE);
-   evas_object_size_hint_weight_set(btn, 0, 0);
+   evas_object_size_hint_weight_set(btn, EXPAND, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("state"));
evas_object_show(btn);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: GROW

2021-02-03 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=e51e4e664786c7df894c5122d29505291a27e0f7

commit e51e4e664786c7df894c5122d29505291a27e0f7
Author: Alastair Poole 
Date:   Wed Feb 3 09:50:46 2021 +

proclist: GROW
---
 src/bin/ui/ui_process_list.c | 19 ---
 src/bin/ui/ui_util.h |  3 ++-
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 1b7dc66..9e8afb7 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -363,7 +363,7 @@ _item_create(Evas_Object *obj)
lb = _item_column_add(tbl, "proc_state", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
rec = evas_object_rectangle_add(evas_object_evas_get(obj));
-   evas_object_size_hint_min_set(rec, 4, 1);
+   evas_object_size_hint_min_set(rec, 8, 1);
evas_object_size_hint_max_set(rec, 4, -1);
elm_table_pack(tbl, rec, i++, 0, 1, 1);
 
@@ -548,6 +548,9 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 
evas_object_geometry_get(pd->btn_time, NULL, NULL, , NULL);
lb = evas_object_data_get(it->obj, "proc_time");
+   evas_object_geometry_get(lb, NULL, NULL, , NULL);
+   if (ow > w)
+ evas_object_size_hint_min_set(pd->btn_cmd, w, 1);
 
_run_time_set(buf, sizeof(buf), proc->run_time);
if (strcmp(buf, elm_object_text_get(lb)))
@@ -556,9 +559,11 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
evas_object_size_hint_min_set(rec, w, 1);
evas_object_show(lb);
 
-   pb = evas_object_data_get(it->obj, "proc_cpu_usage");
evas_object_geometry_get(pd->btn_state, NULL, NULL, , NULL);
lb = evas_object_data_get(it->obj, "proc_state");
+   evas_object_geometry_get(lb, NULL, NULL, , NULL);
+   if (ow > w)
+ evas_object_size_hint_min_set(pd->btn_cmd, w, 1);
snprintf(buf, sizeof(buf), "%s", proc->state);
if (strcmp(buf, elm_object_text_get(lb)))
  elm_object_text_set(lb, buf);
@@ -1400,7 +1405,7 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 (ui->proc.sort_type == SORT_BY_RSS ?
 ui->proc.sort_reverse : 0),
 ui->proc.sort_type == SORT_BY_RSS);
-   evas_object_size_hint_weight_set(btn, 1.0, 0);
+   evas_object_size_hint_weight_set(btn, EXPAND, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("res"));
evas_object_show(btn);
@@ -1436,10 +1441,10 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 
pd->btn_time = btn = elm_button_add(parent);
_btn_icon_state_init(btn,
-(ui->proc.sort_type == SORT_BY_CPU ?
+(ui->proc.sort_type == SORT_BY_TIME ?
 ui->proc.sort_reverse : 0),
-ui->proc.sort_type == SORT_BY_CPU);
-   evas_object_size_hint_weight_set(btn, 0, 0);
+ui->proc.sort_type == SORT_BY_TIME);
+   evas_object_size_hint_weight_set(btn, GROW, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("time"));
evas_object_show(btn);
@@ -1452,7 +1457,7 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 (ui->proc.sort_type == SORT_BY_STATE ?
 ui->proc.sort_reverse : 0),
 ui->proc.sort_type == SORT_BY_STATE);
-   evas_object_size_hint_weight_set(btn, 0, 0);
+   evas_object_size_hint_weight_set(btn, GROW, 0);
evas_object_size_hint_align_set(btn, FILL, FILL);
elm_object_text_set(btn, _("state"));
evas_object_show(btn);
diff --git a/src/bin/ui/ui_util.h b/src/bin/ui/ui_util.h
index 32003ed..7865363 100644
--- a/src/bin/ui/ui_util.h
+++ b/src/bin/ui/ui_util.h
@@ -4,8 +4,9 @@
 #include 
 #include "system/process.h"
 
-#define FILL EVAS_HINT_FILL
+#define FILL   EVAS_HINT_FILL
 #define EXPAND EVAS_HINT_EXPAND
+#define GROW0.1
 
 #define TAB_BTN_WIDTH  74
 #define TAB_BTN_HEIGHT 2

-- 




[EGIT] [apps/evisum] master 01/01: proclist: brackets

2021-01-31 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=9d2e67c1daf534b44e47d26f41bf76dd9ec6d3eb

commit 9d2e67c1daf534b44e47d26f41bf76dd9ec6d3eb
Author: Alastair Poole 
Date:   Sun Jan 31 12:49:11 2021 +

proclist: brackets
---
 src/bin/ui/ui_process_list.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 2d1b083..fd8a75a 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -627,10 +627,9 @@ _process_list_search_trim(Eina_List *list, Ui_Data *pd)
EINA_LIST_FOREACH_SAFE(list, l, l_next, proc)
  {
 if ((proc->pid == ui->program_pid) ||
-(pd->search_len &&
+((pd->search_len) &&
  (strncasecmp(proc->command, pd->search_text, pd->search_len) &&
- (!strstr(proc->command, pd->search_text)))
-)
+ (!strstr(proc->command, pd->search_text
)
  {
 proc_info_free(proc);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: fix search case.

2021-01-31 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=548a1b7ae00c3e8c8be0e527625a49bb931e0978

commit 548a1b7ae00c3e8c8be0e527625a49bb931e0978
Author: Alastair Poole 
Date:   Sun Jan 31 10:41:46 2021 +

proclist: fix search case.

Fix win loses focus, search remains, then escape clearing.
---
 src/bin/ui/ui_process_list.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 7d1a2bf..2d1b083 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1457,6 +1457,7 @@ _search_clear(Ui_Data *pd)
if (pd->search_text)
  free(pd->search_text);
pd->search_text = NULL;
+   pd->search_len = 0;
 }
 
 static void
@@ -1526,6 +1527,7 @@ _win_key_down_search(Ui_Data *pd, Evas_Event_Key_Down *ev)
if (!strcmp(ev->keyname, "Escape"))
  {
 elm_object_text_set(pd->search_entry, "");
+   _search_clear(pd);
 pd->skip_wait = 0;
 elm_object_focus_allow_set(pd->search_entry, 0);
 evas_object_lower(pd->search_pop);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: no pad...simple

2021-01-26 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=0de145be319e45932316f791e666ec1e77715e07

commit 0de145be319e45932316f791e666ec1e77715e07
Author: Alastair Poole 
Date:   Tue Jan 26 18:03:09 2021 +

proclist: no pad...simple
---
 src/bin/ui/ui_process_list.c | 16 ++--
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 2fd8876..842816a 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1243,14 +1243,10 @@ _btn_menu_clicked_cb(void *data, Evas_Object *obj,
 static Evas_Object *
 _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
 {
-   Evas_Object *bx, *fr, *tbl, *btn, *glist;
+   Evas_Object *tbl, *btn, *glist;
Ui *ui = pd->ui;
int i = 0;
 
-   bx = elm_box_add(parent);
-   evas_object_size_hint_weight_set(bx, EXPAND, 0);
-   evas_object_size_hint_align_set(bx, FILL, FILL);
-   evas_object_show(bx);
 
tbl = elm_table_add(parent);
evas_object_size_hint_weight_set(tbl, EXPAND, EXPAND);
@@ -1429,16 +1425,8 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
   _item_pid_secondary_clicked_cb, pd);
evas_object_smart_callback_add(pd->genlist, "unrealized",
   _item_unrealized_cb, pd);
-   elm_box_pack_end(bx, tbl);
 
-   fr = elm_frame_add(parent);
-   evas_object_size_hint_weight_set(fr, EXPAND, EXPAND);
-   evas_object_size_hint_align_set(fr, FILL, FILL);
-   elm_object_style_set(fr, "pad_small");
-   evas_object_show(fr);
-   elm_object_content_set(fr, bx);
-
-   return fr;
+   return tbl;
 }
 
 static Eina_Bool

-- 




[EGIT] [apps/evisum] master 01/01: proclist: remove that pad

2021-01-25 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=edf7ac5ddf1706c93fe1a197f105d8a92660f84d

commit edf7ac5ddf1706c93fe1a197f105d8a92660f84d
Author: Alastair Poole 
Date:   Mon Jan 25 23:53:33 2021 +

proclist: remove that pad
---
 src/bin/ui/ui_process_list.c | 18 +-
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index bac0a20..2fd8876 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -70,8 +70,6 @@ typedef struct
Evas_Object*btn_cpu_usage;
 } Ui_Data;
 
-#define PAD_W 4
-
 static Ui_Data *_pd = NULL;
 
 #if PROGRESS_CUSTOM_FORMAT
@@ -326,24 +324,14 @@ _item_create(Evas_Object *parent)
evas_object_show(lb);
elm_box_pack_end(hbx, lb);
 
-   rec = evas_object_rectangle_add(tbl);
-   evas_object_size_hint_min_set(rec, 4, 1);
-   elm_box_pack_end(hbx, rec);
-
lb = _item_column_add(tbl, "proc_pid", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_prio", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_nice", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
-   rec = evas_object_rectangle_add(tbl);
-   evas_object_size_hint_min_set(rec, PAD_W, 1);
-   elm_table_pack(tbl, rec, i++, 0, 1, 1);
lb = _item_column_add(tbl, "proc_uid", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
-   rec = evas_object_rectangle_add(tbl);
-   evas_object_size_hint_min_set(rec, PAD_W, 1);
-   elm_table_pack(tbl, rec, i++, 0, 1, 1);
lb = _item_column_add(tbl, "proc_size", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_rss", i++);
@@ -352,9 +340,6 @@ _item_create(Evas_Object *parent)
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_cpuid", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
-   rec = evas_object_rectangle_add(tbl);
-   evas_object_size_hint_min_set(rec, 8, 1);
-   elm_table_pack(tbl, rec, i++, 0, 1, 1);
lb = _item_column_add(tbl, "proc_state", i++);
evas_object_size_hint_align_set(lb, 0.5, FILL);
 
@@ -478,7 +463,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 
evas_object_geometry_get(pd->btn_menu, NULL, NULL, , NULL);
evas_object_geometry_get(pd->btn_cmd, NULL, NULL, , NULL);
-   w += (ow - PAD_W);
+   w += (ow - 8);
lb = evas_object_data_get(it->obj, "proc_cmd");
snprintf(buf, sizeof(buf), "%s", proc->command);
if (strcmp(buf, elm_object_text_get(lb)))
@@ -1271,7 +1256,6 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
evas_object_size_hint_weight_set(tbl, EXPAND, EXPAND);
evas_object_size_hint_align_set(tbl, FILL, FILL);
evas_object_show(tbl);
-   elm_table_padding_set(tbl, PAD_W, 0);
 
pd->btn_menu = btn = _btn_create(tbl, "menu", _("Menu"),
 _btn_menu_clicked_cb, pd);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: minor, minor concessions.

2021-01-25 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=8ba7813863df26e7f59f811410b0e3b08826d1a8

commit 8ba7813863df26e7f59f811410b0e3b08826d1a8
Author: Alastair Poole 
Date:   Mon Jan 25 21:29:39 2021 +

proclist: minor, minor concessions.

Wide? Use a virtual desktop!  :) Or at a later date.
---
 src/bin/ui/ui_process_list.c | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 1946aa9..bac0a20 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -70,7 +70,7 @@ typedef struct
Evas_Object*btn_cpu_usage;
 } Ui_Data;
 
-#define PAD_W 2
+#define PAD_W 4
 
 static Ui_Data *_pd = NULL;
 
@@ -331,13 +331,19 @@ _item_create(Evas_Object *parent)
elm_box_pack_end(hbx, rec);
 
lb = _item_column_add(tbl, "proc_pid", i++);
-   evas_object_size_hint_align_set(lb, 0.0, FILL);
+   evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_prio", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_nice", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
+   rec = evas_object_rectangle_add(tbl);
+   evas_object_size_hint_min_set(rec, PAD_W, 1);
+   elm_table_pack(tbl, rec, i++, 0, 1, 1);
lb = _item_column_add(tbl, "proc_uid", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
+   rec = evas_object_rectangle_add(tbl);
+   evas_object_size_hint_min_set(rec, PAD_W, 1);
+   elm_table_pack(tbl, rec, i++, 0, 1, 1);
lb = _item_column_add(tbl, "proc_size", i++);
evas_object_size_hint_align_set(lb, 1.0, FILL);
lb = _item_column_add(tbl, "proc_rss", i++);
@@ -422,7 +428,6 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
evas_object_show(lb);
 
evas_object_geometry_get(pd->btn_uid, NULL, NULL, , NULL);
-   w += PAD_W;
lb = evas_object_data_get(it->obj, "proc_uid");
pwd_entry = getpwuid(proc->uid);
if (pwd_entry)
@@ -444,7 +449,6 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
evas_object_show(lb);
 
evas_object_geometry_get(pd->btn_size, NULL, NULL, , NULL);
-   w += PAD_W;
lb = evas_object_data_get(it->obj, "proc_size");
snprintf(buf, sizeof(buf), "%s", evisum_size_format(proc->mem_size));
if (strcmp(buf, elm_object_text_get(lb)))
@@ -459,7 +463,6 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
evas_object_show(lb);
 
evas_object_geometry_get(pd->btn_rss, NULL, NULL, , NULL);
-   w += PAD_W;
lb = evas_object_data_get(it->obj, "proc_rss");
snprintf(buf, sizeof(buf), "%s", evisum_size_format(proc->mem_rss));
if (strcmp(buf, elm_object_text_get(lb)))
@@ -475,7 +478,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 
evas_object_geometry_get(pd->btn_menu, NULL, NULL, , NULL);
evas_object_geometry_get(pd->btn_cmd, NULL, NULL, , NULL);
-   w += ow;
+   w += (ow - PAD_W);
lb = evas_object_data_get(it->obj, "proc_cmd");
snprintf(buf, sizeof(buf), "%s", proc->command);
if (strcmp(buf, elm_object_text_get(lb)))

-- 




[EGIT] [apps/evisum] master 01/01: proclist: one byte

2021-01-24 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=72f3f9d3991d3995e58a3ef4f5fe01c7a7416997

commit 72f3f9d3991d3995e58a3ef4f5fe01c7a7416997
Author: Alastair Poole 
Date:   Sun Jan 24 15:20:25 2021 +

proclist: one byte
---
 src/bin/ui/ui_process_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 9910685..1946aa9 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1061,7 +1061,7 @@ _item_menu_manual_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 
 static void
 _item_menu_threads_cb(void *data, Evas_Object *obj EINA_UNUSED,
-   void *event_info EINA_UNUSED)
+  void *event_info EINA_UNUSED)
 {
Ui_Data *pd = data;
 

-- 




[EGIT] [apps/evisum] master 01/01: proclist: less blocky keyboard clacky

2021-01-24 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=72296fe9a7d2082053df45782915e76fdbfb9e34

commit 72296fe9a7d2082053df45782915e76fdbfb9e34
Author: Alastair Poole 
Date:   Sun Jan 24 10:11:28 2021 +

proclist: less blocky keyboard clacky
---
 src/bin/ui/ui_process_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index daeddf6..41c0ec5 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1473,7 +1473,7 @@ _search_empty_cb(void *data)
  }
 
if (pd->search_keytime &&
-   ((ecore_loop_time_get() - pd->search_keytime) > 0.05))
+   ((ecore_loop_time_get() - pd->search_keytime) > 0.1))
  {
 pd->skip_wait = 1;
 pd->search_keytime = 0;

-- 




[EGIT] [apps/evisum] master 01/01: proclist: handle backspace when hidden

2021-01-23 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=11b4ad2ba48ee965ca89c12bf7554b5443af014a

commit 11b4ad2ba48ee965ca89c12bf7554b5443af014a
Author: Alastair Poole 
Date:   Sat Jan 23 17:12:11 2021 +

proclist: handle backspace when hidden
---
 src/bin/ui/ui_process_list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index bfca494..ff7d21b 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1562,7 +1562,7 @@ _win_key_down_search(Ui_Data *pd, Evas_Event_Key_Down *ev)
 evas_object_lower(pd->search_pop);
 pd->search_visible = 0;
  }
-   else if (ev->string)
+   else if (ev->string && strcmp(ev->keyname, "BackSpace"))
  {
 if (isspace(ev->string[0])) return;
 size_t len = strlen(ev->string);

-- 




[EGIT] [apps/evisum] master 01/01: proclist: newline

2021-01-23 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=6f1444af65cbf7c9c846dde16edd754b88281271

commit 6f1444af65cbf7c9c846dde16edd754b88281271
Author: Alastair Poole 
Date:   Sat Jan 23 15:18:48 2021 +

proclist: newline
---
 src/bin/ui/ui_process_list.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index f491e9d..bfca494 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1504,7 +1504,6 @@ _search_key_down_cb(void *data, Evas *e, Evas_Object 
*obj, void *event_info)
  elm_object_text_set(pd->search_entry, "");
 
text = elm_object_text_get(obj);
-
if (text)
  {
 pd->search_keytime = ecore_loop_time_get();

-- 




[EGIT] [apps/evisum] master 01/01: proclist: search clear on "escape"

2021-01-22 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=6a2876d20723846aa037f70511262a2e1f4037d6

commit 6a2876d20723846aa037f70511262a2e1f4037d6
Author: Alastair Poole 
Date:   Fri Jan 22 16:37:51 2021 +

proclist: search clear on "escape"
---
 src/bin/ui/ui_process_list.c | 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 26a946e..d5a9cde 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1473,21 +1473,34 @@ _search_empty_cb(void *data)
return EINA_TRUE;
 }
 
+static void
+_search_clear(Ui_Data *pd)
+{
+   if (pd->search_text)
+ free(pd->search_text);
+   pd->search_text = NULL;
+}
+
 static void
 _search_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
+   Evas_Event_Key_Down *ev;
const char *text;
Ui_Data *pd;
size_t len;
 
pd = data;
+   ev = event_info;
+
+   if (ev && !strcmp(ev->keyname, "Escape"))
+ elm_object_text_set(pd->search_entry, "");
+
text = elm_object_text_get(obj);
 
if (text)
  {
+_search_clear(pd);
 len = strlen(text);
-if (pd->search_text)
-  free(pd->search_text);
 pd->search_text = strdup(text);
 pd->search_len = len;
 if (!len && !pd->search_timer)

-- 




[EGIT] [apps/evisum] master 01/01: proclist: indent and fuzz.

2021-01-22 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=d04cd151a75abf1be37018d0955a019caa0d58a4

commit d04cd151a75abf1be37018d0955a019caa0d58a4
Author: Alastair Poole 
Date:   Fri Jan 22 14:02:59 2021 +

proclist: indent and fuzz.
---
 src/bin/ui/ui_process_list.c | 25 -
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 5bd0a56..26a946e 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -353,7 +353,9 @@ _item_create(Evas_Object *parent)
evas_object_size_hint_align_set(pb, FILL, FILL);
elm_progressbar_unit_format_set(pb, "%1.1f %%");
 #if PROGRESS_CUSTOM_FORMAT
-   elm_progressbar_unit_format_function_set(pb, _pb_format_cb, 
_pb_format_free_cb);
+   elm_progressbar_unit_format_function_set(pb,
+_pb_format_cb,
+_pb_format_free_cb);
 #endif
elm_table_pack(tbl, pb, i++, 0, 1, 1);
evas_object_data_set(tbl, "proc_cpu_usage", pb);
@@ -640,9 +642,12 @@ _process_list_search_trim(Eina_List *list, Ui_Data *pd)
 
EINA_LIST_FOREACH_SAFE(list, l, l_next, proc)
  {
-if ((pd->search_len &&
-(strncasecmp(proc->command, pd->search_text, pd->search_len))) ||
-(proc->pid == ui->program_pid))
+if ((proc->pid == ui->program_pid) ||
+(pd->search_len &&
+ (strncasecmp(proc->command, pd->search_text, pd->search_len) &&
+ (!strstr(proc->command, pd->search_text)))
+)
+   )
  {
 proc_info_free(proc);
 list = eina_list_remove_list(list, l);
@@ -1547,7 +1552,7 @@ _win_key_down_search(Ui_Data *pd, Evas_Event_Key_Down *ev)
  elm_entry_entry_append(pd->search_entry, ev->string);
  elm_entry_cursor_pos_set(pd->search_entry, len);
  _search_key_down_cb(pd, NULL, pd->search_entry, NULL);
- }
+  }
 evas_object_geometry_get(pd->win, NULL, NULL, , );
 evas_object_move(pd->search_pop, w / 2, h / 2);
 evas_object_raise(pd->search_pop);
@@ -1627,7 +1632,8 @@ _win_resize_cb(void *data, Evas *e, Evas_Object *obj, 
void *event_info)
 }
 
 static Eina_Bool
-_evisum_config_changed_cb(void *data, int type EINA_UNUSED, void *event 
EINA_UNUSED)
+_evisum_config_changed_cb(void *data, int type EINA_UNUSED,
+  void *event EINA_UNUSED)
 {
Eina_Iterator *it;
Ui *ui;
@@ -1655,7 +1661,8 @@ _evisum_config_changed_cb(void *data, int type 
EINA_UNUSED, void *event EINA_UNU
 }
 
 static void
-_win_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void 
*event_info EINA_UNUSED)
+_win_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
+ void *event_info EINA_UNUSED)
 {
Ui_Data *pd;
Ui *ui;
@@ -1667,8 +1674,8 @@ _win_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj, void *event_info
 }
 
 static void
-_win_del_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED,
-void *event_info EINA_UNUSED)
+_win_del_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
+Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
 {
Ui *ui;
Ui_Data *pd = data;

-- 




[EGIT] [apps/evisum] master 01/01: proclist: scroll auto not on.

2021-01-21 Thread Alastair Poole
netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=31a89db2d92242f1d78af68ecc01acce42aef223

commit 31a89db2d92242f1d78af68ecc01acce42aef223
Author: Alastair Poole 
Date:   Thu Jan 21 17:03:29 2021 +

proclist: scroll auto not on.
---
 src/bin/ui/ui_process_list.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index 2032c62..5bd0a56 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -1420,7 +1420,7 @@ _ui_content_system_add(Ui_Data *pd, Evas_Object *parent)
elm_object_focus_allow_set(glist, 1);
elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_OFF,
(ui->proc.show_scroller ?
-ELM_SCROLLER_POLICY_ON :
+ELM_SCROLLER_POLICY_AUTO :
 ELM_SCROLLER_POLICY_OFF));
elm_genlist_multi_select_set(glist, EINA_FALSE);
evas_object_size_hint_weight_set(glist, EXPAND, EXPAND);
@@ -1647,7 +1647,7 @@ _evisum_config_changed_cb(void *data, int type 
EINA_UNUSED, void *event EINA_UNU
 
elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_OFF,
(ui->proc.show_scroller ?
-ELM_SCROLLER_POLICY_ON :
+ELM_SCROLLER_POLICY_AUTO :
 ELM_SCROLLER_POLICY_OFF));
pd->skip_wait = 1;
 

--