From 6ad1bdcf4b81785c8296b29eaccb73becebce21f Mon Sep 17 00:00:00 2001 From: monsta Date: Wed, 2 Mar 2016 11:37:14 +0300 Subject: clean up some includes, remove some dead code --- src/cgroups.cpp | 8 ++++---- src/cgroups.h | 6 ++---- src/lsof.cpp | 11 ----------- src/util.h | 4 ---- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/cgroups.cpp b/src/cgroups.cpp index eafa1e3..e21196e 100644 --- a/src/cgroups.cpp +++ b/src/cgroups.cpp @@ -1,9 +1,9 @@ #include -#include +#include #include -#include "procman.h" +#include "cgroups.h" #include "util.h" gboolean @@ -20,7 +20,7 @@ cgroups_enabled(void) return has_cgroups; } -void +static void append_cgroup_name(char *line, gchar **current_cgroup_name) { gchar *controller, *path, *tmp, *path_plus_space; @@ -68,7 +68,7 @@ append_cgroup_name(char *line, gchar **current_cgroup_name) *current_cgroup_name = tmp; } -int +static int check_cgroup_changed(gchar *line, gchar *current_cgroup_set) { /* check if line is contained in current_cgroup_set */ diff --git a/src/cgroups.h b/src/cgroups.h index 8c42f6f..2729337 100644 --- a/src/cgroups.h +++ b/src/cgroups.h @@ -5,10 +5,8 @@ #include "procman.h" -void -get_process_cgroup_info (ProcInfo *info); +void get_process_cgroup_info (ProcInfo *info); -gboolean -cgroups_enabled (void); +gboolean cgroups_enabled (void); #endif /* PROCMAN_CGROUP_H_20111103 */ diff --git a/src/lsof.cpp b/src/lsof.cpp index 437900e..25cc3c4 100644 --- a/src/lsof.cpp +++ b/src/lsof.cpp @@ -7,9 +7,6 @@ #include -// #include - - #include #include #include @@ -338,11 +335,6 @@ void procman_lsof(ProcData *procdata) gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); GtkWidget *entry = gtk_entry_new(); - // entry = sexy_icon_entry_new(); - // sexy_icon_entry_add_clear_button(SEXY_ICON_ENTRY(entry)); - // GtkWidget *icon = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU); - // sexy_icon_entry_set_icon(SEXY_ICON_ENTRY(entry), SEXY_ICON_ENTRY_PRIMARY, GTK_IMAGE(icon)); - gtk_box_pack_start(GTK_BOX(hbox), entry, TRUE, TRUE, 0); GtkWidget *search_button = gtk_button_new_from_stock(GTK_STOCK_FIND); gtk_box_pack_start(GTK_BOX(hbox), search_button, FALSE, FALSE, 0); @@ -365,9 +357,6 @@ void procman_lsof(ProcData *procdata) GtkWidget *count_label = gtk_label_new(NULL); gtk_box_pack_end(GTK_BOX(results_box), count_label, FALSE, FALSE, 0); - - - // Scrolled TreeView GtkWidget *scrolled = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), diff --git a/src/util.h b/src/util.h index 38766f1..40934ae 100644 --- a/src/util.h +++ b/src/util.h @@ -5,11 +5,7 @@ #include #include -#include -#include #include -#include -#include using std::string; -- cgit v1.2.1