Commit 71308e85 authored by whitlocb's avatar whitlocb
Browse files

1. I changed osxfixup script so it only matches paths at the start of the path...

1. I changed osxfixup script so it only matches paths at the start of the path so it won't corrupt libraries that already use @executable_path/../lib.
2. I fixed a small bug in the Help window so the contributors page shows up again.
3. I enhanced the Help window so it will use Qt's desktop services to open up external URLs in a web browser. Feel free to use URLs in release notes now.
4. I replaced the woefully old faq.html page with content from our Web site's FAW.html page.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12391 18c085ea-50e0-402c-830e-de6fd14e8384
parent b7659d53
......@@ -43,14 +43,14 @@ function fixup_dylib
s=$(echo $thisLibrary | grep ".framework")
if [[ $s != "" ]] ; then
# Framework
thisLibraryFixed=$(echo "$thisLibrary" | sed "s/\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib/g")
thisLibraryName1=$(echo "$1" | sed "s/\/[A-Za-z0-9_. \/-]*\/lib//g")
thisLibraryName2=$(echo "$thisLibrary" | sed "s/\/[A-Za-z0-9_. \/-]*\/lib//g")
thisLibraryFixed=$(echo "$thisLibrary" | sed "s/^\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib/g")
thisLibraryName1=$(echo "$1" | sed "s/^\/[A-Za-z0-9_. \/-]*\/lib//g")
thisLibraryName2=$(echo "$thisLibrary" | sed "s/^\/[A-Za-z0-9_. \/-]*\/lib//g")
else
# Library
thisLibraryFixed=$(echo "$thisLibrary" | sed "s/\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib\/lib/g")
thisLibraryName1=$(echo "$1" | sed "s/\/[A-Za-z0-9_. \/-]*\/lib/lib/g")
thisLibraryName2=$(echo "$thisLibrary" | sed "s/\/[A-Za-z0-9_. \/-]*\/lib/lib/g")
thisLibraryFixed=$(echo "$thisLibrary" | sed "s/^\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib\/lib/g")
thisLibraryName1=$(echo "$1" | sed "s/^\/[A-Za-z0-9_. \/-]*\/lib/lib/g")
thisLibraryName2=$(echo "$thisLibrary" | sed "s/^\/[A-Za-z0-9_. \/-]*\/lib/lib/g")
fi
# echo "thisLibrary = $thisLibrary"
# echo "thisLibraryFixed = $thisLibraryFixed"
......@@ -65,9 +65,9 @@ function fixup_dylib
if [[ $s != "" ]] ; then
framework=$(echo $library | grep ".framework")
if [[ $framework != "" ]] ; then
newlibrary=$(echo $library | sed "s/\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib/g")
newlibrary=$(echo $library | sed "s/^\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib/g")
else
newlibrary=$(echo $library | sed "s/\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib\/lib/g")
newlibrary=$(echo $library | sed "s/^\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib\/lib/g")
fi
# echo "$library -> $newlibrary"
command="$command -change $library $newlibrary"
......@@ -100,20 +100,20 @@ function fixup_exe
# Get the name of this library from otool since it might not match quite
# what's in $1 because of version number differences.
thisLibrary=$(otool -D $1 | tail -n 1 | sed "s/\://g")
thisLibraryFixed=$(echo "$thisLibrary" | sed "s/\/[A-Za-z0-9_. \/-]*\/bin/@executable_path\/..\/bin/g")
thisLibraryFixed=$(echo "$thisLibrary" | sed "s/^\/[A-Za-z0-9_. \/-]*\/bin/@executable_path\/..\/bin/g")
# echo "thisLibrary = $thisLibrary"
# echo "thisLibraryFixed = $thisLibraryFixed"
sharedLibs=$(otool -L $1 | grep -v ":" | grep "/" | grep -v "libmpi" | grep -v "libopen-rte" | grep -v "libopen-pal")
command=""
for library in $sharedLibs ; do
s=$(echo $library | grep -v "/usr/lib")
s=$(echo $library | grep -v "/usr/lib" | grep -v "/usr/X11R6")
if [[ $s != "" ]] ; then
framework=$(echo $library | grep ".framework")
if [[ $framework != "" ]] ; then
newlibrary=$(echo $library | sed "s/\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib/g")
newlibrary=$(echo $library | sed "s/^\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib/g")
else
newlibrary=$(echo $library | sed "s/\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib\/lib/g")
newlibrary=$(echo $library | sed "s/^\/[A-Za-z0-9_. \/-]*\/lib/@executable_path\/..\/lib\/lib/g")
fi
# echo "$library -> $newlibrary"
command="$command -change $library $newlibrary"
......
......@@ -43,6 +43,7 @@
#include <QvisHelpWindow.h>
#include <QAction>
#include <QDomDocument>
#include <QDesktopServices>
#include <QFile>
#include <QLayout>
#include <QLineEdit>
......@@ -53,9 +54,11 @@
#include <QSplitter>
#include <QTabWidget>
#include <QTextBrowser>
#include <QTimer>
#include <QToolBar>
#include <QToolButton>
#include <QTreeWidget>
#include <QUrl>
#include <QWidget>
#include <string>
......@@ -166,6 +169,9 @@ QvisHelpWindow::SetLocale(const QString &s)
// Brad Whitlock, Wed Nov 19 15:51:04 PST 2008
// Qt 4.
//
// Brad Whitlock, Tue Aug 31 10:32:50 PDT 2010
// I changed how links get clicked through. I also increased min window size.
//
// ****************************************************************************
void
......@@ -193,7 +199,7 @@ QvisHelpWindow::CreateWindowContents()
// Create the tab widget
helpTabs = new QTabWidget(splitter);
helpTabs->setMinimumWidth(200);
helpTabs->setMinimumWidth(250);
connect(helpTabs, SIGNAL(currentChanged(int)),
this, SLOT(activeTabChanged(int)));
......@@ -262,12 +268,14 @@ QvisHelpWindow::CreateWindowContents()
// Create the text browser
helpBrowser = new QTextBrowser(splitter);
helpBrowser->setMinimumWidth(300);
helpBrowser->setMinimumWidth(400);
helpBrowser->setMinimumHeight(500);
splitter->setStretchFactor(1, 10);
QFont f(helpBrowser->font());
f.setBold(false);
helpBrowser->setFont(f);
connect(helpBrowser, SIGNAL(anchorClicked(const QUrl &)),
helpBrowser, SLOT(setSource(const QUrl &)));
this, SLOT(anchorClicked(const QUrl &)));
QAction *backAction = tb->addAction(QIcon(backIcon), tr("Back"),
helpBrowser, SLOT(backward()));
......@@ -430,9 +438,9 @@ QvisHelpWindow::LoadHelp(const QString &fileName)
QTreeWidgetItem *ultraPage = new QTreeWidgetItem(
helpContents);
contribPage->setText(0, tr("VisIt UltraWrapper"));
contribPage->setData(0, Qt::UserRole, QVariant("ultrawrapper.html"));
contribPage->setIcon(0, helpIcon);
ultraPage->setText(0, tr("VisIt UltraWrapper"));
ultraPage->setData(0, Qt::UserRole, QVariant("ultrawrapper.html"));
ultraPage->setIcon(0, helpIcon);
// Read the XML file and create the DOM tree. Then use the tree to
// build the User manual content.
......@@ -1722,3 +1730,37 @@ QvisHelpWindow::removeBookmark()
removeBookmarkButton->setEnabled(bookmarks.count() > 0);
}
// ****************************************************************************
// Method: QvisHelpWindow::anchorClicked
//
// Purpose:
// Set the source of the help browser when a link is clicked. For external
// links, we open the user's default web browser.
//
// Arguments:
// link : The link that was clicked.
//
// Returns:
//
// Note:
//
// Programmer: Brad Whitlock
// Creation: Tue Aug 31 10:31:35 PDT 2010
//
// Modifications:
//
// ****************************************************************************
void
QvisHelpWindow::anchorClicked(const QUrl &link)
{
// qDebug("link scheme = %s", link.scheme().toStdString().c_str());
if(link.scheme() != "file")
{
QTimer::singleShot(10, helpBrowser, SLOT(backward()));
QDesktopServices::openUrl(link);
}
else
helpBrowser->setSource(link);
}
......@@ -53,6 +53,7 @@ class QTabWidget;
class QTextBrowser;
class QTreeWidget;
class QTreeWidgetItem;
class QUrl;
class QWidget;
// ****************************************************************************
......@@ -127,6 +128,7 @@ private slots:
void displayBookmarkTopic();
void addBookmark();
void removeBookmark();
void anchorClicked(const QUrl &);
private:
typedef QMap<QString, QString> IndexMap;
......
This diff is collapsed.
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