Bug 331304 - Save the "show zoomlevel" setting in marble-qt
Summary: Save the "show zoomlevel" setting in marble-qt
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.7 (KDE 4.12)
Platform: Kubuntu Linux
: NOR task
Target Milestone: ---
Assignee: Cruceru Calin-Cristian
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2014-02-19 20:48 UTC by Dennis Nienhüser
Modified: 2014-02-21 09:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.0


Attachments
patch for the bug331304 (3.28 KB, patch)
2014-02-20 21:34 UTC, Cruceru Calin-Cristian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Nienhüser 2014-02-19 20:48:31 UTC
The Qt Marble application can show the zoom / tile level in the status bar. To enable this, the user has to click with the right mouse button on the status bar and select "[X] Show zoom level". Unfortunately this setting is not saved, so you have to enable it again each time you start Marble. 

To fix this, extend readSettings() and writeSettings() (and other locations as needed) in QtMainWindow.cpp. Use the existing "MainWindow" group in the settings to store the value.
Comment 1 Dyr 2014-02-20 21:27:48 UTC
I tried to solve the bug and posted a patch to be reviewed for this bug on the reviewboard:
https://git.reviewboard.kde.org/r/115924/
Comment 2 Cruceru Calin-Cristian 2014-02-20 21:34:18 UTC
Created attachment 85251 [details]
patch for the bug331304

This it my first patch solving a bug in marble. 
If it's something wrong with the patch or some piece of code, please tell me. I want you to be critical so I can grow better skills.
Comment 3 Dennis Nienhüser 2014-02-21 09:28:19 UTC
The patch works fine, I'll do the following minor changes when pushing:
- change "zoomlevel" to "showZoomLevel" for the settings key (camel case and more descriptive)
- change "Show zoom level" for the action name to "Show Zoom Level" according to http://techbase.kde.org/Projects/Usability/HIG/Capitalization (this was wrong in the original code)
- remove the comment regarding the variable name in the .h file. The confusion comes from the technical term "tile level" used for variable names and "zoom level" for presentation to the user. It's a bit mixed up in the original code, but that's not much a problem

@Dyr: I'll go for the other patch since the bug was already assigned, sorry. I'll create more tasks soon.
Comment 4 Dennis Nienhüser 2014-02-21 09:30:00 UTC
Git commit 5815b1651b0f7f643c58aac4d172f8ac51aba510 by Dennis Nienhüser, on behalf of Cruceru Calin-Cristian.
Committed on 21/02/2014 at 09:28.
Pushed by nienhueser into branch 'master'.

Save the "show zoomlevel" setting in marble-qt
FIXED-IN: 4.13.0

M  +12   -7    src/apps/marble-qt/QtMainWindow.cpp
M  +1    -0    src/apps/marble-qt/QtMainWindow.h

http://commits.kde.org/marble/5815b1651b0f7f643c58aac4d172f8ac51aba510