Commit 1dfb522e authored by Robert Roth's avatar Robert Roth

Removed load average from processes view based on UI review

parent b466089c
......@@ -116,19 +116,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="load_avg_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin">12</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="proclist_box">
<property name="visible">True</property>
......@@ -155,7 +142,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
</object>
......
......@@ -157,7 +157,6 @@ public:
void shutdown();
GtkWidget *tree;
GtkWidget *loadavg;
GtkWidget *popup_menu;
GtkWidget *disk_list;
GtkWidget *stack;
......
......@@ -71,9 +71,6 @@ create_proc_view(GsmApplication *app, GtkBuilder * builder)
GtkWidget *proctree;
GtkWidget *scrolled;
/* create the processes tab */
app->loadavg = GTK_WIDGET (gtk_builder_get_object (builder, "load_avg_label"));
proctree = proctable_new (app);
scrolled = GTK_WIDGET (gtk_builder_get_object (builder, "processes_scrolled"));
......
......@@ -27,7 +27,6 @@
#include <glib/gi18n.h>
#include <glib/gprintf.h>
#include <glibtop.h>
#include <glibtop/loadavg.h>
#include <glibtop/proclist.h>
#include <glibtop/procstate.h>
#include <glibtop/procmem.h>
......@@ -1060,7 +1059,7 @@ refresh_list (GsmApplication *app, const pid_t* pid_list, const guint n)
// FIXME: this is broken if the unreachable parent becomes active
// i.e. it gets active or changes ower
// so we just clear the tree on __each__ update
// see proctable_update_list (ProcData * const procdata)
// see proctable_update (ProcData * const procdata)
if ((*it)->ppid == 0 or in_tree.find((*it)->ppid) != in_tree.end()) {
......@@ -1095,8 +1094,8 @@ refresh_list (GsmApplication *app, const pid_t* pid_list, const guint n)
update_info_mutable_cols(it->second);
}
static void
proctable_update_list (GsmApplication *app)
void
proctable_update (GsmApplication *app)
{
pid_t* pid_list;
glibtop_proclist proclist;
......@@ -1159,32 +1158,6 @@ proctable_update_list (GsmApplication *app)
/* proclist.number == g_list_length(procdata->info) == g_hash_table_size(procdata->pids) */
}
static char *
make_loadavg_string (void)
{
glibtop_loadavg buf;
glibtop_get_loadavg (&buf);
return g_strdup_printf (_("Load averages for the last 1, 5, 15 minutes: "
"%0.2f, %0.2f, %0.2f"),
buf.loadavg[0],
buf.loadavg[1],
buf.loadavg[2]);
}
void
proctable_update (GsmApplication * const app)
{
char* string;
string = make_loadavg_string();
gtk_label_set_text (GTK_LABEL(app->loadavg), string);
g_free (string);
proctable_update_list (app);
}
void
proctable_free_table (GsmApplication * const app)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment