Merge lp:~daggerstab/stellarium/add-remove-landscapes into lp:stellarium
- add-remove-landscapes
- Merge into trunk
Proposed by
Bogdan Marinov
Status: | Merged |
---|---|
Merged at revision: | 4760 |
Proposed branch: | lp:~daggerstab/stellarium/add-remove-landscapes |
Merge into: | lp:stellarium |
Diff against target: |
2544 lines (+1500/-219) 11 files modified
po/stellarium/POTFILES.in (+3/-0) po/stellarium/stellarium.pot (+312/-209) src/CMakeLists.txt (+5/-1) src/core/modules/LandscapeMgr.cpp (+314/-0) src/core/modules/LandscapeMgr.hpp (+126/-7) src/gui/AddRemoveLandscapesDialog.cpp (+241/-0) src/gui/AddRemoveLandscapesDialog.hpp (+81/-0) src/gui/ViewDialog.cpp (+17/-1) src/gui/ViewDialog.hpp (+6/-0) src/gui/addRemoveLandscapesDialog.ui (+378/-0) src/gui/viewDialog.ui (+17/-1) |
To merge this branch: | bzr merge lp:~daggerstab/stellarium/add-remove-landscapes |
Related bugs: | |
Related blueprints: |
Landscape Manager plug-in
(Undefined)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Fabien Chéreau | Approve | ||
Review via email: mp+35304@code.launchpad.net |
Commit message
Description of the change
A merge of my "AddRemoveLands
To open the feature's window, go to the "Landscapes" tab of the "Sky and viewing options" window and press the "Add/remove landscapes..." button. You can test it with the landscape archives from the Stellarium Wiki:
http://
To post a comment you must log in.
Revision history for this message
Fabien Chéreau (xalioth) wrote : | # |
Revision history for this message
Fabien Chéreau (xalioth) wrote : | # |
I had a better look today and it's excellent :)
Worked perfectly, well commented code.
I merged in rev 4760.
Thanks a lot Bogdan!
Fabien
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'po/stellarium/POTFILES.in' | |||
2 | --- po/stellarium/POTFILES.in 2010-05-19 13:33:21 +0000 | |||
3 | +++ po/stellarium/POTFILES.in 2010-09-13 16:37:45 +0000 | |||
4 | @@ -19,6 +19,7 @@ | |||
5 | 19 | src/gui/StelGuiItems.cpp | 19 | src/gui/StelGuiItems.cpp |
6 | 20 | src/gui/ViewDialog.cpp | 20 | src/gui/ViewDialog.cpp |
7 | 21 | src/gui/LocationDialog.cpp | 21 | src/gui/LocationDialog.cpp |
8 | 22 | src/gui/AddRemoveLandscapesDialog.cpp | ||
9 | 22 | src/main.cpp | 23 | src/main.cpp |
10 | 23 | src/translations.h | 24 | src/translations.h |
11 | 24 | src/ui_dateTimeDialogGui.h | 25 | src/ui_dateTimeDialogGui.h |
12 | @@ -27,3 +28,5 @@ | |||
13 | 27 | src/ui_searchDialogGui.h | 28 | src/ui_searchDialogGui.h |
14 | 28 | src/ui_viewDialog.h | 29 | src/ui_viewDialog.h |
15 | 29 | src/ui_configurationDialog.h | 30 | src/ui_configurationDialog.h |
16 | 31 | src/ui_addRemoveLandscapesDialog.h | ||
17 | 32 | |||
18 | 30 | 33 | ||
19 | === modified file 'po/stellarium/stellarium.pot' | |||
20 | --- po/stellarium/stellarium.pot 2010-05-19 13:33:21 +0000 | |||
21 | +++ po/stellarium/stellarium.pot 2010-09-13 16:37:45 +0000 | |||
22 | @@ -8,7 +8,7 @@ | |||
23 | 8 | msgstr "" | 8 | msgstr "" |
24 | 9 | "Project-Id-Version: PACKAGE VERSION\n" | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
25 | 10 | "Report-Msgid-Bugs-To: \n" | 10 | "Report-Msgid-Bugs-To: \n" |
27 | 11 | "POT-Creation-Date: 2010-05-19 15:26+0200\n" | 11 | "POT-Creation-Date: 2010-09-13 19:07+0300\n" |
28 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
29 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
30 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
31 | @@ -16,20 +16,20 @@ | |||
32 | 16 | "Content-Type: text/plain; charset=CHARSET\n" | 16 | "Content-Type: text/plain; charset=CHARSET\n" |
33 | 17 | "Content-Transfer-Encoding: 8bit\n" | 17 | "Content-Transfer-Encoding: 8bit\n" |
34 | 18 | 18 | ||
36 | 19 | #: src/core/modules/LandscapeMgr.cpp:401 | 19 | #: src/core/modules/LandscapeMgr.cpp:447 |
37 | 20 | msgid "Author: " | 20 | msgid "Author: " |
38 | 21 | msgstr "" | 21 | msgstr "" |
39 | 22 | 22 | ||
41 | 23 | #: src/core/modules/LandscapeMgr.cpp:404 | 23 | #: src/core/modules/LandscapeMgr.cpp:450 |
42 | 24 | msgid "Location: " | 24 | msgid "Location: " |
43 | 25 | msgstr "" | 25 | msgstr "" |
44 | 26 | 26 | ||
46 | 27 | #: src/core/modules/LandscapeMgr.cpp:409 | 27 | #: src/core/modules/LandscapeMgr.cpp:455 |
47 | 28 | #, qt-format | 28 | #, qt-format |
48 | 29 | msgid ", %1 m" | 29 | msgid ", %1 m" |
49 | 30 | msgstr "" | 30 | msgstr "" |
50 | 31 | 31 | ||
52 | 32 | #: src/core/modules/LandscapeMgr.cpp:412 | 32 | #: src/core/modules/LandscapeMgr.cpp:458 |
53 | 33 | msgid "Planet: " | 33 | msgid "Planet: " |
54 | 34 | msgstr "" | 34 | msgstr "" |
55 | 35 | 35 | ||
56 | @@ -115,7 +115,7 @@ | |||
57 | 115 | msgid "Parallax: %1\"" | 115 | msgid "Parallax: %1\"" |
58 | 116 | msgstr "" | 116 | msgstr "" |
59 | 117 | 117 | ||
61 | 118 | #: src/core/StelProjector.cpp:61 | 118 | #: src/core/StelProjector.cpp:62 |
62 | 119 | msgid "Maximum FOV: " | 119 | msgid "Maximum FOV: " |
63 | 120 | msgstr "" | 120 | msgstr "" |
64 | 121 | 121 | ||
65 | @@ -223,54 +223,54 @@ | |||
66 | 223 | msgid "Az/Alt: %1/%2" | 223 | msgid "Az/Alt: %1/%2" |
67 | 224 | msgstr "" | 224 | msgstr "" |
68 | 225 | 225 | ||
70 | 226 | #: src/gui/ConfigurationDialog.cpp:285 | 226 | #: src/gui/ConfigurationDialog.cpp:294 |
71 | 227 | msgid "Select screenshot directory" | 227 | msgid "Select screenshot directory" |
72 | 228 | msgstr "" | 228 | msgstr "" |
73 | 229 | 229 | ||
75 | 230 | #: src/gui/ConfigurationDialog.cpp:451 | 230 | #: src/gui/ConfigurationDialog.cpp:460 |
76 | 231 | #, qt-format | 231 | #, qt-format |
77 | 232 | msgid "Startup FOV: %1%2" | 232 | msgid "Startup FOV: %1%2" |
78 | 233 | msgstr "" | 233 | msgstr "" |
79 | 234 | 234 | ||
81 | 235 | #: src/gui/ConfigurationDialog.cpp:459 | 235 | #: src/gui/ConfigurationDialog.cpp:468 |
82 | 236 | #, qt-format | 236 | #, qt-format |
83 | 237 | msgid "Startup direction of view Az/Alt: %1/%2" | 237 | msgid "Startup direction of view Az/Alt: %1/%2" |
84 | 238 | msgstr "" | 238 | msgstr "" |
85 | 239 | 239 | ||
87 | 240 | #: src/gui/ConfigurationDialog.cpp:495 | 240 | #: src/gui/ConfigurationDialog.cpp:508 |
88 | 241 | msgid "Authors" | 241 | msgid "Authors" |
89 | 242 | msgstr "" | 242 | msgstr "" |
90 | 243 | 243 | ||
92 | 244 | #: src/gui/ConfigurationDialog.cpp:499 src/gui/ViewDialog.cpp:337 | 244 | #: src/gui/ConfigurationDialog.cpp:512 src/gui/ViewDialog.cpp:345 |
93 | 245 | msgid "Contact" | 245 | msgid "Contact" |
94 | 246 | msgstr "" | 246 | msgstr "" |
95 | 247 | 247 | ||
97 | 248 | #: src/gui/ConfigurationDialog.cpp:571 | 248 | #: src/gui/ConfigurationDialog.cpp:584 |
98 | 249 | msgid "Author" | 249 | msgid "Author" |
99 | 250 | msgstr "" | 250 | msgstr "" |
100 | 251 | 251 | ||
102 | 252 | #: src/gui/ConfigurationDialog.cpp:572 | 252 | #: src/gui/ConfigurationDialog.cpp:585 |
103 | 253 | msgid "License" | 253 | msgid "License" |
104 | 254 | msgstr "" | 254 | msgstr "" |
105 | 255 | 255 | ||
107 | 256 | #: src/gui/ConfigurationDialog.cpp:603 | 256 | #: src/gui/ConfigurationDialog.cpp:614 |
108 | 257 | msgid "Running script: " | 257 | msgid "Running script: " |
109 | 258 | msgstr "" | 258 | msgstr "" |
110 | 259 | 259 | ||
112 | 260 | #: src/gui/ConfigurationDialog.cpp:610 | 260 | #: src/gui/ConfigurationDialog.cpp:621 |
113 | 261 | msgid "Running script: [none]" | 261 | msgid "Running script: [none]" |
114 | 262 | msgstr "" | 262 | msgstr "" |
115 | 263 | 263 | ||
117 | 264 | #: src/gui/ConfigurationDialog.cpp:653 | 264 | #: src/gui/ConfigurationDialog.cpp:664 |
118 | 265 | msgid "Finished downloading all star catalogs!" | 265 | msgid "Finished downloading all star catalogs!" |
119 | 266 | msgstr "" | 266 | msgstr "" |
120 | 267 | 267 | ||
122 | 268 | #: src/gui/ConfigurationDialog.cpp:662 | 268 | #: src/gui/ConfigurationDialog.cpp:673 |
123 | 269 | #, qt-format | 269 | #, qt-format |
124 | 270 | msgid "Get catalog %1 of %2" | 270 | msgid "Get catalog %1 of %2" |
125 | 271 | msgstr "" | 271 | msgstr "" |
126 | 272 | 272 | ||
128 | 273 | #: src/gui/ConfigurationDialog.cpp:664 | 273 | #: src/gui/ConfigurationDialog.cpp:675 |
129 | 274 | #, qt-format | 274 | #, qt-format |
130 | 275 | msgid "" | 275 | msgid "" |
131 | 276 | "Download size: %1MB\n" | 276 | "Download size: %1MB\n" |
132 | @@ -278,31 +278,31 @@ | |||
133 | 278 | "Magnitude range: %3 - %4" | 278 | "Magnitude range: %3 - %4" |
134 | 279 | msgstr "" | 279 | msgstr "" |
135 | 280 | 280 | ||
137 | 281 | #: src/gui/ConfigurationDialog.cpp:673 | 281 | #: src/gui/ConfigurationDialog.cpp:684 |
138 | 282 | msgid "" | 282 | msgid "" |
139 | 283 | "Finished downloading new star catalogs!\n" | 283 | "Finished downloading new star catalogs!\n" |
140 | 284 | "Restart Stellarium to display them." | 284 | "Restart Stellarium to display them." |
141 | 285 | msgstr "" | 285 | msgstr "" |
142 | 286 | 286 | ||
144 | 287 | #: src/gui/ConfigurationDialog.cpp:711 src/gui/ConfigurationDialog.cpp:745 | 287 | #: src/gui/ConfigurationDialog.cpp:722 src/gui/ConfigurationDialog.cpp:756 |
145 | 288 | #, qt-format | 288 | #, qt-format |
146 | 289 | msgid "" | 289 | msgid "" |
147 | 290 | "Error downloading %1:\n" | 290 | "Error downloading %1:\n" |
148 | 291 | "%2" | 291 | "%2" |
149 | 292 | msgstr "" | 292 | msgstr "" |
150 | 293 | 293 | ||
152 | 294 | #: src/gui/ConfigurationDialog.cpp:716 | 294 | #: src/gui/ConfigurationDialog.cpp:727 |
153 | 295 | #, qt-format | 295 | #, qt-format |
154 | 296 | msgid "" | 296 | msgid "" |
155 | 297 | "Downloading %1...\n" | 297 | "Downloading %1...\n" |
156 | 298 | "(You can close this window.)" | 298 | "(You can close this window.)" |
157 | 299 | msgstr "" | 299 | msgstr "" |
158 | 300 | 300 | ||
160 | 301 | #: src/gui/ConfigurationDialog.cpp:796 | 301 | #: src/gui/ConfigurationDialog.cpp:807 |
161 | 302 | msgid "Verifying file integrity..." | 302 | msgid "Verifying file integrity..." |
162 | 303 | msgstr "" | 303 | msgstr "" |
163 | 304 | 304 | ||
165 | 305 | #: src/gui/ConfigurationDialog.cpp:800 | 305 | #: src/gui/ConfigurationDialog.cpp:811 |
166 | 306 | #, qt-format | 306 | #, qt-format |
167 | 307 | msgid "" | 307 | msgid "" |
168 | 308 | "Error downloading %1:\n" | 308 | "Error downloading %1:\n" |
169 | @@ -483,15 +483,15 @@ | |||
170 | 483 | msgid "Constellation boundaries" | 483 | msgid "Constellation boundaries" |
171 | 484 | msgstr "" | 484 | msgstr "" |
172 | 485 | 485 | ||
174 | 486 | #: src/gui/StelGui.cpp:104 src/ui_viewDialog.h:1027 | 486 | #: src/gui/StelGui.cpp:104 src/ui_viewDialog.h:1034 |
175 | 487 | msgid "Azimuthal grid" | 487 | msgid "Azimuthal grid" |
176 | 488 | msgstr "" | 488 | msgstr "" |
177 | 489 | 489 | ||
179 | 490 | #: src/gui/StelGui.cpp:105 src/ui_viewDialog.h:1025 | 490 | #: src/gui/StelGui.cpp:105 src/ui_viewDialog.h:1032 |
180 | 491 | msgid "Equatorial grid" | 491 | msgid "Equatorial grid" |
181 | 492 | msgstr "" | 492 | msgstr "" |
182 | 493 | 493 | ||
184 | 494 | #: src/gui/StelGui.cpp:106 src/ui_viewDialog.h:1026 | 494 | #: src/gui/StelGui.cpp:106 src/ui_viewDialog.h:1033 |
185 | 495 | msgid "Equatorial J2000 grid" | 495 | msgid "Equatorial J2000 grid" |
186 | 496 | msgstr "" | 496 | msgstr "" |
187 | 497 | 497 | ||
188 | @@ -499,19 +499,19 @@ | |||
189 | 499 | msgid "Galactic grid" | 499 | msgid "Galactic grid" |
190 | 500 | msgstr "" | 500 | msgstr "" |
191 | 501 | 501 | ||
193 | 502 | #: src/gui/StelGui.cpp:108 src/ui_viewDialog.h:1030 | 502 | #: src/gui/StelGui.cpp:108 src/ui_viewDialog.h:1037 |
194 | 503 | msgid "Ecliptic line" | 503 | msgid "Ecliptic line" |
195 | 504 | msgstr "" | 504 | msgstr "" |
196 | 505 | 505 | ||
198 | 506 | #: src/gui/StelGui.cpp:109 src/ui_viewDialog.h:1028 | 506 | #: src/gui/StelGui.cpp:109 src/ui_viewDialog.h:1035 |
199 | 507 | msgid "Equator line" | 507 | msgid "Equator line" |
200 | 508 | msgstr "" | 508 | msgstr "" |
201 | 509 | 509 | ||
203 | 510 | #: src/gui/StelGui.cpp:110 src/ui_viewDialog.h:1029 | 510 | #: src/gui/StelGui.cpp:110 src/ui_viewDialog.h:1036 |
204 | 511 | msgid "Meridian line" | 511 | msgid "Meridian line" |
205 | 512 | msgstr "" | 512 | msgstr "" |
206 | 513 | 513 | ||
208 | 514 | #: src/gui/StelGui.cpp:111 src/ui_viewDialog.h:1031 | 514 | #: src/gui/StelGui.cpp:111 src/ui_viewDialog.h:1038 |
209 | 515 | msgid "Cardinal points" | 515 | msgid "Cardinal points" |
210 | 516 | msgstr "" | 516 | msgstr "" |
211 | 517 | 517 | ||
212 | @@ -519,7 +519,7 @@ | |||
213 | 519 | msgid "Ground" | 519 | msgid "Ground" |
214 | 520 | msgstr "" | 520 | msgstr "" |
215 | 521 | 521 | ||
217 | 522 | #: src/gui/StelGui.cpp:114 src/ui_viewDialog.h:1009 | 522 | #: src/gui/StelGui.cpp:114 src/ui_viewDialog.h:1016 |
218 | 523 | msgid "Atmosphere" | 523 | msgid "Atmosphere" |
219 | 524 | msgstr "" | 524 | msgstr "" |
220 | 525 | 525 | ||
221 | @@ -527,7 +527,7 @@ | |||
222 | 527 | msgid "Fog" | 527 | msgid "Fog" |
223 | 528 | msgstr "" | 528 | msgstr "" |
224 | 529 | 529 | ||
226 | 530 | #: src/gui/StelGui.cpp:117 src/ui_viewDialog.h:1014 | 530 | #: src/gui/StelGui.cpp:117 src/ui_viewDialog.h:1021 |
227 | 531 | msgid "Nebulas" | 531 | msgid "Nebulas" |
228 | 532 | msgstr "" | 532 | msgstr "" |
229 | 533 | 533 | ||
230 | @@ -535,7 +535,7 @@ | |||
231 | 535 | msgid "Nebulas background images" | 535 | msgid "Nebulas background images" |
232 | 536 | msgstr "" | 536 | msgstr "" |
233 | 537 | 537 | ||
235 | 538 | #: src/gui/StelGui.cpp:119 src/ui_viewDialog.h:995 src/ui_viewDialog.h:1013 | 538 | #: src/gui/StelGui.cpp:119 src/ui_viewDialog.h:1002 src/ui_viewDialog.h:1020 |
236 | 539 | msgid "Stars" | 539 | msgid "Stars" |
237 | 540 | msgstr "" | 540 | msgstr "" |
238 | 541 | 541 | ||
239 | @@ -599,7 +599,7 @@ | |||
240 | 599 | msgid "Script console window" | 599 | msgid "Script console window" |
241 | 600 | msgstr "" | 600 | msgstr "" |
242 | 601 | 601 | ||
244 | 602 | #: src/gui/StelGui.cpp:140 src/ui_dateTimeDialogGui.h:295 | 602 | #: src/gui/StelGui.cpp:140 src/ui_dateTimeDialogGui.h:294 |
245 | 603 | msgid "Date and Time" | 603 | msgid "Date and Time" |
246 | 604 | msgstr "" | 604 | msgstr "" |
247 | 605 | 605 | ||
248 | @@ -720,35 +720,110 @@ | |||
249 | 720 | msgid "%1m" | 720 | msgid "%1m" |
250 | 721 | msgstr "" | 721 | msgstr "" |
251 | 722 | 722 | ||
253 | 723 | #: src/gui/ViewDialog.cpp:391 | 723 | #: src/gui/ViewDialog.cpp:399 |
254 | 724 | msgid "No description" | 724 | msgid "No description" |
255 | 725 | msgstr "" | 725 | msgstr "" |
256 | 726 | 726 | ||
258 | 727 | #: src/gui/ViewDialog.cpp:451 | 727 | #: src/gui/ViewDialog.cpp:467 |
259 | 728 | msgid "No shooting stars" | 728 | msgid "No shooting stars" |
260 | 729 | msgstr "" | 729 | msgstr "" |
261 | 730 | 730 | ||
263 | 731 | #: src/gui/ViewDialog.cpp:454 | 731 | #: src/gui/ViewDialog.cpp:470 |
264 | 732 | msgid "Normal rate" | 732 | msgid "Normal rate" |
265 | 733 | msgstr "" | 733 | msgstr "" |
266 | 734 | 734 | ||
268 | 735 | #: src/gui/ViewDialog.cpp:457 | 735 | #: src/gui/ViewDialog.cpp:473 |
269 | 736 | msgid "Standard Perseids rate" | 736 | msgid "Standard Perseids rate" |
270 | 737 | msgstr "" | 737 | msgstr "" |
271 | 738 | 738 | ||
273 | 739 | #: src/gui/ViewDialog.cpp:460 | 739 | #: src/gui/ViewDialog.cpp:476 |
274 | 740 | msgid "Exceptional Leonid rate" | 740 | msgid "Exceptional Leonid rate" |
275 | 741 | msgstr "" | 741 | msgstr "" |
276 | 742 | 742 | ||
278 | 743 | #: src/gui/ViewDialog.cpp:463 | 743 | #: src/gui/ViewDialog.cpp:479 |
279 | 744 | msgid "Highest rate ever (1966 Leonids)" | 744 | msgid "Highest rate ever (1966 Leonids)" |
280 | 745 | msgstr "" | 745 | msgstr "" |
281 | 746 | 746 | ||
283 | 747 | #: src/gui/LocationDialog.cpp:340 | 747 | #: src/gui/LocationDialog.cpp:331 |
284 | 748 | msgid "New Location" | 748 | msgid "New Location" |
285 | 749 | msgstr "" | 749 | msgstr "" |
286 | 750 | 750 | ||
288 | 751 | #: src/main.cpp:317 | 751 | #: src/gui/AddRemoveLandscapesDialog.cpp:113 |
289 | 752 | msgid "Select a ZIP archive that contains a Stellarium landscape" | ||
290 | 753 | msgstr "" | ||
291 | 754 | |||
292 | 755 | #. TRANSLATORS: This string is displayed in the "Files of type:" drop-down list in the standard file selection dialog. | ||
293 | 756 | #: src/gui/AddRemoveLandscapesDialog.cpp:115 | ||
294 | 757 | msgid "ZIP archives" | ||
295 | 758 | msgstr "" | ||
296 | 759 | |||
297 | 760 | #: src/gui/AddRemoveLandscapesDialog.cpp:128 | ||
298 | 761 | #, qt-format | ||
299 | 762 | msgid "Landscape \"%1\" has been installed successfully." | ||
300 | 763 | msgstr "" | ||
301 | 764 | |||
302 | 765 | #: src/gui/AddRemoveLandscapesDialog.cpp:129 | ||
303 | 766 | #: src/gui/AddRemoveLandscapesDialog.cpp:156 | ||
304 | 767 | msgid "Success" | ||
305 | 768 | msgstr "" | ||
306 | 769 | |||
307 | 770 | #: src/gui/AddRemoveLandscapesDialog.cpp:142 | ||
308 | 771 | #: src/gui/AddRemoveLandscapesDialog.cpp:212 | ||
309 | 772 | #: src/gui/AddRemoveLandscapesDialog.cpp:221 | ||
310 | 773 | #: src/gui/AddRemoveLandscapesDialog.cpp:229 | ||
311 | 774 | msgid "No landscape was installed." | ||
312 | 775 | msgstr "" | ||
313 | 776 | |||
314 | 777 | #: src/gui/AddRemoveLandscapesDialog.cpp:143 | ||
315 | 778 | #: src/gui/AddRemoveLandscapesDialog.cpp:167 | ||
316 | 779 | #: src/gui/AddRemoveLandscapesDialog.cpp:216 | ||
317 | 780 | #: src/gui/AddRemoveLandscapesDialog.cpp:222 | ||
318 | 781 | #: src/gui/AddRemoveLandscapesDialog.cpp:230 | ||
319 | 782 | #: src/gui/AddRemoveLandscapesDialog.cpp:240 | ||
320 | 783 | msgid "Error!" | ||
321 | 784 | msgstr "" | ||
322 | 785 | |||
323 | 786 | #: src/gui/AddRemoveLandscapesDialog.cpp:155 | ||
324 | 787 | #, qt-format | ||
325 | 788 | msgid "Landscape \"%1\" has been removed successfully." | ||
326 | 789 | msgstr "" | ||
327 | 790 | |||
328 | 791 | #: src/gui/AddRemoveLandscapesDialog.cpp:166 | ||
329 | 792 | #: src/gui/AddRemoveLandscapesDialog.cpp:236 | ||
330 | 793 | msgid "The selected landscape could not be (completely) removed." | ||
331 | 794 | msgstr "" | ||
332 | 795 | |||
333 | 796 | #. TRANSLATORS: MiB = mebibytes (IEC 60027-2 standard for 2^20 bytes) | ||
334 | 797 | #: src/gui/AddRemoveLandscapesDialog.cpp:189 | ||
335 | 798 | #, qt-format | ||
336 | 799 | msgid "Size on disk: %1 MiB" | ||
337 | 800 | msgstr "" | ||
338 | 801 | |||
339 | 802 | #. TRANSLATORS: The parameter is a file/directory path that may be quite long. | ||
340 | 803 | #: src/gui/AddRemoveLandscapesDialog.cpp:215 | ||
341 | 804 | #, qt-format | ||
342 | 805 | msgid "Stellarium cannot open for reading or writing %1" | ||
343 | 806 | msgstr "" | ||
344 | 807 | |||
345 | 808 | #: src/gui/AddRemoveLandscapesDialog.cpp:221 | ||
346 | 809 | msgid "" | ||
347 | 810 | "The selected file is not a ZIP archive or does not contain a Stellarium " | ||
348 | 811 | "landscape." | ||
349 | 812 | msgstr "" | ||
350 | 813 | |||
351 | 814 | #. TRANSLATORS: The parameter is the duplicate name or identifier. | ||
352 | 815 | #: src/gui/AddRemoveLandscapesDialog.cpp:228 | ||
353 | 816 | #, qt-format | ||
354 | 817 | msgid "A landscape with the same name or identifier (%1) already exists." | ||
355 | 818 | msgstr "" | ||
356 | 819 | |||
357 | 820 | #. TRANSLATORS: The parameter is a file/directory path that may be quite long. "It" refers to a landscape that can't be removed. | ||
358 | 821 | #: src/gui/AddRemoveLandscapesDialog.cpp:239 | ||
359 | 822 | #, qt-format | ||
360 | 823 | msgid "You can remove it manually by deleting the following directory: %1" | ||
361 | 824 | msgstr "" | ||
362 | 825 | |||
363 | 826 | #: src/main.cpp:335 | ||
364 | 752 | msgid "This system does not support OpenGL." | 827 | msgid "This system does not support OpenGL." |
365 | 753 | msgstr "" | 828 | msgstr "" |
366 | 754 | 829 | ||
367 | @@ -1196,558 +1271,586 @@ | |||
368 | 1196 | msgid "Set UI Locale: " | 1271 | msgid "Set UI Locale: " |
369 | 1197 | msgstr "" | 1272 | msgstr "" |
370 | 1198 | 1273 | ||
378 | 1199 | #: src/ui_dateTimeDialogGui.h:294 src/ui_helpDialogGui.h:259 | 1274 | #: src/ui_dateTimeDialogGui.h:296 src/ui_dateTimeDialogGui.h:297 |
372 | 1200 | #: src/ui_locationDialogGui.h:387 src/ui_viewDialog.h:979 | ||
373 | 1201 | #: src/ui_configurationDialog.h:746 | ||
374 | 1202 | msgid "Form" | ||
375 | 1203 | msgstr "" | ||
376 | 1204 | |||
377 | 1205 | #: src/ui_dateTimeDialogGui.h:297 src/ui_dateTimeDialogGui.h:298 | ||
379 | 1206 | msgid "/" | 1275 | msgid "/" |
380 | 1207 | msgstr "" | 1276 | msgstr "" |
381 | 1208 | 1277 | ||
383 | 1209 | #: src/ui_dateTimeDialogGui.h:299 src/ui_dateTimeDialogGui.h:300 | 1278 | #: src/ui_dateTimeDialogGui.h:298 src/ui_dateTimeDialogGui.h:299 |
384 | 1210 | msgid ":" | 1279 | msgid ":" |
385 | 1211 | msgstr "" | 1280 | msgstr "" |
386 | 1212 | 1281 | ||
388 | 1213 | #: src/ui_helpDialogGui.h:260 src/ui_helpDialogGui.h:266 | 1282 | #: src/ui_helpDialogGui.h:259 src/ui_helpDialogGui.h:265 |
389 | 1214 | msgid "Help" | 1283 | msgid "Help" |
390 | 1215 | msgstr "" | 1284 | msgstr "" |
391 | 1216 | 1285 | ||
393 | 1217 | #: src/ui_helpDialogGui.h:268 | 1286 | #: src/ui_helpDialogGui.h:267 |
394 | 1218 | msgid "About" | 1287 | msgid "About" |
395 | 1219 | msgstr "" | 1288 | msgstr "" |
396 | 1220 | 1289 | ||
398 | 1221 | #: src/ui_helpDialogGui.h:270 | 1290 | #: src/ui_helpDialogGui.h:269 |
399 | 1222 | msgid "Log" | 1291 | msgid "Log" |
400 | 1223 | msgstr "" | 1292 | msgstr "" |
401 | 1224 | 1293 | ||
403 | 1225 | #: src/ui_helpDialogGui.h:273 | 1294 | #: src/ui_helpDialogGui.h:272 |
404 | 1226 | msgid "Refresh" | 1295 | msgid "Refresh" |
405 | 1227 | msgstr "" | 1296 | msgstr "" |
406 | 1228 | 1297 | ||
408 | 1229 | #: src/ui_locationDialogGui.h:388 | 1298 | #: src/ui_locationDialogGui.h:387 |
409 | 1230 | msgid "Location" | 1299 | msgid "Location" |
410 | 1231 | msgstr "" | 1300 | msgstr "" |
411 | 1232 | 1301 | ||
412 | 1302 | #: src/ui_locationDialogGui.h:391 | ||
413 | 1303 | msgid "Current location information" | ||
414 | 1304 | msgstr "" | ||
415 | 1305 | |||
416 | 1233 | #: src/ui_locationDialogGui.h:392 | 1306 | #: src/ui_locationDialogGui.h:392 |
418 | 1234 | msgid "Current location information" | 1307 | msgid "Use as default" |
419 | 1235 | msgstr "" | 1308 | msgstr "" |
420 | 1236 | 1309 | ||
421 | 1237 | #: src/ui_locationDialogGui.h:393 | 1310 | #: src/ui_locationDialogGui.h:393 |
423 | 1238 | msgid "Use as default" | 1311 | msgid "Delete" |
424 | 1239 | msgstr "" | 1312 | msgstr "" |
425 | 1240 | 1313 | ||
426 | 1241 | #: src/ui_locationDialogGui.h:394 | 1314 | #: src/ui_locationDialogGui.h:394 |
428 | 1242 | msgid "Delete" | 1315 | msgid "Add to list" |
429 | 1243 | msgstr "" | 1316 | msgstr "" |
430 | 1244 | 1317 | ||
431 | 1245 | #: src/ui_locationDialogGui.h:395 | 1318 | #: src/ui_locationDialogGui.h:395 |
432 | 1246 | msgid "Add to list" | ||
433 | 1247 | msgstr "" | ||
434 | 1248 | |||
435 | 1249 | #: src/ui_locationDialogGui.h:396 | ||
436 | 1250 | msgid "Latitude:" | 1319 | msgid "Latitude:" |
437 | 1251 | msgstr "" | 1320 | msgstr "" |
438 | 1252 | 1321 | ||
440 | 1253 | #: src/ui_locationDialogGui.h:398 src/ui_locationDialogGui.h:402 | 1322 | #: src/ui_locationDialogGui.h:397 src/ui_locationDialogGui.h:401 |
441 | 1254 | msgid "" | 1323 | msgid "" |
442 | 1255 | "You can enter values in decimal degrees, or using dms format, for example: " | 1324 | "You can enter values in decimal degrees, or using dms format, for example: " |
443 | 1256 | "+1d 12m 8s" | 1325 | "+1d 12m 8s" |
444 | 1257 | msgstr "" | 1326 | msgstr "" |
445 | 1258 | 1327 | ||
447 | 1259 | #: src/ui_locationDialogGui.h:400 | 1328 | #: src/ui_locationDialogGui.h:399 |
448 | 1260 | msgid "Longitude:" | 1329 | msgid "Longitude:" |
449 | 1261 | msgstr "" | 1330 | msgstr "" |
450 | 1262 | 1331 | ||
452 | 1263 | #: src/ui_locationDialogGui.h:404 | 1332 | #: src/ui_locationDialogGui.h:403 |
453 | 1264 | msgid "Altitude:" | 1333 | msgid "Altitude:" |
454 | 1265 | msgstr "" | 1334 | msgstr "" |
455 | 1266 | 1335 | ||
457 | 1267 | #: src/ui_locationDialogGui.h:406 | 1336 | #: src/ui_locationDialogGui.h:405 |
458 | 1268 | msgid "Enter the altitude in meter" | 1337 | msgid "Enter the altitude in meter" |
459 | 1269 | msgstr "" | 1338 | msgstr "" |
460 | 1270 | 1339 | ||
461 | 1340 | #: src/ui_locationDialogGui.h:407 | ||
462 | 1341 | msgid " m" | ||
463 | 1342 | msgstr "" | ||
464 | 1343 | |||
465 | 1271 | #: src/ui_locationDialogGui.h:408 | 1344 | #: src/ui_locationDialogGui.h:408 |
467 | 1272 | msgid " m" | 1345 | msgid "Name/City:" |
468 | 1273 | msgstr "" | 1346 | msgstr "" |
469 | 1274 | 1347 | ||
470 | 1275 | #: src/ui_locationDialogGui.h:409 | 1348 | #: src/ui_locationDialogGui.h:409 |
472 | 1276 | msgid "Name/City:" | 1349 | msgid "Country:" |
473 | 1277 | msgstr "" | 1350 | msgstr "" |
474 | 1278 | 1351 | ||
475 | 1279 | #: src/ui_locationDialogGui.h:410 | 1352 | #: src/ui_locationDialogGui.h:410 |
476 | 1280 | msgid "Country:" | ||
477 | 1281 | msgstr "" | ||
478 | 1282 | |||
479 | 1283 | #: src/ui_locationDialogGui.h:411 | ||
480 | 1284 | msgid "Planet:" | 1353 | msgid "Planet:" |
481 | 1285 | msgstr "" | 1354 | msgstr "" |
482 | 1286 | 1355 | ||
484 | 1287 | #: src/ui_searchDialogGui.h:230 src/ui_searchDialogGui.h:231 | 1356 | #: src/ui_searchDialogGui.h:227 src/ui_searchDialogGui.h:228 |
485 | 1288 | msgid "Find Object" | 1357 | msgid "Find Object" |
486 | 1289 | msgstr "" | 1358 | msgstr "" |
487 | 1290 | 1359 | ||
489 | 1291 | #: src/ui_searchDialogGui.h:236 | 1360 | #: src/ui_searchDialogGui.h:233 |
490 | 1292 | msgid "RA/Dec (J2000):" | 1361 | msgid "RA/Dec (J2000):" |
491 | 1293 | msgstr "" | 1362 | msgstr "" |
492 | 1294 | 1363 | ||
494 | 1295 | #: src/ui_viewDialog.h:980 | 1364 | #: src/ui_viewDialog.h:987 |
495 | 1296 | msgid "View" | 1365 | msgid "View" |
496 | 1297 | msgstr "" | 1366 | msgstr "" |
497 | 1298 | 1367 | ||
499 | 1299 | #: src/ui_viewDialog.h:986 | 1368 | #: src/ui_viewDialog.h:993 |
500 | 1300 | msgid "Sky" | 1369 | msgid "Sky" |
501 | 1301 | msgstr "" | 1370 | msgstr "" |
502 | 1302 | 1371 | ||
504 | 1303 | #: src/ui_viewDialog.h:988 | 1372 | #: src/ui_viewDialog.h:995 |
505 | 1304 | msgid "Markings" | 1373 | msgid "Markings" |
506 | 1305 | msgstr "" | 1374 | msgstr "" |
507 | 1306 | 1375 | ||
509 | 1307 | #: src/ui_viewDialog.h:990 | 1376 | #: src/ui_viewDialog.h:997 |
510 | 1308 | msgid "Landscape" | 1377 | msgid "Landscape" |
511 | 1309 | msgstr "" | 1378 | msgstr "" |
512 | 1310 | 1379 | ||
514 | 1311 | #: src/ui_viewDialog.h:992 | 1380 | #: src/ui_viewDialog.h:999 |
515 | 1312 | msgid "Starlore" | 1381 | msgid "Starlore" |
516 | 1313 | msgstr "" | 1382 | msgstr "" |
517 | 1314 | 1383 | ||
519 | 1315 | #: src/ui_viewDialog.h:996 | 1384 | #: src/ui_viewDialog.h:1003 |
520 | 1316 | msgid "Absolute scale:" | 1385 | msgid "Absolute scale:" |
521 | 1317 | msgstr "" | 1386 | msgstr "" |
522 | 1318 | 1387 | ||
524 | 1319 | #: src/ui_viewDialog.h:997 | 1388 | #: src/ui_viewDialog.h:1004 |
525 | 1320 | msgid "Relative scale:" | 1389 | msgid "Relative scale:" |
526 | 1321 | msgstr "" | 1390 | msgstr "" |
527 | 1322 | 1391 | ||
529 | 1323 | #: src/ui_viewDialog.h:998 | 1392 | #: src/ui_viewDialog.h:1005 |
530 | 1324 | msgid "Twinkle:" | 1393 | msgid "Twinkle:" |
531 | 1325 | msgstr "" | 1394 | msgstr "" |
532 | 1326 | 1395 | ||
534 | 1327 | #: src/ui_viewDialog.h:1000 | 1396 | #: src/ui_viewDialog.h:1007 |
535 | 1328 | msgid "Dim faint stars when a very bright object is visible" | 1397 | msgid "Dim faint stars when a very bright object is visible" |
536 | 1329 | msgstr "" | 1398 | msgstr "" |
537 | 1330 | 1399 | ||
539 | 1331 | #: src/ui_viewDialog.h:1002 | 1400 | #: src/ui_viewDialog.h:1009 |
540 | 1332 | msgid "Dynamic eye adaptation" | 1401 | msgid "Dynamic eye adaptation" |
541 | 1333 | msgstr "" | 1402 | msgstr "" |
542 | 1334 | 1403 | ||
544 | 1335 | #: src/ui_viewDialog.h:1003 | 1404 | #: src/ui_viewDialog.h:1010 |
545 | 1336 | msgid "Planets and satellites" | 1405 | msgid "Planets and satellites" |
546 | 1337 | msgstr "" | 1406 | msgstr "" |
547 | 1338 | 1407 | ||
549 | 1339 | #: src/ui_viewDialog.h:1004 | 1408 | #: src/ui_viewDialog.h:1011 |
550 | 1340 | msgid "Show planets" | 1409 | msgid "Show planets" |
551 | 1341 | msgstr "" | 1410 | msgstr "" |
552 | 1342 | 1411 | ||
554 | 1343 | #: src/ui_viewDialog.h:1005 | 1412 | #: src/ui_viewDialog.h:1012 |
555 | 1344 | msgid "Show planet markers" | 1413 | msgid "Show planet markers" |
556 | 1345 | msgstr "" | 1414 | msgstr "" |
557 | 1346 | 1415 | ||
559 | 1347 | #: src/ui_viewDialog.h:1006 | 1416 | #: src/ui_viewDialog.h:1013 |
560 | 1348 | msgid "Show planet orbits" | 1417 | msgid "Show planet orbits" |
561 | 1349 | msgstr "" | 1418 | msgstr "" |
562 | 1350 | 1419 | ||
564 | 1351 | #: src/ui_viewDialog.h:1007 | 1420 | #: src/ui_viewDialog.h:1014 |
565 | 1352 | msgid "Simulate light speed" | 1421 | msgid "Simulate light speed" |
566 | 1353 | msgstr "" | 1422 | msgstr "" |
567 | 1354 | 1423 | ||
569 | 1355 | #: src/ui_viewDialog.h:1008 | 1424 | #: src/ui_viewDialog.h:1015 |
570 | 1356 | msgid "Scale Moon" | 1425 | msgid "Scale Moon" |
571 | 1357 | msgstr "" | 1426 | msgstr "" |
572 | 1358 | 1427 | ||
574 | 1359 | #: src/ui_viewDialog.h:1010 | 1428 | #: src/ui_viewDialog.h:1017 |
575 | 1360 | msgid "Show atmosphere" | 1429 | msgid "Show atmosphere" |
576 | 1361 | msgstr "" | 1430 | msgstr "" |
577 | 1362 | 1431 | ||
579 | 1363 | #: src/ui_viewDialog.h:1011 | 1432 | #: src/ui_viewDialog.h:1018 |
580 | 1364 | msgid "Light pollution: " | 1433 | msgid "Light pollution: " |
581 | 1365 | msgstr "" | 1434 | msgstr "" |
582 | 1366 | 1435 | ||
584 | 1367 | #: src/ui_viewDialog.h:1012 | 1436 | #: src/ui_viewDialog.h:1019 |
585 | 1368 | msgid "Labels and Markers" | 1437 | msgid "Labels and Markers" |
586 | 1369 | msgstr "" | 1438 | msgstr "" |
587 | 1370 | 1439 | ||
589 | 1371 | #: src/ui_viewDialog.h:1015 | 1440 | #: src/ui_viewDialog.h:1022 |
590 | 1372 | msgid "Planets" | 1441 | msgid "Planets" |
591 | 1373 | msgstr "" | 1442 | msgstr "" |
592 | 1374 | 1443 | ||
594 | 1375 | #: src/ui_viewDialog.h:1016 | 1444 | #: src/ui_viewDialog.h:1023 |
595 | 1376 | msgid "Shooting Stars" | 1445 | msgid "Shooting Stars" |
596 | 1377 | msgstr "" | 1446 | msgstr "" |
597 | 1378 | 1447 | ||
599 | 1379 | #: src/ui_viewDialog.h:1017 | 1448 | #: src/ui_viewDialog.h:1024 |
600 | 1380 | msgid "Hourly zenith rate:" | 1449 | msgid "Hourly zenith rate:" |
601 | 1381 | msgstr "" | 1450 | msgstr "" |
602 | 1382 | 1451 | ||
604 | 1383 | #: src/ui_viewDialog.h:1018 | 1452 | #: src/ui_viewDialog.h:1025 |
605 | 1384 | msgid "0" | 1453 | msgid "0" |
606 | 1385 | msgstr "" | 1454 | msgstr "" |
607 | 1386 | 1455 | ||
609 | 1387 | #: src/ui_viewDialog.h:1019 | 1456 | #: src/ui_viewDialog.h:1026 |
610 | 1388 | msgid "10" | 1457 | msgid "10" |
611 | 1389 | msgstr "" | 1458 | msgstr "" |
612 | 1390 | 1459 | ||
614 | 1391 | #: src/ui_viewDialog.h:1020 | 1460 | #: src/ui_viewDialog.h:1027 |
615 | 1392 | msgid "80" | 1461 | msgid "80" |
616 | 1393 | msgstr "" | 1462 | msgstr "" |
617 | 1394 | 1463 | ||
619 | 1395 | #: src/ui_viewDialog.h:1021 | 1464 | #: src/ui_viewDialog.h:1028 |
620 | 1396 | msgid "10000" | 1465 | msgid "10000" |
621 | 1397 | msgstr "" | 1466 | msgstr "" |
622 | 1398 | 1467 | ||
624 | 1399 | #: src/ui_viewDialog.h:1022 | 1468 | #: src/ui_viewDialog.h:1029 |
625 | 1400 | msgid "144000" | 1469 | msgid "144000" |
626 | 1401 | msgstr "" | 1470 | msgstr "" |
627 | 1402 | 1471 | ||
629 | 1403 | #: src/ui_viewDialog.h:1024 | 1472 | #: src/ui_viewDialog.h:1031 |
630 | 1404 | msgid "Celestial Sphere" | 1473 | msgid "Celestial Sphere" |
631 | 1405 | msgstr "" | 1474 | msgstr "" |
632 | 1406 | 1475 | ||
634 | 1407 | #: src/ui_viewDialog.h:1032 | 1476 | #: src/ui_viewDialog.h:1039 |
635 | 1408 | msgid "Constellations" | 1477 | msgid "Constellations" |
636 | 1409 | msgstr "" | 1478 | msgstr "" |
637 | 1410 | 1479 | ||
639 | 1411 | #: src/ui_viewDialog.h:1033 | 1480 | #: src/ui_viewDialog.h:1040 |
640 | 1412 | msgid "Show lines" | 1481 | msgid "Show lines" |
641 | 1413 | msgstr "" | 1482 | msgstr "" |
642 | 1414 | 1483 | ||
644 | 1415 | #: src/ui_viewDialog.h:1034 | 1484 | #: src/ui_viewDialog.h:1041 |
645 | 1416 | msgid "Show labels" | 1485 | msgid "Show labels" |
646 | 1417 | msgstr "" | 1486 | msgstr "" |
647 | 1418 | 1487 | ||
649 | 1419 | #: src/ui_viewDialog.h:1035 | 1488 | #: src/ui_viewDialog.h:1042 |
650 | 1420 | msgid "Show boundaries" | 1489 | msgid "Show boundaries" |
651 | 1421 | msgstr "" | 1490 | msgstr "" |
652 | 1422 | 1491 | ||
654 | 1423 | #: src/ui_viewDialog.h:1036 | 1492 | #: src/ui_viewDialog.h:1043 |
655 | 1424 | msgid "Show art" | 1493 | msgid "Show art" |
656 | 1425 | msgstr "" | 1494 | msgstr "" |
657 | 1426 | 1495 | ||
659 | 1427 | #: src/ui_viewDialog.h:1037 | 1496 | #: src/ui_viewDialog.h:1044 |
660 | 1428 | msgid "Art brightness: " | 1497 | msgid "Art brightness: " |
661 | 1429 | msgstr "" | 1498 | msgstr "" |
662 | 1430 | 1499 | ||
664 | 1431 | #: src/ui_viewDialog.h:1038 | 1500 | #: src/ui_viewDialog.h:1045 |
665 | 1432 | msgid "Projection" | 1501 | msgid "Projection" |
666 | 1433 | msgstr "" | 1502 | msgstr "" |
667 | 1434 | 1503 | ||
670 | 1435 | #: src/ui_viewDialog.h:1039 src/ui_viewDialog.h:1044 src/ui_viewDialog.h:1046 | 1504 | #: src/ui_viewDialog.h:1046 |
671 | 1436 | #: src/ui_configurationDialog.h:853 src/ui_configurationDialog.h:864 | 1505 | msgid "Add/remove landscapes..." |
672 | 1506 | msgstr "" | ||
673 | 1507 | |||
674 | 1508 | #: src/ui_viewDialog.h:1047 src/ui_viewDialog.h:1052 src/ui_viewDialog.h:1054 | ||
675 | 1509 | #: src/ui_configurationDialog.h:852 src/ui_configurationDialog.h:863 | ||
676 | 1437 | msgid "Options" | 1510 | msgid "Options" |
677 | 1438 | msgstr "" | 1511 | msgstr "" |
678 | 1439 | 1512 | ||
680 | 1440 | #: src/ui_viewDialog.h:1040 | 1513 | #: src/ui_viewDialog.h:1048 |
681 | 1441 | msgid "Show ground" | 1514 | msgid "Show ground" |
682 | 1442 | msgstr "" | 1515 | msgstr "" |
683 | 1443 | 1516 | ||
685 | 1444 | #: src/ui_viewDialog.h:1041 | 1517 | #: src/ui_viewDialog.h:1049 |
686 | 1445 | msgid "Show fog" | 1518 | msgid "Show fog" |
687 | 1446 | msgstr "" | 1519 | msgstr "" |
688 | 1447 | 1520 | ||
690 | 1448 | #: src/ui_viewDialog.h:1042 | 1521 | #: src/ui_viewDialog.h:1050 |
691 | 1449 | msgid "Use associated planet and position" | 1522 | msgid "Use associated planet and position" |
692 | 1450 | msgstr "" | 1523 | msgstr "" |
693 | 1451 | 1524 | ||
695 | 1452 | #: src/ui_viewDialog.h:1043 | 1525 | #: src/ui_viewDialog.h:1051 |
696 | 1453 | msgid "Use this landscape as default" | 1526 | msgid "Use this landscape as default" |
697 | 1454 | msgstr "" | 1527 | msgstr "" |
698 | 1455 | 1528 | ||
700 | 1456 | #: src/ui_viewDialog.h:1045 | 1529 | #: src/ui_viewDialog.h:1053 |
701 | 1457 | msgid "Use this sky culture as default" | 1530 | msgid "Use this sky culture as default" |
702 | 1458 | msgstr "" | 1531 | msgstr "" |
703 | 1459 | 1532 | ||
705 | 1460 | #: src/ui_viewDialog.h:1047 | 1533 | #: src/ui_viewDialog.h:1055 |
706 | 1461 | msgid "Visible" | 1534 | msgid "Visible" |
707 | 1462 | msgstr "" | 1535 | msgstr "" |
708 | 1463 | 1536 | ||
710 | 1464 | #: src/ui_configurationDialog.h:747 | 1537 | #: src/ui_configurationDialog.h:746 |
711 | 1465 | msgid "Configuration" | 1538 | msgid "Configuration" |
712 | 1466 | msgstr "" | 1539 | msgstr "" |
713 | 1467 | 1540 | ||
714 | 1541 | #: src/ui_configurationDialog.h:748 | ||
715 | 1542 | msgid "Program language" | ||
716 | 1543 | msgstr "" | ||
717 | 1544 | |||
718 | 1468 | #: src/ui_configurationDialog.h:749 | 1545 | #: src/ui_configurationDialog.h:749 |
719 | 1469 | msgid "Program language" | ||
720 | 1470 | msgstr "" | ||
721 | 1471 | |||
722 | 1472 | #: src/ui_configurationDialog.h:750 | ||
723 | 1473 | msgid "Selected object information" | 1546 | msgid "Selected object information" |
724 | 1474 | msgstr "" | 1547 | msgstr "" |
725 | 1475 | 1548 | ||
727 | 1476 | #: src/ui_configurationDialog.h:752 | 1549 | #: src/ui_configurationDialog.h:751 |
728 | 1477 | msgid "Display all information available" | 1550 | msgid "Display all information available" |
729 | 1478 | msgstr "" | 1551 | msgstr "" |
730 | 1479 | 1552 | ||
732 | 1480 | #: src/ui_configurationDialog.h:754 | 1553 | #: src/ui_configurationDialog.h:753 |
733 | 1481 | msgid "All available" | 1554 | msgid "All available" |
734 | 1482 | msgstr "" | 1555 | msgstr "" |
735 | 1483 | 1556 | ||
737 | 1484 | #: src/ui_configurationDialog.h:756 | 1557 | #: src/ui_configurationDialog.h:755 |
738 | 1485 | msgid "Display less information" | 1558 | msgid "Display less information" |
739 | 1486 | msgstr "" | 1559 | msgstr "" |
740 | 1487 | 1560 | ||
742 | 1488 | #: src/ui_configurationDialog.h:758 | 1561 | #: src/ui_configurationDialog.h:757 |
743 | 1489 | msgid "Short" | 1562 | msgid "Short" |
744 | 1490 | msgstr "" | 1563 | msgstr "" |
745 | 1491 | 1564 | ||
747 | 1492 | #: src/ui_configurationDialog.h:760 | 1565 | #: src/ui_configurationDialog.h:759 |
748 | 1493 | msgid "Display no information" | 1566 | msgid "Display no information" |
749 | 1494 | msgstr "" | 1567 | msgstr "" |
750 | 1495 | 1568 | ||
751 | 1569 | #: src/ui_configurationDialog.h:761 | ||
752 | 1570 | msgid "None" | ||
753 | 1571 | msgstr "" | ||
754 | 1572 | |||
755 | 1496 | #: src/ui_configurationDialog.h:762 | 1573 | #: src/ui_configurationDialog.h:762 |
756 | 1497 | msgid "None" | ||
757 | 1498 | msgstr "" | ||
758 | 1499 | |||
759 | 1500 | #: src/ui_configurationDialog.h:763 | ||
760 | 1501 | msgid "Default options" | 1574 | msgid "Default options" |
761 | 1502 | msgstr "" | 1575 | msgstr "" |
762 | 1503 | 1576 | ||
764 | 1504 | #: src/ui_configurationDialog.h:765 | 1577 | #: src/ui_configurationDialog.h:764 |
765 | 1505 | msgid "" | 1578 | msgid "" |
766 | 1506 | "Save the settings you've changed this session to be the same the next time " | 1579 | "Save the settings you've changed this session to be the same the next time " |
767 | 1507 | "you start Stellarium" | 1580 | "you start Stellarium" |
768 | 1508 | msgstr "" | 1581 | msgstr "" |
769 | 1509 | 1582 | ||
771 | 1510 | #: src/ui_configurationDialog.h:767 | 1583 | #: src/ui_configurationDialog.h:766 |
772 | 1511 | msgid "Save settings" | 1584 | msgid "Save settings" |
773 | 1512 | msgstr "" | 1585 | msgstr "" |
774 | 1513 | 1586 | ||
776 | 1514 | #: src/ui_configurationDialog.h:769 | 1587 | #: src/ui_configurationDialog.h:768 |
777 | 1515 | msgid "Restore the default settings that came with Stellarium" | 1588 | msgid "Restore the default settings that came with Stellarium" |
778 | 1516 | msgstr "" | 1589 | msgstr "" |
779 | 1517 | 1590 | ||
780 | 1591 | #: src/ui_configurationDialog.h:770 | ||
781 | 1592 | msgid "Restore defaults" | ||
782 | 1593 | msgstr "" | ||
783 | 1594 | |||
784 | 1518 | #: src/ui_configurationDialog.h:771 | 1595 | #: src/ui_configurationDialog.h:771 |
785 | 1519 | msgid "Restore defaults" | ||
786 | 1520 | msgstr "" | ||
787 | 1521 | |||
788 | 1522 | #: src/ui_configurationDialog.h:772 | ||
789 | 1523 | msgid "" | 1596 | msgid "" |
790 | 1524 | "Restoring default settings requires a restart of Stellarium. Saving all the " | 1597 | "Restoring default settings requires a restart of Stellarium. Saving all the " |
791 | 1525 | "current options includes the current FOV and direction of view for use at " | 1598 | "current options includes the current FOV and direction of view for use at " |
792 | 1526 | "next startup." | 1599 | "next startup." |
793 | 1527 | msgstr "" | 1600 | msgstr "" |
794 | 1528 | 1601 | ||
796 | 1529 | #: src/ui_configurationDialog.h:774 | 1602 | #: src/ui_configurationDialog.h:773 |
797 | 1530 | msgid "The width of your view when Stellarium starts" | 1603 | msgid "The width of your view when Stellarium starts" |
798 | 1531 | msgstr "" | 1604 | msgstr "" |
799 | 1532 | 1605 | ||
801 | 1533 | #: src/ui_configurationDialog.h:776 | 1606 | #: src/ui_configurationDialog.h:775 |
802 | 1534 | msgid "Startup FOV: XX" | 1607 | msgid "Startup FOV: XX" |
803 | 1535 | msgstr "" | 1608 | msgstr "" |
804 | 1536 | 1609 | ||
806 | 1537 | #: src/ui_configurationDialog.h:778 | 1610 | #: src/ui_configurationDialog.h:777 |
807 | 1538 | msgid "The direction you're looking when Stellarium starts" | 1611 | msgid "The direction you're looking when Stellarium starts" |
808 | 1539 | msgstr "" | 1612 | msgstr "" |
809 | 1540 | 1613 | ||
810 | 1614 | #: src/ui_configurationDialog.h:779 | ||
811 | 1615 | msgid "Startup direction of view: xxxx" | ||
812 | 1616 | msgstr "" | ||
813 | 1617 | |||
814 | 1541 | #: src/ui_configurationDialog.h:780 | 1618 | #: src/ui_configurationDialog.h:780 |
815 | 1542 | msgid "Startup direction of view: xxxx" | ||
816 | 1543 | msgstr "" | ||
817 | 1544 | |||
818 | 1545 | #: src/ui_configurationDialog.h:781 | ||
819 | 1546 | msgid "Control" | 1619 | msgid "Control" |
820 | 1547 | msgstr "" | 1620 | msgstr "" |
821 | 1548 | 1621 | ||
823 | 1549 | #: src/ui_configurationDialog.h:783 | 1622 | #: src/ui_configurationDialog.h:782 |
824 | 1550 | msgid "Allow keyboard to pan and zoom" | 1623 | msgid "Allow keyboard to pan and zoom" |
825 | 1551 | msgstr "" | 1624 | msgstr "" |
826 | 1552 | 1625 | ||
828 | 1553 | #: src/ui_configurationDialog.h:785 | 1626 | #: src/ui_configurationDialog.h:784 |
829 | 1554 | msgid "Enable keyboard navigation" | 1627 | msgid "Enable keyboard navigation" |
830 | 1555 | msgstr "" | 1628 | msgstr "" |
831 | 1556 | 1629 | ||
833 | 1557 | #: src/ui_configurationDialog.h:787 | 1630 | #: src/ui_configurationDialog.h:786 |
834 | 1558 | msgid "Allow mouse to pan (drag) and zoom (mousewheel)" | 1631 | msgid "Allow mouse to pan (drag) and zoom (mousewheel)" |
835 | 1559 | msgstr "" | 1632 | msgstr "" |
836 | 1560 | 1633 | ||
837 | 1634 | #: src/ui_configurationDialog.h:788 | ||
838 | 1635 | msgid "Enable mouse navigation" | ||
839 | 1636 | msgstr "" | ||
840 | 1637 | |||
841 | 1561 | #: src/ui_configurationDialog.h:789 | 1638 | #: src/ui_configurationDialog.h:789 |
842 | 1562 | msgid "Enable mouse navigation" | ||
843 | 1563 | msgstr "" | ||
844 | 1564 | |||
845 | 1565 | #: src/ui_configurationDialog.h:790 | ||
846 | 1566 | msgid "Startup date and time" | 1639 | msgid "Startup date and time" |
847 | 1567 | msgstr "" | 1640 | msgstr "" |
848 | 1568 | 1641 | ||
850 | 1569 | #: src/ui_configurationDialog.h:792 | 1642 | #: src/ui_configurationDialog.h:791 |
851 | 1570 | msgid "Starts Stellarium at system clock date and time" | 1643 | msgid "Starts Stellarium at system clock date and time" |
852 | 1571 | msgstr "" | 1644 | msgstr "" |
853 | 1572 | 1645 | ||
855 | 1573 | #: src/ui_configurationDialog.h:794 | 1646 | #: src/ui_configurationDialog.h:793 |
856 | 1574 | msgid "System date and time" | 1647 | msgid "System date and time" |
857 | 1575 | msgstr "" | 1648 | msgstr "" |
858 | 1576 | 1649 | ||
860 | 1577 | #: src/ui_configurationDialog.h:796 | 1650 | #: src/ui_configurationDialog.h:795 |
861 | 1578 | msgid "" | 1651 | msgid "" |
862 | 1579 | "Sets the simulation time to the next instance of this time of day when " | 1652 | "Sets the simulation time to the next instance of this time of day when " |
863 | 1580 | "Stellarium starts" | 1653 | "Stellarium starts" |
864 | 1581 | msgstr "" | 1654 | msgstr "" |
865 | 1582 | 1655 | ||
867 | 1583 | #: src/ui_configurationDialog.h:798 | 1656 | #: src/ui_configurationDialog.h:797 |
868 | 1584 | msgid "System date at:" | 1657 | msgid "System date at:" |
869 | 1585 | msgstr "" | 1658 | msgstr "" |
870 | 1586 | 1659 | ||
872 | 1587 | #: src/ui_configurationDialog.h:800 | 1660 | #: src/ui_configurationDialog.h:799 |
873 | 1588 | msgid "Use a specific date and time when Stellarium starts up" | 1661 | msgid "Use a specific date and time when Stellarium starts up" |
874 | 1589 | msgstr "" | 1662 | msgstr "" |
875 | 1590 | 1663 | ||
876 | 1664 | #: src/ui_configurationDialog.h:801 | ||
877 | 1665 | msgid "Other:" | ||
878 | 1666 | msgstr "" | ||
879 | 1667 | |||
880 | 1591 | #: src/ui_configurationDialog.h:802 | 1668 | #: src/ui_configurationDialog.h:802 |
882 | 1592 | msgid "Other:" | 1669 | msgid "use current" |
883 | 1593 | msgstr "" | 1670 | msgstr "" |
884 | 1594 | 1671 | ||
885 | 1595 | #: src/ui_configurationDialog.h:803 | 1672 | #: src/ui_configurationDialog.h:803 |
886 | 1596 | msgid "use current" | ||
887 | 1597 | msgstr "" | ||
888 | 1598 | |||
889 | 1599 | #: src/ui_configurationDialog.h:804 | ||
890 | 1600 | msgid "Other" | 1673 | msgid "Other" |
891 | 1601 | msgstr "" | 1674 | msgstr "" |
892 | 1602 | 1675 | ||
894 | 1603 | #: src/ui_configurationDialog.h:806 | 1676 | #: src/ui_configurationDialog.h:805 |
895 | 1604 | msgid "Hides the mouse cursor when inactive" | 1677 | msgid "Hides the mouse cursor when inactive" |
896 | 1605 | msgstr "" | 1678 | msgstr "" |
897 | 1606 | 1679 | ||
899 | 1607 | #: src/ui_configurationDialog.h:808 | 1680 | #: src/ui_configurationDialog.h:807 |
900 | 1608 | msgid "Mouse cursor timeout (seconds):" | 1681 | msgid "Mouse cursor timeout (seconds):" |
901 | 1609 | msgstr "" | 1682 | msgstr "" |
902 | 1610 | 1683 | ||
904 | 1611 | #: src/ui_configurationDialog.h:810 | 1684 | #: src/ui_configurationDialog.h:809 |
905 | 1612 | msgid "Toggle vertical and horizontal image flip buttons." | 1685 | msgid "Toggle vertical and horizontal image flip buttons." |
906 | 1613 | msgstr "" | 1686 | msgstr "" |
907 | 1614 | 1687 | ||
908 | 1688 | #: src/ui_configurationDialog.h:811 | ||
909 | 1689 | msgid "Show flip buttons" | ||
910 | 1690 | msgstr "" | ||
911 | 1691 | |||
912 | 1615 | #: src/ui_configurationDialog.h:812 | 1692 | #: src/ui_configurationDialog.h:812 |
913 | 1616 | msgid "Show flip buttons" | ||
914 | 1617 | msgstr "" | ||
915 | 1618 | |||
916 | 1619 | #: src/ui_configurationDialog.h:813 | ||
917 | 1620 | msgid "Planetarium options" | 1693 | msgid "Planetarium options" |
918 | 1621 | msgstr "" | 1694 | msgstr "" |
919 | 1622 | 1695 | ||
921 | 1623 | #: src/ui_configurationDialog.h:815 | 1696 | #: src/ui_configurationDialog.h:814 |
922 | 1624 | msgid "" | 1697 | msgid "" |
923 | 1625 | "Spheric mirror distortion is used when projecting Stellarium onto a spheric " | 1698 | "Spheric mirror distortion is used when projecting Stellarium onto a spheric " |
924 | 1626 | "mirror for low-cost planetarium systems." | 1699 | "mirror for low-cost planetarium systems." |
925 | 1627 | msgstr "" | 1700 | msgstr "" |
926 | 1628 | 1701 | ||
928 | 1629 | #: src/ui_configurationDialog.h:817 | 1702 | #: src/ui_configurationDialog.h:816 |
929 | 1630 | msgid "Spheric mirror distortion" | 1703 | msgid "Spheric mirror distortion" |
930 | 1631 | msgstr "" | 1704 | msgstr "" |
931 | 1632 | 1705 | ||
933 | 1633 | #: src/ui_configurationDialog.h:819 | 1706 | #: src/ui_configurationDialog.h:818 |
934 | 1634 | msgid "Align labels with the horizon" | 1707 | msgid "Align labels with the horizon" |
935 | 1635 | msgstr "" | 1708 | msgstr "" |
936 | 1636 | 1709 | ||
938 | 1637 | #: src/ui_configurationDialog.h:821 | 1710 | #: src/ui_configurationDialog.h:820 |
939 | 1638 | msgid "Gravity labels" | 1711 | msgid "Gravity labels" |
940 | 1639 | msgstr "" | 1712 | msgstr "" |
941 | 1640 | 1713 | ||
943 | 1641 | #: src/ui_configurationDialog.h:823 | 1714 | #: src/ui_configurationDialog.h:822 |
944 | 1642 | msgid "" | 1715 | msgid "" |
945 | 1643 | "When enabled, the \"auto zoom out\" key will also set the initial viewing " | 1716 | "When enabled, the \"auto zoom out\" key will also set the initial viewing " |
946 | 1644 | "direction" | 1717 | "direction" |
947 | 1645 | msgstr "" | 1718 | msgstr "" |
948 | 1646 | 1719 | ||
950 | 1647 | #: src/ui_configurationDialog.h:825 | 1720 | #: src/ui_configurationDialog.h:824 |
951 | 1648 | msgid "Auto zoom out returns to initial direction of view" | 1721 | msgid "Auto zoom out returns to initial direction of view" |
952 | 1649 | msgstr "" | 1722 | msgstr "" |
953 | 1650 | 1723 | ||
955 | 1651 | #: src/ui_configurationDialog.h:827 | 1724 | #: src/ui_configurationDialog.h:826 |
956 | 1652 | msgid "Mask out everything outside a central circle in the main view" | 1725 | msgid "Mask out everything outside a central circle in the main view" |
957 | 1653 | msgstr "" | 1726 | msgstr "" |
958 | 1654 | 1727 | ||
960 | 1655 | #: src/ui_configurationDialog.h:829 | 1728 | #: src/ui_configurationDialog.h:828 |
961 | 1656 | msgid "Disc viewport" | 1729 | msgid "Disc viewport" |
962 | 1657 | msgstr "" | 1730 | msgstr "" |
963 | 1658 | 1731 | ||
965 | 1659 | #: src/ui_configurationDialog.h:831 | 1732 | #: src/ui_configurationDialog.h:830 |
966 | 1660 | msgid "Hide other constellations when you click one" | 1733 | msgid "Hide other constellations when you click one" |
967 | 1661 | msgstr "" | 1734 | msgstr "" |
968 | 1662 | 1735 | ||
969 | 1736 | #: src/ui_configurationDialog.h:832 | ||
970 | 1737 | msgid "Select single constellation" | ||
971 | 1738 | msgstr "" | ||
972 | 1739 | |||
973 | 1663 | #: src/ui_configurationDialog.h:833 | 1740 | #: src/ui_configurationDialog.h:833 |
975 | 1664 | msgid "Select single constellation" | 1741 | msgid "Screenshots" |
976 | 1665 | msgstr "" | 1742 | msgstr "" |
977 | 1666 | 1743 | ||
978 | 1667 | #: src/ui_configurationDialog.h:834 | 1744 | #: src/ui_configurationDialog.h:834 |
979 | 1668 | msgid "Screenshots" | ||
980 | 1669 | msgstr "" | ||
981 | 1670 | |||
982 | 1671 | #: src/ui_configurationDialog.h:835 | ||
983 | 1672 | msgid "Screenshot Directory" | 1745 | msgid "Screenshot Directory" |
984 | 1673 | msgstr "" | 1746 | msgstr "" |
985 | 1674 | 1747 | ||
986 | 1748 | #: src/ui_configurationDialog.h:836 | ||
987 | 1749 | msgid "Invert colors" | ||
988 | 1750 | msgstr "" | ||
989 | 1751 | |||
990 | 1675 | #: src/ui_configurationDialog.h:837 | 1752 | #: src/ui_configurationDialog.h:837 |
991 | 1676 | msgid "Invert colors" | ||
992 | 1677 | msgstr "" | ||
993 | 1678 | |||
994 | 1679 | #: src/ui_configurationDialog.h:838 | ||
995 | 1680 | msgid "Star catalog updates" | 1753 | msgid "Star catalog updates" |
996 | 1681 | msgstr "" | 1754 | msgstr "" |
997 | 1682 | 1755 | ||
999 | 1683 | #: src/ui_configurationDialog.h:840 | 1756 | #: src/ui_configurationDialog.h:839 |
1000 | 1684 | msgid "Click here to start downloading" | 1757 | msgid "Click here to start downloading" |
1001 | 1685 | msgstr "" | 1758 | msgstr "" |
1002 | 1686 | 1759 | ||
1003 | 1760 | #: src/ui_configurationDialog.h:841 | ||
1004 | 1761 | msgid "Get catalog x of y" | ||
1005 | 1762 | msgstr "" | ||
1006 | 1763 | |||
1007 | 1687 | #: src/ui_configurationDialog.h:842 | 1764 | #: src/ui_configurationDialog.h:842 |
1009 | 1688 | msgid "Get catalog x of y" | 1765 | msgid "Download this file to view even more stars" |
1010 | 1689 | msgstr "" | 1766 | msgstr "" |
1011 | 1690 | 1767 | ||
1012 | 1691 | #: src/ui_configurationDialog.h:843 | 1768 | #: src/ui_configurationDialog.h:843 |
1013 | 1692 | msgid "Download this file to view even more stars" | ||
1014 | 1693 | msgstr "" | ||
1015 | 1694 | |||
1016 | 1695 | #: src/ui_configurationDialog.h:844 | ||
1017 | 1696 | msgid "xxx" | 1769 | msgid "xxx" |
1018 | 1697 | msgstr "" | 1770 | msgstr "" |
1019 | 1698 | 1771 | ||
1021 | 1699 | #: src/ui_configurationDialog.h:846 | 1772 | #: src/ui_configurationDialog.h:845 |
1022 | 1700 | msgid "Restart the download" | 1773 | msgid "Restart the download" |
1023 | 1701 | msgstr "" | 1774 | msgstr "" |
1024 | 1702 | 1775 | ||
1026 | 1703 | #: src/ui_configurationDialog.h:848 | 1776 | #: src/ui_configurationDialog.h:847 |
1027 | 1704 | msgid "Retry" | 1777 | msgid "Retry" |
1028 | 1705 | msgstr "" | 1778 | msgstr "" |
1029 | 1706 | 1779 | ||
1031 | 1707 | #: src/ui_configurationDialog.h:850 | 1780 | #: src/ui_configurationDialog.h:849 |
1032 | 1708 | msgid "Stop the download. You can always restart it later" | 1781 | msgid "Stop the download. You can always restart it later" |
1033 | 1709 | msgstr "" | 1782 | msgstr "" |
1034 | 1710 | 1783 | ||
1036 | 1711 | #: src/ui_configurationDialog.h:852 | 1784 | #: src/ui_configurationDialog.h:851 |
1037 | 1712 | msgid "Cancel" | 1785 | msgid "Cancel" |
1038 | 1713 | msgstr "" | 1786 | msgstr "" |
1039 | 1714 | 1787 | ||
1041 | 1715 | #: src/ui_configurationDialog.h:855 | 1788 | #: src/ui_configurationDialog.h:854 |
1042 | 1716 | msgid "Close window when script runs" | 1789 | msgid "Close window when script runs" |
1043 | 1717 | msgstr "" | 1790 | msgstr "" |
1044 | 1718 | 1791 | ||
1046 | 1719 | #: src/ui_configurationDialog.h:857 | 1792 | #: src/ui_configurationDialog.h:856 |
1047 | 1720 | msgid "Run the selected script" | 1793 | msgid "Run the selected script" |
1048 | 1721 | msgstr "" | 1794 | msgstr "" |
1049 | 1722 | 1795 | ||
1051 | 1723 | #: src/ui_configurationDialog.h:861 | 1796 | #: src/ui_configurationDialog.h:860 |
1052 | 1724 | msgid "Stop a running script" | 1797 | msgid "Stop a running script" |
1053 | 1725 | msgstr "" | 1798 | msgstr "" |
1054 | 1726 | 1799 | ||
1055 | 1800 | #: src/ui_configurationDialog.h:864 | ||
1056 | 1801 | msgid "Load at startup" | ||
1057 | 1802 | msgstr "" | ||
1058 | 1803 | |||
1059 | 1727 | #: src/ui_configurationDialog.h:865 | 1804 | #: src/ui_configurationDialog.h:865 |
1060 | 1728 | msgid "Load at startup" | ||
1061 | 1729 | msgstr "" | ||
1062 | 1730 | |||
1063 | 1731 | #: src/ui_configurationDialog.h:866 | ||
1064 | 1732 | msgid "configure" | 1805 | msgid "configure" |
1065 | 1733 | msgstr "" | 1806 | msgstr "" |
1066 | 1734 | 1807 | ||
1068 | 1735 | #: src/ui_configurationDialog.h:871 | 1808 | #: src/ui_configurationDialog.h:870 |
1069 | 1736 | msgid "Main" | 1809 | msgid "Main" |
1070 | 1737 | msgstr "" | 1810 | msgstr "" |
1071 | 1738 | 1811 | ||
1073 | 1739 | #: src/ui_configurationDialog.h:873 | 1812 | #: src/ui_configurationDialog.h:872 |
1074 | 1740 | msgid "Navigation" | 1813 | msgid "Navigation" |
1075 | 1741 | msgstr "" | 1814 | msgstr "" |
1076 | 1742 | 1815 | ||
1078 | 1743 | #: src/ui_configurationDialog.h:875 | 1816 | #: src/ui_configurationDialog.h:874 |
1079 | 1744 | msgid "Tools" | 1817 | msgid "Tools" |
1080 | 1745 | msgstr "" | 1818 | msgstr "" |
1081 | 1746 | 1819 | ||
1083 | 1747 | #: src/ui_configurationDialog.h:877 | 1820 | #: src/ui_configurationDialog.h:876 |
1084 | 1748 | msgid "Scripts" | 1821 | msgid "Scripts" |
1085 | 1749 | msgstr "" | 1822 | msgstr "" |
1086 | 1750 | 1823 | ||
1088 | 1751 | #: src/ui_configurationDialog.h:879 | 1824 | #: src/ui_configurationDialog.h:878 |
1089 | 1752 | msgid "Plugins" | 1825 | msgid "Plugins" |
1090 | 1753 | msgstr "" | 1826 | msgstr "" |
1091 | 1827 | |||
1092 | 1828 | #: src/ui_addRemoveLandscapesDialog.h:266 | ||
1093 | 1829 | msgid "Add/Remove Landscapes" | ||
1094 | 1830 | msgstr "" | ||
1095 | 1831 | |||
1096 | 1832 | #: src/ui_addRemoveLandscapesDialog.h:268 | ||
1097 | 1833 | msgid "Add a new landscape" | ||
1098 | 1834 | msgstr "" | ||
1099 | 1835 | |||
1100 | 1836 | #: src/ui_addRemoveLandscapesDialog.h:269 | ||
1101 | 1837 | msgid "Install a new landscape from a ZIP archive..." | ||
1102 | 1838 | msgstr "" | ||
1103 | 1839 | |||
1104 | 1840 | #: src/ui_addRemoveLandscapesDialog.h:270 | ||
1105 | 1841 | msgid "Switch to the new landscape after installation" | ||
1106 | 1842 | msgstr "" | ||
1107 | 1843 | |||
1108 | 1844 | #: src/ui_addRemoveLandscapesDialog.h:273 | ||
1109 | 1845 | msgid "Remove an installed landscape" | ||
1110 | 1846 | msgstr "" | ||
1111 | 1847 | |||
1112 | 1848 | #: src/ui_addRemoveLandscapesDialog.h:275 | ||
1113 | 1849 | msgid "Remove" | ||
1114 | 1850 | msgstr "" | ||
1115 | 1851 | |||
1116 | 1852 | #: src/ui_addRemoveLandscapesDialog.h:276 | ||
1117 | 1853 | msgid "" | ||
1118 | 1854 | "WARNING: Removing the selected landscape means deleting its files. This " | ||
1119 | 1855 | "operation is irreversible." | ||
1120 | 1856 | msgstr "" | ||
1121 | 1754 | 1857 | ||
1122 | === modified file 'src/CMakeLists.txt' | |||
1123 | --- src/CMakeLists.txt 2010-09-06 10:39:45 +0000 | |||
1124 | +++ src/CMakeLists.txt 2010-09-13 16:37:45 +0000 | |||
1125 | @@ -407,6 +407,8 @@ | |||
1126 | 407 | gui/SearchDialog.cpp | 407 | gui/SearchDialog.cpp |
1127 | 408 | gui/ConfigurationDialog.hpp | 408 | gui/ConfigurationDialog.hpp |
1128 | 409 | gui/ConfigurationDialog.cpp | 409 | gui/ConfigurationDialog.cpp |
1129 | 410 | gui/AddRemoveLandscapesDialog.hpp | ||
1130 | 411 | gui/AddRemoveLandscapesDialog.cpp | ||
1131 | 410 | gui/StelDialog.hpp | 412 | gui/StelDialog.hpp |
1132 | 411 | gui/StelDialog.cpp) | 413 | gui/StelDialog.cpp) |
1133 | 412 | 414 | ||
1134 | @@ -424,6 +426,7 @@ | |||
1135 | 424 | gui/ViewDialog.hpp | 426 | gui/ViewDialog.hpp |
1136 | 425 | gui/SearchDialog.hpp | 427 | gui/SearchDialog.hpp |
1137 | 426 | gui/ConfigurationDialog.hpp | 428 | gui/ConfigurationDialog.hpp |
1138 | 429 | gui/AddRemoveLandscapesDialog.hpp | ||
1139 | 427 | gui/StelDialog.hpp) | 430 | gui/StelDialog.hpp) |
1140 | 428 | 431 | ||
1141 | 429 | ################# compiles .ui files ############ | 432 | ################# compiles .ui files ############ |
1142 | @@ -433,7 +436,8 @@ | |||
1143 | 433 | gui/dateTimeDialogGui.ui | 436 | gui/dateTimeDialogGui.ui |
1144 | 434 | gui/viewDialog.ui | 437 | gui/viewDialog.ui |
1145 | 435 | gui/searchDialogGui.ui | 438 | gui/searchDialogGui.ui |
1147 | 436 | gui/configurationDialog.ui) | 439 | gui/configurationDialog.ui |
1148 | 440 | gui/addRemoveLandscapesDialog.ui) | ||
1149 | 437 | 441 | ||
1150 | 438 | IF(ENABLE_SCRIPT_CONSOLE) | 442 | IF(ENABLE_SCRIPT_CONSOLE) |
1151 | 439 | SET(stellarium_gui_SRCS ${stellarium_gui_SRCS} | 443 | SET(stellarium_gui_SRCS ${stellarium_gui_SRCS} |
1152 | 440 | 444 | ||
1153 | === modified file 'src/core/modules/LandscapeMgr.cpp' | |||
1154 | --- src/core/modules/LandscapeMgr.cpp 2010-06-03 21:41:26 +0000 | |||
1155 | +++ src/core/modules/LandscapeMgr.cpp 2010-09-13 16:37:45 +0000 | |||
1156 | @@ -1,6 +1,7 @@ | |||
1157 | 1 | /* | 1 | /* |
1158 | 2 | * Stellarium | 2 | * Stellarium |
1159 | 3 | * Copyright (C) 2006 Fabien Chereau | 3 | * Copyright (C) 2006 Fabien Chereau |
1160 | 4 | * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature) | ||
1161 | 4 | * | 5 | * |
1162 | 5 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
1163 | 6 | * modify it under the terms of the GNU General Public License | 7 | * modify it under the terms of the GNU General Public License |
1164 | @@ -20,6 +21,9 @@ | |||
1165 | 20 | #include <QDebug> | 21 | #include <QDebug> |
1166 | 21 | #include <QSettings> | 22 | #include <QSettings> |
1167 | 22 | #include <QString> | 23 | #include <QString> |
1168 | 24 | #include <QDir> | ||
1169 | 25 | #include <QFile> | ||
1170 | 26 | #include <QTemporaryFile> | ||
1171 | 23 | 27 | ||
1172 | 24 | #ifdef USE_OPENGL_ES2 | 28 | #ifdef USE_OPENGL_ES2 |
1173 | 25 | #include "GLES2/gl2.h" | 29 | #include "GLES2/gl2.h" |
1174 | @@ -27,6 +31,8 @@ | |||
1175 | 27 | #include <QtOpenGL> | 31 | #include <QtOpenGL> |
1176 | 28 | #endif | 32 | #endif |
1177 | 29 | 33 | ||
1178 | 34 | #include <stdexcept> | ||
1179 | 35 | |||
1180 | 30 | #include "LandscapeMgr.hpp" | 36 | #include "LandscapeMgr.hpp" |
1181 | 31 | #include "Landscape.hpp" | 37 | #include "Landscape.hpp" |
1182 | 32 | #include "Atmosphere.hpp" | 38 | #include "Atmosphere.hpp" |
1183 | @@ -40,6 +46,8 @@ | |||
1184 | 40 | #include "StelIniParser.hpp" | 46 | #include "StelIniParser.hpp" |
1185 | 41 | #include "StelSkyDrawer.hpp" | 47 | #include "StelSkyDrawer.hpp" |
1186 | 42 | #include "StelPainter.hpp" | 48 | #include "StelPainter.hpp" |
1187 | 49 | #include "karchive.h" | ||
1188 | 50 | #include "kzip.h" | ||
1189 | 43 | 51 | ||
1190 | 44 | // Class which manages the cardinal points displaying | 52 | // Class which manages the cardinal points displaying |
1191 | 45 | class Cardinals | 53 | class Cardinals |
1192 | @@ -144,6 +152,10 @@ | |||
1193 | 144 | LandscapeMgr::LandscapeMgr() : atmosphere(NULL), cardinalsPoints(NULL), landscape(NULL), flagLandscapeSetsLocation(false) | 152 | LandscapeMgr::LandscapeMgr() : atmosphere(NULL), cardinalsPoints(NULL), landscape(NULL), flagLandscapeSetsLocation(false) |
1194 | 145 | { | 153 | { |
1195 | 146 | setObjectName("LandscapeMgr"); | 154 | setObjectName("LandscapeMgr"); |
1196 | 155 | |||
1197 | 156 | //TODO: Find a way to obtain this list automatically. | ||
1198 | 157 | //Note: The first entry in the list is used as the default 'default landscape' in removeLandscape(). | ||
1199 | 158 | packagedLandscapeIDs = (QStringList() << "guereins" << "trees" << "moon" << "hurricane" << "ocean" << "garching" << "mars" << "saturn"); | ||
1200 | 147 | } | 159 | } |
1201 | 148 | 160 | ||
1202 | 149 | LandscapeMgr::~LandscapeMgr() | 161 | LandscapeMgr::~LandscapeMgr() |
1203 | @@ -408,6 +420,20 @@ | |||
1204 | 408 | return result; | 420 | return result; |
1205 | 409 | } | 421 | } |
1206 | 410 | 422 | ||
1207 | 423 | QStringList LandscapeMgr::getUserLandscapeIDs() const | ||
1208 | 424 | { | ||
1209 | 425 | QMap<QString,QString> nameToDirMap = getNameToDirMap(); | ||
1210 | 426 | QStringList result; | ||
1211 | 427 | foreach (QString id, nameToDirMap.values()) | ||
1212 | 428 | { | ||
1213 | 429 | if(!packagedLandscapeIDs.contains(id)) | ||
1214 | 430 | { | ||
1215 | 431 | result += id; | ||
1216 | 432 | } | ||
1217 | 433 | } | ||
1218 | 434 | return result; | ||
1219 | 435 | } | ||
1220 | 436 | |||
1221 | 411 | QString LandscapeMgr::getCurrentLandscapeName() const | 437 | QString LandscapeMgr::getCurrentLandscapeName() const |
1222 | 412 | { | 438 | { |
1223 | 413 | return landscape->getName(); | 439 | return landscape->getName(); |
1224 | @@ -604,3 +630,291 @@ | |||
1225 | 604 | } | 630 | } |
1226 | 605 | 631 | ||
1227 | 606 | 632 | ||
1228 | 633 | QString LandscapeMgr::installLandscapeFromArchive(QString sourceFilePath, bool display, bool toMainDirectory) | ||
1229 | 634 | { | ||
1230 | 635 | if (!QFile::exists(sourceFilePath)) | ||
1231 | 636 | { | ||
1232 | 637 | qDebug() << "LandscapeMgr: File does not exist:" << sourceFilePath; | ||
1233 | 638 | emit errorUnableToOpen(sourceFilePath); | ||
1234 | 639 | return QString(); | ||
1235 | 640 | } | ||
1236 | 641 | |||
1237 | 642 | QDir parentDestinationDir; | ||
1238 | 643 | //TODO: Fix the "for all users" option | ||
1239 | 644 | parentDestinationDir.setPath(StelFileMgr::getUserDir()); | ||
1240 | 645 | |||
1241 | 646 | if (!parentDestinationDir.exists("landscapes")) | ||
1242 | 647 | { | ||
1243 | 648 | //qDebug() << "LandscapeMgr: No 'landscapes' subdirectory exists in" << parentDestinationDir.absolutePath(); | ||
1244 | 649 | if (!parentDestinationDir.mkdir("landscapes")) | ||
1245 | 650 | { | ||
1246 | 651 | qWarning() << "LandscapeMgr: Unable to install landscape: Unable to create sub-directory 'landscapes' in" << parentDestinationDir.absolutePath(); | ||
1247 | 652 | emit errorUnableToOpen(QDir::cleanPath(parentDestinationDir.filePath("landscapes")));//parentDestinationDir.absolutePath() | ||
1248 | 653 | return QString(); | ||
1249 | 654 | } | ||
1250 | 655 | } | ||
1251 | 656 | QDir destinationDir (parentDestinationDir.absoluteFilePath("landscapes")); | ||
1252 | 657 | |||
1253 | 658 | KZip sourceArchive(sourceFilePath); | ||
1254 | 659 | if(!sourceArchive.open(QIODevice::ReadOnly)) | ||
1255 | 660 | { | ||
1256 | 661 | qWarning() << "LandscapeMgr: Unable to open as a ZIP archive:" << sourceFilePath; | ||
1257 | 662 | emit errorNotArchive(); | ||
1258 | 663 | return QString(); | ||
1259 | 664 | } | ||
1260 | 665 | |||
1261 | 666 | //Detect top directory | ||
1262 | 667 | const KArchiveDirectory * archiveTopDirectory = NULL; | ||
1263 | 668 | QStringList topLevelContents = sourceArchive.directory()->entries(); | ||
1264 | 669 | if(topLevelContents.contains("landscape.ini")) | ||
1265 | 670 | { | ||
1266 | 671 | //If the landscape archive has no top level directory... | ||
1267 | 672 | //(test case is "tulipfield" from the Stellarium Wiki) | ||
1268 | 673 | archiveTopDirectory = sourceArchive.directory(); | ||
1269 | 674 | } | ||
1270 | 675 | else | ||
1271 | 676 | { | ||
1272 | 677 | foreach (QString entryPath, topLevelContents) | ||
1273 | 678 | { | ||
1274 | 679 | if (sourceArchive.directory()->entry(entryPath)->isDirectory()) | ||
1275 | 680 | { | ||
1276 | 681 | if((dynamic_cast<const KArchiveDirectory*>(sourceArchive.directory()->entry(entryPath)))->entries().contains("landscape.ini")) | ||
1277 | 682 | { | ||
1278 | 683 | archiveTopDirectory = dynamic_cast<const KArchiveDirectory*>(sourceArchive.directory()->entry(entryPath)); | ||
1279 | 684 | break; | ||
1280 | 685 | } | ||
1281 | 686 | } | ||
1282 | 687 | } | ||
1283 | 688 | } | ||
1284 | 689 | if (archiveTopDirectory == NULL) | ||
1285 | 690 | { | ||
1286 | 691 | qWarning() << "LandscapeMgr: Unable to install landscape. There is no directory that contains a 'landscape.ini' file in the source archive."; | ||
1287 | 692 | emit errorNotArchive(); | ||
1288 | 693 | return QString(); | ||
1289 | 694 | } | ||
1290 | 695 | |||
1291 | 696 | /* | ||
1292 | 697 | qDebug() << "LandscapeMgr: Contents of the source archive:" << endl | ||
1293 | 698 | << "- top level direcotory:" << archiveTopDirectory->name() << endl | ||
1294 | 699 | << "- contents:" << archiveTopDirectory->entries(); | ||
1295 | 700 | */ | ||
1296 | 701 | |||
1297 | 702 | //Check if the top directory name is unique | ||
1298 | 703 | //TODO: Prompt rename? Rename silently? | ||
1299 | 704 | /* | ||
1300 | 705 | if (destinationDir.exists(archiveTopDirectory->name())) | ||
1301 | 706 | { | ||
1302 | 707 | qWarning() << "LandscapeMgr: Unable to install landscape. A directory named" << archiveTopDirectory->name() << "already exists in" << destinationDir.absolutePath(); | ||
1303 | 708 | return QString(); | ||
1304 | 709 | } | ||
1305 | 710 | */ | ||
1306 | 711 | //Determine the landscape's identifier | ||
1307 | 712 | QString landscapeID = archiveTopDirectory->name(); | ||
1308 | 713 | if (landscapeID.length() < 2) | ||
1309 | 714 | { | ||
1310 | 715 | //If the archive has no top level directory (landscapeID is "/"), | ||
1311 | 716 | //use the first 65 characters of its file name for an identifier | ||
1312 | 717 | QFileInfo sourceFileInfo(sourceFilePath); | ||
1313 | 718 | landscapeID = sourceFileInfo.baseName().left(65); | ||
1314 | 719 | } | ||
1315 | 720 | |||
1316 | 721 | //Check for duplicate IDs | ||
1317 | 722 | if (getAllLandscapeIDs().contains(landscapeID)) | ||
1318 | 723 | { | ||
1319 | 724 | qWarning() << "LandscapeMgr: Unable to install landscape. A landscape with the ID" << landscapeID << "already exists."; | ||
1320 | 725 | emit errorNotUnique(landscapeID); | ||
1321 | 726 | return QString(); | ||
1322 | 727 | } | ||
1323 | 728 | |||
1324 | 729 | //Read the .ini file and check if the landscape name is unique | ||
1325 | 730 | QTemporaryFile tempLandscapeIni("landscapeXXXXXX.ini"); | ||
1326 | 731 | if (tempLandscapeIni.open()) | ||
1327 | 732 | { | ||
1328 | 733 | const KZipFileEntry * archLandscapeIni = static_cast<const KZipFileEntry*>(archiveTopDirectory->entry("landscape.ini")); | ||
1329 | 734 | tempLandscapeIni.write(archLandscapeIni->createDevice()->readAll()); | ||
1330 | 735 | tempLandscapeIni.close(); | ||
1331 | 736 | |||
1332 | 737 | QSettings confLandscapeIni(tempLandscapeIni.fileName(), StelIniFormat); | ||
1333 | 738 | QString landscapeName = confLandscapeIni.value("landscape/name").toString(); | ||
1334 | 739 | if (getAllLandscapeNames().contains(landscapeName)) | ||
1335 | 740 | { | ||
1336 | 741 | qWarning() << "LandscapeMgr: Unable to install landscape. There is already a landscape named" << landscapeName; | ||
1337 | 742 | emit errorNotUnique(landscapeName); | ||
1338 | 743 | return QString(); | ||
1339 | 744 | } | ||
1340 | 745 | } | ||
1341 | 746 | |||
1342 | 747 | //Copy the landscape directory to the target | ||
1343 | 748 | //sourceArchive.directory()->copyTo(destinationDir.absolutePath()); | ||
1344 | 749 | |||
1345 | 750 | //This case already has been handled - and commented out - above. :) | ||
1346 | 751 | if(destinationDir.exists(landscapeID)) | ||
1347 | 752 | { | ||
1348 | 753 | qWarning() << "LandscapeMgr: A subdirectory" << landscapeID << "already exists in" << destinationDir.absolutePath() << "Its contents may be overwritten."; | ||
1349 | 754 | } | ||
1350 | 755 | else if(!destinationDir.mkdir(landscapeID)) | ||
1351 | 756 | { | ||
1352 | 757 | qWarning() << "LandscapeMgr: Unable to install landscape. Unable to create" << landscapeID << "directory in" << destinationDir.absolutePath(); | ||
1353 | 758 | emit errorUnableToOpen(QDir::cleanPath(destinationDir.filePath(landscapeID))); | ||
1354 | 759 | return QString(); | ||
1355 | 760 | } | ||
1356 | 761 | destinationDir.cd(landscapeID); | ||
1357 | 762 | QString destinationDirPath = destinationDir.absolutePath(); | ||
1358 | 763 | QStringList landscapeFileEntries = archiveTopDirectory->entries(); | ||
1359 | 764 | foreach (QString entry, landscapeFileEntries) | ||
1360 | 765 | { | ||
1361 | 766 | const KArchiveEntry * archEntry = archiveTopDirectory->entry(entry); | ||
1362 | 767 | if(archEntry->isFile()) | ||
1363 | 768 | { | ||
1364 | 769 | static_cast<const KZipFileEntry*>(archEntry)->copyTo(destinationDirPath); | ||
1365 | 770 | } | ||
1366 | 771 | } | ||
1367 | 772 | |||
1368 | 773 | sourceArchive.close(); | ||
1369 | 774 | |||
1370 | 775 | //If necessary, make the new landscape the current landscape | ||
1371 | 776 | if (display) | ||
1372 | 777 | { | ||
1373 | 778 | setCurrentLandscapeID(landscapeID); | ||
1374 | 779 | } | ||
1375 | 780 | |||
1376 | 781 | //Make sure that everyone knows that the list of available landscapes has changed | ||
1377 | 782 | emit landscapesChanged(); | ||
1378 | 783 | |||
1379 | 784 | qDebug() << "LandscapeMgr: Successfully installed landscape directory" << landscapeID << "to" << destinationDir.absolutePath(); | ||
1380 | 785 | return landscapeID; | ||
1381 | 786 | } | ||
1382 | 787 | |||
1383 | 788 | bool LandscapeMgr::removeLandscape(QString landscapeID) | ||
1384 | 789 | { | ||
1385 | 790 | if (landscapeID.isEmpty()) | ||
1386 | 791 | { | ||
1387 | 792 | qWarning() << "LandscapeMgr: Error! No landscape ID passed to removeLandscape()."; | ||
1388 | 793 | return false; | ||
1389 | 794 | } | ||
1390 | 795 | |||
1391 | 796 | if (packagedLandscapeIDs.contains(landscapeID)) | ||
1392 | 797 | { | ||
1393 | 798 | qWarning() << "LandscapeMgr: Landscapes that are part of the default installation cannot be removed."; | ||
1394 | 799 | return false; | ||
1395 | 800 | } | ||
1396 | 801 | |||
1397 | 802 | qDebug() << "LandscapeMgr: Trying to remove landscape" << landscapeID; | ||
1398 | 803 | |||
1399 | 804 | QString landscapePath = getLandscapePath(landscapeID); | ||
1400 | 805 | if (landscapePath.isEmpty()) | ||
1401 | 806 | return false; | ||
1402 | 807 | |||
1403 | 808 | QDir landscapeDir(landscapePath); | ||
1404 | 809 | foreach (QString fileName, landscapeDir.entryList(QDir::Files | QDir::NoDotAndDotDot)) | ||
1405 | 810 | { | ||
1406 | 811 | if(!landscapeDir.remove(fileName)) | ||
1407 | 812 | { | ||
1408 | 813 | qWarning() << "LandscapeMgr: Unable to remove" << fileName; | ||
1409 | 814 | emit errorRemoveManually(landscapeDir.absolutePath()); | ||
1410 | 815 | return false; | ||
1411 | 816 | } | ||
1412 | 817 | } | ||
1413 | 818 | landscapeDir.cdUp(); | ||
1414 | 819 | if(!landscapeDir.rmdir(landscapeID)) | ||
1415 | 820 | { | ||
1416 | 821 | qWarning() << "LandscapeMgr: Error! Landscape" << landscapeID | ||
1417 | 822 | << "could not be removed. " | ||
1418 | 823 | << "Some files were deleted, but not all." | ||
1419 | 824 | << endl | ||
1420 | 825 | << "LandscapeMgr: You can delete manually" << QDir::cleanPath(landscapeDir.filePath(landscapeID)); | ||
1421 | 826 | emit errorRemoveManually(QDir::cleanPath(landscapeDir.filePath(landscapeID))); | ||
1422 | 827 | return false; | ||
1423 | 828 | } | ||
1424 | 829 | |||
1425 | 830 | qDebug() << "LandscapeMgr: Successfully removed" << landscapePath; | ||
1426 | 831 | |||
1427 | 832 | //If the landscape has been selected, revert to the default one | ||
1428 | 833 | //TODO: Make this optional? | ||
1429 | 834 | if (getCurrentLandscapeID() == landscapeID) | ||
1430 | 835 | { | ||
1431 | 836 | if(getDefaultLandscapeID() == landscapeID) | ||
1432 | 837 | { | ||
1433 | 838 | setDefaultLandscapeID(packagedLandscapeIDs.first()); | ||
1434 | 839 | //TODO: Find what happens if a missing landscape is specified in the configuration file | ||
1435 | 840 | } | ||
1436 | 841 | |||
1437 | 842 | setCurrentLandscapeID(getDefaultLandscapeID()); | ||
1438 | 843 | } | ||
1439 | 844 | |||
1440 | 845 | //Make sure that everyone knows that the list of available landscapes has changed | ||
1441 | 846 | emit landscapesChanged(); | ||
1442 | 847 | |||
1443 | 848 | return true; | ||
1444 | 849 | } | ||
1445 | 850 | |||
1446 | 851 | QString LandscapeMgr::getLandscapePath(QString landscapeID) | ||
1447 | 852 | { | ||
1448 | 853 | QString result; | ||
1449 | 854 | //Is this necessary? This function is private. | ||
1450 | 855 | if (landscapeID.isEmpty()) | ||
1451 | 856 | return result; | ||
1452 | 857 | |||
1453 | 858 | try | ||
1454 | 859 | { | ||
1455 | 860 | result = StelFileMgr::findFile("landscapes/" + landscapeID, StelFileMgr::Directory); | ||
1456 | 861 | } | ||
1457 | 862 | catch (std::runtime_error &e) | ||
1458 | 863 | { | ||
1459 | 864 | qWarning() << "LandscapeMgr: Error! Unable to find" << landscapeID << ":" << e.what(); | ||
1460 | 865 | return result; | ||
1461 | 866 | } | ||
1462 | 867 | |||
1463 | 868 | return result; | ||
1464 | 869 | } | ||
1465 | 870 | |||
1466 | 871 | QString LandscapeMgr::loadLandscapeName(QString landscapeID) | ||
1467 | 872 | { | ||
1468 | 873 | QString landscapeName; | ||
1469 | 874 | if (landscapeID.isEmpty()) | ||
1470 | 875 | { | ||
1471 | 876 | qWarning() << "LandscapeMgr: Error! No landscape ID passed to loadLandscapeName()."; | ||
1472 | 877 | return landscapeName; | ||
1473 | 878 | } | ||
1474 | 879 | |||
1475 | 880 | QString landscapePath = getLandscapePath(landscapeID); | ||
1476 | 881 | if (landscapePath.isEmpty()) | ||
1477 | 882 | return landscapeName; | ||
1478 | 883 | |||
1479 | 884 | QDir landscapeDir(landscapePath); | ||
1480 | 885 | if (landscapeDir.exists("landscape.ini")) | ||
1481 | 886 | { | ||
1482 | 887 | QString landscapeSettingsPath = landscapeDir.filePath("landscape.ini"); | ||
1483 | 888 | QSettings landscapeSettings(landscapeSettingsPath, StelIniFormat); | ||
1484 | 889 | landscapeName = landscapeSettings.value("landscape/name").toString(); | ||
1485 | 890 | } | ||
1486 | 891 | else | ||
1487 | 892 | { | ||
1488 | 893 | qWarning() << "LandscapeMgr: Error! Landscape directory" << landscapePath << "does not contain a 'landscape.ini' file"; | ||
1489 | 894 | } | ||
1490 | 895 | |||
1491 | 896 | return landscapeName; | ||
1492 | 897 | } | ||
1493 | 898 | |||
1494 | 899 | quint64 LandscapeMgr::loadLandscapeSize(QString landscapeID) | ||
1495 | 900 | { | ||
1496 | 901 | quint64 landscapeSize = 0; | ||
1497 | 902 | if (landscapeID.isEmpty()) | ||
1498 | 903 | { | ||
1499 | 904 | qWarning() << "LandscapeMgr: Error! No landscape ID passed to loadLandscapeSize()."; | ||
1500 | 905 | return landscapeSize; | ||
1501 | 906 | } | ||
1502 | 907 | |||
1503 | 908 | QString landscapePath = getLandscapePath(landscapeID); | ||
1504 | 909 | if (landscapePath.isEmpty()) | ||
1505 | 910 | return landscapeSize; | ||
1506 | 911 | |||
1507 | 912 | QDir landscapeDir(landscapePath); | ||
1508 | 913 | foreach (QFileInfo file, landscapeDir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot)) | ||
1509 | 914 | { | ||
1510 | 915 | //qDebug() << "name:" << file.baseName() << "size:" << file.size(); | ||
1511 | 916 | landscapeSize += file.size(); | ||
1512 | 917 | } | ||
1513 | 918 | |||
1514 | 919 | return landscapeSize; | ||
1515 | 920 | } | ||
1516 | 607 | 921 | ||
1517 | === modified file 'src/core/modules/LandscapeMgr.hpp' | |||
1518 | --- src/core/modules/LandscapeMgr.hpp 2010-05-20 10:13:42 +0000 | |||
1519 | +++ src/core/modules/LandscapeMgr.hpp 2010-09-13 16:37:45 +0000 | |||
1520 | @@ -1,6 +1,7 @@ | |||
1521 | 1 | /* | 1 | /* |
1522 | 2 | * Stellarium | 2 | * Stellarium |
1523 | 3 | * Copyright (C) 2006 Fabien Chereau | 3 | * Copyright (C) 2006 Fabien Chereau |
1524 | 4 | * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature) | ||
1525 | 4 | * | 5 | * |
1526 | 5 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
1527 | 6 | * modify it under the terms of the GNU General Public License | 7 | * modify it under the terms of the GNU General Public License |
1528 | @@ -32,8 +33,8 @@ | |||
1529 | 32 | class QSettings; | 33 | class QSettings; |
1530 | 33 | 34 | ||
1531 | 34 | //! @class LandscapeMgr | 35 | //! @class LandscapeMgr |
1534 | 35 | //! Manages all the rendering a the level of the observer's surrounding. | 36 | //! Manages all the rendering at the level of the observer's surroundings. |
1535 | 36 | //! This includes landscape textures, fog, atmosphere and cardinal points | 37 | //! This includes landscape textures, fog, atmosphere and cardinal points. |
1536 | 37 | //! I decided to put all these elements together in a single class because they are | 38 | //! I decided to put all these elements together in a single class because they are |
1537 | 38 | //! inherently linked, especially when we start moving the observer in altitude. | 39 | //! inherently linked, especially when we start moving the observer in altitude. |
1538 | 39 | class LandscapeMgr : public StelModule | 40 | class LandscapeMgr : public StelModule |
1539 | @@ -95,16 +96,21 @@ | |||
1540 | 95 | public slots: | 96 | public slots: |
1541 | 96 | /////////////////////////////////////////////////////////////////////////// | 97 | /////////////////////////////////////////////////////////////////////////// |
1542 | 97 | // Methods callable from script and GUI | 98 | // Methods callable from script and GUI |
1545 | 98 | //! Retrieve list of the names of all the available landscape in the | 99 | //! Retrieve a list of the names of all the available landscapes in |
1546 | 99 | //! file search path sub-directories of the landscape area | 100 | //! the file search path sub-directories of the landscape area |
1547 | 100 | //! @return the names of the landscapes, which are the values of the name parameter in the landscape.ini files | 101 | //! @return the names of the landscapes, which are the values of the name parameter in the landscape.ini files |
1548 | 101 | QStringList getAllLandscapeNames() const; | 102 | QStringList getAllLandscapeNames() const; |
1549 | 102 | 103 | ||
1553 | 103 | //! Retrieve list of the names of all the available landscape in the | 104 | //! Retrieve a list of the identifiers of all the available landscapes in |
1554 | 104 | //! file search path sub-directories of the landscape area | 105 | //! the file search path sub-directories of the landscape area |
1555 | 105 | //! @return the names of the landscapes, which are the values of the name parameter in the landscape.ini files | 106 | //! @return the identifiers of the landscapes, which are the names of the directories containing the landscapes' files |
1556 | 106 | QStringList getAllLandscapeIDs() const; | 107 | QStringList getAllLandscapeIDs() const; |
1557 | 107 | 108 | ||
1558 | 109 | //! Retrieve a list of the identifiers of all user-installed landscapes. | ||
1559 | 110 | //! Effectively, this returns the results of getAllLandscapeIDs() without | ||
1560 | 111 | //! the landscapes specified in the #packagedLandscapeIDs list. | ||
1561 | 112 | QStringList getUserLandscapeIDs() const; | ||
1562 | 113 | |||
1563 | 108 | //! Get the current landscape ID. | 114 | //! Get the current landscape ID. |
1564 | 109 | const QString& getCurrentLandscapeID() const {return currentLandscapeID;} | 115 | const QString& getCurrentLandscapeID() const {return currentLandscapeID;} |
1565 | 110 | //! Change the current landscape to the landscape with the ID specified. | 116 | //! Change the current landscape to the landscape with the ID specified. |
1566 | @@ -174,6 +180,106 @@ | |||
1567 | 174 | //! @param d the rotation angle in degrees as an offset from the originally loaded value. | 180 | //! @param d the rotation angle in degrees as an offset from the originally loaded value. |
1568 | 175 | void setZRotation(float d); | 181 | void setZRotation(float d); |
1569 | 176 | 182 | ||
1570 | 183 | //! Install a landscape from a ZIP archive. | ||
1571 | 184 | //! This function searches for a file named "landscape.ini" in the root | ||
1572 | 185 | //! directory of the archive. If it is not found there, the function | ||
1573 | 186 | //! searches inside the topmost sub-directories (if any), but no deeper. | ||
1574 | 187 | //! If a landscape configuration file is found: | ||
1575 | 188 | //! - if a "landscapes" directory does not exist in the user data | ||
1576 | 189 | //! directory, it is created; | ||
1577 | 190 | //! - inside it, a sub-directory is created with the landscape identifier | ||
1578 | 191 | //! for a name; | ||
1579 | 192 | //! - all files in the archive directory that contains the "landscape.ini" | ||
1580 | 193 | //! file are extracted to the new sub-directory of "landscapes"; | ||
1581 | 194 | //! - all sub-directories of that archive directory will be skipped along | ||
1582 | 195 | //! with any other files or directories in the archive. | ||
1583 | 196 | //! | ||
1584 | 197 | //! The landscape identifier is either: | ||
1585 | 198 | //! - the name of the folder in the archive that contains "landscape.ini", | ||
1586 | 199 | //! - or the first 65 (or less) characters of the archive name, if the | ||
1587 | 200 | //! "landscape.ini" file is in the nameless root directory of the archive. | ||
1588 | 201 | //! | ||
1589 | 202 | //! The landscape identifier must be unique. | ||
1590 | 203 | //! @param pathToSourceArchive path to the source archive file. | ||
1591 | 204 | //! @param display If true, the landscape will be set to be the current | ||
1592 | 205 | //! landscape after installation. | ||
1593 | 206 | //! @param forAllUsers If true, this function will try to install the | ||
1594 | 207 | //! landscape in a way that meakes it is available to all users of this | ||
1595 | 208 | //! computer. May require running Stellarium as an administrator (root) | ||
1596 | 209 | //! on some Windows or *nix systems. (NOT IMPLEMENTED!) | ||
1597 | 210 | //! @returns the installed landscape's identifier, or | ||
1598 | 211 | //! an empty string on failure. | ||
1599 | 212 | //! @todo Find a better way to pass error messages. | ||
1600 | 213 | QString installLandscapeFromArchive(QString pathToSourceArchive, bool display = false, bool forAllUsers = false); | ||
1601 | 214 | |||
1602 | 215 | //! Install a landscape from a directory. | ||
1603 | 216 | //! Expected directory structure: the name of the directory that contains | ||
1604 | 217 | //! a landscape.ini file is assumed to be the landscape ID and should be | ||
1605 | 218 | //! unique. | ||
1606 | 219 | //! This directory and all files in it will be installed, but its | ||
1607 | 220 | //! subdirectories will be skipped along with any other files or | ||
1608 | 221 | //! directories in the archive. | ||
1609 | 222 | //! @param pathToSourceLandscapeIni path to a landscape.ini file. Its parent | ||
1610 | 223 | //! directory is assumed to be the landscape source directory. | ||
1611 | 224 | //! @param display If true, the landscape will be set to be the current | ||
1612 | 225 | //! landscape after installation. | ||
1613 | 226 | //! @param forAllUsers If true, this function will try to install the | ||
1614 | 227 | //! landscape in a way that meakes it is available to all users of this | ||
1615 | 228 | //! computer. May require running Stellarium as an administrator (root) | ||
1616 | 229 | //! on some Windows or *nix systems. (NOT IMPLEMENTED!) | ||
1617 | 230 | //! @returns the installed landscape's identifier (the folder name), or | ||
1618 | 231 | //! an empty string on failure. | ||
1619 | 232 | //QString installLandscapeFromDirectory(QString pathToSourceLandscapeIni, bool display = false, bool forAllUsers = false); | ||
1620 | 233 | |||
1621 | 234 | //! This function removes a landscape from the user data directory. | ||
1622 | 235 | //! It tries to recursively delete all files in the landscape directory | ||
1623 | 236 | //! and then remove it from the list of available landscapes. | ||
1624 | 237 | //! If the function encounters any file that can't be deleted | ||
1625 | 238 | //! it aborts the operation (previously deleted files are not restored). | ||
1626 | 239 | //! Landscapes that were packaged with Stellarium can't be removed, | ||
1627 | 240 | //! thanks to the #packagedtLandscapeIDs list. | ||
1628 | 241 | //! @param landscapeID an installed landscape's identifier (the folder name) | ||
1629 | 242 | //! @todo Find a better way to pass error messages. | ||
1630 | 243 | bool removeLandscape(QString landscapeID); | ||
1631 | 244 | |||
1632 | 245 | //! This function reads a landscape's name from its configuration file. | ||
1633 | 246 | //! @param landscapeID an installed landscape's identifier (the folder name) | ||
1634 | 247 | //! @returns an empty string if there is no such landscape or some other | ||
1635 | 248 | //! error occurs | ||
1636 | 249 | QString loadLandscapeName(QString landscapeID); | ||
1637 | 250 | |||
1638 | 251 | //! This function calculates and returns a landscape's disc size in bytes. | ||
1639 | 252 | //! It adds up the sizes of all files in the landscape's folder. It assumes | ||
1640 | 253 | //! that there are no sub-directories. (There shouldn't be any anyway.) | ||
1641 | 254 | //! @param landscapeID an installed landscape's identifier (the folder name) | ||
1642 | 255 | quint64 loadLandscapeSize(QString landscapeID); | ||
1643 | 256 | |||
1644 | 257 | signals: | ||
1645 | 258 | //! Emitted when a landscape has been installed or un-installed. | ||
1646 | 259 | //! For example, it is used to update the list of landscapes in | ||
1647 | 260 | //! the Sky and viewing options window (the ViewDialog class) | ||
1648 | 261 | void landscapesChanged(); | ||
1649 | 262 | |||
1650 | 263 | //! Emitted when installLandscapeFromArchive() can't read from, write to or | ||
1651 | 264 | //! create a file or a directory. | ||
1652 | 265 | //! (A way of moving the need for translatable error messages to the GUI.) | ||
1653 | 266 | //! \param path path to the file or directory | ||
1654 | 267 | void errorUnableToOpen(QString path); | ||
1655 | 268 | //! Emitted when the file passed to installLandscapeFromArchive() is not a | ||
1656 | 269 | //! ZIP archive or does not contain a valid landscape. | ||
1657 | 270 | //! (A way of moving the need for translatable error messages to the GUI.) | ||
1658 | 271 | void errorNotArchive(); | ||
1659 | 272 | //! Emitted when installLandscapeFromArchive() tries to install a landscape | ||
1660 | 273 | //! with the same name or identifier as an already installed one. | ||
1661 | 274 | //! (A way of moving the need for translatable error messages to the GUI.) | ||
1662 | 275 | //! \param nameOrID the name or the identifier of the landscape | ||
1663 | 276 | void errorNotUnique(QString nameOrID); | ||
1664 | 277 | //! Emitted when removeLandscape() is unable to remove all the files of | ||
1665 | 278 | //! a landscape. | ||
1666 | 279 | //! (A way of moving the need for translatable error messages to the GUI.) | ||
1667 | 280 | //! \param path the path to the landscape's directory | ||
1668 | 281 | void errorRemoveManually(QString path); | ||
1669 | 282 | |||
1670 | 177 | private: | 283 | private: |
1671 | 178 | //! Get light pollution luminance level. | 284 | //! Get light pollution luminance level. |
1672 | 179 | float getAtmosphereLightPollutionLuminance() const; | 285 | float getAtmosphereLightPollutionLuminance() const; |
1673 | @@ -188,6 +294,12 @@ | |||
1674 | 188 | //! Return a map of landscape name to landscape ID (directory name). | 294 | //! Return a map of landscape name to landscape ID (directory name). |
1675 | 189 | QMap<QString,QString> getNameToDirMap() const; | 295 | QMap<QString,QString> getNameToDirMap() const; |
1676 | 190 | 296 | ||
1677 | 297 | //! Returns the path to an installed landscape's directory. | ||
1678 | 298 | //! It uses StelFileMgr to look for it in the possible directories. | ||
1679 | 299 | //! @param landscapeID an installed landscape's identifier (the folder name) | ||
1680 | 300 | //! @returns an empty string, if no such landscape was found. | ||
1681 | 301 | QString getLandscapePath(QString landscapeID); | ||
1682 | 302 | |||
1683 | 191 | Atmosphere* atmosphere; // Atmosphere | 303 | Atmosphere* atmosphere; // Atmosphere |
1684 | 192 | Cardinals* cardinalsPoints; // Cardinals points | 304 | Cardinals* cardinalsPoints; // Cardinals points |
1685 | 193 | Landscape* landscape; // The landscape i.e. the fog, the ground and "decor" | 305 | Landscape* landscape; // The landscape i.e. the fog, the ground and "decor" |
1686 | @@ -200,6 +312,13 @@ | |||
1687 | 200 | 312 | ||
1688 | 201 | // The ID of the default landscape | 313 | // The ID of the default landscape |
1689 | 202 | QString defaultLandscapeID; | 314 | QString defaultLandscapeID; |
1690 | 315 | |||
1691 | 316 | //! List of the IDs of the landscapes packaged by default with Stellarium. | ||
1692 | 317 | //! (So that they can't be removed.) | ||
1693 | 318 | //! It is populated in LandscapeMgr() and has to be updated | ||
1694 | 319 | //! manually on changes. | ||
1695 | 320 | //! @todo Find a way to update it automatically. | ||
1696 | 321 | QStringList packagedLandscapeIDs; | ||
1697 | 203 | }; | 322 | }; |
1698 | 204 | 323 | ||
1699 | 205 | #endif // _LANDSCAPEMGR_HPP_ | 324 | #endif // _LANDSCAPEMGR_HPP_ |
1700 | 206 | 325 | ||
1701 | === added file 'src/gui/AddRemoveLandscapesDialog.cpp' | |||
1702 | --- src/gui/AddRemoveLandscapesDialog.cpp 1970-01-01 00:00:00 +0000 | |||
1703 | +++ src/gui/AddRemoveLandscapesDialog.cpp 2010-09-13 16:37:45 +0000 | |||
1704 | @@ -0,0 +1,241 @@ | |||
1705 | 1 | /* | ||
1706 | 2 | * Stellarium | ||
1707 | 3 | * | ||
1708 | 4 | * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature) | ||
1709 | 5 | * | ||
1710 | 6 | * This program is free software; you can redistribute it and/or | ||
1711 | 7 | * modify it under the terms of the GNU General Public License | ||
1712 | 8 | * as published by the Free Software Foundation; either version 2 | ||
1713 | 9 | * of the License, or (at your option) any later version. | ||
1714 | 10 | * | ||
1715 | 11 | * This program is distributed in the hope that it will be useful, | ||
1716 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1717 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1718 | 14 | * GNU General Public License for more details. | ||
1719 | 15 | * | ||
1720 | 16 | * You should have received a copy of the GNU General Public License | ||
1721 | 17 | * along with this program; if not, write to the Free Software | ||
1722 | 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
1723 | 19 | */ | ||
1724 | 20 | #include "AddRemoveLandscapesDialog.hpp" | ||
1725 | 21 | #include "ui_addRemoveLandscapesDialog.h" | ||
1726 | 22 | |||
1727 | 23 | #include "Dialog.hpp" | ||
1728 | 24 | #include "LandscapeMgr.hpp" | ||
1729 | 25 | #include "StelApp.hpp" | ||
1730 | 26 | #include "StelModuleMgr.hpp" | ||
1731 | 27 | #include "StelLocaleMgr.hpp" | ||
1732 | 28 | |||
1733 | 29 | #include <QDebug> | ||
1734 | 30 | #include <QFileDialog> | ||
1735 | 31 | #include <QString> | ||
1736 | 32 | |||
1737 | 33 | AddRemoveLandscapesDialog::AddRemoveLandscapesDialog() | ||
1738 | 34 | { | ||
1739 | 35 | ui = new Ui_addRemoveLandscapesDialogForm; | ||
1740 | 36 | |||
1741 | 37 | landscapeManager = GETSTELMODULE(LandscapeMgr); | ||
1742 | 38 | |||
1743 | 39 | lastUsedDirectoryPath = QDir::homePath(); | ||
1744 | 40 | } | ||
1745 | 41 | |||
1746 | 42 | AddRemoveLandscapesDialog::~AddRemoveLandscapesDialog() | ||
1747 | 43 | { | ||
1748 | 44 | delete ui; | ||
1749 | 45 | } | ||
1750 | 46 | |||
1751 | 47 | void AddRemoveLandscapesDialog::languageChanged() | ||
1752 | 48 | { | ||
1753 | 49 | if (dialog) | ||
1754 | 50 | ui->retranslateUi(dialog); | ||
1755 | 51 | } | ||
1756 | 52 | |||
1757 | 53 | // Initialize the dialog widgets and connect the signals/slots | ||
1758 | 54 | void AddRemoveLandscapesDialog::createDialogContent() | ||
1759 | 55 | { | ||
1760 | 56 | ui->setupUi(dialog); | ||
1761 | 57 | |||
1762 | 58 | //Signals and slots | ||
1763 | 59 | connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); | ||
1764 | 60 | |||
1765 | 61 | connect(ui->pushButtonBrowseForArchive, SIGNAL(clicked()), this, SLOT(browseForArchiveClicked())); | ||
1766 | 62 | connect(ui->listWidgetUserLandscapes, SIGNAL(currentRowChanged(int)), this, SLOT(updateSidePane(int))); | ||
1767 | 63 | connect(ui->pushButtonRemove, SIGNAL(clicked()), this, SLOT(removeClicked())); | ||
1768 | 64 | connect(ui->pushButtonMessageOK, SIGNAL(clicked()), this, SLOT(messageAcknowledged())); | ||
1769 | 65 | |||
1770 | 66 | connect(landscapeManager, SIGNAL(landscapesChanged()), this, SLOT(populateLists())); | ||
1771 | 67 | connect(landscapeManager, SIGNAL(errorUnableToOpen(QString)), this, SLOT(messageUnableToOpen(QString))); | ||
1772 | 68 | connect(landscapeManager, SIGNAL(errorNotArchive()), this, SLOT(messageNotArchive())); | ||
1773 | 69 | connect(landscapeManager, SIGNAL(errorNotUnique(QString)), this, SLOT(messageNotUnique(QString))); | ||
1774 | 70 | connect(landscapeManager, SIGNAL(errorRemoveManually(QString)), this, SLOT(messageRemoveManually(QString))); | ||
1775 | 71 | |||
1776 | 72 | ui->groupBoxMessage->setVisible(false); | ||
1777 | 73 | |||
1778 | 74 | populateLists(); | ||
1779 | 75 | } | ||
1780 | 76 | |||
1781 | 77 | void AddRemoveLandscapesDialog::setVisible(bool v) | ||
1782 | 78 | { | ||
1783 | 79 | StelDialog::setVisible(v); | ||
1784 | 80 | //Make sure that every time when the dialog is displayed, the current | ||
1785 | 81 | //landscape is selected in the list of user landscapes if it is in the list. | ||
1786 | 82 | populateLists(); | ||
1787 | 83 | } | ||
1788 | 84 | |||
1789 | 85 | void AddRemoveLandscapesDialog::populateLists() | ||
1790 | 86 | { | ||
1791 | 87 | ui->listWidgetUserLandscapes->clear(); | ||
1792 | 88 | QStringList landscapes = landscapeManager->getUserLandscapeIDs(); | ||
1793 | 89 | if (!landscapes.isEmpty()) | ||
1794 | 90 | { | ||
1795 | 91 | landscapes.sort(); | ||
1796 | 92 | ui->listWidgetUserLandscapes->addItems(landscapes); | ||
1797 | 93 | //If the current landscape is in the list of user landscapes, select its entry | ||
1798 | 94 | if((ui->listWidgetUserLandscapes->findItems(landscapeManager->getCurrentLandscapeID(), Qt::MatchExactly).isEmpty())) | ||
1799 | 95 | { | ||
1800 | 96 | //If the current landscape is not in the list, simply select the first row | ||
1801 | 97 | ui->listWidgetUserLandscapes->setCurrentRow(0); | ||
1802 | 98 | } | ||
1803 | 99 | else | ||
1804 | 100 | { | ||
1805 | 101 | ui->listWidgetUserLandscapes->setCurrentItem(ui->listWidgetUserLandscapes->findItems(landscapeManager->getCurrentLandscapeID(), Qt::MatchExactly).first()); | ||
1806 | 102 | } | ||
1807 | 103 | } | ||
1808 | 104 | else | ||
1809 | 105 | { | ||
1810 | 106 | //Force disabling the side pane | ||
1811 | 107 | updateSidePane(-1); | ||
1812 | 108 | } | ||
1813 | 109 | } | ||
1814 | 110 | |||
1815 | 111 | void AddRemoveLandscapesDialog::browseForArchiveClicked() | ||
1816 | 112 | { | ||
1817 | 113 | QString caption = q_("Select a ZIP archive that contains a Stellarium landscape"); | ||
1818 | 114 | // TRANSLATORS: This string is displayed in the "Files of type:" drop-down list in the standard file selection dialog. | ||
1819 | 115 | QString filter = q_("ZIP archives"); | ||
1820 | 116 | filter += " (*.zip)"; | ||
1821 | 117 | QString sourceArchivePath = QFileDialog::getOpenFileName(NULL, caption, lastUsedDirectoryPath, filter); | ||
1822 | 118 | bool useLandscape = ui->checkBoxUseLandscape->isChecked(); | ||
1823 | 119 | if (!sourceArchivePath.isEmpty() && QFile::exists(sourceArchivePath)) | ||
1824 | 120 | { | ||
1825 | 121 | //Remember the last successfully used directory | ||
1826 | 122 | lastUsedDirectoryPath = QFileInfo(sourceArchivePath).path(); | ||
1827 | 123 | |||
1828 | 124 | QString newLandscapeID = landscapeManager->installLandscapeFromArchive(sourceArchivePath, useLandscape); | ||
1829 | 125 | if(!newLandscapeID.isEmpty()) | ||
1830 | 126 | { | ||
1831 | 127 | //Show a message | ||
1832 | 128 | QString successMessage = QString(q_("Landscape \"%1\" has been installed successfully.")).arg(newLandscapeID); | ||
1833 | 129 | displayMessage(q_("Success"), successMessage); | ||
1834 | 130 | |||
1835 | 131 | //Make the new landscape selected in the list | ||
1836 | 132 | //populateLists(); //No longer needed after the migration to signals/slots | ||
1837 | 133 | ui->listWidgetUserLandscapes->setCurrentItem((ui->listWidgetUserLandscapes->findItems(newLandscapeID, Qt::MatchExactly)).first()); | ||
1838 | 134 | } | ||
1839 | 135 | else | ||
1840 | 136 | { | ||
1841 | 137 | //If no error message has been displayed by the signal/slot mechanism, | ||
1842 | 138 | //display a generic message. | ||
1843 | 139 | if (!ui->groupBoxMessage->isVisible()) | ||
1844 | 140 | { | ||
1845 | 141 | //Show an error message | ||
1846 | 142 | QString failureMessage = q_("No landscape was installed."); | ||
1847 | 143 | displayMessage(q_("Error!"), failureMessage); | ||
1848 | 144 | } | ||
1849 | 145 | } | ||
1850 | 146 | } | ||
1851 | 147 | } | ||
1852 | 148 | |||
1853 | 149 | void AddRemoveLandscapesDialog::removeClicked() | ||
1854 | 150 | { | ||
1855 | 151 | QString landscapeID = ui->listWidgetUserLandscapes->currentItem()->data(0).toString(); | ||
1856 | 152 | if(landscapeManager->removeLandscape(landscapeID)) | ||
1857 | 153 | { | ||
1858 | 154 | //populateLists();//No longer needed after the migration to signals/slots | ||
1859 | 155 | QString successMessage = QString(q_("Landscape \"%1\" has been removed successfully.")).arg(landscapeID); | ||
1860 | 156 | displayMessage(q_("Success"), successMessage); | ||
1861 | 157 | } | ||
1862 | 158 | else | ||
1863 | 159 | { | ||
1864 | 160 | //If no error message has been displayed by the signal/slot mechanism, | ||
1865 | 161 | //display a generic message. | ||
1866 | 162 | if (!ui->groupBoxMessage->isVisible()) | ||
1867 | 163 | { | ||
1868 | 164 | //Show an error message | ||
1869 | 165 | //NB! This string is used elsewhere. Modify both to avoid two nearly identical translations. | ||
1870 | 166 | QString failureMessage = q_("The selected landscape could not be (completely) removed."); | ||
1871 | 167 | displayMessage(q_("Error!"), failureMessage); | ||
1872 | 168 | } | ||
1873 | 169 | } | ||
1874 | 170 | |||
1875 | 171 | } | ||
1876 | 172 | |||
1877 | 173 | void AddRemoveLandscapesDialog::updateSidePane(int newRow) | ||
1878 | 174 | { | ||
1879 | 175 | bool displaySidePane = (newRow >= 0); | ||
1880 | 176 | ui->labelLandscapeName->setVisible(displaySidePane); | ||
1881 | 177 | ui->labelLandscapeSize->setVisible(displaySidePane); | ||
1882 | 178 | ui->pushButtonRemove->setEnabled(displaySidePane); | ||
1883 | 179 | ui->labelWarning->setEnabled(displaySidePane); | ||
1884 | 180 | if (!displaySidePane) | ||
1885 | 181 | return; | ||
1886 | 182 | |||
1887 | 183 | QString landscapeID = ui->listWidgetUserLandscapes->item(newRow)->data(0).toString(); | ||
1888 | 184 | //Name | ||
1889 | 185 | ui->labelLandscapeName->setText("<h3>"+landscapeManager->loadLandscapeName(landscapeID)+"</h3>"); | ||
1890 | 186 | //Size in MiB | ||
1891 | 187 | double landscapeSize = landscapeManager->loadLandscapeSize(landscapeID) / (double)(1024*1024); | ||
1892 | 188 | // TRANSLATORS: MiB = mebibytes (IEC 60027-2 standard for 2^20 bytes) | ||
1893 | 189 | ui->labelLandscapeSize->setText(QString(q_("Size on disk: %1 MiB")).arg(landscapeSize, 0, 'f', 2)); | ||
1894 | 190 | } | ||
1895 | 191 | |||
1896 | 192 | void AddRemoveLandscapesDialog::messageAcknowledged() | ||
1897 | 193 | { | ||
1898 | 194 | ui->groupBoxMessage->setVisible(false); | ||
1899 | 195 | ui->groupBoxAdd->setVisible(true); | ||
1900 | 196 | ui->groupBoxRemove->setVisible(true); | ||
1901 | 197 | ui->labelMessage->clear(); | ||
1902 | 198 | ui->groupBoxMessage->setTitle(QString()); | ||
1903 | 199 | } | ||
1904 | 200 | |||
1905 | 201 | void AddRemoveLandscapesDialog::displayMessage(QString title, QString message) | ||
1906 | 202 | { | ||
1907 | 203 | ui->labelMessage->setText(message); | ||
1908 | 204 | ui->groupBoxMessage->setTitle(title); | ||
1909 | 205 | ui->groupBoxMessage->setVisible(true); | ||
1910 | 206 | ui->groupBoxAdd->setVisible(false); | ||
1911 | 207 | ui->groupBoxRemove->setVisible(false); | ||
1912 | 208 | } | ||
1913 | 209 | |||
1914 | 210 | void AddRemoveLandscapesDialog::messageUnableToOpen(QString path) | ||
1915 | 211 | { | ||
1916 | 212 | QString failureMessage = q_("No landscape was installed."); | ||
1917 | 213 | failureMessage.append(" "); | ||
1918 | 214 | // TRANSLATORS: The parameter is a file/directory path that may be quite long. | ||
1919 | 215 | failureMessage.append(q_("Stellarium cannot open for reading or writing %1").arg(path)); | ||
1920 | 216 | displayMessage(q_("Error!"), failureMessage); | ||
1921 | 217 | } | ||
1922 | 218 | |||
1923 | 219 | void AddRemoveLandscapesDialog::messageNotArchive() | ||
1924 | 220 | { | ||
1925 | 221 | QString failureMessage = q_("No landscape was installed.") + " " + q_("The selected file is not a ZIP archive or does not contain a Stellarium landscape."); | ||
1926 | 222 | displayMessage(q_("Error!"), failureMessage); | ||
1927 | 223 | } | ||
1928 | 224 | |||
1929 | 225 | void AddRemoveLandscapesDialog::messageNotUnique(QString nameOrID) | ||
1930 | 226 | { | ||
1931 | 227 | // TRANSLATORS: The parameter is the duplicate name or identifier. | ||
1932 | 228 | QString nameMessage = q_("A landscape with the same name or identifier (%1) already exists.").arg(nameOrID); | ||
1933 | 229 | QString failureMessage = q_("No landscape was installed.") + " " + nameMessage; | ||
1934 | 230 | displayMessage(q_("Error!"), failureMessage); | ||
1935 | 231 | } | ||
1936 | 232 | |||
1937 | 233 | void AddRemoveLandscapesDialog::messageRemoveManually(QString path) | ||
1938 | 234 | { | ||
1939 | 235 | //NB! This string is used elsewhere. Modify both to avoid two nearly identical translations. | ||
1940 | 236 | QString failureMessage = q_("The selected landscape could not be (completely) removed."); | ||
1941 | 237 | failureMessage.append(" "); | ||
1942 | 238 | // TRANSLATORS: The parameter is a file/directory path that may be quite long. "It" refers to a landscape that can't be removed. | ||
1943 | 239 | failureMessage.append(q_("You can remove it manually by deleting the following directory: %1").arg(path)); | ||
1944 | 240 | displayMessage(q_("Error!"), failureMessage); | ||
1945 | 241 | } | ||
1946 | 0 | 242 | ||
1947 | === added file 'src/gui/AddRemoveLandscapesDialog.hpp' | |||
1948 | --- src/gui/AddRemoveLandscapesDialog.hpp 1970-01-01 00:00:00 +0000 | |||
1949 | +++ src/gui/AddRemoveLandscapesDialog.hpp 2010-09-13 16:37:45 +0000 | |||
1950 | @@ -0,0 +1,81 @@ | |||
1951 | 1 | /* | ||
1952 | 2 | * Stellarium | ||
1953 | 3 | * | ||
1954 | 4 | * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature) | ||
1955 | 5 | * | ||
1956 | 6 | * This program is free software; you can redistribute it and/or | ||
1957 | 7 | * modify it under the terms of the GNU General Public License | ||
1958 | 8 | * as published by the Free Software Foundation; either version 2 | ||
1959 | 9 | * of the License, or (at your option) any later version. | ||
1960 | 10 | * | ||
1961 | 11 | * This program is distributed in the hope that it will be useful, | ||
1962 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1963 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1964 | 14 | * GNU General Public License for more details. | ||
1965 | 15 | * | ||
1966 | 16 | * You should have received a copy of the GNU General Public License | ||
1967 | 17 | * along with this program; if not, write to the Free Software | ||
1968 | 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
1969 | 19 | */ | ||
1970 | 20 | |||
1971 | 21 | #ifndef _ADDREMOVELANDSCAPESDIALOG_HPP_ | ||
1972 | 22 | #define _ADDREMOVELANDSCAPESDIALOG_HPP_ | ||
1973 | 23 | |||
1974 | 24 | #include <QObject> | ||
1975 | 25 | #include <QStringList> | ||
1976 | 26 | |||
1977 | 27 | #include "StelDialog.hpp" | ||
1978 | 28 | |||
1979 | 29 | class Ui_addRemoveLandscapesDialogForm; | ||
1980 | 30 | class LandscapeMgr; | ||
1981 | 31 | |||
1982 | 32 | //! @class AddRemoveLandscapesDialog | ||
1983 | 33 | class AddRemoveLandscapesDialog : public StelDialog | ||
1984 | 34 | { | ||
1985 | 35 | Q_OBJECT | ||
1986 | 36 | public: | ||
1987 | 37 | AddRemoveLandscapesDialog(); | ||
1988 | 38 | virtual ~AddRemoveLandscapesDialog(); | ||
1989 | 39 | void languageChanged(); | ||
1990 | 40 | |||
1991 | 41 | public slots: | ||
1992 | 42 | //! This function overrides the non-virtual StelDialog::setVisible() | ||
1993 | 43 | //! to allow the current landscape to be selected in the list of user | ||
1994 | 44 | //! landscapes (if it is in the list) every time the dialog is displayed. | ||
1995 | 45 | void setVisible(bool); | ||
1996 | 46 | void populateLists(); | ||
1997 | 47 | |||
1998 | 48 | protected: | ||
1999 | 49 | //! Initialize the dialog widgets and connect the signals/slots. | ||
2000 | 50 | virtual void createDialogContent(); | ||
2001 | 51 | Ui_addRemoveLandscapesDialogForm* ui; | ||
2002 | 52 | |||
2003 | 53 | private slots: | ||
2004 | 54 | void browseForArchiveClicked(); | ||
2005 | 55 | void removeClicked(); | ||
2006 | 56 | void updateSidePane(int newRow); | ||
2007 | 57 | |||
2008 | 58 | //! Hides the message group box and returns to the "Add" group box. | ||
2009 | 59 | //! Usually called by clicking the "OK" button in the message box. | ||
2010 | 60 | void messageAcknowledged(); | ||
2011 | 61 | |||
2012 | 62 | void messageUnableToOpen(QString path); | ||
2013 | 63 | void messageNotArchive(); | ||
2014 | 64 | void messageNotUnique(QString nameOrID); | ||
2015 | 65 | void messageRemoveManually(QString path); | ||
2016 | 66 | |||
2017 | 67 | private: | ||
2018 | 68 | LandscapeMgr* landscapeManager; | ||
2019 | 69 | |||
2020 | 70 | //! Path to the directory last used by QFileDialog in buttonAddClicked(). | ||
2021 | 71 | //! Initialized with QDir::homePath() in Landscape(). (DOESN'T WORK!) | ||
2022 | 72 | QString lastUsedDirectoryPath; | ||
2023 | 73 | |||
2024 | 74 | //! Displays a message in place of the "Add" box. | ||
2025 | 75 | //! Pressing the "OK" button in the message box calls messageAcknowledged(). | ||
2026 | 76 | //! @param title the title of the QGroupBox that contains the message | ||
2027 | 77 | //! @param message the text of the message itself | ||
2028 | 78 | void displayMessage(QString title, QString message); | ||
2029 | 79 | }; | ||
2030 | 80 | |||
2031 | 81 | #endif // _ADDREMOVELANDSCAPESDIALOG_ | ||
2032 | 0 | 82 | ||
2033 | === modified file 'src/gui/ViewDialog.cpp' | |||
2034 | --- src/gui/ViewDialog.cpp 2010-04-22 10:02:15 +0000 | |||
2035 | +++ src/gui/ViewDialog.cpp 2010-09-13 16:37:45 +0000 | |||
2036 | @@ -20,6 +20,7 @@ | |||
2037 | 20 | 20 | ||
2038 | 21 | #include "ViewDialog.hpp" | 21 | #include "ViewDialog.hpp" |
2039 | 22 | #include "ui_viewDialog.h" | 22 | #include "ui_viewDialog.h" |
2040 | 23 | #include "AddRemoveLandscapesDialog.hpp" | ||
2041 | 23 | #include "StelApp.hpp" | 24 | #include "StelApp.hpp" |
2042 | 24 | #include "StelCore.hpp" | 25 | #include "StelCore.hpp" |
2043 | 25 | #include "StelSkyCultureMgr.hpp" | 26 | #include "StelSkyCultureMgr.hpp" |
2044 | @@ -50,12 +51,15 @@ | |||
2045 | 50 | ViewDialog::ViewDialog() | 51 | ViewDialog::ViewDialog() |
2046 | 51 | { | 52 | { |
2047 | 52 | ui = new Ui_viewDialogForm; | 53 | ui = new Ui_viewDialogForm; |
2048 | 54 | addRemoveLandscapesDialog = NULL; | ||
2049 | 53 | } | 55 | } |
2050 | 54 | 56 | ||
2051 | 55 | ViewDialog::~ViewDialog() | 57 | ViewDialog::~ViewDialog() |
2052 | 56 | { | 58 | { |
2053 | 57 | delete ui; | 59 | delete ui; |
2054 | 58 | ui=NULL; | 60 | ui=NULL; |
2055 | 61 | delete addRemoveLandscapesDialog; | ||
2056 | 62 | addRemoveLandscapesDialog = NULL; | ||
2057 | 59 | } | 63 | } |
2058 | 60 | 64 | ||
2059 | 61 | void ViewDialog::languageChanged() | 65 | void ViewDialog::languageChanged() |
2060 | @@ -196,6 +200,9 @@ | |||
2061 | 196 | ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getCurrentLandscapeID()!=lmgr->getDefaultLandscapeID()); | 200 | ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getCurrentLandscapeID()!=lmgr->getDefaultLandscapeID()); |
2062 | 197 | connect(ui->useAsDefaultLandscapeCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentLandscapeAsDefault())); | 201 | connect(ui->useAsDefaultLandscapeCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentLandscapeAsDefault())); |
2063 | 198 | 202 | ||
2064 | 203 | connect(GETSTELMODULE(LandscapeMgr), SIGNAL(landscapesChanged()), this, SLOT(populateLists())); | ||
2065 | 204 | connect(ui->pushButtonAddRemoveLandscapes, SIGNAL(clicked()), this, SLOT(showAddRemoveLandscapesDialog())); | ||
2066 | 205 | |||
2067 | 199 | // Grid and lines | 206 | // Grid and lines |
2068 | 200 | GridLinesMgr* glmgr = GETSTELMODULE(GridLinesMgr); | 207 | GridLinesMgr* glmgr = GETSTELMODULE(GridLinesMgr); |
2069 | 201 | ui->showEquatorLineCheckBox->setChecked(glmgr->getFlagEquatorLine()); | 208 | ui->showEquatorLineCheckBox->setChecked(glmgr->getFlagEquatorLine()); |
2070 | @@ -312,7 +319,8 @@ | |||
2071 | 312 | l->addItems(lmgr->getAllLandscapeNames()); | 319 | l->addItems(lmgr->getAllLandscapeNames()); |
2072 | 313 | l->setCurrentItem(l->findItems(lmgr->getCurrentLandscapeName(), Qt::MatchExactly).at(0)); | 320 | l->setCurrentItem(l->findItems(lmgr->getCurrentLandscapeName(), Qt::MatchExactly).at(0)); |
2073 | 314 | l->blockSignals(false); | 321 | l->blockSignals(false); |
2075 | 315 | ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescription()); | 322 | //ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescription()); //Is there any reason not to reuse code? |
2076 | 323 | landscapeChanged(l->currentItem()); | ||
2077 | 316 | } | 324 | } |
2078 | 317 | 325 | ||
2079 | 318 | void ViewDialog::populateSkyLayersList() | 326 | void ViewDialog::populateSkyLayersList() |
2080 | @@ -420,6 +428,14 @@ | |||
2081 | 420 | ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getDefaultLandscapeID()!=lmgr->getCurrentLandscapeID()); | 428 | ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getDefaultLandscapeID()!=lmgr->getCurrentLandscapeID()); |
2082 | 421 | } | 429 | } |
2083 | 422 | 430 | ||
2084 | 431 | void ViewDialog::showAddRemoveLandscapesDialog() | ||
2085 | 432 | { | ||
2086 | 433 | if(addRemoveLandscapesDialog == NULL) | ||
2087 | 434 | addRemoveLandscapesDialog = new AddRemoveLandscapesDialog(); | ||
2088 | 435 | |||
2089 | 436 | addRemoveLandscapesDialog->setVisible(true); | ||
2090 | 437 | } | ||
2091 | 438 | |||
2092 | 423 | void ViewDialog::shootingStarsZHRChanged() | 439 | void ViewDialog::shootingStarsZHRChanged() |
2093 | 424 | { | 440 | { |
2094 | 425 | MeteorMgr* mmgr = GETSTELMODULE(MeteorMgr); | 441 | MeteorMgr* mmgr = GETSTELMODULE(MeteorMgr); |
2095 | 426 | 442 | ||
2096 | === modified file 'src/gui/ViewDialog.hpp' | |||
2097 | --- src/gui/ViewDialog.hpp 2009-05-25 15:24:19 +0000 | |||
2098 | +++ src/gui/ViewDialog.hpp 2010-09-13 16:37:45 +0000 | |||
2099 | @@ -26,6 +26,8 @@ | |||
2100 | 26 | class Ui_viewDialogForm; | 26 | class Ui_viewDialogForm; |
2101 | 27 | class QListWidgetItem; | 27 | class QListWidgetItem; |
2102 | 28 | 28 | ||
2103 | 29 | class AddRemoveLandscapesDialog; | ||
2104 | 30 | |||
2105 | 29 | class ViewDialog : public StelDialog | 31 | class ViewDialog : public StelDialog |
2106 | 30 | { | 32 | { |
2107 | 31 | Q_OBJECT | 33 | Q_OBJECT |
2108 | @@ -54,6 +56,8 @@ | |||
2109 | 54 | //! This function should be called repeatidly with e.g. a timer | 56 | //! This function should be called repeatidly with e.g. a timer |
2110 | 55 | void updateFromProgram(); | 57 | void updateFromProgram(); |
2111 | 56 | 58 | ||
2112 | 59 | void showAddRemoveLandscapesDialog(); | ||
2113 | 60 | |||
2114 | 57 | void populateSkyLayersList(); | 61 | void populateSkyLayersList(); |
2115 | 58 | void skyLayersSelectionChanged(const QString&); | 62 | void skyLayersSelectionChanged(const QString&); |
2116 | 59 | void skyLayersEnabledChanged(int); | 63 | void skyLayersEnabledChanged(int); |
2117 | @@ -61,6 +65,8 @@ | |||
2118 | 61 | void changePage(QListWidgetItem *current, QListWidgetItem *previous); | 65 | void changePage(QListWidgetItem *current, QListWidgetItem *previous); |
2119 | 62 | private: | 66 | private: |
2120 | 63 | void updateSkyCultureText(); | 67 | void updateSkyCultureText(); |
2121 | 68 | |||
2122 | 69 | AddRemoveLandscapesDialog * addRemoveLandscapesDialog; | ||
2123 | 64 | }; | 70 | }; |
2124 | 65 | 71 | ||
2125 | 66 | #endif // _VIEWDIALOG_HPP_ | 72 | #endif // _VIEWDIALOG_HPP_ |
2126 | 67 | 73 | ||
2127 | === added file 'src/gui/addRemoveLandscapesDialog.ui' | |||
2128 | --- src/gui/addRemoveLandscapesDialog.ui 1970-01-01 00:00:00 +0000 | |||
2129 | +++ src/gui/addRemoveLandscapesDialog.ui 2010-09-13 16:37:45 +0000 | |||
2130 | @@ -0,0 +1,378 @@ | |||
2131 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2132 | 2 | <ui version="4.0"> | ||
2133 | 3 | <class>addRemoveLandscapesDialogForm</class> | ||
2134 | 4 | <widget class="QWidget" name="addRemoveLandscapesDialogForm"> | ||
2135 | 5 | <property name="geometry"> | ||
2136 | 6 | <rect> | ||
2137 | 7 | <x>0</x> | ||
2138 | 8 | <y>0</y> | ||
2139 | 9 | <width>450</width> | ||
2140 | 10 | <height>400</height> | ||
2141 | 11 | </rect> | ||
2142 | 12 | </property> | ||
2143 | 13 | <property name="sizePolicy"> | ||
2144 | 14 | <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> | ||
2145 | 15 | <horstretch>0</horstretch> | ||
2146 | 16 | <verstretch>0</verstretch> | ||
2147 | 17 | </sizepolicy> | ||
2148 | 18 | </property> | ||
2149 | 19 | <property name="minimumSize"> | ||
2150 | 20 | <size> | ||
2151 | 21 | <width>400</width> | ||
2152 | 22 | <height>400</height> | ||
2153 | 23 | </size> | ||
2154 | 24 | </property> | ||
2155 | 25 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
2156 | 26 | <property name="spacing"> | ||
2157 | 27 | <number>0</number> | ||
2158 | 28 | </property> | ||
2159 | 29 | <property name="margin"> | ||
2160 | 30 | <number>0</number> | ||
2161 | 31 | </property> | ||
2162 | 32 | <item> | ||
2163 | 33 | <widget class="BarFrame" name="LocationBar"> | ||
2164 | 34 | <property name="sizePolicy"> | ||
2165 | 35 | <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | ||
2166 | 36 | <horstretch>0</horstretch> | ||
2167 | 37 | <verstretch>0</verstretch> | ||
2168 | 38 | </sizepolicy> | ||
2169 | 39 | </property> | ||
2170 | 40 | <property name="minimumSize"> | ||
2171 | 41 | <size> | ||
2172 | 42 | <width>400</width> | ||
2173 | 43 | <height>25</height> | ||
2174 | 44 | </size> | ||
2175 | 45 | </property> | ||
2176 | 46 | <property name="maximumSize"> | ||
2177 | 47 | <size> | ||
2178 | 48 | <width>16777215</width> | ||
2179 | 49 | <height>30</height> | ||
2180 | 50 | </size> | ||
2181 | 51 | </property> | ||
2182 | 52 | <property name="focusPolicy"> | ||
2183 | 53 | <enum>Qt::NoFocus</enum> | ||
2184 | 54 | </property> | ||
2185 | 55 | <property name="autoFillBackground"> | ||
2186 | 56 | <bool>false</bool> | ||
2187 | 57 | </property> | ||
2188 | 58 | <property name="frameShape"> | ||
2189 | 59 | <enum>QFrame::StyledPanel</enum> | ||
2190 | 60 | </property> | ||
2191 | 61 | <layout class="QHBoxLayout"> | ||
2192 | 62 | <property name="spacing"> | ||
2193 | 63 | <number>6</number> | ||
2194 | 64 | </property> | ||
2195 | 65 | <property name="leftMargin"> | ||
2196 | 66 | <number>0</number> | ||
2197 | 67 | </property> | ||
2198 | 68 | <property name="topMargin"> | ||
2199 | 69 | <number>0</number> | ||
2200 | 70 | </property> | ||
2201 | 71 | <property name="rightMargin"> | ||
2202 | 72 | <number>4</number> | ||
2203 | 73 | </property> | ||
2204 | 74 | <property name="bottomMargin"> | ||
2205 | 75 | <number>0</number> | ||
2206 | 76 | </property> | ||
2207 | 77 | <item> | ||
2208 | 78 | <spacer name="titleSpacerLeft"> | ||
2209 | 79 | <property name="orientation"> | ||
2210 | 80 | <enum>Qt::Horizontal</enum> | ||
2211 | 81 | </property> | ||
2212 | 82 | <property name="sizeHint" stdset="0"> | ||
2213 | 83 | <size> | ||
2214 | 84 | <width>40</width> | ||
2215 | 85 | <height>20</height> | ||
2216 | 86 | </size> | ||
2217 | 87 | </property> | ||
2218 | 88 | </spacer> | ||
2219 | 89 | </item> | ||
2220 | 90 | <item> | ||
2221 | 91 | <widget class="QLabel" name="stelWindowTitle"> | ||
2222 | 92 | <property name="text"> | ||
2223 | 93 | <string>Add/Remove Landscapes</string> | ||
2224 | 94 | </property> | ||
2225 | 95 | </widget> | ||
2226 | 96 | </item> | ||
2227 | 97 | <item> | ||
2228 | 98 | <spacer name="titleSpacerRight"> | ||
2229 | 99 | <property name="orientation"> | ||
2230 | 100 | <enum>Qt::Horizontal</enum> | ||
2231 | 101 | </property> | ||
2232 | 102 | <property name="sizeHint" stdset="0"> | ||
2233 | 103 | <size> | ||
2234 | 104 | <width>40</width> | ||
2235 | 105 | <height>20</height> | ||
2236 | 106 | </size> | ||
2237 | 107 | </property> | ||
2238 | 108 | </spacer> | ||
2239 | 109 | </item> | ||
2240 | 110 | <item> | ||
2241 | 111 | <widget class="QPushButton" name="closeStelWindow"> | ||
2242 | 112 | <property name="minimumSize"> | ||
2243 | 113 | <size> | ||
2244 | 114 | <width>16</width> | ||
2245 | 115 | <height>16</height> | ||
2246 | 116 | </size> | ||
2247 | 117 | </property> | ||
2248 | 118 | <property name="maximumSize"> | ||
2249 | 119 | <size> | ||
2250 | 120 | <width>16</width> | ||
2251 | 121 | <height>16</height> | ||
2252 | 122 | </size> | ||
2253 | 123 | </property> | ||
2254 | 124 | <property name="focusPolicy"> | ||
2255 | 125 | <enum>Qt::NoFocus</enum> | ||
2256 | 126 | </property> | ||
2257 | 127 | <property name="text"> | ||
2258 | 128 | <string/> | ||
2259 | 129 | </property> | ||
2260 | 130 | </widget> | ||
2261 | 131 | </item> | ||
2262 | 132 | </layout> | ||
2263 | 133 | </widget> | ||
2264 | 134 | </item> | ||
2265 | 135 | <item> | ||
2266 | 136 | <widget class="QGroupBox" name="groupBoxAdd"> | ||
2267 | 137 | <property name="sizePolicy"> | ||
2268 | 138 | <sizepolicy hsizetype="Expanding" vsizetype="Minimum"> | ||
2269 | 139 | <horstretch>0</horstretch> | ||
2270 | 140 | <verstretch>0</verstretch> | ||
2271 | 141 | </sizepolicy> | ||
2272 | 142 | </property> | ||
2273 | 143 | <property name="title"> | ||
2274 | 144 | <string>Add a new landscape</string> | ||
2275 | 145 | </property> | ||
2276 | 146 | <layout class="QGridLayout" name="gridLayout"> | ||
2277 | 147 | <property name="margin"> | ||
2278 | 148 | <number>0</number> | ||
2279 | 149 | </property> | ||
2280 | 150 | <item row="0" column="0" colspan="2"> | ||
2281 | 151 | <widget class="QPushButton" name="pushButtonBrowseForArchive"> | ||
2282 | 152 | <property name="sizePolicy"> | ||
2283 | 153 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | ||
2284 | 154 | <horstretch>0</horstretch> | ||
2285 | 155 | <verstretch>0</verstretch> | ||
2286 | 156 | </sizepolicy> | ||
2287 | 157 | </property> | ||
2288 | 158 | <property name="text"> | ||
2289 | 159 | <string>Install a new landscape from a ZIP archive...</string> | ||
2290 | 160 | </property> | ||
2291 | 161 | </widget> | ||
2292 | 162 | </item> | ||
2293 | 163 | <item row="1" column="0" colspan="2"> | ||
2294 | 164 | <widget class="QCheckBox" name="checkBoxUseLandscape"> | ||
2295 | 165 | <property name="sizePolicy"> | ||
2296 | 166 | <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> | ||
2297 | 167 | <horstretch>0</horstretch> | ||
2298 | 168 | <verstretch>0</verstretch> | ||
2299 | 169 | </sizepolicy> | ||
2300 | 170 | </property> | ||
2301 | 171 | <property name="text"> | ||
2302 | 172 | <string>Switch to the new landscape after installation</string> | ||
2303 | 173 | </property> | ||
2304 | 174 | <property name="checked"> | ||
2305 | 175 | <bool>true</bool> | ||
2306 | 176 | </property> | ||
2307 | 177 | </widget> | ||
2308 | 178 | </item> | ||
2309 | 179 | </layout> | ||
2310 | 180 | </widget> | ||
2311 | 181 | </item> | ||
2312 | 182 | <item> | ||
2313 | 183 | <widget class="QGroupBox" name="groupBoxMessage"> | ||
2314 | 184 | <property name="title"> | ||
2315 | 185 | <string notr="true">Message</string> | ||
2316 | 186 | </property> | ||
2317 | 187 | <layout class="QGridLayout" name="gridLayout_4"> | ||
2318 | 188 | <property name="margin"> | ||
2319 | 189 | <number>0</number> | ||
2320 | 190 | </property> | ||
2321 | 191 | <item row="0" column="0" colspan="2"> | ||
2322 | 192 | <widget class="QLabel" name="labelMessage"> | ||
2323 | 193 | <property name="sizePolicy"> | ||
2324 | 194 | <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | ||
2325 | 195 | <horstretch>0</horstretch> | ||
2326 | 196 | <verstretch>0</verstretch> | ||
2327 | 197 | </sizepolicy> | ||
2328 | 198 | </property> | ||
2329 | 199 | <property name="font"> | ||
2330 | 200 | <font> | ||
2331 | 201 | <family>DejaVu Sans</family> | ||
2332 | 202 | <pointsize>12</pointsize> | ||
2333 | 203 | </font> | ||
2334 | 204 | </property> | ||
2335 | 205 | <property name="text"> | ||
2336 | 206 | <string/> | ||
2337 | 207 | </property> | ||
2338 | 208 | <property name="wordWrap"> | ||
2339 | 209 | <bool>true</bool> | ||
2340 | 210 | </property> | ||
2341 | 211 | <property name="textInteractionFlags"> | ||
2342 | 212 | <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> | ||
2343 | 213 | </property> | ||
2344 | 214 | </widget> | ||
2345 | 215 | </item> | ||
2346 | 216 | <item row="1" column="1"> | ||
2347 | 217 | <widget class="QPushButton" name="pushButtonMessageOK"> | ||
2348 | 218 | <property name="sizePolicy"> | ||
2349 | 219 | <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> | ||
2350 | 220 | <horstretch>0</horstretch> | ||
2351 | 221 | <verstretch>0</verstretch> | ||
2352 | 222 | </sizepolicy> | ||
2353 | 223 | </property> | ||
2354 | 224 | <property name="text"> | ||
2355 | 225 | <string/> | ||
2356 | 226 | </property> | ||
2357 | 227 | <property name="icon"> | ||
2358 | 228 | <iconset resource="../../data/gui/guiRes.qrc"> | ||
2359 | 229 | <normaloff>:/graphicGui/closeButton-hover.png</normaloff>:/graphicGui/closeButton-hover.png</iconset> | ||
2360 | 230 | </property> | ||
2361 | 231 | </widget> | ||
2362 | 232 | </item> | ||
2363 | 233 | <item row="1" column="0"> | ||
2364 | 234 | <spacer name="horizontalSpacer"> | ||
2365 | 235 | <property name="orientation"> | ||
2366 | 236 | <enum>Qt::Horizontal</enum> | ||
2367 | 237 | </property> | ||
2368 | 238 | <property name="sizeHint" stdset="0"> | ||
2369 | 239 | <size> | ||
2370 | 240 | <width>40</width> | ||
2371 | 241 | <height>20</height> | ||
2372 | 242 | </size> | ||
2373 | 243 | </property> | ||
2374 | 244 | </spacer> | ||
2375 | 245 | </item> | ||
2376 | 246 | </layout> | ||
2377 | 247 | </widget> | ||
2378 | 248 | </item> | ||
2379 | 249 | <item> | ||
2380 | 250 | <widget class="QGroupBox" name="groupBoxRemove"> | ||
2381 | 251 | <property name="sizePolicy"> | ||
2382 | 252 | <sizepolicy hsizetype="Expanding" vsizetype="Minimum"> | ||
2383 | 253 | <horstretch>0</horstretch> | ||
2384 | 254 | <verstretch>0</verstretch> | ||
2385 | 255 | </sizepolicy> | ||
2386 | 256 | </property> | ||
2387 | 257 | <property name="title"> | ||
2388 | 258 | <string>Remove an installed landscape</string> | ||
2389 | 259 | </property> | ||
2390 | 260 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
2391 | 261 | <property name="margin"> | ||
2392 | 262 | <number>0</number> | ||
2393 | 263 | </property> | ||
2394 | 264 | <item> | ||
2395 | 265 | <widget class="QListWidget" name="listWidgetUserLandscapes"> | ||
2396 | 266 | <property name="sizePolicy"> | ||
2397 | 267 | <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> | ||
2398 | 268 | <horstretch>0</horstretch> | ||
2399 | 269 | <verstretch>0</verstretch> | ||
2400 | 270 | </sizepolicy> | ||
2401 | 271 | </property> | ||
2402 | 272 | </widget> | ||
2403 | 273 | </item> | ||
2404 | 274 | <item> | ||
2405 | 275 | <widget class="QFrame" name="frameSidePane"> | ||
2406 | 276 | <property name="sizePolicy"> | ||
2407 | 277 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | ||
2408 | 278 | <horstretch>0</horstretch> | ||
2409 | 279 | <verstretch>0</verstretch> | ||
2410 | 280 | </sizepolicy> | ||
2411 | 281 | </property> | ||
2412 | 282 | <layout class="QVBoxLayout" name="verticalLayoutSidePane"> | ||
2413 | 283 | <property name="margin"> | ||
2414 | 284 | <number>0</number> | ||
2415 | 285 | </property> | ||
2416 | 286 | <item> | ||
2417 | 287 | <widget class="QLabel" name="labelLandscapeName"> | ||
2418 | 288 | <property name="text"> | ||
2419 | 289 | <string notr="true"/> | ||
2420 | 290 | </property> | ||
2421 | 291 | </widget> | ||
2422 | 292 | </item> | ||
2423 | 293 | <item> | ||
2424 | 294 | <widget class="QLabel" name="labelLandscapeSize"> | ||
2425 | 295 | <property name="sizePolicy"> | ||
2426 | 296 | <sizepolicy hsizetype="Expanding" vsizetype="Minimum"> | ||
2427 | 297 | <horstretch>0</horstretch> | ||
2428 | 298 | <verstretch>0</verstretch> | ||
2429 | 299 | </sizepolicy> | ||
2430 | 300 | </property> | ||
2431 | 301 | <property name="text"> | ||
2432 | 302 | <string/> | ||
2433 | 303 | </property> | ||
2434 | 304 | </widget> | ||
2435 | 305 | </item> | ||
2436 | 306 | <item> | ||
2437 | 307 | <widget class="QPushButton" name="pushButtonRemove"> | ||
2438 | 308 | <property name="sizePolicy"> | ||
2439 | 309 | <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> | ||
2440 | 310 | <horstretch>0</horstretch> | ||
2441 | 311 | <verstretch>0</verstretch> | ||
2442 | 312 | </sizepolicy> | ||
2443 | 313 | </property> | ||
2444 | 314 | <property name="text"> | ||
2445 | 315 | <string>Remove</string> | ||
2446 | 316 | </property> | ||
2447 | 317 | </widget> | ||
2448 | 318 | </item> | ||
2449 | 319 | <item> | ||
2450 | 320 | <widget class="QLabel" name="labelWarning"> | ||
2451 | 321 | <property name="sizePolicy"> | ||
2452 | 322 | <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> | ||
2453 | 323 | <horstretch>0</horstretch> | ||
2454 | 324 | <verstretch>0</verstretch> | ||
2455 | 325 | </sizepolicy> | ||
2456 | 326 | </property> | ||
2457 | 327 | <property name="text"> | ||
2458 | 328 | <string>WARNING: Removing the selected landscape means deleting its files. This operation is irreversible.</string> | ||
2459 | 329 | </property> | ||
2460 | 330 | <property name="alignment"> | ||
2461 | 331 | <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | ||
2462 | 332 | </property> | ||
2463 | 333 | <property name="wordWrap"> | ||
2464 | 334 | <bool>true</bool> | ||
2465 | 335 | </property> | ||
2466 | 336 | </widget> | ||
2467 | 337 | </item> | ||
2468 | 338 | <item> | ||
2469 | 339 | <spacer name="verticalSpacer"> | ||
2470 | 340 | <property name="orientation"> | ||
2471 | 341 | <enum>Qt::Vertical</enum> | ||
2472 | 342 | </property> | ||
2473 | 343 | <property name="sizeHint" stdset="0"> | ||
2474 | 344 | <size> | ||
2475 | 345 | <width>20</width> | ||
2476 | 346 | <height>40</height> | ||
2477 | 347 | </size> | ||
2478 | 348 | </property> | ||
2479 | 349 | </spacer> | ||
2480 | 350 | </item> | ||
2481 | 351 | </layout> | ||
2482 | 352 | </widget> | ||
2483 | 353 | </item> | ||
2484 | 354 | </layout> | ||
2485 | 355 | </widget> | ||
2486 | 356 | </item> | ||
2487 | 357 | </layout> | ||
2488 | 358 | </widget> | ||
2489 | 359 | <customwidgets> | ||
2490 | 360 | <customwidget> | ||
2491 | 361 | <class>BarFrame</class> | ||
2492 | 362 | <extends>QFrame</extends> | ||
2493 | 363 | <header>Dialog.hpp</header> | ||
2494 | 364 | <container>1</container> | ||
2495 | 365 | </customwidget> | ||
2496 | 366 | </customwidgets> | ||
2497 | 367 | <tabstops> | ||
2498 | 368 | <tabstop>checkBoxUseLandscape</tabstop> | ||
2499 | 369 | <tabstop>pushButtonBrowseForArchive</tabstop> | ||
2500 | 370 | <tabstop>pushButtonMessageOK</tabstop> | ||
2501 | 371 | <tabstop>listWidgetUserLandscapes</tabstop> | ||
2502 | 372 | <tabstop>pushButtonRemove</tabstop> | ||
2503 | 373 | </tabstops> | ||
2504 | 374 | <resources> | ||
2505 | 375 | <include location="../../data/gui/guiRes.qrc"/> | ||
2506 | 376 | </resources> | ||
2507 | 377 | <connections/> | ||
2508 | 378 | </ui> | ||
2509 | 0 | 379 | ||
2510 | === modified file 'src/gui/viewDialog.ui' | |||
2511 | --- src/gui/viewDialog.ui 2010-09-08 11:05:30 +0000 | |||
2512 | +++ src/gui/viewDialog.ui 2010-09-13 16:37:45 +0000 | |||
2513 | @@ -1228,7 +1228,7 @@ | |||
2514 | 1228 | <property name="spacing"> | 1228 | <property name="spacing"> |
2515 | 1229 | <number>0</number> | 1229 | <number>0</number> |
2516 | 1230 | </property> | 1230 | </property> |
2518 | 1231 | <item row="0" column="0" rowspan="2"> | 1231 | <item row="0" column="0" rowspan="4"> |
2519 | 1232 | <widget class="QListWidget" name="landscapesListWidget"> | 1232 | <widget class="QListWidget" name="landscapesListWidget"> |
2520 | 1233 | <property name="sizePolicy"> | 1233 | <property name="sizePolicy"> |
2521 | 1234 | <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> | 1234 | <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> |
2522 | @@ -1292,6 +1292,22 @@ | |||
2523 | 1292 | </property> | 1292 | </property> |
2524 | 1293 | </widget> | 1293 | </widget> |
2525 | 1294 | </item> | 1294 | </item> |
2526 | 1295 | <item row="2" column="1"> | ||
2527 | 1296 | <widget class="QPushButton" name="pushButtonAddRemoveLandscapes"> | ||
2528 | 1297 | <property name="minimumSize"> | ||
2529 | 1298 | <size> | ||
2530 | 1299 | <width>0</width> | ||
2531 | 1300 | <height>37</height> | ||
2532 | 1301 | </size> | ||
2533 | 1302 | </property> | ||
2534 | 1303 | <property name="styleSheet"> | ||
2535 | 1304 | <string notr="true">margin-left: 10px; margin-right: 10px; margin-bottom:10px;</string> | ||
2536 | 1305 | </property> | ||
2537 | 1306 | <property name="text"> | ||
2538 | 1307 | <string>Add/remove landscapes...</string> | ||
2539 | 1308 | </property> | ||
2540 | 1309 | </widget> | ||
2541 | 1310 | </item> | ||
2542 | 1295 | <item row="1" column="1"> | 1311 | <item row="1" column="1"> |
2543 | 1296 | <widget class="QGroupBox" name="landscapeOptionsGroupBox"> | 1312 | <widget class="QGroupBox" name="landscapeOptionsGroupBox"> |
2544 | 1297 | <property name="sizePolicy"> | 1313 | <property name="sizePolicy"> |
Hi Bogdan,
I just come back from holidays (I just turned 30 years old 5 days ago!!)
From the code it looks fine, but I still need to have a closer look tomorrow.
Fab