mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
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
This commit is contained in:
parent
f4734765f9
commit
48304a3e83
@ -75,6 +75,16 @@ void QgsHelpViewer::loadContext(const QString &contextId)
|
|||||||
* the context id
|
* the context id
|
||||||
*/
|
*/
|
||||||
QString lang(QTextCodec::locale());
|
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;
|
QString fullHelpPath = helpFilesPath + contextId + "_" + lang;
|
||||||
// get the help content and title from the localized file
|
// get the help content and title from the localized file
|
||||||
QString helpContents;
|
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
|
msexport_CXXFLAGS = $(CXXFLAGS) $(PKGDATAPATH) $(EXTRA_CXXFLAGS) $(QT_CXXFLAGS) $(PYTHON_INCLUDE_DIR) -I../../src
|
||||||
|
|
||||||
CLEANFILES = $(BUILT_SOURCES)
|
CLEANFILES = $(BUILT_SOURCES)
|
||||||
|
@ -29,6 +29,7 @@ email : sherman at mrcc.com
|
|||||||
#include <qstring.h>
|
#include <qstring.h>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include "../src/core/qgscontexthelp.h"
|
||||||
#include "qgsmapserverexport.h"
|
#include "qgsmapserverexport.h"
|
||||||
|
|
||||||
|
|
||||||
@ -167,6 +168,11 @@ void QgsMapserverExport::on_buttonOk_clicked()
|
|||||||
Py_DECREF(pstr);
|
Py_DECREF(pstr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
void QgsMapserverExport::on_buttonHelp_clicked()
|
||||||
|
{
|
||||||
|
QgsContextHelp::run(context_id);
|
||||||
|
}
|
||||||
|
|
||||||
/** End of Auto-connected Slots **/
|
/** End of Auto-connected Slots **/
|
||||||
|
|
||||||
// Write the map file
|
// Write the map file
|
||||||
|
@ -51,7 +51,8 @@ public:
|
|||||||
OPEN
|
OPEN
|
||||||
};
|
};
|
||||||
public slots:
|
public slots:
|
||||||
void showHelp();
|
void showHelp();
|
||||||
|
void on_buttonHelp_clicked();
|
||||||
void on_btnChooseFile_clicked();
|
void on_btnChooseFile_clicked();
|
||||||
void on_chkExpLayersOnly_clicked(bool);
|
void on_chkExpLayersOnly_clicked(bool);
|
||||||
void on_btnChooseProjectFile_clicked();
|
void on_btnChooseProjectFile_clicked();
|
||||||
@ -63,6 +64,7 @@ public:
|
|||||||
QString qgisProjectFile;
|
QString qgisProjectFile;
|
||||||
bool neverSaved;
|
bool neverSaved;
|
||||||
int action;
|
int action;
|
||||||
|
static const int context_id = 863656587;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //QGSMAPSERVEREXPORT_H
|
#endif //QGSMAPSERVEREXPORT_H
|
||||||
|
@ -450,7 +450,7 @@
|
|||||||
<item row="1" column="0" >
|
<item row="1" column="0" >
|
||||||
<widget class="QLabel" name="textLabel7_2" >
|
<widget class="QLabel" name="textLabel7_2" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>QGIS Project File</string>
|
<string>QGIS project file</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy" >
|
<property name="buddy" >
|
||||||
<cstring>txtQgisFilePath</cstring>
|
<cstring>txtQgisFilePath</cstring>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user