netstar pushed a commit to branch master.

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

commit 4a0f35c7b172240e28d9cb73c06a8e0dfdc4cc88
Author: Alastair Poole <[email protected]>
Date:   Thu Dec 31 20:17:02 2020 +0000

    ui: not much
---
 data/images/ladyhand.png     | Bin 672153 -> 659708 bytes
 src/bin/ui/ui_disk.c         |   2 +-
 src/bin/ui/ui_process_list.c |  24 ++++++++++--------------
 src/bin/ui/ui_process_view.c |  10 +++++-----
 src/bin/ui/ui_util.c         |  31 ++++++++++++-------------------
 5 files changed, 28 insertions(+), 39 deletions(-)

diff --git a/data/images/ladyhand.png b/data/images/ladyhand.png
index a75723d..30d654e 100644
Binary files a/data/images/ladyhand.png and b/data/images/ladyhand.png differ
diff --git a/src/bin/ui/ui_disk.c b/src/bin/ui/ui_disk.c
index 4d14771..04a3919 100644
--- a/src/bin/ui/ui_disk.c
+++ b/src/bin/ui/ui_disk.c
@@ -104,7 +104,7 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
    Evas_Object *lb, *r, *pb;
    Evas_Coord w, ow;
    Ui_Data *pd;
-   File_System *inf =  data;
+   File_System *inf = data;
 
    if (!inf) return NULL;
    if (strcmp(source, "elm.swallow.content")) return NULL;
diff --git a/src/bin/ui/ui_process_list.c b/src/bin/ui/ui_process_list.c
index de477e9..757f101 100644
--- a/src/bin/ui/ui_process_list.c
+++ b/src/bin/ui/ui_process_list.c
@@ -20,7 +20,6 @@ typedef struct
    Evisum_Ui_Cache       *cache;
    Ecore_Event_Handler   *handler[2];
    Eina_Bool              skip_wait;
-   Eina_Bool              ready;
 
    Eina_Hash             *cpu_times;
    Ecore_Timer           *resize_timer;
@@ -362,7 +361,6 @@ _content_get(void *data, Evas_Object *obj, const char 
*source)
 
    if (strcmp(source, "elm.swallow.content")) return NULL;
    if (!proc) return NULL;
-   if (!pd->ready) return NULL;
 
    Item_Cache *it = evisum_ui_item_cache_item_get(pd->cache);
    if (!it)
@@ -734,16 +732,6 @@ _process_list(void *data, Ecore_Thread *thread)
 
    while (!ecore_thread_check(thread))
      {
-        list = _process_list_get(pd);
-
-        if (!pd->skip_wait)
-          ecore_thread_feedback(thread, list);
-        else
-          {
-             EINA_LIST_FREE(list, proc)
-               proc_info_free(proc);
-          }
-
         for (i = 0; i < delay * 8; i++)
           {
              if (ecore_thread_check(thread)) return;
@@ -755,7 +743,15 @@ _process_list(void *data, Ecore_Thread *thread)
                }
              usleep(125000);
           }
-        pd->ready = 1;
+        list = _process_list_get(pd);
+        if (!pd->skip_wait)
+          ecore_thread_feedback(thread, list);
+        else
+          {
+             EINA_LIST_FREE(list, proc)
+               proc_info_free(proc);
+          }
+
         delay = ui->proc.poll_delay;
      }
 }
@@ -1678,7 +1674,7 @@ ui_process_list_win_add(Ui *ui, Evas_Object *parent 
EINA_UNUSED)
 
    ui->proc.win = pd->win = win = elm_win_util_standard_add("evisum", 
"evisum");
    elm_win_autodel_set(win, EINA_TRUE);
-   elm_win_title_set(win, _("EFL System Monitor"));
+   elm_win_title_set(win, _("Process Explorer"));
    icon = elm_icon_add(win);
    elm_icon_standard_set(icon, "evisum");
    elm_win_icon_object_set(win, icon);
diff --git a/src/bin/ui/ui_process_view.c b/src/bin/ui/ui_process_view.c
index cb7a6db..408eabb 100644
--- a/src/bin/ui/ui_process_view.c
+++ b/src/bin/ui/ui_process_view.c
@@ -1009,7 +1009,7 @@ _threads_tab_add(Evas_Object *parent, Ui_Data *pd)
    pd->btn_thread_id = btn = elm_button_add(hbox);
    evas_object_size_hint_weight_set(btn, EXPAND, EXPAND);
    evas_object_size_hint_align_set(btn, FILL, FILL);
-   elm_object_text_set(btn, _("ID"));
+   elm_object_text_set(btn, _("id"));
    _btn_icon_state_set(btn, pd->sort_reverse);
    evas_object_show(btn);
    evas_object_smart_callback_add(btn, "clicked", _btn_thread_clicked_cb, pd);
@@ -1018,7 +1018,7 @@ _threads_tab_add(Evas_Object *parent, Ui_Data *pd)
    pd->btn_thread_name = btn = elm_button_add(hbox);
    evas_object_size_hint_weight_set(btn, EXPAND, EXPAND);
    evas_object_size_hint_align_set(btn, FILL, FILL);
-   elm_object_text_set(btn, _("Name"));
+   elm_object_text_set(btn, _("name"));
    _btn_icon_state_set(btn, pd->sort_reverse);
    evas_object_show(btn);
    evas_object_smart_callback_add(btn, "clicked", _btn_name_clicked_cb, pd);
@@ -1027,7 +1027,7 @@ _threads_tab_add(Evas_Object *parent, Ui_Data *pd)
    pd->btn_thread_state = btn = elm_button_add(hbox);
    evas_object_size_hint_weight_set(btn, EXPAND, EXPAND);
    evas_object_size_hint_align_set(btn, FILL, FILL);
-   elm_object_text_set(btn, _("State"));
+   elm_object_text_set(btn, _("state"));
    _btn_icon_state_set(btn, pd->sort_reverse);
    evas_object_show(btn);
    evas_object_smart_callback_add(btn, "clicked", _btn_state_clicked_cb, pd);
@@ -1036,7 +1036,7 @@ _threads_tab_add(Evas_Object *parent, Ui_Data *pd)
    pd->btn_thread_cpu_id = btn = elm_button_add(hbox);
    evas_object_size_hint_weight_set(btn, 0, EXPAND);
    evas_object_size_hint_align_set(btn, FILL, FILL);
-   elm_object_text_set(btn, _("CPU ID"));
+   elm_object_text_set(btn, _("cpu id"));
    _btn_icon_state_set(btn, pd->sort_reverse);
    evas_object_show(btn);
    evas_object_smart_callback_add(btn, "clicked", _btn_cpu_id_clicked_cb, pd);
@@ -1045,7 +1045,7 @@ _threads_tab_add(Evas_Object *parent, Ui_Data *pd)
    pd->btn_thread_cpu_usage = btn = elm_button_add(hbox);
    evas_object_size_hint_weight_set(btn, EXPAND, EXPAND);
    evas_object_size_hint_align_set(btn, FILL, FILL);
-   elm_object_text_set(btn, _("CPU %"));
+   elm_object_text_set(btn, _("cpu %"));
    _btn_icon_state_set(btn, pd->sort_reverse);
    evas_object_show(btn);
    evas_object_smart_callback_add(btn, "clicked",
diff --git a/src/bin/ui/ui_util.c b/src/bin/ui/ui_util.c
index 4c19560..e23a084 100644
--- a/src/bin/ui/ui_util.c
+++ b/src/bin/ui/ui_util.c
@@ -133,7 +133,7 @@ evisum_size_format(unsigned long long bytes)
         --precision;
      }
 
-   s = eina_slstr_printf("%1.*f %c", precision, (double) value / powi, *unit);
+   s = eina_slstr_printf("%1.*f%c", precision, (double) value / powi, *unit);
 
    return s;
 }
@@ -283,7 +283,6 @@ typedef struct {
    Ecore_Animator *animator;
    int             pos;
    int             pos2;
-   Eina_Bool       im_upwards;
 } Animate_Data;
 
 static void
@@ -348,28 +347,20 @@ about_anim(void *data)
 
    if (ad->pos <= -oh) ad->pos = h;
 
-   if (!(t % 120)) begin = 1;
+   if (!(t % 15)) begin = 1;
 
    if (!begin) return EINA_TRUE;
 
    evas_object_geometry_get(ad->im, &ix, &iy, &iw, &ih);
 
-   if (ad->im_upwards)
-     ad->pos2 -= 1;
-   else
-     ad->pos2 += 5;
+   ad->pos2 += 7;
 
    evas_object_move(ad->im, ix, ad->pos2);
    evas_object_show(ad->im);
 
-   if (ad->pos2 < ih)
-     {
-        ad->im_upwards = 0;
-     }
-   else if (ad->pos2 > h + ih)
+   if (ad->pos2 > h + oh)
      {
-        ad->pos2 = (h + ih);
-        ad->im_upwards = 1;
+        ad->pos2 = -oh;
         srand(t);
         evas_object_move(ad->im, rand() % w, ad->pos2);
         evas_object_hide(ad->im);
@@ -407,7 +398,8 @@ evisum_about_window_show(void *data)
       "FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF <br>"
       "CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT <br>"
       "OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS <br>"
-      "SOFTWARE.<br></></>";
+      "SOFTWARE.<br><br><br><br><br><br><br><br><br><br><br>"
+      "monitor like its 1999...</></i>";
 
    ui = data;
 
@@ -425,8 +417,10 @@ evisum_about_window_show(void *data)
    elm_bg_file_set(bg, evisum_icon_path_get("ladyhand"), NULL);
    elm_win_resize_object_add(win, bg);
    evas_object_show(bg);
-   evas_object_size_hint_min_set(bg, 320 * elm_config_scale_get(),
-                   320 * elm_config_scale_get());
+   evas_object_size_hint_min_set(bg, ELM_SCALE_SIZE(320),
+                                ELM_SCALE_SIZE(400));
+   evas_object_size_hint_max_set(bg, ELM_SCALE_SIZE(320),
+                                 ELM_SCALE_SIZE(400));
 
    tbl = elm_table_add(win);
    evas_object_show(tbl);
@@ -455,8 +449,7 @@ evisum_about_window_show(void *data)
    about->pos = elm_config_scale_get() * 320;
    about->ui = ui;
    about->im = im;
-   about->pos2 = h + ih + ih;
-   about->im_upwards = 1;
+   about->pos2 = -ih;
    about->animator = ecore_animator_add(about_anim, about);
    evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _win_del_cb, about);
    evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, _about_resize_cb, 
about);

-- 


Reply via email to