Добавил заголовок в csv файл

pull/20/head
Igor Belitskiy 3 years ago
parent dea014f309
commit db94a299a5

@ -1 +1,2 @@
Option;Tone code
ubbeep;1 22 333 4444 5555 ubbeep;1 22 333 4444 5555
1 ubbeep Option 1 22 333 4444 5555 Tone code
1 Option Tone code
2 ubbeep ubbeep 1 22 333 4444 5555 1 22 333 4444 5555

@ -717,7 +717,7 @@ void MainWindow::set_init_data_superuser(std::map<string, string> &map_temp) {
void MainWindow::set_data_csv_melody() { void MainWindow::set_data_csv_melody() {
string path_name = ""; string path_name = "";
path_name = path_name + path_resources + "/" + path_melody; path_name = path_name + path_resources + "/" + melody_csv;
string line; string line;
string all_melody = ""; string all_melody = "";
string all_melody_old = ""; string all_melody_old = "";
@ -765,7 +765,7 @@ void MainWindow::set_init_data_melody(std::map<string, string> &map_temp) {
list_store_melody = Gtk::ListStore::create(m_columns_melody); list_store_melody = Gtk::ListStore::create(m_columns_melody);
treeViewMelody->set_model(list_store_melody); treeViewMelody->set_model(list_store_melody);
string path_name = ""; string path_name = "";
path_name = path_name + path_resources + "/" + path_melody; path_name = path_name + path_resources + "/" + melody_csv;
vector<tuple<string, string>> vec_melody = Utils::read_csv_melody(path_name); vector<tuple<string, string>> vec_melody = Utils::read_csv_melody(path_name);
bool flag = false; bool flag = false;
string cgf_code_melody = map_temp["GRUB_PLAY"]; string cgf_code_melody = map_temp["GRUB_PLAY"];

@ -132,7 +132,7 @@ void me_thread(string cmd);
#define icon_checked "com.ublinux.ubl-settings-bootloader.checked" #define icon_checked "com.ublinux.ubl-settings-bootloader.checked"
#define icon_warning "com.ublinux.ubl-settings-bootloader.warning" #define icon_warning "com.ublinux.ubl-settings-bootloader.warning"
#define kernel_csv "grub-cmdline-linux.csv" #define kernel_csv "grub-cmdline-linux.csv"
#define path_melody "grub-play.csv" #define melody_csv "grub-play.csv"
#define IPT_csv "grub-terminal-input.csv" #define IPT_csv "grub-terminal-input.csv"
#define OTT_csv "grub-terminal-output.csv" #define OTT_csv "grub-terminal-output.csv"
#define path_app "/usr/bin/" #define path_app "/usr/bin/"

@ -63,6 +63,7 @@ vector<tuple<string, string>> read_csv_melody(const string& filename) {
ifstream file(filename); ifstream file(filename);
string line; string line;
char delimiter = ';'; char delimiter = ';';
getline(file, line);
while (getline(file, line)) { while (getline(file, line)) {
stringstream stream(line); stringstream stream(line);
string name; string name;

Loading…
Cancel
Save