[Kstars-devel] branches/KDE/3.5/kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Thu Sep 8 07:59:53 CEST 2005
SVN commit 458416 by harris:
1. Switch order of "Import Catalog" and "Load Catalog" buttons in the
Catalog tab of the Options window
2. Add Catalog window: Show input file contents when file is selected
witht he file browser (before contents only shown if filename entered in
line edit box)
3. Add Catalog window: Warn user if the output file alread exists (I
added strings, but they are identical to strings that already exist in
kstars.pot)
CCMAIL: kstars-devel at kde.org
M +16 -0 addcatdialog.cpp
M +12 -12 opscatalogui.ui
--- branches/KDE/3.5/kdeedu/kstars/kstars/addcatdialog.cpp #458415:458416
@@ -42,6 +42,8 @@
vlay->addWidget( acd );
connect( acd->DataURL->lineEdit(), SIGNAL( lostFocus() ), this, SLOT( slotShowDataFile() ) );
+ connect( acd->DataURL, SIGNAL( urlSelected( const QString & ) ),
+ this, SLOT( slotShowDataFile() ) );
connect( acd->PreviewButton, SIGNAL( clicked() ), this, SLOT( slotPreviewCatalog() ) );
connect( this, SIGNAL( okClicked() ), this, SLOT( slotCreateCatalog() ) );
@@ -201,6 +203,20 @@
if ( validateDataFile() ) {
//CatalogContents now contains the text for the catalog file,
//and objList contains the parsed objects
+
+ //Warn user if file exists!
+ if ( QFile::exists( acd->CatalogURL->url() ) )
+ {
+ KURL u( acd->CatalogURL->url() );
+ int r=KMessageBox::warningContinueCancel( 0,
+ i18n( "A file named \"%1\" already exists. "
+ "Overwrite it?" ).arg( u.fileName() ),
+ i18n( "Overwrite File?" ),
+ i18n( "&Overwrite" ) );
+
+ if(r==KMessageBox::Cancel) return;
+ }
+
QFile OutFile( acd->CatalogURL->url() );
if ( ! OutFile.open( IO_WriteOnly ) ) {
KMessageBox::sorry( 0,
--- branches/KDE/3.5/kdeedu/kstars/kstars/opscatalogui.ui #458415:458416
@@ -370,30 +370,30 @@
</property>
<widget class="KPushButton">
<property name="name">
- <cstring>LoadCatalog</cstring>
+ <cstring>AddCatalog</cstring>
</property>
<property name="text">
- <string>Load Catalog...</string>
+ <string>Import Catalog...</string>
</property>
<property name="toolTip" stdset="0">
- <string>Load an existing user catalog</string>
+ <string>Create a custom object catalog</string>
</property>
<property name="whatsThis" stdset="0">
- <string>Load an existing custom catalog. Only use this button if you have a catalog file that was created by KStars (or one that has the proper header).</string>
+ <string>Press this button to create a custom object catalog. Use this button instead of "Load Catalog", even if you already have a data file. We will add a header to your data file to create the catalog.</string>
</property>
</widget>
<widget class="KPushButton">
<property name="name">
- <cstring>AddCatalog</cstring>
+ <cstring>LoadCatalog</cstring>
</property>
<property name="text">
- <string>Import Catalog...</string>
+ <string>Load Catalog...</string>
</property>
<property name="toolTip" stdset="0">
- <string>Create a custom object catalog</string>
+ <string>Load an existing user catalog</string>
</property>
<property name="whatsThis" stdset="0">
- <string>Press this button to create a custom object catalog. Use this button instead of "Load Catalog", even if you already have a data file. We will add a header to your data file to create the catalog.</string>
+ <string>Load an existing custom catalog. Only use this button if you have a catalog file that was created by KStars (or one that has the proper header).</string>
</property>
</widget>
<widget class="KPushButton">
@@ -426,7 +426,7 @@
<property name="sizeHint">
<size>
<width>20</width>
- <height>40</height>
+ <height>68</height>
</size>
</property>
</spacer>
@@ -574,8 +574,8 @@
<class>MagnitudeSpinBox</class>
<header location="local">magnitudespinbox.h</header>
<sizehint>
- <width>70</width>
- <height>20</height>
+ <width>60</width>
+ <height>18</height>
</sizehint>
<container>0</container>
<sizepolicy>
@@ -590,7 +590,7 @@
</customwidgets>
<images>
<image name="image0">
- <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7e
bd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582
c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082</data>
+ <data format="XBM.GZ" length="79">789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f</data>
</image>
</images>
<layoutdefaults spacing="6" margin="11"/>
More information about the Kstars-devel
mailing list