summaryrefslogtreecommitdiff
path: root/noncore/apps/zsafe/zsafe.cpp
Unidiff
Diffstat (limited to 'noncore/apps/zsafe/zsafe.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/zsafe/zsafe.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp
index 1c15852..2dd94aa 100644
--- a/noncore/apps/zsafe/zsafe.cpp
+++ b/noncore/apps/zsafe/zsafe.cpp
@@ -371,13 +371,13 @@ static const char* const general_data[] = {
371#else 371#else
372 conf = new QSettings (cfgFile); 372 conf = new QSettings (cfgFile);
373 conf->insertSearchPath (QSettings::Unix, cfgFile); 373 conf->insertSearchPath (QSettings::Unix, cfgFile);
374#endif 374#endif
375#else 375#else
376 conf = new Config (cfgFile, Config::File); 376 conf = new Config (cfgFile, Config::File);
377 conf->setGroup ("zsafe"); 377 conf->setGroup ("zsafePrefs");
378#endif 378#endif
379 } 379 }
380 } 380 }
381 381
382 382
383/* 383/*
@@ -489,13 +489,13 @@ ZSafe::ZSafe( QWidget* parent, const char* name, bool modal, WFlags fl )
489 resize( DeskW, DeskH-30 ); 489 resize( DeskW, DeskH-30 );
490#endif 490#endif
491 491
492#endif 492#endif
493 setCaption( tr( "ZSafe" ) ); 493 setCaption( tr( "ZSafe" ) );
494 QString zsafeAppDirPath = QDir::homeDirPath() + "/Documents/application/zsafe"; 494 QString zsafeAppDirPath = QDir::homeDirPath() + "/Documents/application/zsafe";
495 QString filename = conf->readEntry(APP_KEY+"document"); 495 filename = conf->readEntry(APP_KEY+"document");
496 if ( !QFileInfo(filename).exists() || !QDir(zsafeAppDirPath).exists() ) 496 if ( !QFileInfo(filename).exists() || !QDir(zsafeAppDirPath).exists() )
497 { 497 {
498 // check if the directory application exists, if not 498 // check if the directory application exists, if not
499 // create it 499 // create it
500// #ifndef Q_WS_WIN 500// #ifndef Q_WS_WIN
501 // QString d1("Documents/application"); 501 // QString d1("Documents/application");
@@ -759,14 +759,14 @@ void ZSafe::deletePwd()
759 delCategory(); 759 delCategory();
760 } 760 }
761} 761}
762 762
763void ZSafe::editPwd() 763void ZSafe::editPwd()
764{ 764{
765 if (!selectedItem) 765 if (!selectedItem)
766 return; 766 return;
767 if (!isCategory(selectedItem)) 767 if (!isCategory(selectedItem))
768 { 768 {
769 // open the 'New Entry' dialog 769 // open the 'New Entry' dialog
770 NewDialog *dialog = new NewDialog(this, "edit_entry", TRUE); 770 NewDialog *dialog = new NewDialog(this, "edit_entry", TRUE);
771#ifdef Q_WS_WIN 771#ifdef Q_WS_WIN
772 dialog->setCaption ("Qt " + tr("Edit Entry")); 772 dialog->setCaption ("Qt " + tr("Edit Entry"));
@@ -802,13 +802,13 @@ void ZSafe::editPwd()
802#endif 802#endif
803#else 803#else
804 dialog->showMaximized(); 804 dialog->showMaximized();
805#endif 805#endif
806#ifdef DESKTOP 806#ifdef DESKTOP
807 int result = dialog->exec(); 807 int result = dialog->exec();
808// result = QDialog::Accepted; 808 result = QDialog::Accepted;
809#endif 809#endif
810 if (result == Accepted) 810 if (result == Accepted)
811 { 811 {
812 modified = true; 812 modified = true;
813 // edit the selected item 813 // edit the selected item
814 QString name = dialog->NameField->text(); 814 QString name = dialog->NameField->text();
@@ -833,22 +833,22 @@ void ZSafe::editPwd()
833 editCategory(); 833 editCategory();
834 } 834 }
835} 835}
836 836
837void ZSafe::newPwd() 837void ZSafe::newPwd()
838{ 838{
839 if (!selectedItem) 839 if (!selectedItem)
840 return; 840 return;
841 841 qWarning("new item");
842 if (!isCategory(selectedItem)) 842 if (!isCategory(selectedItem))
843 selectedItem = selectedItem->parent(); 843 selectedItem = selectedItem->parent();
844 844
845 if (isCategory(selectedItem)) 845 if (isCategory(selectedItem))
846 { 846 {
847 QString cat = selectedItem->text(0); 847 QString cat = selectedItem->text(0);
848 848 qWarning(cat);
849 // open the 'New Entry' dialog 849 // open the 'New Entry' dialog
850 NewDialog *dialog = new NewDialog(this, "new_entry", TRUE); 850 NewDialog *dialog = new NewDialog(this, "new_entry", TRUE);
851#ifdef Q_WS_WIN 851#ifdef Q_WS_WIN
852 dialog->setCaption ("Qt " + tr("New Entry")); 852 dialog->setCaption ("Qt " + tr("New Entry"));
853 dialog->setGeometry(200, 250, 220, 310 ); 853 dialog->setGeometry(200, 250, 220, 310 );
854#endif 854#endif
@@ -871,13 +871,13 @@ retype:
871#endif 871#endif
872#else 872#else
873 dialog->showMaximized(); 873 dialog->showMaximized();
874#endif 874#endif
875#ifdef DESKTOP 875#ifdef DESKTOP
876 int result = dialog->exec(); 876 int result = dialog->exec();
877// result = QDialog::Accepted; 877 result = QDialog::Accepted;
878#endif 878#endif
879 879
880 if (result == Accepted) 880 if (result == Accepted)
881 { 881 {
882 882
883 QString name = dialog->NameField->text(); 883 QString name = dialog->NameField->text();