Commit c6bef264 authored by Johnny Jazeix's avatar Johnny Jazeix

Changes file paths from the recent files menus to absolute paths instead of...

Changes file paths from the recent files menus to absolute paths instead of relative (so no more problems when executing ViTE from another directory.
parent ed35063b
......@@ -18,12 +18,12 @@ IF(VITE_ENABLE_VBO)
INCLUDE(cmake/FindGLEW.cmake)
ENDIF(VITE_ENABLE_VBO)
OPTION(VITE_ENABLE_OTF "Enable the support of OTF file format." OFF)
OPTION(VITE_ENABLE_OTF "Enable the support of OTF file format." ON)
IF(VITE_ENABLE_OTF)
INCLUDE(cmake/FindOTF.cmake)
ENDIF(VITE_ENABLE_OTF)
OPTION(VITE_ENABLE_TAU "Enable the support of TAU file format." OFF)
OPTION(VITE_ENABLE_TAU "Enable the support of TAU file format." ON)
IF(VITE_ENABLE_TAU)
INCLUDE(cmake/FindTAU.cmake)
ENDIF(VITE_ENABLE_TAU)
......
This is ViTE version 1.2.
ViTE is a C++ Visual Trace Explorer using Qt for viewing.
***************
INSTALLING ViTE
***************
On Windows, please refer to the how_to_install.txt file in the windows.tar.gz file.
On MacOS X or Debian, follow the next step.
-----------------
For Windows users:
Run the installer provided.
-----------------------
For Debian/Ubuntu users:
......@@ -41,13 +29,13 @@ Otherwise (Debian/Ubuntu users):
If you do not have Qt please visit : http://www.qtsoftware.com/downloads/opensource/appdev and download the development files for your operating system.
you can use apt-get :
sudo apt-get install libqt4-dev libqt4-opengl-dev libglew-dev
sudo apt-get install vite
For Debian users, you may need to install also the qmake package.
Then, until Qt development files are installed, you can compile ViTE :
./configure (or ./configure --enable_otf if you want to compile and use the otf version from the sources)
./configure (./configure -h will show you options for compilation).
or
cmake -D CMAKE_INSTALL_PREFIX:PATH=. .
or
......@@ -92,9 +80,9 @@ DOCUMENTATION
For ViTE there is three documentations that can be found in documentation folder.
The first one is the user manual which can be useful for a first use.
The first one is the user manual which explain ViTE and its features.
The two other ones are for developpers : this is the technical manual and the Doxygen generated doc. The technical manual explains how ViTE is coded and the Doxygen explains the classes and functions more in details.
The two other ones are for developers : this is the technical manual and the Doxygen generated doc. The technical manual explains how ViTE is coded and the Doxygen explains the classes and functions more in details.
For Doxygen, it is necessary to have epstopdf for the latex version. You can install it with the package texlive-extra-utils.
Also, install the dot program for graphics from the package graphviz.
......
......@@ -30,6 +30,7 @@ FIND_PATH( OTF_INCLUDE_DIR otf.h
${OTF_DIR}/include
/usr/include
/usr/local/include
../externals/otf/otflib/
)
......
......@@ -238,7 +238,7 @@ bool Core::draw_trace(const string & filename, const int format) {
}
else {
// We add the filename to the recent files opened list
Session::add_recent_file(QString::fromStdString(filename));
Session::add_recent_file(QFileInfo(filename.c_str()).absoluteFilePath());
_main_window->update_recent_files_menu();
}
......
......@@ -976,15 +976,19 @@ Core * Interface_graphic::get_console(){
void Interface_graphic::update_recent_files_menu() {
const QStringList filenames = Session::get_recent_files();
QString absoluteFilename;
for (int i = 0 ; i < Session::_MAX_NB_RECENT_FILES && i < filenames.size() ; ++ i) {
if(_recent_file_actions[i] != NULL) {
delete _recent_file_actions[i];
}
_recent_file_actions[i] = new QAction(this);
_recent_file_actions[i]->setVisible(true);
const QString text = tr("&%1 %2").arg(i+1).arg( QFileInfo(filenames[i]).fileName() );
absoluteFilename = QFileInfo(filenames[i]).absoluteFilePath();
const QString text = tr("&%1 %2").arg(i+1).arg(absoluteFilename);
_recent_file_actions[i]->setText(text);
_recent_file_actions[i]->setData(filenames[i]);
_recent_file_actions[i]->setData(absoluteFilename);
connect(_recent_file_actions[i], SIGNAL(triggered()),
this, SLOT(open_recent_file()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment