refactoring, expand interface

This commit is contained in:
2020-05-13 00:56:26 +02:00
parent f9cdde7008
commit 7691c80fb4
12 changed files with 100 additions and 38 deletions

View File

@@ -1,9 +1,6 @@
#include "conexion_ssl.h"
#include "vista.h"
#include "controlador.h"
#include "view_loggin.h"
#include <iostream>
#include "read_uses.h"
#include "container_window.h"
#define FILE_CONFIG "config"
@@ -11,9 +8,6 @@ using namespace std;
int main(int argc, char *argv[])
{
auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example");
config_reader conf = config_reader(FILE_CONFIG);
conexion* con;
string option;
@@ -28,24 +22,7 @@ int main(int argc, char *argv[])
}else{
perror("no securty option found in config");
}
/*if(con->check_pass("test","ok")){
con->write_string("algo");
string salida;
con->read_string(salida,10);
cout << salida << endl;
}else{
cout << "contrasenia incorrecta" << endl;
}*/
view_loggin login(con);
//Shows the window and returns when it is closed.
//app->add_window(vis);
app->run(login);
if(login.login){
vista vis;
controlador cont(&vis, con);
app.reset();
app = Gtk::Application::create(argc, argv, "org.gtkmm.example");
app->run(vis);
}
auto app=Gtk::Application::create(argc, argv, "org.gtkmm.example");
container_window cont(con, app);
return 0;
}