Skip to content

Commit 4254fcc

Browse files
author
jef
committed
- use online API documentation, when no local is found
- remove "set layer CRS" from toolbar git-svn-id: http://svn.osgeo.org/qgis/trunk@15378 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 60bbe12 commit 4254fcc

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

cmake_templates/qgsconfig.h.in

-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,5 @@
3232

3333
#cmakedefine HAVE_PYTHON
3434

35-
#cmakedefine WITH_APIDOC
36-
3735
#endif
3836

src/app/qgisapp.cpp

+8-14
Original file line numberDiff line numberDiff line change
@@ -1257,12 +1257,8 @@ void QgisApp::createActions()
12571257
connect( mActionHelpContents, SIGNAL( triggered() ), this, SLOT( helpContents() ) );
12581258
mActionHelpContents->setEnabled( QFileInfo( QgsApplication::pkgDataPath() + "/doc/index.html" ).exists() );
12591259

1260-
#ifdef WITH_APIDOC
12611260
mActionHelpAPI = new QAction( getThemeIcon( "mActionHelpAPI.png" ), tr( "API documentation" ), this );
12621261
connect( mActionHelpAPI, SIGNAL( triggered() ), this, SLOT( apiDocumentation() ) );
1263-
mActionHelpAPI->setEnabled( QFileInfo( QgsApplication::pkgDataPath() + "/doc/api/index.html" ).exists() );
1264-
#endif
1265-
12661262

12671263
mActionQgisHomePage = new QAction( getThemeIcon( "mActionQgisHomePage.png" ), tr( "QGIS Home Page" ), this );
12681264
#ifndef Q_WS_MAC
@@ -1699,9 +1695,7 @@ void QgisApp::createMenus()
16991695
mHelpMenu = menuBar()->addMenu( tr( "&Help" ) );
17001696

17011697
mHelpMenu->addAction( mActionHelpContents );
1702-
#ifdef WITH_APIDOC
17031698
mHelpMenu->addAction( mActionHelpAPI );
1704-
#endif
17051699
mActionHelpSeparator1 = mHelpMenu->addSeparator();
17061700

17071701
mHelpMenu->addAction( mActionQgisHomePage );
@@ -1748,7 +1742,6 @@ void QgisApp::createToolBars()
17481742
mLayerToolBar->addAction( mActionAddWmsLayer );
17491743
mLayerToolBar->addAction( mActionNewVectorLayer );
17501744
mLayerToolBar->addAction( mActionRemoveLayer );
1751-
mLayerToolBar->addAction( mActionSetLayerCRS );
17521745
//commented out for QGIS 1.4 by Tim
17531746
//mLayerToolBar->addAction( mActionAddToOverview );
17541747
//mLayerToolBar->addAction( mActionShowAllLayers );
@@ -1917,9 +1910,6 @@ void QgisApp::createToolBars()
19171910
mHelpToolBar = addToolBar( tr( "Help" ) );
19181911
mHelpToolBar->setObjectName( "Help" );
19191912
mHelpToolBar->addAction( mActionHelpContents );
1920-
#ifdef WITH_APIDOC
1921-
mHelpToolBar->addAction( mActionHelpAPI );
1922-
#endif
19231913
mHelpToolBar->addAction( QWhatsThis::createAction() );
19241914
mToolbarMenu->addAction( mHelpToolBar->toggleViewAction() );
19251915

@@ -2143,9 +2133,6 @@ void QgisApp::setTheme( QString theThemeName )
21432133
mActionOptions->setIcon( getThemeIcon( "/mActionOptions.png" ) );
21442134
mActionConfigureShortcuts->setIcon( getThemeIcon( "/mActionOptions.png" ) );
21452135
mActionHelpContents->setIcon( getThemeIcon( "/mActionHelpContents.png" ) );
2146-
#ifdef WITH_APIDOC
2147-
mActionHelpAPI->setIcon( getThemeIcon( "/mActionHelpAPI.png" ) );
2148-
#endif
21492136
mActionLocalHistogramStretch->setIcon( getThemeIcon( "/mActionLocalHistogramStretch.png" ) );
21502137
mActionQgisHomePage->setIcon( getThemeIcon( "/mActionQgisHomePage.png" ) );
21512138
mActionAbout->setIcon( getThemeIcon( "/mActionHelpAbout.png" ) );
@@ -5661,7 +5648,14 @@ void QgisApp::helpContents()
56615648

56625649
void QgisApp::apiDocumentation()
56635650
{
5664-
openURL( "api/index.html" );
5651+
if( QFileInfo( QgsApplication::pkgDataPath() + "/doc/api/index.html" ).exists() )
5652+
{
5653+
openURL( "api/index.html" );
5654+
}
5655+
else
5656+
{
5657+
openURL( "http://qgis.org/api/", false );
5658+
}
56655659
}
56665660

56675661
void QgisApp::helpQgisHomePage()

0 commit comments

Comments
 (0)