Andreas Tscharner avatar Andreas Tscharner committed 4d95312

gui: Add columns to treeview

Comments (0)

Files changed (1)

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()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.