'Creates a view for the hosts model.
It will contain two columns, the first with the OS icon given in
the second column of the model. The second column of the view will
be the string contained in the fourth column of the model.
The first column of the view will be orderer according to the
second column of the model, and the second column of the view will
be ordered according to its fifth column.
Will connect activation of a row with the on_click method'

def create_view(self):

    self.view = Gtk.TreeView(self.model)
    self.view.set_activate_on_single_click(False)
    text_renderer = Gtk.CellRendererText()
    icon_renderer = Gtk.CellRendererPixbuf()
    column_hosts = Gtk.TreeViewColumn('Hosts', text_renderer, text=3)
    column_hosts.set_sort_column_id(4)
    column_hosts.set_sort_indicator(True)
    column_os = Gtk.TreeViewColumn('', icon_renderer, pixbuf=1)
    column_os.set_sort_column_id(2)
    column_os.set_sort_indicator(True)
    self.view.append_column(column_os)
    self.view.append_column(column_hosts)
    self.view.connect('row_activated', self.on_click)
    self.view.set_enable_search(True)
    self.view.set_search_column(2)
    return self.view
