Commits

Andreas Tscharner  committed 4d95312

gui: Add columns to treeview

  • Participants
  • Parent commits 5f38ac2

Comments (0)

Files changed (1)

File src/gui/MainWindow.cxx

  */
 
 
+#include <gtkmm/treeview.h>
 #include "MainWindow.hxx"
 #include "AddRemoveHandlers.hxx"
+#include "ResColumnModel.hxx"
+
+#ifdef HAVE_CONFIG_H
+#include "../lrc_config.h"
+#endif
 
 
 MainWindow::MainWindow(Gtk::Window *p_mainWin, Glib::RefPtr<Gtk::Builder> p_refBuilder)
 {
+	Gtk::TreeView *resFileView;
+
+
 	m_mainWindow = p_mainWin;
 	m_refBuilder = p_refBuilder;
 
 
 	m_resColModel = new ResColumnModel();
 	m_listResFiles = Gtk::ListStore::create(*m_resColModel);
+	m_refBuilder->get_widget("resTreeView", resFileView);
+	resFileView->set_model(m_listResFiles);
+
+	resFileView->append_column("Resource ID", m_resColModel->FUniqueResID);
+	resFileView->append_column("Dateiname", m_resColModel->FResFilename);
+	resFileView->append_column("Komprimierung", m_resColModel->FCompressType);
+#ifndef NO_ENCRYPTION
+	resFileView->append_column("Verschlüsselung", m_resColModel->FEncryptType);
+	resFileView->append_column("Passwort", m_resColModel->FEncPassword);
+#endif
 }
 
 MainWindow::~MainWindow()