summaryrefslogtreecommitdiff
authorzecke <zecke>2003-02-11 17:26:51 (UTC)
committer zecke <zecke>2003-02-11 17:26:51 (UTC)
commit99ccdda218112cfb0f7371fa05d7a696b8da1c40 (patch) (unidiff)
tree64d46b22de7acbccbc2ee73c406be7645ff693c3
parentdf37010a49dfa9624c9600e4ed838ec7aade1b31 (diff)
downloadopie-99ccdda218112cfb0f7371fa05d7a696b8da1c40.zip
opie-99ccdda218112cfb0f7371fa05d7a696b8da1c40.tar.gz
opie-99ccdda218112cfb0f7371fa05d7a696b8da1c40.tar.bz2
fix bug 0000591
AppLnk does not need to reload all labels but it needs to reload the names for the ids in mCat
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/applnk.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index 5763c62..35822dd 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -86,13 +86,17 @@ public:
86 QMap<int, QPixmap> mPixmaps; 86 QMap<int, QPixmap> mPixmaps;
87 87
88 void updateCatListFromArray() 88 void updateCatListFromArray()
89 { 89 {
90 Categories cat( 0 ); 90 Categories cat( 0 );
91 cat.load( categoryFileName() ); 91 cat.load( categoryFileName() );
92 mCatList = cat.labels("Document View",mCat); 92 // we need to update the names for the mCat... to mCatList
93 mCatList.clear();
94 for (uint i = 0; i < mCat.count(); i++ )
95 mCatList << cat.label("Document View", mCat[i] );
96
93 } 97 }
94 98
95 void setCatArrayDirty() 99 void setCatArrayDirty()
96 { 100 {
97 mCat.resize(0); 101 mCat.resize(0);
98 } 102 }
@@ -403,12 +407,13 @@ AppLnk::AppLnk( const QString &file )
403 } 407 }
404 mId = 0; 408 mId = 0;
405} 409}
406 410
407AppLnk& AppLnk::operator=(const AppLnk &copy) 411AppLnk& AppLnk::operator=(const AppLnk &copy)
408{ 412{
413 if ( this == &copy ) return *this;
409 if ( mId ) 414 if ( mId )
410 qWarning("Deleting AppLnk that is in an AppLnkSet"); 415 qWarning("Deleting AppLnk that is in an AppLnkSet");
411 if ( d ) 416 if ( d )
412 delete d; 417 delete d;
413 418
414 419
@@ -847,13 +852,13 @@ void AppLnk::storeLink() const
847 config.writeEntry("Name",mName); 852 config.writeEntry("Name",mName);
848 if ( !mIconFile.isNull() ) config.writeEntry("Icon",mIconFile); 853 if ( !mIconFile.isNull() ) config.writeEntry("Icon",mIconFile);
849 config.writeEntry("Type",type()); 854 config.writeEntry("Type",type());
850 if(!rotation().isEmpty()) 855 if(!rotation().isEmpty())
851 config.writeEntry("Rotation",rotation()); 856 config.writeEntry("Rotation",rotation());
852 else 857 else
853 config.removeEntry("Rotation"); 858 config.removeEntry("Rotation");
854 if ( !mComment.isNull() ) config.writeEntry("Comment",mComment); 859 if ( !mComment.isNull() ) config.writeEntry("Comment",mComment);
855 QString f = file(); 860 QString f = file();
856 int i = 0; 861 int i = 0;
857 while ( i < (int)f.length() && i < (int)mLinkFile.length() && f[i] == mLinkFile[i] ) 862 while ( i < (int)f.length() && i < (int)mLinkFile.length() && f[i] == mLinkFile[i] )
858 i++; 863 i++;
859 while ( i && f[i] != '/' ) 864 while ( i && f[i] != '/' )