Skip to content

Commit

Permalink
- use online API documentation, when no local is found
Browse files Browse the repository at this point in the history
- remove "set layer CRS" from toolbar


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15378 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 7, 2011
1 parent fce899a commit bdd95a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
2 changes: 0 additions & 2 deletions cmake_templates/qgsconfig.h.in
Expand Up @@ -32,7 +32,5 @@

#cmakedefine HAVE_PYTHON

#cmakedefine WITH_APIDOC

#endif

22 changes: 8 additions & 14 deletions src/app/qgisapp.cpp
Expand Up @@ -1257,12 +1257,8 @@ void QgisApp::createActions()
connect( mActionHelpContents, SIGNAL( triggered() ), this, SLOT( helpContents() ) );
mActionHelpContents->setEnabled( QFileInfo( QgsApplication::pkgDataPath() + "/doc/index.html" ).exists() );

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


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

mHelpMenu->addAction( mActionHelpContents );
#ifdef WITH_APIDOC
mHelpMenu->addAction( mActionHelpAPI );
#endif
mActionHelpSeparator1 = mHelpMenu->addSeparator();

mHelpMenu->addAction( mActionQgisHomePage );
Expand Down Expand Up @@ -1748,7 +1742,6 @@ void QgisApp::createToolBars()
mLayerToolBar->addAction( mActionAddWmsLayer );
mLayerToolBar->addAction( mActionNewVectorLayer );
mLayerToolBar->addAction( mActionRemoveLayer );
mLayerToolBar->addAction( mActionSetLayerCRS );
//commented out for QGIS 1.4 by Tim
//mLayerToolBar->addAction( mActionAddToOverview );
//mLayerToolBar->addAction( mActionShowAllLayers );
Expand Down Expand Up @@ -1917,9 +1910,6 @@ void QgisApp::createToolBars()
mHelpToolBar = addToolBar( tr( "Help" ) );
mHelpToolBar->setObjectName( "Help" );
mHelpToolBar->addAction( mActionHelpContents );
#ifdef WITH_APIDOC
mHelpToolBar->addAction( mActionHelpAPI );
#endif
mHelpToolBar->addAction( QWhatsThis::createAction() );
mToolbarMenu->addAction( mHelpToolBar->toggleViewAction() );

Expand Down Expand Up @@ -2143,9 +2133,6 @@ void QgisApp::setTheme( QString theThemeName )
mActionOptions->setIcon( getThemeIcon( "/mActionOptions.png" ) );
mActionConfigureShortcuts->setIcon( getThemeIcon( "/mActionOptions.png" ) );
mActionHelpContents->setIcon( getThemeIcon( "/mActionHelpContents.png" ) );
#ifdef WITH_APIDOC
mActionHelpAPI->setIcon( getThemeIcon( "/mActionHelpAPI.png" ) );
#endif
mActionLocalHistogramStretch->setIcon( getThemeIcon( "/mActionLocalHistogramStretch.png" ) );
mActionQgisHomePage->setIcon( getThemeIcon( "/mActionQgisHomePage.png" ) );
mActionAbout->setIcon( getThemeIcon( "/mActionHelpAbout.png" ) );
Expand Down Expand Up @@ -5661,7 +5648,14 @@ void QgisApp::helpContents()

void QgisApp::apiDocumentation()
{
openURL( "api/index.html" );
if( QFileInfo( QgsApplication::pkgDataPath() + "/doc/api/index.html" ).exists() )
{
openURL( "api/index.html" );
}
else
{
openURL( "http://qgis.org/api/", false );
}
}

void QgisApp::helpQgisHomePage()
Expand Down

0 comments on commit bdd95a5

Please sign in to comment.