From c81bae465eaa5f871af572633cc0d75ffaeacf70 Mon Sep 17 00:00:00 2001 From: Macr0Nerd Date: Thu, 2 May 2019 09:31:15 -0500 Subject: [PATCH] Added cleanup --- workshop/HoneyGUI/configDisplay.cpp | 2 ++ workshop/HoneyGUI/pluginDisplay.cpp | 15 +-------------- workshop/HoneyGUI/pluginDisplay.h | 1 - 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/workshop/HoneyGUI/configDisplay.cpp b/workshop/HoneyGUI/configDisplay.cpp index a9c4a0c..4041538 100644 --- a/workshop/HoneyGUI/configDisplay.cpp +++ b/workshop/HoneyGUI/configDisplay.cpp @@ -42,6 +42,8 @@ int configDisplay::file_replace(std::string toReplace, std::string replaceWith, filein2.close(); fileout2.close(); + system("x=$(find ~/ -name \"honeybot\" | head -n 1); rm $x/honeybot/settings/temp.txt"); + return 0; } diff --git a/workshop/HoneyGUI/pluginDisplay.cpp b/workshop/HoneyGUI/pluginDisplay.cpp index 384569a..21e8a19 100644 --- a/workshop/HoneyGUI/pluginDisplay.cpp +++ b/workshop/HoneyGUI/pluginDisplay.cpp @@ -51,13 +51,6 @@ pluginDisplay::pluginDisplay() : plugPane(Gtk::ORIENTATION_VERTICAL), plugs(Gtk: plugins.push_back(strTemp.substr(0, strTemp.length() - 3)); } - infile.close(); - infile.open(path + "settings/STD_PLUGINS.conf"); - - while (getline(infile, strTemp)) { //Reading the standard plugins - stdPlugins.push_back(strTemp); - } - infile.close(); get_list(); //Getting the selected plugins @@ -65,17 +58,11 @@ pluginDisplay::pluginDisplay() : plugPane(Gtk::ORIENTATION_VERTICAL), plugs(Gtk: for (int i = 0; i < plugins.size(); ++i) { //Creating each CheckButton plugs.pack_start(butts[i]); //Adding it into view - strTemp = "User Plugin"; - - if (std::find(stdPlugins.begin(), stdPlugins.end(), plugins[i]) != stdPlugins.end()){ - strTemp = "Standard Plugin"; //Checking if its a Standard Plugin - } - if (std::find(selected.begin(), selected.end(), plugins[i]) != selected.end()){ butts[i].set_active(true); //If its preselected than activate it } - butts[i].set_label(plugins[i] + " | " + strTemp); //Setting the label + butts[i].set_label(plugins[i]); //Setting the label butts[i].signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &pluginDisplay::alterCheck), butts[i].property_active(), plugins[i]) ); //Connecting the signal } diff --git a/workshop/HoneyGUI/pluginDisplay.h b/workshop/HoneyGUI/pluginDisplay.h index b5a9b36..f66032b 100644 --- a/workshop/HoneyGUI/pluginDisplay.h +++ b/workshop/HoneyGUI/pluginDisplay.h @@ -24,7 +24,6 @@ class pluginDisplay : public Gtk::Frame { std::string path; //The path to honeybot std::string checks; //The string to save all the selected plugins to for easy file writing std::vector plugins; //All the available plugins - std::vector stdPlugins; //Vector of standard plugins std::vector selected; //Vector of the plugins INITIALLY selected Gtk::Alignment alignment1;