MESignPostInfoDialog::MESignPostInfoDialog(
      OldConnection* conn, uint32 toNodeID, MEMapArea* mapArea)
{

   m_connection = conn;
   m_toNodeID = toNodeID;
   m_mapArea = mapArea;
   m_editSpDialog = NULL;

   char tmpStr[256];
   sprintf( tmpStr, "%s, 0x%x",
            "Sign post info", m_mapArea->getMap()->getMapID() );
   set_title(tmpStr);
   
   // list with all sign posts for this connection
   Gtk::Frame* frame = manage(new Gtk::Frame("Signposts:"));

   // Create ListStore and add to TreeView
   m_listStore = Gtk::ListStore::create(m_columns);
   m_treeView.set_model(m_listStore);

   // Add visible columns to TreeView
   m_treeView.append_column("REMOVE ME", m_columns.m_info);
   m_treeView.set_headers_visible(false);

   // Create selection object to handle selections
   m_selection = m_treeView.get_selection();
   if(!m_selection)
   { 
      // If this doesn't work we're in trouble.
      mc2log << error << "No selection object created for corresponding "
             << "TreeView" << endl;
      MC2_ASSERT(false);
   }


   Gtk::ScrolledWindow* scrolledWin = manage(new Gtk::ScrolledWindow());
   scrolledWin->set_size_request(200, 150);
   scrolledWin->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
   scrolledWin->add(m_treeView);
   frame->add(*scrolledWin);
   get_vbox()->pack_start(*frame, true, true, 5);

   // buttons for Edit and Close in the action area
   Gtk::HBox* actionBox = manage(new Gtk::HBox());
   if (m_mapArea != NULL) {
      Gtk::Button* editButton = manage(new Gtk::Button("Edit"));
      editButton->set_size_request(75, 25);
      editButton->signal_clicked().connect(
            sigc::mem_fun(*this, &MESignPostInfoDialog::editSpPressed));
      actionBox->pack_start(*editButton);
   } else {
      // empty label..
      Gtk::Label* editLabel = manage(new Gtk::Label(""));
      editLabel->set_size_request(75, 25);
      actionBox->pack_start(*editLabel);
   }
   Gtk::Button* closeButton = manage(new Gtk::Button("Close"));
   closeButton->signal_clicked().connect(
                  sigc::mem_fun(*this, &MESignPostInfoDialog::closePressed));
   closeButton->set_size_request(75, 25);
   actionBox->pack_start(*closeButton);
   get_action_area()->pack_start(*actionBox);

   // Don't show the dialog now, wait for show()-command.
}