Index: ossp-pkg/as/as-gui/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/ChangeLog,v rcsdiff -q -kk '-r1.11' '-r1.12' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/ChangeLog,v' 2>/dev/null --- ChangeLog 2003/01/24 16:32:18 1.11 +++ ChangeLog 2003/01/24 18:22:03 1.12 @@ -4,6 +4,7 @@ Removed sort on load to allow easier file diffs Allow only reasonable fields to transmit to server Improved invalid data signaling in both Titable and ctrls + Made account and event file and directory handling generic 030123 Added logic to make IIOP and SOAP connections optional Fixed potentially disastrous bug with current file overwrite Index: ossp-pkg/as/as-gui/as_assist.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v rcsdiff -q -kk '-r1.83' '-r1.84' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_assist.cpp,v' 2>/dev/null --- as_assist.cpp 2003/01/24 16:32:18 1.83 +++ as_assist.cpp 2003/01/24 18:22:03 1.84 @@ -52,6 +52,7 @@ #include #include #include +#include // User interface #include "as_gui.h" // Main classes @@ -837,7 +838,7 @@ // Configure attributes m_pAmount->setButtonSymbols(QSpinBox::PlusMinus); - m_pAmount->setSuffix(trUtf8(" Minutes")); + m_pAmount->setSuffix(trUtf8(" Mins")); m_pAmount->setEnabled(false); // m_pAmount->setSpecialValueText(trUtf8("In progress")); @@ -855,8 +856,11 @@ throw Genexcept("Main window task entries creation failed."); // Populate the stringlist with fresh accounts, taken from filename in prefs - QFile Filetemp(m_pPrefs->getString(TITRAQ_PREFACCOUNTS, TITRAQ_PREFACCOUNTS)); - this->loadAccounts(Filetemp); // Load account helper method + QString Asdir = m_pPrefs->getString(TITRAQ_PREFACCOUNTS, TITRAQ_DEFACCOUNTS); + if (Asdir.startsWith(TITRAQ_HOMEDIRTOK)) + Asdir = QDir::homeDirPath() + Asdir.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1); + QFile Filetemp(Asdir); + this->loadAccounts(Filetemp); // Load account helper method // Make the combobox task edit m_pTasks = new QComboBox(true, m_pCenframe, "Tasks"); Index: ossp-pkg/as/as-gui/as_const.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_const.h,v rcsdiff -q -kk '-r1.33' '-r1.34' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_const.h,v' 2>/dev/null --- as_const.h 2002/12/20 17:42:10 1.33 +++ as_const.h 2003/01/24 18:22:03 1.34 @@ -44,9 +44,9 @@ #define TITRAQ_PREFUSER "user" #define TITRAQ_DEFUSER "username" #define TITRAQ_PREFASFILE "asfile" -#define TITRAQ_DEFASFILE "/e/dev/as" +#define TITRAQ_DEFASFILE "~/.as/events.as" #define TITRAQ_PREFACCOUNTS "accounts" -#define TITRAQ_DEFACCOUNTS "/e/dev/as/accounts.txt" +#define TITRAQ_DEFACCOUNTS "~/.as/accounts" #define TITRAQ_PREFSTYLE "uistyle" #define TITRAQ_PREFVIEW "view" #define TITRAQ_DEFVIEW "normal" @@ -108,9 +108,9 @@ #define TITRAQ_PREFFCOLWIDTH "finishcolwidth" #define TITRAQ_DEFFCOLWIDTH 80 #define TITRAQ_PREFACOLWIDTH "amountcolwidth" -#define TITRAQ_DEFACOLWIDTH 98 +#define TITRAQ_DEFACOLWIDTH 72 #define TITRAQ_PREFTCOLWIDTH "taskcolwidth" -#define TITRAQ_DEFTCOLWIDTH 96 +#define TITRAQ_DEFTCOLWIDTH 148 #define TITRAQ_PREFREMCOLWIDTH "remarkcolwidth" #define TITRAQ_DEFREMCOLWIDTH 120 @@ -133,6 +133,7 @@ // Other string constants #define TITRAQ_DATEZERO "0000-00-00" #define TITRAQ_SEPARATORTOK " " +#define TITRAQ_HOMEDIRTOK "~/" #define TITRAQ_SAVEFIRST "The timesheet contains unsaved changes\nDo you want to save the changes or discard them?" #define TITRAQ_OVERWRITE "A file already exists with the chosen name\nDo you want to overwrite it with new data?" Index: ossp-pkg/as/as-gui/as_slot.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v rcsdiff -q -kk '-r1.85' '-r1.86' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v' 2>/dev/null --- as_slot.cpp 2003/01/24 16:32:18 1.85 +++ as_slot.cpp 2003/01/24 18:22:03 1.86 @@ -283,7 +283,13 @@ void Titraqform::openDoc(void) { int nResult = 0; // Holds return value from save first messagebox - QString Filestring = QFileDialog::getOpenFileName(m_pPrefs->getString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE), trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"), this, trUtf8("ChooserDialog"), trUtf8("Choose a file to open"), NULL, false); + + // Make sure we correctly get the name of the default file to open + QString Openas = m_pPrefs->getString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE); + if (Openas.startsWith(TITRAQ_HOMEDIRTOK)) + Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1); + + QString Filestring = QFileDialog::getOpenFileName(Openas, trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"), this, trUtf8("ChooserDialog"), trUtf8("Choose a file to open"), NULL, false); if (!Filestring.isEmpty()) { QFile Filetemp(Filestring); // File to load @@ -373,8 +379,13 @@ { int nResult = 0; // For checking user's answer - // First get the selected file name to save to - QString Filestring = QFileDialog::getSaveFileName(m_pPrefs->getString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE), trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"), this, trUtf8("ChooserDialog"), trUtf8("Choose a file to save"), NULL, false); + // Make sure we correctly get the name of the default file to open + QString Openas = m_pPrefs->getString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE); + if (Openas.startsWith(TITRAQ_HOMEDIRTOK)) + Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1); + + // And then get the name of the selected file to save to + QString Filestring = QFileDialog::getSaveFileName(Openas, trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"), this, trUtf8("ChooserDialog"), trUtf8("Choose a file to save"), NULL, false); if (!Filestring.isEmpty()) { if (QFile::exists(Filestring)) { nResult = QMessageBox::warning(this, trUtf8(TITRAQ_APPTITLE),