GSoC/GCI Archive
Google Code-in 2014 KDE

Disable menu entries of Marble features not available on Windows

completed by: Sergey Popov

mentors: Dennis Nienhüser

Marble is a virtual globe and world atlas — your Swiss army knife for maps. Find your way and explore the world! Please visit the Marble website at https://marble.kde.org/ for further information including instructions to set it up for development.

While Marble is developed primarily on Linux it also runs fine on Windows. Some features are not (yet) available there. To avoid that users run into issues with not implemented functionality for Windows, the following menu entries shall be disabled on Windows only:

  • File menu: "Download Maps"
  • Edit menu: "Record Movie"
  • Edit menu: "Stop recording"

While you're at it, please also change "Stop recording" to "Stop Recording" to match the KDE guidelines for title capitalization in menu entries.

All changes can be done in src/apps/marble-qt/QtMainWindow.cpp. Search for m_downloadAction, m_recordMovieAction, m_stopRecordingAction. Since the menu entries should only be deactivated on Windows, your final code should look something like this:

#ifdef Q_OS_WIN32
m_downloadAction->setEnabled( false );
#endif

There are instructions how to download the sources at the Marble website and Windows specific instructions at http://nienhueser.de/blog/?p=595
Feel free to use uptodate versions of the tools mentioned there (MSVC 2013 Express, Qt 5.3, CMake 3.0.2).

The easiest way to reach Marble developers to help you is to visit the #marble IRC channel in freenode. Watch out for Earthwings.