Skip to content
Permalink
Browse files

Fixed help viewer to handle cases where no LANG (locale) is set.

Updated mapserver export tool to support context help.


git-svn-id: http://svn.osgeo.org/qgis/trunk@6124 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman
gsherman committed Nov 26, 2006
1 parent f473476 commit 48304a3e83768201fa351b0cf54d80704db0bbe5
@@ -75,6 +75,16 @@ void QgsHelpViewer::loadContext(const QString &contextId)
* the context id
*/
QString lang(QTextCodec::locale());
/*
* If the language isn't set on the system, assume en_US,
* otherwise we get the banner at the top of the help file
* saying it isn't available in "your" language. Some systems
* may be installed without the LANG environment being set.
*/
if(lang.length() == 0 || lang == "C")
{
lang = "en_US";
}
QString fullHelpPath = helpFilesPath + contextId + "_" + lang;
// get the help content and title from the localized file
QString helpContents;
@@ -60,7 +60,8 @@ BUILT_SOURCES = $(msexport_MOC) $(msexport_UI)



msexport_LDADD = $(QT_LDADD) $(PYTHON_LIB)
msexport_LDADD = $(QT_LDADD) $(PYTHON_LIB) ../../src/core/libqgis_core.la ../../src/gui/libqgis_gui.la

msexport_CXXFLAGS = $(CXXFLAGS) $(PKGDATAPATH) $(EXTRA_CXXFLAGS) $(QT_CXXFLAGS) $(PYTHON_INCLUDE_DIR) -I../../src

CLEANFILES = $(BUILT_SOURCES)
@@ -29,6 +29,7 @@ email : sherman at mrcc.com
#include <qstring.h>
#include <QWidget>
#include <QApplication>
#include "../src/core/qgscontexthelp.h"
#include "qgsmapserverexport.h"


@@ -167,6 +168,11 @@ void QgsMapserverExport::on_buttonOk_clicked()
Py_DECREF(pstr);

}
void QgsMapserverExport::on_buttonHelp_clicked()
{
QgsContextHelp::run(context_id);
}

/** End of Auto-connected Slots **/

// Write the map file
@@ -51,7 +51,8 @@ Q_OBJECT
OPEN
};
public slots:
void showHelp();
void showHelp();
void on_buttonHelp_clicked();
void on_btnChooseFile_clicked();
void on_chkExpLayersOnly_clicked(bool);
void on_btnChooseProjectFile_clicked();
@@ -63,6 +64,7 @@ Q_OBJECT
QString qgisProjectFile;
bool neverSaved;
int action;
static const int context_id = 863656587;
};

#endif //QGSMAPSERVEREXPORT_H
@@ -450,7 +450,7 @@
<item row="1" column="0" >
<widget class="QLabel" name="textLabel7_2" >
<property name="text" >
<string>QGIS Project File</string>
<string>QGIS project file</string>
</property>
<property name="buddy" >
<cstring>txtQgisFilePath</cstring>

0 comments on commit 48304a3

Please sign in to comment.
You can’t perform that action at this time.