Summary: | missing file kbabel.defaultproject inhibits the user from updating the identity | ||
---|---|---|---|
Product: | kbabel | Reporter: | Thomas Reitelbach <tr> |
Component: | general | Assignee: | Stanislav Visnovsky <visnovsky> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nicolasg |
Priority: | NOR | ||
Version: | 1.11.2 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Try to fix the dialog for a missing default project
Fix project handling when default project is missing |
Description
Thomas Reitelbach
2006-06-10 12:30:19 UTC
I can confirm. It is enough to rename the kbabel.defaultproject file to get that bug (even if in that case, you do not get the dialog at startup, but you cannot change the project setting). Have a nice day! SVN commit 554679 by goutte: Allow to open empty files as KBabel project files CCBUG:128939 (That is not exactly the same bug, but it has the same symptom.) M +12 -1 kbproject.cpp --- branches/KDE/3.5/kdesdk/kbabel/common/kbproject.cpp #554678:554679 @@ -66,8 +66,19 @@ // first, for existing file check the MIME type // it has to be text file KMimeType::Ptr mime = KMimeType::findByURL( KURL::fromPathOrURL( file ) ); - if( mime->name() != "text/plain" ) + + if ( mime->name() == "text/plain" ) + { + // Plain text, no problem! + } + else if ( mime->name() == "application/x-zerosize" ) + { + // Empty files are allowed too + kdWarning() << "Empty KBabel project file!" << endl; + } + else { + // Unknown mime type, abort! // ### TODO: should the user not be asked instead? kdWarning () << "File type is " << mime->name() << endl; return; Created attachment 16779 [details]
Try to fix the dialog for a missing default project
The patch does not work, as the project configuration dialog show gray entries.
Created attachment 18605 [details]
Fix project handling when default project is missing
Please try the appended patch. It should fix all problems related to a missing
default project file.
I can confirm that the bug is fixed by the patch provided by Stephan Johach. I'd like to see the fix in SVN :) Thanks :) SVN commit 606520 by johach: Fix problems when no default project is found. KBabel used a KDE function which returns a null string if the requested file does not exist. That lead to some strange problems with disabled project configuration settings. BUG:128939 M +12 -8 catalogmanager/catalogmanager.cpp M +2 -1 catalogmanager/catalogmanager.h M +3 -1 catalogmanager/main.cpp M +3 -0 common/catalog.cpp M +1 -3 common/catalog.h M +1 -0 common/catalogitem.cpp M +4 -1 common/kbproject.cpp M +9 -0 common/kbprojectmanager.cpp M +2 -0 common/kbprojectmanager.h M +0 -1 common/resources.h M +1 -0 kbabel/hidingmsgedit.cpp M +18 -13 kbabel/kbabel.cpp M +2 -2 kbabel/kbabel.h M +12 -9 kbabel/main.cpp M +1 -1 kbabel/mymultilineedit.cpp |