#include "ubhello.h"

void on_back_clicked(GtkWidget *, GtkWidget *socket){
    gtk_widget_destroy(socket);
}

void on_plug_connected(GtkSocket *self, main_window *widgets){
    gtk_widget_show(widgets->BackButton);
    g_signal_connect(G_OBJECT(widgets->BackButton),"clicked",G_CALLBACK(on_back_clicked),self);
    gtk_widget_hide(widgets->HeadBox);
}

void on_plug_disconnected(GtkSocket *self, main_window *widgets){
    gtk_widget_hide(widgets->BackButton);
    g_signal_handlers_disconnect_by_func(G_OBJECT(widgets->BackButton),G_CALLBACK(on_back_clicked),self);
    gtk_widget_show(widgets->HeadBox);
}