summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/zsafe/zsafe.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp
index e86b3d2..9341425 100644
--- a/noncore/apps/zsafe/zsafe.cpp
+++ b/noncore/apps/zsafe/zsafe.cpp
@@ -2797,32 +2797,34 @@ void ZSafe::setCategoryDialogFields(CategoryDialog *dialog)
2797 2797
2798 QString icon; 2798 QString icon;
2799 if (selectedItem) 2799 if (selectedItem)
2800 { 2800 {
2801 dialog->Field1->setText(getFieldLabel (selectedItem, "1", tr("Name"))); 2801 dialog->Field1->setText(getFieldLabel (selectedItem, "1", tr("Name")));
2802 dialog->Field2->setText(getFieldLabel (selectedItem, "2", tr("Username"))); 2802 dialog->Field2->setText(getFieldLabel (selectedItem, "2", tr("Username")));
2803 dialog->Field3->setText(getFieldLabel (selectedItem, "3", tr("Password"))); 2803 dialog->Field3->setText(getFieldLabel (selectedItem, "3", tr("Password")));
2804 dialog->Field4->setText(getFieldLabel (selectedItem, "4", tr("Comment"))); 2804 dialog->Field4->setText(getFieldLabel (selectedItem, "4", tr("Comment")));
2805 dialog->Field5->setText(getFieldLabel (selectedItem, "5", tr("Field 4"))); 2805 dialog->Field5->setText(getFieldLabel (selectedItem, "5", tr("Field 4")));
2806 dialog->Field6->setText(getFieldLabel (selectedItem, "6", tr("Field 5"))); 2806 dialog->Field6->setText(getFieldLabel (selectedItem, "6", tr("Field 5")));
2807 2807
2808 Category *cat= categories.find (selectedItem->text(0)); 2808 Category *cat= categories.find (selectedItem->text(0));
2809 if (cat) 2809 if (cat)
2810 { 2810 {
2811 icon = cat->getIconName(); 2811 icon = cat->getIconName();
2812 } 2812 }
2813 else
2814 icon = conf->readEntry(APP_KEY+selectedItem->text(0));
2813 } 2815 }
2814 else 2816 else
2815 { 2817 {
2816 dialog->Field1->setText(tr("Name")); 2818 dialog->Field1->setText(tr("Name"));
2817 dialog->Field2->setText(tr("Username")); 2819 dialog->Field2->setText(tr("Username"));
2818 dialog->Field3->setText(tr("Password")); 2820 dialog->Field3->setText(tr("Password"));
2819 dialog->Field4->setText(tr("Comment")); 2821 dialog->Field4->setText(tr("Comment"));
2820 dialog->Field5->setText(tr("Field 4")); 2822 dialog->Field5->setText(tr("Field 4"));
2821 dialog->Field6->setText(tr("Field 5")); 2823 dialog->Field6->setText(tr("Field 5"));
2822 } 2824 }
2823 2825
2824#ifdef DESKTOP 2826#ifdef DESKTOP
2825 QDir d(iconPath); 2827 QDir d(iconPath);
2826#else 2828#else
2827 QDir d(QPEApplication::qpeDir() + "/pics/"); 2829 QDir d(QPEApplication::qpeDir() + "/pics/");
2828#endif 2830#endif
@@ -2862,32 +2864,34 @@ void ZSafe::setCategoryDialogFields(CategoryDialog *dialog, QString category)
2862 if (!dialog) 2864 if (!dialog)
2863 return; 2865 return;
2864 2866
2865 dialog->Field1->setText(getFieldLabel (category, "1", tr("Name"))); 2867 dialog->Field1->setText(getFieldLabel (category, "1", tr("Name")));
2866 dialog->Field2->setText(getFieldLabel (category, "2", tr("Username"))); 2868 dialog->Field2->setText(getFieldLabel (category, "2", tr("Username")));
2867 dialog->Field3->setText(getFieldLabel (category, "3", tr("Password"))); 2869 dialog->Field3->setText(getFieldLabel (category, "3", tr("Password")));
2868 dialog->Field4->setText(getFieldLabel (category, "4", tr("Comment"))); 2870 dialog->Field4->setText(getFieldLabel (category, "4", tr("Comment")));
2869 dialog->Field5->setText(getFieldLabel (category, "5", tr("Field 4"))); 2871 dialog->Field5->setText(getFieldLabel (category, "5", tr("Field 4")));
2870 dialog->Field6->setText(getFieldLabel (category, "6", tr("Field 5"))); 2872 dialog->Field6->setText(getFieldLabel (category, "6", tr("Field 5")));
2871 2873
2872 QString icon; 2874 QString icon;
2873 Category *cat= categories.find (category); 2875 Category *cat= categories.find (category);
2874 if (cat) 2876 if (cat)
2875 { 2877 {
2876 icon = cat->getIconName(); 2878 icon = cat->getIconName();
2877 } 2879 }
2880 else
2881 icon = conf->readEntry(APP_KEY+category);
2878 2882
2879#ifdef DESKTOP 2883#ifdef DESKTOP
2880 QDir d(iconPath); 2884 QDir d(iconPath);
2881#else 2885#else
2882 QDir d(QPEApplication::qpeDir() + "/pics/"); 2886 QDir d(QPEApplication::qpeDir() + "/pics/");
2883#endif 2887#endif
2884 d.setFilter( QDir::Files); 2888 d.setFilter( QDir::Files);
2885 2889
2886 const QFileInfoList *list = d.entryInfoList(); 2890 const QFileInfoList *list = d.entryInfoList();
2887 int i=0; 2891 int i=0;
2888 QFileInfoListIterator it( *list ); // create list iterator 2892 QFileInfoListIterator it( *list ); // create list iterator
2889 QFileInfo *fi; // pointer for traversing 2893 QFileInfo *fi; // pointer for traversing
2890 if (icon.isEmpty() || icon.isNull()) 2894 if (icon.isEmpty() || icon.isNull())
2891 { 2895 {
2892 dialog->IconField->setCurrentItem(0); 2896 dialog->IconField->setCurrentItem(0);
2893 } 2897 }