Merge lp:~daggerstab/stellarium/add-remove-landscapes into lp:stellarium

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
Reviewer Review Type Date Requested Status
Fabien Chéreau Approve
Review via email: mp+35304@code.launchpad.net

Description of the change

A merge of my "AddRemoveLandscapes" plug-in into a feature in the main code, with improvements. (Lots of improvements, actually.)

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://www.stellarium.org/wiki/index.php/Landscapes

To post a comment you must log in.
Revision history for this message
Fabien Chéreau (xalioth) wrote :

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

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
=== modified file 'po/stellarium/POTFILES.in'
--- po/stellarium/POTFILES.in 2010-05-19 13:33:21 +0000
+++ po/stellarium/POTFILES.in 2010-09-13 16:37:45 +0000
@@ -19,6 +19,7 @@
19src/gui/StelGuiItems.cpp19src/gui/StelGuiItems.cpp
20src/gui/ViewDialog.cpp20src/gui/ViewDialog.cpp
21src/gui/LocationDialog.cpp21src/gui/LocationDialog.cpp
22src/gui/AddRemoveLandscapesDialog.cpp
22src/main.cpp23src/main.cpp
23src/translations.h24src/translations.h
24src/ui_dateTimeDialogGui.h25src/ui_dateTimeDialogGui.h
@@ -27,3 +28,5 @@
27src/ui_searchDialogGui.h28src/ui_searchDialogGui.h
28src/ui_viewDialog.h29src/ui_viewDialog.h
29src/ui_configurationDialog.h30src/ui_configurationDialog.h
31src/ui_addRemoveLandscapesDialog.h
32
3033
=== modified file 'po/stellarium/stellarium.pot'
--- po/stellarium/stellarium.pot 2010-05-19 13:33:21 +0000
+++ po/stellarium/stellarium.pot 2010-09-13 16:37:45 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2010-05-19 15:26+0200\n"11"POT-Creation-Date: 2010-09-13 19:07+0300\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,20 +16,20 @@
16"Content-Type: text/plain; charset=CHARSET\n"16"Content-Type: text/plain; charset=CHARSET\n"
17"Content-Transfer-Encoding: 8bit\n"17"Content-Transfer-Encoding: 8bit\n"
1818
19#: src/core/modules/LandscapeMgr.cpp:40119#: src/core/modules/LandscapeMgr.cpp:447
20msgid "Author: "20msgid "Author: "
21msgstr ""21msgstr ""
2222
23#: src/core/modules/LandscapeMgr.cpp:40423#: src/core/modules/LandscapeMgr.cpp:450
24msgid "Location: "24msgid "Location: "
25msgstr ""25msgstr ""
2626
27#: src/core/modules/LandscapeMgr.cpp:40927#: src/core/modules/LandscapeMgr.cpp:455
28#, qt-format28#, qt-format
29msgid ", %1 m"29msgid ", %1 m"
30msgstr ""30msgstr ""
3131
32#: src/core/modules/LandscapeMgr.cpp:41232#: src/core/modules/LandscapeMgr.cpp:458
33msgid "Planet: "33msgid "Planet: "
34msgstr ""34msgstr ""
3535
@@ -115,7 +115,7 @@
115msgid "Parallax: %1\""115msgid "Parallax: %1\""
116msgstr ""116msgstr ""
117117
118#: src/core/StelProjector.cpp:61118#: src/core/StelProjector.cpp:62
119msgid "Maximum FOV: "119msgid "Maximum FOV: "
120msgstr ""120msgstr ""
121121
@@ -223,54 +223,54 @@
223msgid "Az/Alt: %1/%2"223msgid "Az/Alt: %1/%2"
224msgstr ""224msgstr ""
225225
226#: src/gui/ConfigurationDialog.cpp:285226#: src/gui/ConfigurationDialog.cpp:294
227msgid "Select screenshot directory"227msgid "Select screenshot directory"
228msgstr ""228msgstr ""
229229
230#: src/gui/ConfigurationDialog.cpp:451230#: src/gui/ConfigurationDialog.cpp:460
231#, qt-format231#, qt-format
232msgid "Startup FOV: %1%2"232msgid "Startup FOV: %1%2"
233msgstr ""233msgstr ""
234234
235#: src/gui/ConfigurationDialog.cpp:459235#: src/gui/ConfigurationDialog.cpp:468
236#, qt-format236#, qt-format
237msgid "Startup direction of view Az/Alt: %1/%2"237msgid "Startup direction of view Az/Alt: %1/%2"
238msgstr ""238msgstr ""
239239
240#: src/gui/ConfigurationDialog.cpp:495240#: src/gui/ConfigurationDialog.cpp:508
241msgid "Authors"241msgid "Authors"
242msgstr ""242msgstr ""
243243
244#: src/gui/ConfigurationDialog.cpp:499 src/gui/ViewDialog.cpp:337244#: src/gui/ConfigurationDialog.cpp:512 src/gui/ViewDialog.cpp:345
245msgid "Contact"245msgid "Contact"
246msgstr ""246msgstr ""
247247
248#: src/gui/ConfigurationDialog.cpp:571248#: src/gui/ConfigurationDialog.cpp:584
249msgid "Author"249msgid "Author"
250msgstr ""250msgstr ""
251251
252#: src/gui/ConfigurationDialog.cpp:572252#: src/gui/ConfigurationDialog.cpp:585
253msgid "License"253msgid "License"
254msgstr ""254msgstr ""
255255
256#: src/gui/ConfigurationDialog.cpp:603256#: src/gui/ConfigurationDialog.cpp:614
257msgid "Running script: "257msgid "Running script: "
258msgstr ""258msgstr ""
259259
260#: src/gui/ConfigurationDialog.cpp:610260#: src/gui/ConfigurationDialog.cpp:621
261msgid "Running script: [none]"261msgid "Running script: [none]"
262msgstr ""262msgstr ""
263263
264#: src/gui/ConfigurationDialog.cpp:653264#: src/gui/ConfigurationDialog.cpp:664
265msgid "Finished downloading all star catalogs!"265msgid "Finished downloading all star catalogs!"
266msgstr ""266msgstr ""
267267
268#: src/gui/ConfigurationDialog.cpp:662268#: src/gui/ConfigurationDialog.cpp:673
269#, qt-format269#, qt-format
270msgid "Get catalog %1 of %2"270msgid "Get catalog %1 of %2"
271msgstr ""271msgstr ""
272272
273#: src/gui/ConfigurationDialog.cpp:664273#: src/gui/ConfigurationDialog.cpp:675
274#, qt-format274#, qt-format
275msgid ""275msgid ""
276"Download size: %1MB\n"276"Download size: %1MB\n"
@@ -278,31 +278,31 @@
278"Magnitude range: %3 - %4"278"Magnitude range: %3 - %4"
279msgstr ""279msgstr ""
280280
281#: src/gui/ConfigurationDialog.cpp:673281#: src/gui/ConfigurationDialog.cpp:684
282msgid ""282msgid ""
283"Finished downloading new star catalogs!\n"283"Finished downloading new star catalogs!\n"
284"Restart Stellarium to display them."284"Restart Stellarium to display them."
285msgstr ""285msgstr ""
286286
287#: src/gui/ConfigurationDialog.cpp:711 src/gui/ConfigurationDialog.cpp:745287#: src/gui/ConfigurationDialog.cpp:722 src/gui/ConfigurationDialog.cpp:756
288#, qt-format288#, qt-format
289msgid ""289msgid ""
290"Error downloading %1:\n"290"Error downloading %1:\n"
291"%2"291"%2"
292msgstr ""292msgstr ""
293293
294#: src/gui/ConfigurationDialog.cpp:716294#: src/gui/ConfigurationDialog.cpp:727
295#, qt-format295#, qt-format
296msgid ""296msgid ""
297"Downloading %1...\n"297"Downloading %1...\n"
298"(You can close this window.)"298"(You can close this window.)"
299msgstr ""299msgstr ""
300300
301#: src/gui/ConfigurationDialog.cpp:796301#: src/gui/ConfigurationDialog.cpp:807
302msgid "Verifying file integrity..."302msgid "Verifying file integrity..."
303msgstr ""303msgstr ""
304304
305#: src/gui/ConfigurationDialog.cpp:800305#: src/gui/ConfigurationDialog.cpp:811
306#, qt-format306#, qt-format
307msgid ""307msgid ""
308"Error downloading %1:\n"308"Error downloading %1:\n"
@@ -483,15 +483,15 @@
483msgid "Constellation boundaries"483msgid "Constellation boundaries"
484msgstr ""484msgstr ""
485485
486#: src/gui/StelGui.cpp:104 src/ui_viewDialog.h:1027486#: src/gui/StelGui.cpp:104 src/ui_viewDialog.h:1034
487msgid "Azimuthal grid"487msgid "Azimuthal grid"
488msgstr ""488msgstr ""
489489
490#: src/gui/StelGui.cpp:105 src/ui_viewDialog.h:1025490#: src/gui/StelGui.cpp:105 src/ui_viewDialog.h:1032
491msgid "Equatorial grid"491msgid "Equatorial grid"
492msgstr ""492msgstr ""
493493
494#: src/gui/StelGui.cpp:106 src/ui_viewDialog.h:1026494#: src/gui/StelGui.cpp:106 src/ui_viewDialog.h:1033
495msgid "Equatorial J2000 grid"495msgid "Equatorial J2000 grid"
496msgstr ""496msgstr ""
497497
@@ -499,19 +499,19 @@
499msgid "Galactic grid"499msgid "Galactic grid"
500msgstr ""500msgstr ""
501501
502#: src/gui/StelGui.cpp:108 src/ui_viewDialog.h:1030502#: src/gui/StelGui.cpp:108 src/ui_viewDialog.h:1037
503msgid "Ecliptic line"503msgid "Ecliptic line"
504msgstr ""504msgstr ""
505505
506#: src/gui/StelGui.cpp:109 src/ui_viewDialog.h:1028506#: src/gui/StelGui.cpp:109 src/ui_viewDialog.h:1035
507msgid "Equator line"507msgid "Equator line"
508msgstr ""508msgstr ""
509509
510#: src/gui/StelGui.cpp:110 src/ui_viewDialog.h:1029510#: src/gui/StelGui.cpp:110 src/ui_viewDialog.h:1036
511msgid "Meridian line"511msgid "Meridian line"
512msgstr ""512msgstr ""
513513
514#: src/gui/StelGui.cpp:111 src/ui_viewDialog.h:1031514#: src/gui/StelGui.cpp:111 src/ui_viewDialog.h:1038
515msgid "Cardinal points"515msgid "Cardinal points"
516msgstr ""516msgstr ""
517517
@@ -519,7 +519,7 @@
519msgid "Ground"519msgid "Ground"
520msgstr ""520msgstr ""
521521
522#: src/gui/StelGui.cpp:114 src/ui_viewDialog.h:1009522#: src/gui/StelGui.cpp:114 src/ui_viewDialog.h:1016
523msgid "Atmosphere"523msgid "Atmosphere"
524msgstr ""524msgstr ""
525525
@@ -527,7 +527,7 @@
527msgid "Fog"527msgid "Fog"
528msgstr ""528msgstr ""
529529
530#: src/gui/StelGui.cpp:117 src/ui_viewDialog.h:1014530#: src/gui/StelGui.cpp:117 src/ui_viewDialog.h:1021
531msgid "Nebulas"531msgid "Nebulas"
532msgstr ""532msgstr ""
533533
@@ -535,7 +535,7 @@
535msgid "Nebulas background images"535msgid "Nebulas background images"
536msgstr ""536msgstr ""
537537
538#: src/gui/StelGui.cpp:119 src/ui_viewDialog.h:995 src/ui_viewDialog.h:1013538#: src/gui/StelGui.cpp:119 src/ui_viewDialog.h:1002 src/ui_viewDialog.h:1020
539msgid "Stars"539msgid "Stars"
540msgstr ""540msgstr ""
541541
@@ -599,7 +599,7 @@
599msgid "Script console window"599msgid "Script console window"
600msgstr ""600msgstr ""
601601
602#: src/gui/StelGui.cpp:140 src/ui_dateTimeDialogGui.h:295602#: src/gui/StelGui.cpp:140 src/ui_dateTimeDialogGui.h:294
603msgid "Date and Time"603msgid "Date and Time"
604msgstr ""604msgstr ""
605605
@@ -720,35 +720,110 @@
720msgid "%1m"720msgid "%1m"
721msgstr ""721msgstr ""
722722
723#: src/gui/ViewDialog.cpp:391723#: src/gui/ViewDialog.cpp:399
724msgid "No description"724msgid "No description"
725msgstr ""725msgstr ""
726726
727#: src/gui/ViewDialog.cpp:451727#: src/gui/ViewDialog.cpp:467
728msgid "No shooting stars"728msgid "No shooting stars"
729msgstr ""729msgstr ""
730730
731#: src/gui/ViewDialog.cpp:454731#: src/gui/ViewDialog.cpp:470
732msgid "Normal rate"732msgid "Normal rate"
733msgstr ""733msgstr ""
734734
735#: src/gui/ViewDialog.cpp:457735#: src/gui/ViewDialog.cpp:473
736msgid "Standard Perseids rate"736msgid "Standard Perseids rate"
737msgstr ""737msgstr ""
738738
739#: src/gui/ViewDialog.cpp:460739#: src/gui/ViewDialog.cpp:476
740msgid "Exceptional Leonid rate"740msgid "Exceptional Leonid rate"
741msgstr ""741msgstr ""
742742
743#: src/gui/ViewDialog.cpp:463743#: src/gui/ViewDialog.cpp:479
744msgid "Highest rate ever (1966 Leonids)"744msgid "Highest rate ever (1966 Leonids)"
745msgstr ""745msgstr ""
746746
747#: src/gui/LocationDialog.cpp:340747#: src/gui/LocationDialog.cpp:331
748msgid "New Location"748msgid "New Location"
749msgstr ""749msgstr ""
750750
751#: src/main.cpp:317751#: src/gui/AddRemoveLandscapesDialog.cpp:113
752msgid "Select a ZIP archive that contains a Stellarium landscape"
753msgstr ""
754
755#. TRANSLATORS: This string is displayed in the "Files of type:" drop-down list in the standard file selection dialog.
756#: src/gui/AddRemoveLandscapesDialog.cpp:115
757msgid "ZIP archives"
758msgstr ""
759
760#: src/gui/AddRemoveLandscapesDialog.cpp:128
761#, qt-format
762msgid "Landscape \"%1\" has been installed successfully."
763msgstr ""
764
765#: src/gui/AddRemoveLandscapesDialog.cpp:129
766#: src/gui/AddRemoveLandscapesDialog.cpp:156
767msgid "Success"
768msgstr ""
769
770#: src/gui/AddRemoveLandscapesDialog.cpp:142
771#: src/gui/AddRemoveLandscapesDialog.cpp:212
772#: src/gui/AddRemoveLandscapesDialog.cpp:221
773#: src/gui/AddRemoveLandscapesDialog.cpp:229
774msgid "No landscape was installed."
775msgstr ""
776
777#: src/gui/AddRemoveLandscapesDialog.cpp:143
778#: src/gui/AddRemoveLandscapesDialog.cpp:167
779#: src/gui/AddRemoveLandscapesDialog.cpp:216
780#: src/gui/AddRemoveLandscapesDialog.cpp:222
781#: src/gui/AddRemoveLandscapesDialog.cpp:230
782#: src/gui/AddRemoveLandscapesDialog.cpp:240
783msgid "Error!"
784msgstr ""
785
786#: src/gui/AddRemoveLandscapesDialog.cpp:155
787#, qt-format
788msgid "Landscape \"%1\" has been removed successfully."
789msgstr ""
790
791#: src/gui/AddRemoveLandscapesDialog.cpp:166
792#: src/gui/AddRemoveLandscapesDialog.cpp:236
793msgid "The selected landscape could not be (completely) removed."
794msgstr ""
795
796#. TRANSLATORS: MiB = mebibytes (IEC 60027-2 standard for 2^20 bytes)
797#: src/gui/AddRemoveLandscapesDialog.cpp:189
798#, qt-format
799msgid "Size on disk: %1 MiB"
800msgstr ""
801
802#. TRANSLATORS: The parameter is a file/directory path that may be quite long.
803#: src/gui/AddRemoveLandscapesDialog.cpp:215
804#, qt-format
805msgid "Stellarium cannot open for reading or writing %1"
806msgstr ""
807
808#: src/gui/AddRemoveLandscapesDialog.cpp:221
809msgid ""
810"The selected file is not a ZIP archive or does not contain a Stellarium "
811"landscape."
812msgstr ""
813
814#. TRANSLATORS: The parameter is the duplicate name or identifier.
815#: src/gui/AddRemoveLandscapesDialog.cpp:228
816#, qt-format
817msgid "A landscape with the same name or identifier (%1) already exists."
818msgstr ""
819
820#. TRANSLATORS: The parameter is a file/directory path that may be quite long. "It" refers to a landscape that can't be removed.
821#: src/gui/AddRemoveLandscapesDialog.cpp:239
822#, qt-format
823msgid "You can remove it manually by deleting the following directory: %1"
824msgstr ""
825
826#: src/main.cpp:335
752msgid "This system does not support OpenGL."827msgid "This system does not support OpenGL."
753msgstr ""828msgstr ""
754829
@@ -1196,558 +1271,586 @@
1196msgid "Set UI Locale: "1271msgid "Set UI Locale: "
1197msgstr ""1272msgstr ""
11981273
1199#: src/ui_dateTimeDialogGui.h:294 src/ui_helpDialogGui.h:2591274#: src/ui_dateTimeDialogGui.h:296 src/ui_dateTimeDialogGui.h:297
1200#: src/ui_locationDialogGui.h:387 src/ui_viewDialog.h:979
1201#: src/ui_configurationDialog.h:746
1202msgid "Form"
1203msgstr ""
1204
1205#: src/ui_dateTimeDialogGui.h:297 src/ui_dateTimeDialogGui.h:298
1206msgid "/"1275msgid "/"
1207msgstr ""1276msgstr ""
12081277
1209#: src/ui_dateTimeDialogGui.h:299 src/ui_dateTimeDialogGui.h:3001278#: src/ui_dateTimeDialogGui.h:298 src/ui_dateTimeDialogGui.h:299
1210msgid ":"1279msgid ":"
1211msgstr ""1280msgstr ""
12121281
1213#: src/ui_helpDialogGui.h:260 src/ui_helpDialogGui.h:2661282#: src/ui_helpDialogGui.h:259 src/ui_helpDialogGui.h:265
1214msgid "Help"1283msgid "Help"
1215msgstr ""1284msgstr ""
12161285
1217#: src/ui_helpDialogGui.h:2681286#: src/ui_helpDialogGui.h:267
1218msgid "About"1287msgid "About"
1219msgstr ""1288msgstr ""
12201289
1221#: src/ui_helpDialogGui.h:2701290#: src/ui_helpDialogGui.h:269
1222msgid "Log"1291msgid "Log"
1223msgstr ""1292msgstr ""
12241293
1225#: src/ui_helpDialogGui.h:2731294#: src/ui_helpDialogGui.h:272
1226msgid "Refresh"1295msgid "Refresh"
1227msgstr ""1296msgstr ""
12281297
1229#: src/ui_locationDialogGui.h:3881298#: src/ui_locationDialogGui.h:387
1230msgid "Location"1299msgid "Location"
1231msgstr ""1300msgstr ""
12321301
1302#: src/ui_locationDialogGui.h:391
1303msgid "Current location information"
1304msgstr ""
1305
1233#: src/ui_locationDialogGui.h:3921306#: src/ui_locationDialogGui.h:392
1234msgid "Current location information"1307msgid "Use as default"
1235msgstr ""1308msgstr ""
12361309
1237#: src/ui_locationDialogGui.h:3931310#: src/ui_locationDialogGui.h:393
1238msgid "Use as default"1311msgid "Delete"
1239msgstr ""1312msgstr ""
12401313
1241#: src/ui_locationDialogGui.h:3941314#: src/ui_locationDialogGui.h:394
1242msgid "Delete"1315msgid "Add to list"
1243msgstr ""1316msgstr ""
12441317
1245#: src/ui_locationDialogGui.h:3951318#: src/ui_locationDialogGui.h:395
1246msgid "Add to list"
1247msgstr ""
1248
1249#: src/ui_locationDialogGui.h:396
1250msgid "Latitude:"1319msgid "Latitude:"
1251msgstr ""1320msgstr ""
12521321
1253#: src/ui_locationDialogGui.h:398 src/ui_locationDialogGui.h:4021322#: src/ui_locationDialogGui.h:397 src/ui_locationDialogGui.h:401
1254msgid ""1323msgid ""
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: "
1256"+1d 12m 8s"1325"+1d 12m 8s"
1257msgstr ""1326msgstr ""
12581327
1259#: src/ui_locationDialogGui.h:4001328#: src/ui_locationDialogGui.h:399
1260msgid "Longitude:"1329msgid "Longitude:"
1261msgstr ""1330msgstr ""
12621331
1263#: src/ui_locationDialogGui.h:4041332#: src/ui_locationDialogGui.h:403
1264msgid "Altitude:"1333msgid "Altitude:"
1265msgstr ""1334msgstr ""
12661335
1267#: src/ui_locationDialogGui.h:4061336#: src/ui_locationDialogGui.h:405
1268msgid "Enter the altitude in meter"1337msgid "Enter the altitude in meter"
1269msgstr ""1338msgstr ""
12701339
1340#: src/ui_locationDialogGui.h:407
1341msgid " m"
1342msgstr ""
1343
1271#: src/ui_locationDialogGui.h:4081344#: src/ui_locationDialogGui.h:408
1272msgid " m"1345msgid "Name/City:"
1273msgstr ""1346msgstr ""
12741347
1275#: src/ui_locationDialogGui.h:4091348#: src/ui_locationDialogGui.h:409
1276msgid "Name/City:"1349msgid "Country:"
1277msgstr ""1350msgstr ""
12781351
1279#: src/ui_locationDialogGui.h:4101352#: src/ui_locationDialogGui.h:410
1280msgid "Country:"
1281msgstr ""
1282
1283#: src/ui_locationDialogGui.h:411
1284msgid "Planet:"1353msgid "Planet:"
1285msgstr ""1354msgstr ""
12861355
1287#: src/ui_searchDialogGui.h:230 src/ui_searchDialogGui.h:2311356#: src/ui_searchDialogGui.h:227 src/ui_searchDialogGui.h:228
1288msgid "Find Object"1357msgid "Find Object"
1289msgstr ""1358msgstr ""
12901359
1291#: src/ui_searchDialogGui.h:2361360#: src/ui_searchDialogGui.h:233
1292msgid "RA/Dec (J2000):"1361msgid "RA/Dec (J2000):"
1293msgstr ""1362msgstr ""
12941363
1295#: src/ui_viewDialog.h:9801364#: src/ui_viewDialog.h:987
1296msgid "View"1365msgid "View"
1297msgstr ""1366msgstr ""
12981367
1299#: src/ui_viewDialog.h:9861368#: src/ui_viewDialog.h:993
1300msgid "Sky"1369msgid "Sky"
1301msgstr ""1370msgstr ""
13021371
1303#: src/ui_viewDialog.h:9881372#: src/ui_viewDialog.h:995
1304msgid "Markings"1373msgid "Markings"
1305msgstr ""1374msgstr ""
13061375
1307#: src/ui_viewDialog.h:9901376#: src/ui_viewDialog.h:997
1308msgid "Landscape"1377msgid "Landscape"
1309msgstr ""1378msgstr ""
13101379
1311#: src/ui_viewDialog.h:9921380#: src/ui_viewDialog.h:999
1312msgid "Starlore"1381msgid "Starlore"
1313msgstr ""1382msgstr ""
13141383
1315#: src/ui_viewDialog.h:9961384#: src/ui_viewDialog.h:1003
1316msgid "Absolute scale:"1385msgid "Absolute scale:"
1317msgstr ""1386msgstr ""
13181387
1319#: src/ui_viewDialog.h:9971388#: src/ui_viewDialog.h:1004
1320msgid "Relative scale:"1389msgid "Relative scale:"
1321msgstr ""1390msgstr ""
13221391
1323#: src/ui_viewDialog.h:9981392#: src/ui_viewDialog.h:1005
1324msgid "Twinkle:"1393msgid "Twinkle:"
1325msgstr ""1394msgstr ""
13261395
1327#: src/ui_viewDialog.h:10001396#: src/ui_viewDialog.h:1007
1328msgid "Dim faint stars when a very bright object is visible"1397msgid "Dim faint stars when a very bright object is visible"
1329msgstr ""1398msgstr ""
13301399
1331#: src/ui_viewDialog.h:10021400#: src/ui_viewDialog.h:1009
1332msgid "Dynamic eye adaptation"1401msgid "Dynamic eye adaptation"
1333msgstr ""1402msgstr ""
13341403
1335#: src/ui_viewDialog.h:10031404#: src/ui_viewDialog.h:1010
1336msgid "Planets and satellites"1405msgid "Planets and satellites"
1337msgstr ""1406msgstr ""
13381407
1339#: src/ui_viewDialog.h:10041408#: src/ui_viewDialog.h:1011
1340msgid "Show planets"1409msgid "Show planets"
1341msgstr ""1410msgstr ""
13421411
1343#: src/ui_viewDialog.h:10051412#: src/ui_viewDialog.h:1012
1344msgid "Show planet markers"1413msgid "Show planet markers"
1345msgstr ""1414msgstr ""
13461415
1347#: src/ui_viewDialog.h:10061416#: src/ui_viewDialog.h:1013
1348msgid "Show planet orbits"1417msgid "Show planet orbits"
1349msgstr ""1418msgstr ""
13501419
1351#: src/ui_viewDialog.h:10071420#: src/ui_viewDialog.h:1014
1352msgid "Simulate light speed"1421msgid "Simulate light speed"
1353msgstr ""1422msgstr ""
13541423
1355#: src/ui_viewDialog.h:10081424#: src/ui_viewDialog.h:1015
1356msgid "Scale Moon"1425msgid "Scale Moon"
1357msgstr ""1426msgstr ""
13581427
1359#: src/ui_viewDialog.h:10101428#: src/ui_viewDialog.h:1017
1360msgid "Show atmosphere"1429msgid "Show atmosphere"
1361msgstr ""1430msgstr ""
13621431
1363#: src/ui_viewDialog.h:10111432#: src/ui_viewDialog.h:1018
1364msgid "Light pollution: "1433msgid "Light pollution: "
1365msgstr ""1434msgstr ""
13661435
1367#: src/ui_viewDialog.h:10121436#: src/ui_viewDialog.h:1019
1368msgid "Labels and Markers"1437msgid "Labels and Markers"
1369msgstr ""1438msgstr ""
13701439
1371#: src/ui_viewDialog.h:10151440#: src/ui_viewDialog.h:1022
1372msgid "Planets"1441msgid "Planets"
1373msgstr ""1442msgstr ""
13741443
1375#: src/ui_viewDialog.h:10161444#: src/ui_viewDialog.h:1023
1376msgid "Shooting Stars"1445msgid "Shooting Stars"
1377msgstr ""1446msgstr ""
13781447
1379#: src/ui_viewDialog.h:10171448#: src/ui_viewDialog.h:1024
1380msgid "Hourly zenith rate:"1449msgid "Hourly zenith rate:"
1381msgstr ""1450msgstr ""
13821451
1383#: src/ui_viewDialog.h:10181452#: src/ui_viewDialog.h:1025
1384msgid "0"1453msgid "0"
1385msgstr ""1454msgstr ""
13861455
1387#: src/ui_viewDialog.h:10191456#: src/ui_viewDialog.h:1026
1388msgid "10"1457msgid "10"
1389msgstr ""1458msgstr ""
13901459
1391#: src/ui_viewDialog.h:10201460#: src/ui_viewDialog.h:1027
1392msgid "80"1461msgid "80"
1393msgstr ""1462msgstr ""
13941463
1395#: src/ui_viewDialog.h:10211464#: src/ui_viewDialog.h:1028
1396msgid "10000"1465msgid "10000"
1397msgstr ""1466msgstr ""
13981467
1399#: src/ui_viewDialog.h:10221468#: src/ui_viewDialog.h:1029
1400msgid "144000"1469msgid "144000"
1401msgstr ""1470msgstr ""
14021471
1403#: src/ui_viewDialog.h:10241472#: src/ui_viewDialog.h:1031
1404msgid "Celestial Sphere"1473msgid "Celestial Sphere"
1405msgstr ""1474msgstr ""
14061475
1407#: src/ui_viewDialog.h:10321476#: src/ui_viewDialog.h:1039
1408msgid "Constellations"1477msgid "Constellations"
1409msgstr ""1478msgstr ""
14101479
1411#: src/ui_viewDialog.h:10331480#: src/ui_viewDialog.h:1040
1412msgid "Show lines"1481msgid "Show lines"
1413msgstr ""1482msgstr ""
14141483
1415#: src/ui_viewDialog.h:10341484#: src/ui_viewDialog.h:1041
1416msgid "Show labels"1485msgid "Show labels"
1417msgstr ""1486msgstr ""
14181487
1419#: src/ui_viewDialog.h:10351488#: src/ui_viewDialog.h:1042
1420msgid "Show boundaries"1489msgid "Show boundaries"
1421msgstr ""1490msgstr ""
14221491
1423#: src/ui_viewDialog.h:10361492#: src/ui_viewDialog.h:1043
1424msgid "Show art"1493msgid "Show art"
1425msgstr ""1494msgstr ""
14261495
1427#: src/ui_viewDialog.h:10371496#: src/ui_viewDialog.h:1044
1428msgid "Art brightness: "1497msgid "Art brightness: "
1429msgstr ""1498msgstr ""
14301499
1431#: src/ui_viewDialog.h:10381500#: src/ui_viewDialog.h:1045
1432msgid "Projection"1501msgid "Projection"
1433msgstr ""1502msgstr ""
14341503
1435#: src/ui_viewDialog.h:1039 src/ui_viewDialog.h:1044 src/ui_viewDialog.h:10461504#: src/ui_viewDialog.h:1046
1436#: src/ui_configurationDialog.h:853 src/ui_configurationDialog.h:8641505msgid "Add/remove landscapes..."
1506msgstr ""
1507
1508#: src/ui_viewDialog.h:1047 src/ui_viewDialog.h:1052 src/ui_viewDialog.h:1054
1509#: src/ui_configurationDialog.h:852 src/ui_configurationDialog.h:863
1437msgid "Options"1510msgid "Options"
1438msgstr ""1511msgstr ""
14391512
1440#: src/ui_viewDialog.h:10401513#: src/ui_viewDialog.h:1048
1441msgid "Show ground"1514msgid "Show ground"
1442msgstr ""1515msgstr ""
14431516
1444#: src/ui_viewDialog.h:10411517#: src/ui_viewDialog.h:1049
1445msgid "Show fog"1518msgid "Show fog"
1446msgstr ""1519msgstr ""
14471520
1448#: src/ui_viewDialog.h:10421521#: src/ui_viewDialog.h:1050
1449msgid "Use associated planet and position"1522msgid "Use associated planet and position"
1450msgstr ""1523msgstr ""
14511524
1452#: src/ui_viewDialog.h:10431525#: src/ui_viewDialog.h:1051
1453msgid "Use this landscape as default"1526msgid "Use this landscape as default"
1454msgstr ""1527msgstr ""
14551528
1456#: src/ui_viewDialog.h:10451529#: src/ui_viewDialog.h:1053
1457msgid "Use this sky culture as default"1530msgid "Use this sky culture as default"
1458msgstr ""1531msgstr ""
14591532
1460#: src/ui_viewDialog.h:10471533#: src/ui_viewDialog.h:1055
1461msgid "Visible"1534msgid "Visible"
1462msgstr ""1535msgstr ""
14631536
1464#: src/ui_configurationDialog.h:7471537#: src/ui_configurationDialog.h:746
1465msgid "Configuration"1538msgid "Configuration"
1466msgstr ""1539msgstr ""
14671540
1541#: src/ui_configurationDialog.h:748
1542msgid "Program language"
1543msgstr ""
1544
1468#: src/ui_configurationDialog.h:7491545#: src/ui_configurationDialog.h:749
1469msgid "Program language"
1470msgstr ""
1471
1472#: src/ui_configurationDialog.h:750
1473msgid "Selected object information"1546msgid "Selected object information"
1474msgstr ""1547msgstr ""
14751548
1476#: src/ui_configurationDialog.h:7521549#: src/ui_configurationDialog.h:751
1477msgid "Display all information available"1550msgid "Display all information available"
1478msgstr ""1551msgstr ""
14791552
1480#: src/ui_configurationDialog.h:7541553#: src/ui_configurationDialog.h:753
1481msgid "All available"1554msgid "All available"
1482msgstr ""1555msgstr ""
14831556
1484#: src/ui_configurationDialog.h:7561557#: src/ui_configurationDialog.h:755
1485msgid "Display less information"1558msgid "Display less information"
1486msgstr ""1559msgstr ""
14871560
1488#: src/ui_configurationDialog.h:7581561#: src/ui_configurationDialog.h:757
1489msgid "Short"1562msgid "Short"
1490msgstr ""1563msgstr ""
14911564
1492#: src/ui_configurationDialog.h:7601565#: src/ui_configurationDialog.h:759
1493msgid "Display no information"1566msgid "Display no information"
1494msgstr ""1567msgstr ""
14951568
1569#: src/ui_configurationDialog.h:761
1570msgid "None"
1571msgstr ""
1572
1496#: src/ui_configurationDialog.h:7621573#: src/ui_configurationDialog.h:762
1497msgid "None"
1498msgstr ""
1499
1500#: src/ui_configurationDialog.h:763
1501msgid "Default options"1574msgid "Default options"
1502msgstr ""1575msgstr ""
15031576
1504#: src/ui_configurationDialog.h:7651577#: src/ui_configurationDialog.h:764
1505msgid ""1578msgid ""
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 "
1507"you start Stellarium"1580"you start Stellarium"
1508msgstr ""1581msgstr ""
15091582
1510#: src/ui_configurationDialog.h:7671583#: src/ui_configurationDialog.h:766
1511msgid "Save settings"1584msgid "Save settings"
1512msgstr ""1585msgstr ""
15131586
1514#: src/ui_configurationDialog.h:7691587#: src/ui_configurationDialog.h:768
1515msgid "Restore the default settings that came with Stellarium"1588msgid "Restore the default settings that came with Stellarium"
1516msgstr ""1589msgstr ""
15171590
1591#: src/ui_configurationDialog.h:770
1592msgid "Restore defaults"
1593msgstr ""
1594
1518#: src/ui_configurationDialog.h:7711595#: src/ui_configurationDialog.h:771
1519msgid "Restore defaults"
1520msgstr ""
1521
1522#: src/ui_configurationDialog.h:772
1523msgid ""1596msgid ""
1524"Restoring default settings requires a restart of Stellarium. Saving all the "1597"Restoring default settings requires a restart of Stellarium. Saving all the "
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 "
1526"next startup."1599"next startup."
1527msgstr ""1600msgstr ""
15281601
1529#: src/ui_configurationDialog.h:7741602#: src/ui_configurationDialog.h:773
1530msgid "The width of your view when Stellarium starts"1603msgid "The width of your view when Stellarium starts"
1531msgstr ""1604msgstr ""
15321605
1533#: src/ui_configurationDialog.h:7761606#: src/ui_configurationDialog.h:775
1534msgid "Startup FOV: XX"1607msgid "Startup FOV: XX"
1535msgstr ""1608msgstr ""
15361609
1537#: src/ui_configurationDialog.h:7781610#: src/ui_configurationDialog.h:777
1538msgid "The direction you're looking when Stellarium starts"1611msgid "The direction you're looking when Stellarium starts"
1539msgstr ""1612msgstr ""
15401613
1614#: src/ui_configurationDialog.h:779
1615msgid "Startup direction of view: xxxx"
1616msgstr ""
1617
1541#: src/ui_configurationDialog.h:7801618#: src/ui_configurationDialog.h:780
1542msgid "Startup direction of view: xxxx"
1543msgstr ""
1544
1545#: src/ui_configurationDialog.h:781
1546msgid "Control"1619msgid "Control"
1547msgstr ""1620msgstr ""
15481621
1549#: src/ui_configurationDialog.h:7831622#: src/ui_configurationDialog.h:782
1550msgid "Allow keyboard to pan and zoom"1623msgid "Allow keyboard to pan and zoom"
1551msgstr ""1624msgstr ""
15521625
1553#: src/ui_configurationDialog.h:7851626#: src/ui_configurationDialog.h:784
1554msgid "Enable keyboard navigation"1627msgid "Enable keyboard navigation"
1555msgstr ""1628msgstr ""
15561629
1557#: src/ui_configurationDialog.h:7871630#: src/ui_configurationDialog.h:786
1558msgid "Allow mouse to pan (drag) and zoom (mousewheel)"1631msgid "Allow mouse to pan (drag) and zoom (mousewheel)"
1559msgstr ""1632msgstr ""
15601633
1634#: src/ui_configurationDialog.h:788
1635msgid "Enable mouse navigation"
1636msgstr ""
1637
1561#: src/ui_configurationDialog.h:7891638#: src/ui_configurationDialog.h:789
1562msgid "Enable mouse navigation"
1563msgstr ""
1564
1565#: src/ui_configurationDialog.h:790
1566msgid "Startup date and time"1639msgid "Startup date and time"
1567msgstr ""1640msgstr ""
15681641
1569#: src/ui_configurationDialog.h:7921642#: src/ui_configurationDialog.h:791
1570msgid "Starts Stellarium at system clock date and time"1643msgid "Starts Stellarium at system clock date and time"
1571msgstr ""1644msgstr ""
15721645
1573#: src/ui_configurationDialog.h:7941646#: src/ui_configurationDialog.h:793
1574msgid "System date and time"1647msgid "System date and time"
1575msgstr ""1648msgstr ""
15761649
1577#: src/ui_configurationDialog.h:7961650#: src/ui_configurationDialog.h:795
1578msgid ""1651msgid ""
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 "
1580"Stellarium starts"1653"Stellarium starts"
1581msgstr ""1654msgstr ""
15821655
1583#: src/ui_configurationDialog.h:7981656#: src/ui_configurationDialog.h:797
1584msgid "System date at:"1657msgid "System date at:"
1585msgstr ""1658msgstr ""
15861659
1587#: src/ui_configurationDialog.h:8001660#: src/ui_configurationDialog.h:799
1588msgid "Use a specific date and time when Stellarium starts up"1661msgid "Use a specific date and time when Stellarium starts up"
1589msgstr ""1662msgstr ""
15901663
1664#: src/ui_configurationDialog.h:801
1665msgid "Other:"
1666msgstr ""
1667
1591#: src/ui_configurationDialog.h:8021668#: src/ui_configurationDialog.h:802
1592msgid "Other:"1669msgid "use current"
1593msgstr ""1670msgstr ""
15941671
1595#: src/ui_configurationDialog.h:8031672#: src/ui_configurationDialog.h:803
1596msgid "use current"
1597msgstr ""
1598
1599#: src/ui_configurationDialog.h:804
1600msgid "Other"1673msgid "Other"
1601msgstr ""1674msgstr ""
16021675
1603#: src/ui_configurationDialog.h:8061676#: src/ui_configurationDialog.h:805
1604msgid "Hides the mouse cursor when inactive"1677msgid "Hides the mouse cursor when inactive"
1605msgstr ""1678msgstr ""
16061679
1607#: src/ui_configurationDialog.h:8081680#: src/ui_configurationDialog.h:807
1608msgid "Mouse cursor timeout (seconds):"1681msgid "Mouse cursor timeout (seconds):"
1609msgstr ""1682msgstr ""
16101683
1611#: src/ui_configurationDialog.h:8101684#: src/ui_configurationDialog.h:809
1612msgid "Toggle vertical and horizontal image flip buttons."1685msgid "Toggle vertical and horizontal image flip buttons."
1613msgstr ""1686msgstr ""
16141687
1688#: src/ui_configurationDialog.h:811
1689msgid "Show flip buttons"
1690msgstr ""
1691
1615#: src/ui_configurationDialog.h:8121692#: src/ui_configurationDialog.h:812
1616msgid "Show flip buttons"
1617msgstr ""
1618
1619#: src/ui_configurationDialog.h:813
1620msgid "Planetarium options"1693msgid "Planetarium options"
1621msgstr ""1694msgstr ""
16221695
1623#: src/ui_configurationDialog.h:8151696#: src/ui_configurationDialog.h:814
1624msgid ""1697msgid ""
1625"Spheric mirror distortion is used when projecting Stellarium onto a spheric "1698"Spheric mirror distortion is used when projecting Stellarium onto a spheric "
1626"mirror for low-cost planetarium systems."1699"mirror for low-cost planetarium systems."
1627msgstr ""1700msgstr ""
16281701
1629#: src/ui_configurationDialog.h:8171702#: src/ui_configurationDialog.h:816
1630msgid "Spheric mirror distortion"1703msgid "Spheric mirror distortion"
1631msgstr ""1704msgstr ""
16321705
1633#: src/ui_configurationDialog.h:8191706#: src/ui_configurationDialog.h:818
1634msgid "Align labels with the horizon"1707msgid "Align labels with the horizon"
1635msgstr ""1708msgstr ""
16361709
1637#: src/ui_configurationDialog.h:8211710#: src/ui_configurationDialog.h:820
1638msgid "Gravity labels"1711msgid "Gravity labels"
1639msgstr ""1712msgstr ""
16401713
1641#: src/ui_configurationDialog.h:8231714#: src/ui_configurationDialog.h:822
1642msgid ""1715msgid ""
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 "
1644"direction"1717"direction"
1645msgstr ""1718msgstr ""
16461719
1647#: src/ui_configurationDialog.h:8251720#: src/ui_configurationDialog.h:824
1648msgid "Auto zoom out returns to initial direction of view"1721msgid "Auto zoom out returns to initial direction of view"
1649msgstr ""1722msgstr ""
16501723
1651#: src/ui_configurationDialog.h:8271724#: src/ui_configurationDialog.h:826
1652msgid "Mask out everything outside a central circle in the main view"1725msgid "Mask out everything outside a central circle in the main view"
1653msgstr ""1726msgstr ""
16541727
1655#: src/ui_configurationDialog.h:8291728#: src/ui_configurationDialog.h:828
1656msgid "Disc viewport"1729msgid "Disc viewport"
1657msgstr ""1730msgstr ""
16581731
1659#: src/ui_configurationDialog.h:8311732#: src/ui_configurationDialog.h:830
1660msgid "Hide other constellations when you click one"1733msgid "Hide other constellations when you click one"
1661msgstr ""1734msgstr ""
16621735
1736#: src/ui_configurationDialog.h:832
1737msgid "Select single constellation"
1738msgstr ""
1739
1663#: src/ui_configurationDialog.h:8331740#: src/ui_configurationDialog.h:833
1664msgid "Select single constellation"1741msgid "Screenshots"
1665msgstr ""1742msgstr ""
16661743
1667#: src/ui_configurationDialog.h:8341744#: src/ui_configurationDialog.h:834
1668msgid "Screenshots"
1669msgstr ""
1670
1671#: src/ui_configurationDialog.h:835
1672msgid "Screenshot Directory"1745msgid "Screenshot Directory"
1673msgstr ""1746msgstr ""
16741747
1748#: src/ui_configurationDialog.h:836
1749msgid "Invert colors"
1750msgstr ""
1751
1675#: src/ui_configurationDialog.h:8371752#: src/ui_configurationDialog.h:837
1676msgid "Invert colors"
1677msgstr ""
1678
1679#: src/ui_configurationDialog.h:838
1680msgid "Star catalog updates"1753msgid "Star catalog updates"
1681msgstr ""1754msgstr ""
16821755
1683#: src/ui_configurationDialog.h:8401756#: src/ui_configurationDialog.h:839
1684msgid "Click here to start downloading"1757msgid "Click here to start downloading"
1685msgstr ""1758msgstr ""
16861759
1760#: src/ui_configurationDialog.h:841
1761msgid "Get catalog x of y"
1762msgstr ""
1763
1687#: src/ui_configurationDialog.h:8421764#: src/ui_configurationDialog.h:842
1688msgid "Get catalog x of y"1765msgid "Download this file to view even more stars"
1689msgstr ""1766msgstr ""
16901767
1691#: src/ui_configurationDialog.h:8431768#: src/ui_configurationDialog.h:843
1692msgid "Download this file to view even more stars"
1693msgstr ""
1694
1695#: src/ui_configurationDialog.h:844
1696msgid "xxx"1769msgid "xxx"
1697msgstr ""1770msgstr ""
16981771
1699#: src/ui_configurationDialog.h:8461772#: src/ui_configurationDialog.h:845
1700msgid "Restart the download"1773msgid "Restart the download"
1701msgstr ""1774msgstr ""
17021775
1703#: src/ui_configurationDialog.h:8481776#: src/ui_configurationDialog.h:847
1704msgid "Retry"1777msgid "Retry"
1705msgstr ""1778msgstr ""
17061779
1707#: src/ui_configurationDialog.h:8501780#: src/ui_configurationDialog.h:849
1708msgid "Stop the download. You can always restart it later"1781msgid "Stop the download. You can always restart it later"
1709msgstr ""1782msgstr ""
17101783
1711#: src/ui_configurationDialog.h:8521784#: src/ui_configurationDialog.h:851
1712msgid "Cancel"1785msgid "Cancel"
1713msgstr ""1786msgstr ""
17141787
1715#: src/ui_configurationDialog.h:8551788#: src/ui_configurationDialog.h:854
1716msgid "Close window when script runs"1789msgid "Close window when script runs"
1717msgstr ""1790msgstr ""
17181791
1719#: src/ui_configurationDialog.h:8571792#: src/ui_configurationDialog.h:856
1720msgid "Run the selected script"1793msgid "Run the selected script"
1721msgstr ""1794msgstr ""
17221795
1723#: src/ui_configurationDialog.h:8611796#: src/ui_configurationDialog.h:860
1724msgid "Stop a running script"1797msgid "Stop a running script"
1725msgstr ""1798msgstr ""
17261799
1800#: src/ui_configurationDialog.h:864
1801msgid "Load at startup"
1802msgstr ""
1803
1727#: src/ui_configurationDialog.h:8651804#: src/ui_configurationDialog.h:865
1728msgid "Load at startup"
1729msgstr ""
1730
1731#: src/ui_configurationDialog.h:866
1732msgid "configure"1805msgid "configure"
1733msgstr ""1806msgstr ""
17341807
1735#: src/ui_configurationDialog.h:8711808#: src/ui_configurationDialog.h:870
1736msgid "Main"1809msgid "Main"
1737msgstr ""1810msgstr ""
17381811
1739#: src/ui_configurationDialog.h:8731812#: src/ui_configurationDialog.h:872
1740msgid "Navigation"1813msgid "Navigation"
1741msgstr ""1814msgstr ""
17421815
1743#: src/ui_configurationDialog.h:8751816#: src/ui_configurationDialog.h:874
1744msgid "Tools"1817msgid "Tools"
1745msgstr ""1818msgstr ""
17461819
1747#: src/ui_configurationDialog.h:8771820#: src/ui_configurationDialog.h:876
1748msgid "Scripts"1821msgid "Scripts"
1749msgstr ""1822msgstr ""
17501823
1751#: src/ui_configurationDialog.h:8791824#: src/ui_configurationDialog.h:878
1752msgid "Plugins"1825msgid "Plugins"
1753msgstr ""1826msgstr ""
1827
1828#: src/ui_addRemoveLandscapesDialog.h:266
1829msgid "Add/Remove Landscapes"
1830msgstr ""
1831
1832#: src/ui_addRemoveLandscapesDialog.h:268
1833msgid "Add a new landscape"
1834msgstr ""
1835
1836#: src/ui_addRemoveLandscapesDialog.h:269
1837msgid "Install a new landscape from a ZIP archive..."
1838msgstr ""
1839
1840#: src/ui_addRemoveLandscapesDialog.h:270
1841msgid "Switch to the new landscape after installation"
1842msgstr ""
1843
1844#: src/ui_addRemoveLandscapesDialog.h:273
1845msgid "Remove an installed landscape"
1846msgstr ""
1847
1848#: src/ui_addRemoveLandscapesDialog.h:275
1849msgid "Remove"
1850msgstr ""
1851
1852#: src/ui_addRemoveLandscapesDialog.h:276
1853msgid ""
1854"WARNING: Removing the selected landscape means deleting its files. This "
1855"operation is irreversible."
1856msgstr ""
17541857
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2010-09-06 10:39:45 +0000
+++ src/CMakeLists.txt 2010-09-13 16:37:45 +0000
@@ -407,6 +407,8 @@
407 gui/SearchDialog.cpp407 gui/SearchDialog.cpp
408 gui/ConfigurationDialog.hpp408 gui/ConfigurationDialog.hpp
409 gui/ConfigurationDialog.cpp409 gui/ConfigurationDialog.cpp
410 gui/AddRemoveLandscapesDialog.hpp
411 gui/AddRemoveLandscapesDialog.cpp
410 gui/StelDialog.hpp412 gui/StelDialog.hpp
411 gui/StelDialog.cpp)413 gui/StelDialog.cpp)
412414
@@ -424,6 +426,7 @@
424 gui/ViewDialog.hpp426 gui/ViewDialog.hpp
425 gui/SearchDialog.hpp427 gui/SearchDialog.hpp
426 gui/ConfigurationDialog.hpp428 gui/ConfigurationDialog.hpp
429 gui/AddRemoveLandscapesDialog.hpp
427 gui/StelDialog.hpp)430 gui/StelDialog.hpp)
428431
429 ################# compiles .ui files ############432 ################# compiles .ui files ############
@@ -433,7 +436,8 @@
433 gui/dateTimeDialogGui.ui436 gui/dateTimeDialogGui.ui
434 gui/viewDialog.ui437 gui/viewDialog.ui
435 gui/searchDialogGui.ui438 gui/searchDialogGui.ui
436 gui/configurationDialog.ui)439 gui/configurationDialog.ui
440 gui/addRemoveLandscapesDialog.ui)
437441
438 IF(ENABLE_SCRIPT_CONSOLE)442 IF(ENABLE_SCRIPT_CONSOLE)
439 SET(stellarium_gui_SRCS ${stellarium_gui_SRCS}443 SET(stellarium_gui_SRCS ${stellarium_gui_SRCS}
440444
=== modified file 'src/core/modules/LandscapeMgr.cpp'
--- src/core/modules/LandscapeMgr.cpp 2010-06-03 21:41:26 +0000
+++ src/core/modules/LandscapeMgr.cpp 2010-09-13 16:37:45 +0000
@@ -1,6 +1,7 @@
1/*1/*
2 * Stellarium2 * Stellarium
3 * Copyright (C) 2006 Fabien Chereau3 * Copyright (C) 2006 Fabien Chereau
4 * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature)
4 *5 *
5 * This program is free software; you can redistribute it and/or6 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License7 * modify it under the terms of the GNU General Public License
@@ -20,6 +21,9 @@
20#include <QDebug>21#include <QDebug>
21#include <QSettings>22#include <QSettings>
22#include <QString>23#include <QString>
24#include <QDir>
25#include <QFile>
26#include <QTemporaryFile>
2327
24#ifdef USE_OPENGL_ES228#ifdef USE_OPENGL_ES2
25 #include "GLES2/gl2.h"29 #include "GLES2/gl2.h"
@@ -27,6 +31,8 @@
27 #include <QtOpenGL>31 #include <QtOpenGL>
28#endif32#endif
2933
34#include <stdexcept>
35
30#include "LandscapeMgr.hpp"36#include "LandscapeMgr.hpp"
31#include "Landscape.hpp"37#include "Landscape.hpp"
32#include "Atmosphere.hpp"38#include "Atmosphere.hpp"
@@ -40,6 +46,8 @@
40#include "StelIniParser.hpp"46#include "StelIniParser.hpp"
41#include "StelSkyDrawer.hpp"47#include "StelSkyDrawer.hpp"
42#include "StelPainter.hpp"48#include "StelPainter.hpp"
49#include "karchive.h"
50#include "kzip.h"
4351
44// Class which manages the cardinal points displaying52// Class which manages the cardinal points displaying
45class Cardinals53class Cardinals
@@ -144,6 +152,10 @@
144LandscapeMgr::LandscapeMgr() : atmosphere(NULL), cardinalsPoints(NULL), landscape(NULL), flagLandscapeSetsLocation(false)152LandscapeMgr::LandscapeMgr() : atmosphere(NULL), cardinalsPoints(NULL), landscape(NULL), flagLandscapeSetsLocation(false)
145{153{
146 setObjectName("LandscapeMgr");154 setObjectName("LandscapeMgr");
155
156 //TODO: Find a way to obtain this list automatically.
157 //Note: The first entry in the list is used as the default 'default landscape' in removeLandscape().
158 packagedLandscapeIDs = (QStringList() << "guereins" << "trees" << "moon" << "hurricane" << "ocean" << "garching" << "mars" << "saturn");
147}159}
148160
149LandscapeMgr::~LandscapeMgr()161LandscapeMgr::~LandscapeMgr()
@@ -408,6 +420,20 @@
408 return result;420 return result;
409}421}
410422
423QStringList LandscapeMgr::getUserLandscapeIDs() const
424{
425 QMap<QString,QString> nameToDirMap = getNameToDirMap();
426 QStringList result;
427 foreach (QString id, nameToDirMap.values())
428 {
429 if(!packagedLandscapeIDs.contains(id))
430 {
431 result += id;
432 }
433 }
434 return result;
435}
436
411QString LandscapeMgr::getCurrentLandscapeName() const437QString LandscapeMgr::getCurrentLandscapeName() const
412{438{
413 return landscape->getName();439 return landscape->getName();
@@ -604,3 +630,291 @@
604}630}
605631
606632
633QString LandscapeMgr::installLandscapeFromArchive(QString sourceFilePath, bool display, bool toMainDirectory)
634{
635 if (!QFile::exists(sourceFilePath))
636 {
637 qDebug() << "LandscapeMgr: File does not exist:" << sourceFilePath;
638 emit errorUnableToOpen(sourceFilePath);
639 return QString();
640 }
641
642 QDir parentDestinationDir;
643 //TODO: Fix the "for all users" option
644 parentDestinationDir.setPath(StelFileMgr::getUserDir());
645
646 if (!parentDestinationDir.exists("landscapes"))
647 {
648 //qDebug() << "LandscapeMgr: No 'landscapes' subdirectory exists in" << parentDestinationDir.absolutePath();
649 if (!parentDestinationDir.mkdir("landscapes"))
650 {
651 qWarning() << "LandscapeMgr: Unable to install landscape: Unable to create sub-directory 'landscapes' in" << parentDestinationDir.absolutePath();
652 emit errorUnableToOpen(QDir::cleanPath(parentDestinationDir.filePath("landscapes")));//parentDestinationDir.absolutePath()
653 return QString();
654 }
655 }
656 QDir destinationDir (parentDestinationDir.absoluteFilePath("landscapes"));
657
658 KZip sourceArchive(sourceFilePath);
659 if(!sourceArchive.open(QIODevice::ReadOnly))
660 {
661 qWarning() << "LandscapeMgr: Unable to open as a ZIP archive:" << sourceFilePath;
662 emit errorNotArchive();
663 return QString();
664 }
665
666 //Detect top directory
667 const KArchiveDirectory * archiveTopDirectory = NULL;
668 QStringList topLevelContents = sourceArchive.directory()->entries();
669 if(topLevelContents.contains("landscape.ini"))
670 {
671 //If the landscape archive has no top level directory...
672 //(test case is "tulipfield" from the Stellarium Wiki)
673 archiveTopDirectory = sourceArchive.directory();
674 }
675 else
676 {
677 foreach (QString entryPath, topLevelContents)
678 {
679 if (sourceArchive.directory()->entry(entryPath)->isDirectory())
680 {
681 if((dynamic_cast<const KArchiveDirectory*>(sourceArchive.directory()->entry(entryPath)))->entries().contains("landscape.ini"))
682 {
683 archiveTopDirectory = dynamic_cast<const KArchiveDirectory*>(sourceArchive.directory()->entry(entryPath));
684 break;
685 }
686 }
687 }
688 }
689 if (archiveTopDirectory == NULL)
690 {
691 qWarning() << "LandscapeMgr: Unable to install landscape. There is no directory that contains a 'landscape.ini' file in the source archive.";
692 emit errorNotArchive();
693 return QString();
694 }
695
696 /*
697 qDebug() << "LandscapeMgr: Contents of the source archive:" << endl
698 << "- top level direcotory:" << archiveTopDirectory->name() << endl
699 << "- contents:" << archiveTopDirectory->entries();
700 */
701
702 //Check if the top directory name is unique
703 //TODO: Prompt rename? Rename silently?
704 /*
705 if (destinationDir.exists(archiveTopDirectory->name()))
706 {
707 qWarning() << "LandscapeMgr: Unable to install landscape. A directory named" << archiveTopDirectory->name() << "already exists in" << destinationDir.absolutePath();
708 return QString();
709 }
710 */
711 //Determine the landscape's identifier
712 QString landscapeID = archiveTopDirectory->name();
713 if (landscapeID.length() < 2)
714 {
715 //If the archive has no top level directory (landscapeID is "/"),
716 //use the first 65 characters of its file name for an identifier
717 QFileInfo sourceFileInfo(sourceFilePath);
718 landscapeID = sourceFileInfo.baseName().left(65);
719 }
720
721 //Check for duplicate IDs
722 if (getAllLandscapeIDs().contains(landscapeID))
723 {
724 qWarning() << "LandscapeMgr: Unable to install landscape. A landscape with the ID" << landscapeID << "already exists.";
725 emit errorNotUnique(landscapeID);
726 return QString();
727 }
728
729 //Read the .ini file and check if the landscape name is unique
730 QTemporaryFile tempLandscapeIni("landscapeXXXXXX.ini");
731 if (tempLandscapeIni.open())
732 {
733 const KZipFileEntry * archLandscapeIni = static_cast<const KZipFileEntry*>(archiveTopDirectory->entry("landscape.ini"));
734 tempLandscapeIni.write(archLandscapeIni->createDevice()->readAll());
735 tempLandscapeIni.close();
736
737 QSettings confLandscapeIni(tempLandscapeIni.fileName(), StelIniFormat);
738 QString landscapeName = confLandscapeIni.value("landscape/name").toString();
739 if (getAllLandscapeNames().contains(landscapeName))
740 {
741 qWarning() << "LandscapeMgr: Unable to install landscape. There is already a landscape named" << landscapeName;
742 emit errorNotUnique(landscapeName);
743 return QString();
744 }
745 }
746
747 //Copy the landscape directory to the target
748 //sourceArchive.directory()->copyTo(destinationDir.absolutePath());
749
750 //This case already has been handled - and commented out - above. :)
751 if(destinationDir.exists(landscapeID))
752 {
753 qWarning() << "LandscapeMgr: A subdirectory" << landscapeID << "already exists in" << destinationDir.absolutePath() << "Its contents may be overwritten.";
754 }
755 else if(!destinationDir.mkdir(landscapeID))
756 {
757 qWarning() << "LandscapeMgr: Unable to install landscape. Unable to create" << landscapeID << "directory in" << destinationDir.absolutePath();
758 emit errorUnableToOpen(QDir::cleanPath(destinationDir.filePath(landscapeID)));
759 return QString();
760 }
761 destinationDir.cd(landscapeID);
762 QString destinationDirPath = destinationDir.absolutePath();
763 QStringList landscapeFileEntries = archiveTopDirectory->entries();
764 foreach (QString entry, landscapeFileEntries)
765 {
766 const KArchiveEntry * archEntry = archiveTopDirectory->entry(entry);
767 if(archEntry->isFile())
768 {
769 static_cast<const KZipFileEntry*>(archEntry)->copyTo(destinationDirPath);
770 }
771 }
772
773 sourceArchive.close();
774
775 //If necessary, make the new landscape the current landscape
776 if (display)
777 {
778 setCurrentLandscapeID(landscapeID);
779 }
780
781 //Make sure that everyone knows that the list of available landscapes has changed
782 emit landscapesChanged();
783
784 qDebug() << "LandscapeMgr: Successfully installed landscape directory" << landscapeID << "to" << destinationDir.absolutePath();
785 return landscapeID;
786}
787
788bool LandscapeMgr::removeLandscape(QString landscapeID)
789{
790 if (landscapeID.isEmpty())
791 {
792 qWarning() << "LandscapeMgr: Error! No landscape ID passed to removeLandscape().";
793 return false;
794 }
795
796 if (packagedLandscapeIDs.contains(landscapeID))
797 {
798 qWarning() << "LandscapeMgr: Landscapes that are part of the default installation cannot be removed.";
799 return false;
800 }
801
802 qDebug() << "LandscapeMgr: Trying to remove landscape" << landscapeID;
803
804 QString landscapePath = getLandscapePath(landscapeID);
805 if (landscapePath.isEmpty())
806 return false;
807
808 QDir landscapeDir(landscapePath);
809 foreach (QString fileName, landscapeDir.entryList(QDir::Files | QDir::NoDotAndDotDot))
810 {
811 if(!landscapeDir.remove(fileName))
812 {
813 qWarning() << "LandscapeMgr: Unable to remove" << fileName;
814 emit errorRemoveManually(landscapeDir.absolutePath());
815 return false;
816 }
817 }
818 landscapeDir.cdUp();
819 if(!landscapeDir.rmdir(landscapeID))
820 {
821 qWarning() << "LandscapeMgr: Error! Landscape" << landscapeID
822 << "could not be removed. "
823 << "Some files were deleted, but not all."
824 << endl
825 << "LandscapeMgr: You can delete manually" << QDir::cleanPath(landscapeDir.filePath(landscapeID));
826 emit errorRemoveManually(QDir::cleanPath(landscapeDir.filePath(landscapeID)));
827 return false;
828 }
829
830 qDebug() << "LandscapeMgr: Successfully removed" << landscapePath;
831
832 //If the landscape has been selected, revert to the default one
833 //TODO: Make this optional?
834 if (getCurrentLandscapeID() == landscapeID)
835 {
836 if(getDefaultLandscapeID() == landscapeID)
837 {
838 setDefaultLandscapeID(packagedLandscapeIDs.first());
839 //TODO: Find what happens if a missing landscape is specified in the configuration file
840 }
841
842 setCurrentLandscapeID(getDefaultLandscapeID());
843 }
844
845 //Make sure that everyone knows that the list of available landscapes has changed
846 emit landscapesChanged();
847
848 return true;
849}
850
851QString LandscapeMgr::getLandscapePath(QString landscapeID)
852{
853 QString result;
854 //Is this necessary? This function is private.
855 if (landscapeID.isEmpty())
856 return result;
857
858 try
859 {
860 result = StelFileMgr::findFile("landscapes/" + landscapeID, StelFileMgr::Directory);
861 }
862 catch (std::runtime_error &e)
863 {
864 qWarning() << "LandscapeMgr: Error! Unable to find" << landscapeID << ":" << e.what();
865 return result;
866 }
867
868 return result;
869}
870
871QString LandscapeMgr::loadLandscapeName(QString landscapeID)
872{
873 QString landscapeName;
874 if (landscapeID.isEmpty())
875 {
876 qWarning() << "LandscapeMgr: Error! No landscape ID passed to loadLandscapeName().";
877 return landscapeName;
878 }
879
880 QString landscapePath = getLandscapePath(landscapeID);
881 if (landscapePath.isEmpty())
882 return landscapeName;
883
884 QDir landscapeDir(landscapePath);
885 if (landscapeDir.exists("landscape.ini"))
886 {
887 QString landscapeSettingsPath = landscapeDir.filePath("landscape.ini");
888 QSettings landscapeSettings(landscapeSettingsPath, StelIniFormat);
889 landscapeName = landscapeSettings.value("landscape/name").toString();
890 }
891 else
892 {
893 qWarning() << "LandscapeMgr: Error! Landscape directory" << landscapePath << "does not contain a 'landscape.ini' file";
894 }
895
896 return landscapeName;
897}
898
899quint64 LandscapeMgr::loadLandscapeSize(QString landscapeID)
900{
901 quint64 landscapeSize = 0;
902 if (landscapeID.isEmpty())
903 {
904 qWarning() << "LandscapeMgr: Error! No landscape ID passed to loadLandscapeSize().";
905 return landscapeSize;
906 }
907
908 QString landscapePath = getLandscapePath(landscapeID);
909 if (landscapePath.isEmpty())
910 return landscapeSize;
911
912 QDir landscapeDir(landscapePath);
913 foreach (QFileInfo file, landscapeDir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot))
914 {
915 //qDebug() << "name:" << file.baseName() << "size:" << file.size();
916 landscapeSize += file.size();
917 }
918
919 return landscapeSize;
920}
607921
=== modified file 'src/core/modules/LandscapeMgr.hpp'
--- src/core/modules/LandscapeMgr.hpp 2010-05-20 10:13:42 +0000
+++ src/core/modules/LandscapeMgr.hpp 2010-09-13 16:37:45 +0000
@@ -1,6 +1,7 @@
1/*1/*
2 * Stellarium2 * Stellarium
3 * Copyright (C) 2006 Fabien Chereau3 * Copyright (C) 2006 Fabien Chereau
4 * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature)
4 *5 *
5 * This program is free software; you can redistribute it and/or6 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License7 * modify it under the terms of the GNU General Public License
@@ -32,8 +33,8 @@
32class QSettings;33class QSettings;
3334
34//! @class LandscapeMgr35//! @class LandscapeMgr
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.
36//! This includes landscape textures, fog, atmosphere and cardinal points37//! This includes landscape textures, fog, atmosphere and cardinal points.
37//! I decided to put all these elements together in a single class because they are38//! I decided to put all these elements together in a single class because they are
38//! inherently linked, especially when we start moving the observer in altitude.39//! inherently linked, especially when we start moving the observer in altitude.
39class LandscapeMgr : public StelModule40class LandscapeMgr : public StelModule
@@ -95,16 +96,21 @@
95public slots:96public slots:
96 ///////////////////////////////////////////////////////////////////////////97 ///////////////////////////////////////////////////////////////////////////
97 // Methods callable from script and GUI98 // Methods callable from script and GUI
98 //! Retrieve list of the names of all the available landscape in the99 //! Retrieve a list of the names of all the available landscapes in
99 //! file search path sub-directories of the landscape area100 //! the file search path sub-directories of the landscape area
100 //! @return the names of the landscapes, which are the values of the name parameter in the landscape.ini files101 //! @return the names of the landscapes, which are the values of the name parameter in the landscape.ini files
101 QStringList getAllLandscapeNames() const;102 QStringList getAllLandscapeNames() const;
102103
103 //! Retrieve list of the names of all the available landscape in the104 //! Retrieve a list of the identifiers of all the available landscapes in
104 //! file search path sub-directories of the landscape area105 //! the file search path sub-directories of the landscape area
105 //! @return the names of the landscapes, which are the values of the name parameter in the landscape.ini files106 //! @return the identifiers of the landscapes, which are the names of the directories containing the landscapes' files
106 QStringList getAllLandscapeIDs() const;107 QStringList getAllLandscapeIDs() const;
107108
109 //! Retrieve a list of the identifiers of all user-installed landscapes.
110 //! Effectively, this returns the results of getAllLandscapeIDs() without
111 //! the landscapes specified in the #packagedLandscapeIDs list.
112 QStringList getUserLandscapeIDs() const;
113
108 //! Get the current landscape ID.114 //! Get the current landscape ID.
109 const QString& getCurrentLandscapeID() const {return currentLandscapeID;}115 const QString& getCurrentLandscapeID() const {return currentLandscapeID;}
110 //! Change the current landscape to the landscape with the ID specified.116 //! Change the current landscape to the landscape with the ID specified.
@@ -174,6 +180,106 @@
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.
175 void setZRotation(float d);181 void setZRotation(float d);
176182
183 //! Install a landscape from a ZIP archive.
184 //! This function searches for a file named "landscape.ini" in the root
185 //! directory of the archive. If it is not found there, the function
186 //! searches inside the topmost sub-directories (if any), but no deeper.
187 //! If a landscape configuration file is found:
188 //! - if a "landscapes" directory does not exist in the user data
189 //! directory, it is created;
190 //! - inside it, a sub-directory is created with the landscape identifier
191 //! for a name;
192 //! - all files in the archive directory that contains the "landscape.ini"
193 //! file are extracted to the new sub-directory of "landscapes";
194 //! - all sub-directories of that archive directory will be skipped along
195 //! with any other files or directories in the archive.
196 //!
197 //! The landscape identifier is either:
198 //! - the name of the folder in the archive that contains "landscape.ini",
199 //! - or the first 65 (or less) characters of the archive name, if the
200 //! "landscape.ini" file is in the nameless root directory of the archive.
201 //!
202 //! The landscape identifier must be unique.
203 //! @param pathToSourceArchive path to the source archive file.
204 //! @param display If true, the landscape will be set to be the current
205 //! landscape after installation.
206 //! @param forAllUsers If true, this function will try to install the
207 //! landscape in a way that meakes it is available to all users of this
208 //! computer. May require running Stellarium as an administrator (root)
209 //! on some Windows or *nix systems. (NOT IMPLEMENTED!)
210 //! @returns the installed landscape's identifier, or
211 //! an empty string on failure.
212 //! @todo Find a better way to pass error messages.
213 QString installLandscapeFromArchive(QString pathToSourceArchive, bool display = false, bool forAllUsers = false);
214
215 //! Install a landscape from a directory.
216 //! Expected directory structure: the name of the directory that contains
217 //! a landscape.ini file is assumed to be the landscape ID and should be
218 //! unique.
219 //! This directory and all files in it will be installed, but its
220 //! subdirectories will be skipped along with any other files or
221 //! directories in the archive.
222 //! @param pathToSourceLandscapeIni path to a landscape.ini file. Its parent
223 //! directory is assumed to be the landscape source directory.
224 //! @param display If true, the landscape will be set to be the current
225 //! landscape after installation.
226 //! @param forAllUsers If true, this function will try to install the
227 //! landscape in a way that meakes it is available to all users of this
228 //! computer. May require running Stellarium as an administrator (root)
229 //! on some Windows or *nix systems. (NOT IMPLEMENTED!)
230 //! @returns the installed landscape's identifier (the folder name), or
231 //! an empty string on failure.
232 //QString installLandscapeFromDirectory(QString pathToSourceLandscapeIni, bool display = false, bool forAllUsers = false);
233
234 //! This function removes a landscape from the user data directory.
235 //! It tries to recursively delete all files in the landscape directory
236 //! and then remove it from the list of available landscapes.
237 //! If the function encounters any file that can't be deleted
238 //! it aborts the operation (previously deleted files are not restored).
239 //! Landscapes that were packaged with Stellarium can't be removed,
240 //! thanks to the #packagedtLandscapeIDs list.
241 //! @param landscapeID an installed landscape's identifier (the folder name)
242 //! @todo Find a better way to pass error messages.
243 bool removeLandscape(QString landscapeID);
244
245 //! This function reads a landscape's name from its configuration file.
246 //! @param landscapeID an installed landscape's identifier (the folder name)
247 //! @returns an empty string if there is no such landscape or some other
248 //! error occurs
249 QString loadLandscapeName(QString landscapeID);
250
251 //! This function calculates and returns a landscape's disc size in bytes.
252 //! It adds up the sizes of all files in the landscape's folder. It assumes
253 //! that there are no sub-directories. (There shouldn't be any anyway.)
254 //! @param landscapeID an installed landscape's identifier (the folder name)
255 quint64 loadLandscapeSize(QString landscapeID);
256
257signals:
258 //! Emitted when a landscape has been installed or un-installed.
259 //! For example, it is used to update the list of landscapes in
260 //! the Sky and viewing options window (the ViewDialog class)
261 void landscapesChanged();
262
263 //! Emitted when installLandscapeFromArchive() can't read from, write to or
264 //! create a file or a directory.
265 //! (A way of moving the need for translatable error messages to the GUI.)
266 //! \param path path to the file or directory
267 void errorUnableToOpen(QString path);
268 //! Emitted when the file passed to installLandscapeFromArchive() is not a
269 //! ZIP archive or does not contain a valid landscape.
270 //! (A way of moving the need for translatable error messages to the GUI.)
271 void errorNotArchive();
272 //! Emitted when installLandscapeFromArchive() tries to install a landscape
273 //! with the same name or identifier as an already installed one.
274 //! (A way of moving the need for translatable error messages to the GUI.)
275 //! \param nameOrID the name or the identifier of the landscape
276 void errorNotUnique(QString nameOrID);
277 //! Emitted when removeLandscape() is unable to remove all the files of
278 //! a landscape.
279 //! (A way of moving the need for translatable error messages to the GUI.)
280 //! \param path the path to the landscape's directory
281 void errorRemoveManually(QString path);
282
177private:283private:
178 //! Get light pollution luminance level.284 //! Get light pollution luminance level.
179 float getAtmosphereLightPollutionLuminance() const;285 float getAtmosphereLightPollutionLuminance() const;
@@ -188,6 +294,12 @@
188 //! Return a map of landscape name to landscape ID (directory name).294 //! Return a map of landscape name to landscape ID (directory name).
189 QMap<QString,QString> getNameToDirMap() const;295 QMap<QString,QString> getNameToDirMap() const;
190296
297 //! Returns the path to an installed landscape's directory.
298 //! It uses StelFileMgr to look for it in the possible directories.
299 //! @param landscapeID an installed landscape's identifier (the folder name)
300 //! @returns an empty string, if no such landscape was found.
301 QString getLandscapePath(QString landscapeID);
302
191 Atmosphere* atmosphere; // Atmosphere303 Atmosphere* atmosphere; // Atmosphere
192 Cardinals* cardinalsPoints; // Cardinals points304 Cardinals* cardinalsPoints; // Cardinals points
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"
@@ -200,6 +312,13 @@
200312
201 // The ID of the default landscape313 // The ID of the default landscape
202 QString defaultLandscapeID;314 QString defaultLandscapeID;
315
316 //! List of the IDs of the landscapes packaged by default with Stellarium.
317 //! (So that they can't be removed.)
318 //! It is populated in LandscapeMgr() and has to be updated
319 //! manually on changes.
320 //! @todo Find a way to update it automatically.
321 QStringList packagedLandscapeIDs;
203};322};
204323
205#endif // _LANDSCAPEMGR_HPP_324#endif // _LANDSCAPEMGR_HPP_
206325
=== added file 'src/gui/AddRemoveLandscapesDialog.cpp'
--- src/gui/AddRemoveLandscapesDialog.cpp 1970-01-01 00:00:00 +0000
+++ src/gui/AddRemoveLandscapesDialog.cpp 2010-09-13 16:37:45 +0000
@@ -0,0 +1,241 @@
1/*
2 * Stellarium
3 *
4 * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19*/
20#include "AddRemoveLandscapesDialog.hpp"
21#include "ui_addRemoveLandscapesDialog.h"
22
23#include "Dialog.hpp"
24#include "LandscapeMgr.hpp"
25#include "StelApp.hpp"
26#include "StelModuleMgr.hpp"
27#include "StelLocaleMgr.hpp"
28
29#include <QDebug>
30#include <QFileDialog>
31#include <QString>
32
33AddRemoveLandscapesDialog::AddRemoveLandscapesDialog()
34{
35 ui = new Ui_addRemoveLandscapesDialogForm;
36
37 landscapeManager = GETSTELMODULE(LandscapeMgr);
38
39 lastUsedDirectoryPath = QDir::homePath();
40}
41
42AddRemoveLandscapesDialog::~AddRemoveLandscapesDialog()
43{
44 delete ui;
45}
46
47void AddRemoveLandscapesDialog::languageChanged()
48{
49 if (dialog)
50 ui->retranslateUi(dialog);
51}
52
53// Initialize the dialog widgets and connect the signals/slots
54void AddRemoveLandscapesDialog::createDialogContent()
55{
56 ui->setupUi(dialog);
57
58 //Signals and slots
59 connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
60
61 connect(ui->pushButtonBrowseForArchive, SIGNAL(clicked()), this, SLOT(browseForArchiveClicked()));
62 connect(ui->listWidgetUserLandscapes, SIGNAL(currentRowChanged(int)), this, SLOT(updateSidePane(int)));
63 connect(ui->pushButtonRemove, SIGNAL(clicked()), this, SLOT(removeClicked()));
64 connect(ui->pushButtonMessageOK, SIGNAL(clicked()), this, SLOT(messageAcknowledged()));
65
66 connect(landscapeManager, SIGNAL(landscapesChanged()), this, SLOT(populateLists()));
67 connect(landscapeManager, SIGNAL(errorUnableToOpen(QString)), this, SLOT(messageUnableToOpen(QString)));
68 connect(landscapeManager, SIGNAL(errorNotArchive()), this, SLOT(messageNotArchive()));
69 connect(landscapeManager, SIGNAL(errorNotUnique(QString)), this, SLOT(messageNotUnique(QString)));
70 connect(landscapeManager, SIGNAL(errorRemoveManually(QString)), this, SLOT(messageRemoveManually(QString)));
71
72 ui->groupBoxMessage->setVisible(false);
73
74 populateLists();
75}
76
77void AddRemoveLandscapesDialog::setVisible(bool v)
78{
79 StelDialog::setVisible(v);
80 //Make sure that every time when the dialog is displayed, the current
81 //landscape is selected in the list of user landscapes if it is in the list.
82 populateLists();
83}
84
85void AddRemoveLandscapesDialog::populateLists()
86{
87 ui->listWidgetUserLandscapes->clear();
88 QStringList landscapes = landscapeManager->getUserLandscapeIDs();
89 if (!landscapes.isEmpty())
90 {
91 landscapes.sort();
92 ui->listWidgetUserLandscapes->addItems(landscapes);
93 //If the current landscape is in the list of user landscapes, select its entry
94 if((ui->listWidgetUserLandscapes->findItems(landscapeManager->getCurrentLandscapeID(), Qt::MatchExactly).isEmpty()))
95 {
96 //If the current landscape is not in the list, simply select the first row
97 ui->listWidgetUserLandscapes->setCurrentRow(0);
98 }
99 else
100 {
101 ui->listWidgetUserLandscapes->setCurrentItem(ui->listWidgetUserLandscapes->findItems(landscapeManager->getCurrentLandscapeID(), Qt::MatchExactly).first());
102 }
103 }
104 else
105 {
106 //Force disabling the side pane
107 updateSidePane(-1);
108 }
109}
110
111void AddRemoveLandscapesDialog::browseForArchiveClicked()
112{
113 QString caption = q_("Select a ZIP archive that contains a Stellarium landscape");
114 // TRANSLATORS: This string is displayed in the "Files of type:" drop-down list in the standard file selection dialog.
115 QString filter = q_("ZIP archives");
116 filter += " (*.zip)";
117 QString sourceArchivePath = QFileDialog::getOpenFileName(NULL, caption, lastUsedDirectoryPath, filter);
118 bool useLandscape = ui->checkBoxUseLandscape->isChecked();
119 if (!sourceArchivePath.isEmpty() && QFile::exists(sourceArchivePath))
120 {
121 //Remember the last successfully used directory
122 lastUsedDirectoryPath = QFileInfo(sourceArchivePath).path();
123
124 QString newLandscapeID = landscapeManager->installLandscapeFromArchive(sourceArchivePath, useLandscape);
125 if(!newLandscapeID.isEmpty())
126 {
127 //Show a message
128 QString successMessage = QString(q_("Landscape \"%1\" has been installed successfully.")).arg(newLandscapeID);
129 displayMessage(q_("Success"), successMessage);
130
131 //Make the new landscape selected in the list
132 //populateLists(); //No longer needed after the migration to signals/slots
133 ui->listWidgetUserLandscapes->setCurrentItem((ui->listWidgetUserLandscapes->findItems(newLandscapeID, Qt::MatchExactly)).first());
134 }
135 else
136 {
137 //If no error message has been displayed by the signal/slot mechanism,
138 //display a generic message.
139 if (!ui->groupBoxMessage->isVisible())
140 {
141 //Show an error message
142 QString failureMessage = q_("No landscape was installed.");
143 displayMessage(q_("Error!"), failureMessage);
144 }
145 }
146 }
147}
148
149void AddRemoveLandscapesDialog::removeClicked()
150{
151 QString landscapeID = ui->listWidgetUserLandscapes->currentItem()->data(0).toString();
152 if(landscapeManager->removeLandscape(landscapeID))
153 {
154 //populateLists();//No longer needed after the migration to signals/slots
155 QString successMessage = QString(q_("Landscape \"%1\" has been removed successfully.")).arg(landscapeID);
156 displayMessage(q_("Success"), successMessage);
157 }
158 else
159 {
160 //If no error message has been displayed by the signal/slot mechanism,
161 //display a generic message.
162 if (!ui->groupBoxMessage->isVisible())
163 {
164 //Show an error message
165 //NB! This string is used elsewhere. Modify both to avoid two nearly identical translations.
166 QString failureMessage = q_("The selected landscape could not be (completely) removed.");
167 displayMessage(q_("Error!"), failureMessage);
168 }
169 }
170
171}
172
173void AddRemoveLandscapesDialog::updateSidePane(int newRow)
174{
175 bool displaySidePane = (newRow >= 0);
176 ui->labelLandscapeName->setVisible(displaySidePane);
177 ui->labelLandscapeSize->setVisible(displaySidePane);
178 ui->pushButtonRemove->setEnabled(displaySidePane);
179 ui->labelWarning->setEnabled(displaySidePane);
180 if (!displaySidePane)
181 return;
182
183 QString landscapeID = ui->listWidgetUserLandscapes->item(newRow)->data(0).toString();
184 //Name
185 ui->labelLandscapeName->setText("<h3>"+landscapeManager->loadLandscapeName(landscapeID)+"</h3>");
186 //Size in MiB
187 double landscapeSize = landscapeManager->loadLandscapeSize(landscapeID) / (double)(1024*1024);
188 // TRANSLATORS: MiB = mebibytes (IEC 60027-2 standard for 2^20 bytes)
189 ui->labelLandscapeSize->setText(QString(q_("Size on disk: %1 MiB")).arg(landscapeSize, 0, 'f', 2));
190}
191
192void AddRemoveLandscapesDialog::messageAcknowledged()
193{
194 ui->groupBoxMessage->setVisible(false);
195 ui->groupBoxAdd->setVisible(true);
196 ui->groupBoxRemove->setVisible(true);
197 ui->labelMessage->clear();
198 ui->groupBoxMessage->setTitle(QString());
199}
200
201void AddRemoveLandscapesDialog::displayMessage(QString title, QString message)
202{
203 ui->labelMessage->setText(message);
204 ui->groupBoxMessage->setTitle(title);
205 ui->groupBoxMessage->setVisible(true);
206 ui->groupBoxAdd->setVisible(false);
207 ui->groupBoxRemove->setVisible(false);
208}
209
210void AddRemoveLandscapesDialog::messageUnableToOpen(QString path)
211{
212 QString failureMessage = q_("No landscape was installed.");
213 failureMessage.append(" ");
214 // TRANSLATORS: The parameter is a file/directory path that may be quite long.
215 failureMessage.append(q_("Stellarium cannot open for reading or writing %1").arg(path));
216 displayMessage(q_("Error!"), failureMessage);
217}
218
219void AddRemoveLandscapesDialog::messageNotArchive()
220{
221 QString failureMessage = q_("No landscape was installed.") + " " + q_("The selected file is not a ZIP archive or does not contain a Stellarium landscape.");
222 displayMessage(q_("Error!"), failureMessage);
223}
224
225void AddRemoveLandscapesDialog::messageNotUnique(QString nameOrID)
226{
227 // TRANSLATORS: The parameter is the duplicate name or identifier.
228 QString nameMessage = q_("A landscape with the same name or identifier (%1) already exists.").arg(nameOrID);
229 QString failureMessage = q_("No landscape was installed.") + " " + nameMessage;
230 displayMessage(q_("Error!"), failureMessage);
231}
232
233void AddRemoveLandscapesDialog::messageRemoveManually(QString path)
234{
235 //NB! This string is used elsewhere. Modify both to avoid two nearly identical translations.
236 QString failureMessage = q_("The selected landscape could not be (completely) removed.");
237 failureMessage.append(" ");
238 // TRANSLATORS: The parameter is a file/directory path that may be quite long. "It" refers to a landscape that can't be removed.
239 failureMessage.append(q_("You can remove it manually by deleting the following directory: %1").arg(path));
240 displayMessage(q_("Error!"), failureMessage);
241}
0242
=== added file 'src/gui/AddRemoveLandscapesDialog.hpp'
--- src/gui/AddRemoveLandscapesDialog.hpp 1970-01-01 00:00:00 +0000
+++ src/gui/AddRemoveLandscapesDialog.hpp 2010-09-13 16:37:45 +0000
@@ -0,0 +1,81 @@
1/*
2 * Stellarium
3 *
4 * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19*/
20
21#ifndef _ADDREMOVELANDSCAPESDIALOG_HPP_
22#define _ADDREMOVELANDSCAPESDIALOG_HPP_
23
24#include <QObject>
25#include <QStringList>
26
27#include "StelDialog.hpp"
28
29class Ui_addRemoveLandscapesDialogForm;
30class LandscapeMgr;
31
32//! @class AddRemoveLandscapesDialog
33class AddRemoveLandscapesDialog : public StelDialog
34{
35 Q_OBJECT
36public:
37 AddRemoveLandscapesDialog();
38 virtual ~AddRemoveLandscapesDialog();
39 void languageChanged();
40
41public slots:
42 //! This function overrides the non-virtual StelDialog::setVisible()
43 //! to allow the current landscape to be selected in the list of user
44 //! landscapes (if it is in the list) every time the dialog is displayed.
45 void setVisible(bool);
46 void populateLists();
47
48protected:
49 //! Initialize the dialog widgets and connect the signals/slots.
50 virtual void createDialogContent();
51 Ui_addRemoveLandscapesDialogForm* ui;
52
53private slots:
54 void browseForArchiveClicked();
55 void removeClicked();
56 void updateSidePane(int newRow);
57
58 //! Hides the message group box and returns to the "Add" group box.
59 //! Usually called by clicking the "OK" button in the message box.
60 void messageAcknowledged();
61
62 void messageUnableToOpen(QString path);
63 void messageNotArchive();
64 void messageNotUnique(QString nameOrID);
65 void messageRemoveManually(QString path);
66
67private:
68 LandscapeMgr* landscapeManager;
69
70 //! Path to the directory last used by QFileDialog in buttonAddClicked().
71 //! Initialized with QDir::homePath() in Landscape(). (DOESN'T WORK!)
72 QString lastUsedDirectoryPath;
73
74 //! Displays a message in place of the "Add" box.
75 //! Pressing the "OK" button in the message box calls messageAcknowledged().
76 //! @param title the title of the QGroupBox that contains the message
77 //! @param message the text of the message itself
78 void displayMessage(QString title, QString message);
79};
80
81#endif // _ADDREMOVELANDSCAPESDIALOG_
082
=== modified file 'src/gui/ViewDialog.cpp'
--- src/gui/ViewDialog.cpp 2010-04-22 10:02:15 +0000
+++ src/gui/ViewDialog.cpp 2010-09-13 16:37:45 +0000
@@ -20,6 +20,7 @@
2020
21#include "ViewDialog.hpp"21#include "ViewDialog.hpp"
22#include "ui_viewDialog.h"22#include "ui_viewDialog.h"
23#include "AddRemoveLandscapesDialog.hpp"
23#include "StelApp.hpp"24#include "StelApp.hpp"
24#include "StelCore.hpp"25#include "StelCore.hpp"
25#include "StelSkyCultureMgr.hpp"26#include "StelSkyCultureMgr.hpp"
@@ -50,12 +51,15 @@
50ViewDialog::ViewDialog()51ViewDialog::ViewDialog()
51{52{
52 ui = new Ui_viewDialogForm;53 ui = new Ui_viewDialogForm;
54 addRemoveLandscapesDialog = NULL;
53}55}
5456
55ViewDialog::~ViewDialog()57ViewDialog::~ViewDialog()
56{58{
57 delete ui;59 delete ui;
58 ui=NULL;60 ui=NULL;
61 delete addRemoveLandscapesDialog;
62 addRemoveLandscapesDialog = NULL;
59}63}
6064
61void ViewDialog::languageChanged()65void ViewDialog::languageChanged()
@@ -196,6 +200,9 @@
196 ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getCurrentLandscapeID()!=lmgr->getDefaultLandscapeID());200 ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getCurrentLandscapeID()!=lmgr->getDefaultLandscapeID());
197 connect(ui->useAsDefaultLandscapeCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentLandscapeAsDefault()));201 connect(ui->useAsDefaultLandscapeCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentLandscapeAsDefault()));
198202
203 connect(GETSTELMODULE(LandscapeMgr), SIGNAL(landscapesChanged()), this, SLOT(populateLists()));
204 connect(ui->pushButtonAddRemoveLandscapes, SIGNAL(clicked()), this, SLOT(showAddRemoveLandscapesDialog()));
205
199 // Grid and lines206 // Grid and lines
200 GridLinesMgr* glmgr = GETSTELMODULE(GridLinesMgr);207 GridLinesMgr* glmgr = GETSTELMODULE(GridLinesMgr);
201 ui->showEquatorLineCheckBox->setChecked(glmgr->getFlagEquatorLine());208 ui->showEquatorLineCheckBox->setChecked(glmgr->getFlagEquatorLine());
@@ -312,7 +319,8 @@
312 l->addItems(lmgr->getAllLandscapeNames());319 l->addItems(lmgr->getAllLandscapeNames());
313 l->setCurrentItem(l->findItems(lmgr->getCurrentLandscapeName(), Qt::MatchExactly).at(0));320 l->setCurrentItem(l->findItems(lmgr->getCurrentLandscapeName(), Qt::MatchExactly).at(0));
314 l->blockSignals(false);321 l->blockSignals(false);
315 ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescription());322 //ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescription()); //Is there any reason not to reuse code?
323 landscapeChanged(l->currentItem());
316}324}
317325
318void ViewDialog::populateSkyLayersList()326void ViewDialog::populateSkyLayersList()
@@ -420,6 +428,14 @@
420 ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getDefaultLandscapeID()!=lmgr->getCurrentLandscapeID());428 ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getDefaultLandscapeID()!=lmgr->getCurrentLandscapeID());
421}429}
422430
431void ViewDialog::showAddRemoveLandscapesDialog()
432{
433 if(addRemoveLandscapesDialog == NULL)
434 addRemoveLandscapesDialog = new AddRemoveLandscapesDialog();
435
436 addRemoveLandscapesDialog->setVisible(true);
437}
438
423void ViewDialog::shootingStarsZHRChanged()439void ViewDialog::shootingStarsZHRChanged()
424{440{
425 MeteorMgr* mmgr = GETSTELMODULE(MeteorMgr);441 MeteorMgr* mmgr = GETSTELMODULE(MeteorMgr);
426442
=== modified file 'src/gui/ViewDialog.hpp'
--- src/gui/ViewDialog.hpp 2009-05-25 15:24:19 +0000
+++ src/gui/ViewDialog.hpp 2010-09-13 16:37:45 +0000
@@ -26,6 +26,8 @@
26class Ui_viewDialogForm;26class Ui_viewDialogForm;
27class QListWidgetItem;27class QListWidgetItem;
2828
29class AddRemoveLandscapesDialog;
30
29class ViewDialog : public StelDialog31class ViewDialog : public StelDialog
30{32{
31Q_OBJECT33Q_OBJECT
@@ -54,6 +56,8 @@
54 //! This function should be called repeatidly with e.g. a timer56 //! This function should be called repeatidly with e.g. a timer
55 void updateFromProgram();57 void updateFromProgram();
5658
59 void showAddRemoveLandscapesDialog();
60
57 void populateSkyLayersList();61 void populateSkyLayersList();
58 void skyLayersSelectionChanged(const QString&);62 void skyLayersSelectionChanged(const QString&);
59 void skyLayersEnabledChanged(int);63 void skyLayersEnabledChanged(int);
@@ -61,6 +65,8 @@
61 void changePage(QListWidgetItem *current, QListWidgetItem *previous);65 void changePage(QListWidgetItem *current, QListWidgetItem *previous);
62private:66private:
63 void updateSkyCultureText();67 void updateSkyCultureText();
68
69 AddRemoveLandscapesDialog * addRemoveLandscapesDialog;
64};70};
6571
66#endif // _VIEWDIALOG_HPP_72#endif // _VIEWDIALOG_HPP_
6773
=== added file 'src/gui/addRemoveLandscapesDialog.ui'
--- src/gui/addRemoveLandscapesDialog.ui 1970-01-01 00:00:00 +0000
+++ src/gui/addRemoveLandscapesDialog.ui 2010-09-13 16:37:45 +0000
@@ -0,0 +1,378 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>addRemoveLandscapesDialogForm</class>
4 <widget class="QWidget" name="addRemoveLandscapesDialogForm">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>450</width>
10 <height>400</height>
11 </rect>
12 </property>
13 <property name="sizePolicy">
14 <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
15 <horstretch>0</horstretch>
16 <verstretch>0</verstretch>
17 </sizepolicy>
18 </property>
19 <property name="minimumSize">
20 <size>
21 <width>400</width>
22 <height>400</height>
23 </size>
24 </property>
25 <layout class="QVBoxLayout" name="verticalLayout">
26 <property name="spacing">
27 <number>0</number>
28 </property>
29 <property name="margin">
30 <number>0</number>
31 </property>
32 <item>
33 <widget class="BarFrame" name="LocationBar">
34 <property name="sizePolicy">
35 <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
36 <horstretch>0</horstretch>
37 <verstretch>0</verstretch>
38 </sizepolicy>
39 </property>
40 <property name="minimumSize">
41 <size>
42 <width>400</width>
43 <height>25</height>
44 </size>
45 </property>
46 <property name="maximumSize">
47 <size>
48 <width>16777215</width>
49 <height>30</height>
50 </size>
51 </property>
52 <property name="focusPolicy">
53 <enum>Qt::NoFocus</enum>
54 </property>
55 <property name="autoFillBackground">
56 <bool>false</bool>
57 </property>
58 <property name="frameShape">
59 <enum>QFrame::StyledPanel</enum>
60 </property>
61 <layout class="QHBoxLayout">
62 <property name="spacing">
63 <number>6</number>
64 </property>
65 <property name="leftMargin">
66 <number>0</number>
67 </property>
68 <property name="topMargin">
69 <number>0</number>
70 </property>
71 <property name="rightMargin">
72 <number>4</number>
73 </property>
74 <property name="bottomMargin">
75 <number>0</number>
76 </property>
77 <item>
78 <spacer name="titleSpacerLeft">
79 <property name="orientation">
80 <enum>Qt::Horizontal</enum>
81 </property>
82 <property name="sizeHint" stdset="0">
83 <size>
84 <width>40</width>
85 <height>20</height>
86 </size>
87 </property>
88 </spacer>
89 </item>
90 <item>
91 <widget class="QLabel" name="stelWindowTitle">
92 <property name="text">
93 <string>Add/Remove Landscapes</string>
94 </property>
95 </widget>
96 </item>
97 <item>
98 <spacer name="titleSpacerRight">
99 <property name="orientation">
100 <enum>Qt::Horizontal</enum>
101 </property>
102 <property name="sizeHint" stdset="0">
103 <size>
104 <width>40</width>
105 <height>20</height>
106 </size>
107 </property>
108 </spacer>
109 </item>
110 <item>
111 <widget class="QPushButton" name="closeStelWindow">
112 <property name="minimumSize">
113 <size>
114 <width>16</width>
115 <height>16</height>
116 </size>
117 </property>
118 <property name="maximumSize">
119 <size>
120 <width>16</width>
121 <height>16</height>
122 </size>
123 </property>
124 <property name="focusPolicy">
125 <enum>Qt::NoFocus</enum>
126 </property>
127 <property name="text">
128 <string/>
129 </property>
130 </widget>
131 </item>
132 </layout>
133 </widget>
134 </item>
135 <item>
136 <widget class="QGroupBox" name="groupBoxAdd">
137 <property name="sizePolicy">
138 <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
139 <horstretch>0</horstretch>
140 <verstretch>0</verstretch>
141 </sizepolicy>
142 </property>
143 <property name="title">
144 <string>Add a new landscape</string>
145 </property>
146 <layout class="QGridLayout" name="gridLayout">
147 <property name="margin">
148 <number>0</number>
149 </property>
150 <item row="0" column="0" colspan="2">
151 <widget class="QPushButton" name="pushButtonBrowseForArchive">
152 <property name="sizePolicy">
153 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
154 <horstretch>0</horstretch>
155 <verstretch>0</verstretch>
156 </sizepolicy>
157 </property>
158 <property name="text">
159 <string>Install a new landscape from a ZIP archive...</string>
160 </property>
161 </widget>
162 </item>
163 <item row="1" column="0" colspan="2">
164 <widget class="QCheckBox" name="checkBoxUseLandscape">
165 <property name="sizePolicy">
166 <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
167 <horstretch>0</horstretch>
168 <verstretch>0</verstretch>
169 </sizepolicy>
170 </property>
171 <property name="text">
172 <string>Switch to the new landscape after installation</string>
173 </property>
174 <property name="checked">
175 <bool>true</bool>
176 </property>
177 </widget>
178 </item>
179 </layout>
180 </widget>
181 </item>
182 <item>
183 <widget class="QGroupBox" name="groupBoxMessage">
184 <property name="title">
185 <string notr="true">Message</string>
186 </property>
187 <layout class="QGridLayout" name="gridLayout_4">
188 <property name="margin">
189 <number>0</number>
190 </property>
191 <item row="0" column="0" colspan="2">
192 <widget class="QLabel" name="labelMessage">
193 <property name="sizePolicy">
194 <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
195 <horstretch>0</horstretch>
196 <verstretch>0</verstretch>
197 </sizepolicy>
198 </property>
199 <property name="font">
200 <font>
201 <family>DejaVu Sans</family>
202 <pointsize>12</pointsize>
203 </font>
204 </property>
205 <property name="text">
206 <string/>
207 </property>
208 <property name="wordWrap">
209 <bool>true</bool>
210 </property>
211 <property name="textInteractionFlags">
212 <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
213 </property>
214 </widget>
215 </item>
216 <item row="1" column="1">
217 <widget class="QPushButton" name="pushButtonMessageOK">
218 <property name="sizePolicy">
219 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
220 <horstretch>0</horstretch>
221 <verstretch>0</verstretch>
222 </sizepolicy>
223 </property>
224 <property name="text">
225 <string/>
226 </property>
227 <property name="icon">
228 <iconset resource="../../data/gui/guiRes.qrc">
229 <normaloff>:/graphicGui/closeButton-hover.png</normaloff>:/graphicGui/closeButton-hover.png</iconset>
230 </property>
231 </widget>
232 </item>
233 <item row="1" column="0">
234 <spacer name="horizontalSpacer">
235 <property name="orientation">
236 <enum>Qt::Horizontal</enum>
237 </property>
238 <property name="sizeHint" stdset="0">
239 <size>
240 <width>40</width>
241 <height>20</height>
242 </size>
243 </property>
244 </spacer>
245 </item>
246 </layout>
247 </widget>
248 </item>
249 <item>
250 <widget class="QGroupBox" name="groupBoxRemove">
251 <property name="sizePolicy">
252 <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
253 <horstretch>0</horstretch>
254 <verstretch>0</verstretch>
255 </sizepolicy>
256 </property>
257 <property name="title">
258 <string>Remove an installed landscape</string>
259 </property>
260 <layout class="QHBoxLayout" name="horizontalLayout">
261 <property name="margin">
262 <number>0</number>
263 </property>
264 <item>
265 <widget class="QListWidget" name="listWidgetUserLandscapes">
266 <property name="sizePolicy">
267 <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
268 <horstretch>0</horstretch>
269 <verstretch>0</verstretch>
270 </sizepolicy>
271 </property>
272 </widget>
273 </item>
274 <item>
275 <widget class="QFrame" name="frameSidePane">
276 <property name="sizePolicy">
277 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
278 <horstretch>0</horstretch>
279 <verstretch>0</verstretch>
280 </sizepolicy>
281 </property>
282 <layout class="QVBoxLayout" name="verticalLayoutSidePane">
283 <property name="margin">
284 <number>0</number>
285 </property>
286 <item>
287 <widget class="QLabel" name="labelLandscapeName">
288 <property name="text">
289 <string notr="true"/>
290 </property>
291 </widget>
292 </item>
293 <item>
294 <widget class="QLabel" name="labelLandscapeSize">
295 <property name="sizePolicy">
296 <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
297 <horstretch>0</horstretch>
298 <verstretch>0</verstretch>
299 </sizepolicy>
300 </property>
301 <property name="text">
302 <string/>
303 </property>
304 </widget>
305 </item>
306 <item>
307 <widget class="QPushButton" name="pushButtonRemove">
308 <property name="sizePolicy">
309 <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
310 <horstretch>0</horstretch>
311 <verstretch>0</verstretch>
312 </sizepolicy>
313 </property>
314 <property name="text">
315 <string>Remove</string>
316 </property>
317 </widget>
318 </item>
319 <item>
320 <widget class="QLabel" name="labelWarning">
321 <property name="sizePolicy">
322 <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
323 <horstretch>0</horstretch>
324 <verstretch>0</verstretch>
325 </sizepolicy>
326 </property>
327 <property name="text">
328 <string>WARNING: Removing the selected landscape means deleting its files. This operation is irreversible.</string>
329 </property>
330 <property name="alignment">
331 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
332 </property>
333 <property name="wordWrap">
334 <bool>true</bool>
335 </property>
336 </widget>
337 </item>
338 <item>
339 <spacer name="verticalSpacer">
340 <property name="orientation">
341 <enum>Qt::Vertical</enum>
342 </property>
343 <property name="sizeHint" stdset="0">
344 <size>
345 <width>20</width>
346 <height>40</height>
347 </size>
348 </property>
349 </spacer>
350 </item>
351 </layout>
352 </widget>
353 </item>
354 </layout>
355 </widget>
356 </item>
357 </layout>
358 </widget>
359 <customwidgets>
360 <customwidget>
361 <class>BarFrame</class>
362 <extends>QFrame</extends>
363 <header>Dialog.hpp</header>
364 <container>1</container>
365 </customwidget>
366 </customwidgets>
367 <tabstops>
368 <tabstop>checkBoxUseLandscape</tabstop>
369 <tabstop>pushButtonBrowseForArchive</tabstop>
370 <tabstop>pushButtonMessageOK</tabstop>
371 <tabstop>listWidgetUserLandscapes</tabstop>
372 <tabstop>pushButtonRemove</tabstop>
373 </tabstops>
374 <resources>
375 <include location="../../data/gui/guiRes.qrc"/>
376 </resources>
377 <connections/>
378</ui>
0379
=== modified file 'src/gui/viewDialog.ui'
--- src/gui/viewDialog.ui 2010-09-08 11:05:30 +0000
+++ src/gui/viewDialog.ui 2010-09-13 16:37:45 +0000
@@ -1228,7 +1228,7 @@
1228 <property name="spacing">1228 <property name="spacing">
1229 <number>0</number>1229 <number>0</number>
1230 </property>1230 </property>
1231 <item row="0" column="0" rowspan="2">1231 <item row="0" column="0" rowspan="4">
1232 <widget class="QListWidget" name="landscapesListWidget">1232 <widget class="QListWidget" name="landscapesListWidget">
1233 <property name="sizePolicy">1233 <property name="sizePolicy">
1234 <sizepolicy hsizetype="Preferred" vsizetype="Expanding">1234 <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
@@ -1292,6 +1292,22 @@
1292 </property>1292 </property>
1293 </widget>1293 </widget>
1294 </item>1294 </item>
1295 <item row="2" column="1">
1296 <widget class="QPushButton" name="pushButtonAddRemoveLandscapes">
1297 <property name="minimumSize">
1298 <size>
1299 <width>0</width>
1300 <height>37</height>
1301 </size>
1302 </property>
1303 <property name="styleSheet">
1304 <string notr="true">margin-left: 10px; margin-right: 10px; margin-bottom:10px;</string>
1305 </property>
1306 <property name="text">
1307 <string>Add/remove landscapes...</string>
1308 </property>
1309 </widget>
1310 </item>
1295 <item row="1" column="1">1311 <item row="1" column="1">
1296 <widget class="QGroupBox" name="landscapeOptionsGroupBox">1312 <widget class="QGroupBox" name="landscapeOptionsGroupBox">
1297 <property name="sizePolicy">1313 <property name="sizePolicy">