This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository evisum.

View the commit online.

commit da43efe833bc362bc4318828d5548a2f78fa1879
Author: Alastair Poole <m...@alastairpoole.com>
AuthorDate: Wed Mar 5 20:40:16 2025 +0000

    process view: follow ppid.
    
    Make the rabbit hole even more traversible.
    
    Allow PPID to be selected.
---
 src/bin/ui/ui_process_view.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/ui_process_view.c b/src/bin/ui/ui_process_view.c
index c801bcf..dda6e13 100644
--- a/src/bin/ui/ui_process_view.c
+++ b/src/bin/ui/ui_process_view.c
@@ -540,6 +540,23 @@ _threads_cpu_usage(Win_Data *wd, Proc_Info *proc)
      }
 }
 
+static void
+_btn_ppid_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+   Evas_Object *entry;
+   const char *txt;
+   Proc_Info *proc;
+
+   entry = data;
+   txt = elm_object_text_get(entry);
+   proc = proc_info_by_pid(atoll(txt));
+
+   if (!proc) return;
+
+   ui_process_view_win_add(proc->pid, PROC_VIEW_DEFAULT);
+   proc_info_free(proc);
+}
+
 static void
 _item_children_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
                           void *event_info)
@@ -1199,9 +1216,14 @@ _general_tab_add(Evas_Object *parent, Win_Data *wd)
    wd->general.entry_uid = entry = _entry_add(parent);
    elm_table_pack(tb, entry, 1, i++, 1, 1);
 
-   lb = _lb_add(parent, _("PPID:"));
-   elm_table_pack(tb, lb, 0, i, 1, 1);
+   btn = elm_button_add(parent);
+   evas_object_size_hint_weight_set(btn, 0, EXPAND);
+   elm_object_text_set(btn, _("PPID:"));
+   elm_table_pack(tb, btn, 0, i, 1, 1);
+   evas_object_show(btn);
+
    wd->general.entry_ppid = entry = _entry_add(parent);
+   evas_object_smart_callback_add(btn, "clicked", _btn_ppid_clicked_cb, entry);
    elm_table_pack(tb, entry, 1, i++, 1, 1);
 
 #if defined(__MacOS__)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to