OSSP CVS Repository

ossp - Check-in [4033]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4033
Date: 2003-Feb-13 22:12:36 (local)
2003-Feb-13 21:12:36 (UTC)
User:ms
Branch:
Comment: Remove default event file insert, and instead default to event directory.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/as_assist.cpp      1.103 -> 1.104     1 inserted, 1 deleted
ossp-pkg/as/as-gui/as_const.h      1.52 -> 1.53     2 inserted, 2 deleted
ossp-pkg/as/as-gui/as_panel.cpp      1.5 -> 1.6     3 inserted, 3 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.121 -> 1.122     5 inserted, 17 deleted

ossp-pkg/as/as-gui/as_assist.cpp 1.103 -> 1.104

--- as_assist.cpp        2003/02/13 19:49:02     1.103
+++ as_assist.cpp        2003/02/13 21:12:36     1.104
@@ -105,7 +105,7 @@
 
         m_pPrefs->setNumber(TITRAQ_PREFSTYLE, TITRAQ_STYLECDE);
         m_pPrefs->setString(TITRAQ_PREFACCOUNTS, TITRAQ_DEFACCOUNTS);
-        m_pPrefs->setString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE);
+        m_pPrefs->setString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR);
         m_pPrefs->setString(TITRAQ_PREFVIEW, TITRAQ_DEFVIEW);
         m_pPrefs->setNumber(TITRAQ_PREFSORTCOL, TITRAQ_DEFSORTCOL);
         m_pPrefs->setBool(TITRAQ_PREFSORTDIR, TITRAQ_DEFSORTDIR);


ossp-pkg/as/as-gui/as_const.h 1.52 -> 1.53

--- as_const.h   2003/02/13 20:41:37     1.52
+++ as_const.h   2003/02/13 21:12:36     1.53
@@ -43,8 +43,8 @@
 #define TITRAQ_DEFHOME          "."
 #define TITRAQ_PREFUSER         "user"
 #define TITRAQ_DEFUSER          "username"
-#define TITRAQ_PREFASFILE       "asfile"
-#define TITRAQ_DEFASFILE        "~/.as/events"
+#define TITRAQ_PREFASDIR        "asdir"
+#define TITRAQ_DEFASDIR         "~/.as/"
 #define TITRAQ_PREFACCOUNTS     "accounts"
 #define TITRAQ_DEFACCOUNTS      "~/.as/accounts"
 #define TITRAQ_PREFSTYLE        "uistyle"


ossp-pkg/as/as-gui/as_panel.cpp 1.5 -> 1.6

--- as_panel.cpp 2003/02/12 19:33:05     1.5
+++ as_panel.cpp 2003/02/13 21:12:36     1.6
@@ -133,7 +133,7 @@
     m_pGeninner->addWidget(m_pAcctlabel, 0, 0);
     m_pAcctline = new QLineEdit(m_pGenbox, "Accountline");
     m_pGeninner->addWidget(m_pAcctline, 0, 1);
-    m_pEventlabel = new QLabel(m_pGenbox, "Evntfilelabel");
+    m_pEventlabel = new QLabel(m_pGenbox, "Evntdirlabel");
     m_pGeninner->addWidget(m_pEventlabel, 1, 0);
     m_pEventline = new QLineEdit(m_pGenbox, "Eventline");
     m_pGeninner->addWidget(m_pEventline, 1, 1);
@@ -242,11 +242,11 @@
 
     m_pGenbox->setTitle(tr("File and directory paths", "Comment for Genbox"));
     m_pAcctlabel->setText(tr("Accounts path", "Comment for Acctlabel"));
-    m_pEventlabel->setText(tr("Events path", "Comment for Eventlabel"));
+    m_pEventlabel->setText(tr("Events directory", "Comment for Eventlabel"));
     m_pUserlabel->setText(tr("User name", "Comment for Userlabel"));
     m_pHomelabel->setText(tr("Home directory", "Comment for Homelabel"));
     QToolTip::add(m_pAcctline, tr("The accounts file pathname", "Comment for toolTip Acctline"));
-    QToolTip::add(m_pEventline, tr("The events file pathname", "Comment for toolTip Eventline"));
+    QToolTip::add(m_pEventline, tr("The default events directory", "Comment for toolTip Eventline"));
     QToolTip::add(m_pUserline, tr("The user name", "Comment for toolTip Userline"));
     QToolTip::add(m_pHomeline, tr("The home directory", "Comment for toolTip Homeline"));
 


ossp-pkg/as/as-gui/as_slot.cpp 1.121 -> 1.122

--- as_slot.cpp  2003/02/13 20:41:37     1.121
+++ as_slot.cpp  2003/02/13 21:12:36     1.122
@@ -397,14 +397,10 @@
 //
     if (!m_pMaintable->isDirty() || nResult == 1) { // Check modification state
         // Make sure we correctly get the name of the default file to open
-        QString Openas = m_pPrefs->getString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE);
+        QString Openas = m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR);
         if (Openas.startsWith(TITRAQ_HOMEDIRTOK))
             Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1);
 
-        // Conditionally use a unique extension like '.as' if user prefers
-        if (m_pPrefs->getBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON))
-            Openas += TITRAQ_FEXTENSION;
-
         // This dialog asks which file the user wants to open
         QString Filestring = QFileDialog::getOpenFileName(Openas,
             trUtf8("Accounting Data (*.as);;Text files (*.txt);;All Files (*)"),
@@ -478,14 +474,10 @@
     int nResult = 0; // For checking user's answer
 
     // Make sure we correctly get the name of the default file to open
-    QString Openas = m_pPrefs->getString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE);
+    QString Openas = m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR);
     if (Openas.startsWith(TITRAQ_HOMEDIRTOK))
         Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1);
 
-    // Conditionally use a unique extension like '.as' if user prefers
-    if (m_pPrefs->getBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON))
-        Openas += TITRAQ_FEXTENSION;
-
     // 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()) {
@@ -528,14 +520,10 @@
     int nResult = 0; // For checking user's answer
 
     // Make sure we correctly get the name of the default file to open
-    QString Openas = m_pPrefs->getString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE);
+    QString Openas = m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR);
     if (Openas.startsWith(TITRAQ_HOMEDIRTOK))
         Openas = QDir::homeDirPath() + Openas.remove(0, QString(TITRAQ_HOMEDIRTOK).length() - 1);
 
-    // Conditionally use a unique extension like '.as' if user prefers
-    if (m_pPrefs->getBool(TITRAQ_PREFEXTENDON, TITRAQ_DEFEXTENDON))
-        Openas += TITRAQ_FEXTENSION;
-
     nResult = 1;            // We loop on this dialog only if an indecisive user
     while (nResult > 0) {   // is hesitant to overwrite a file over and over again
         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);
@@ -1137,7 +1125,7 @@
 
     // Set default values to appear in initialized panel widgets
     pUserpanel->setAccounts(m_pPrefs->getString(TITRAQ_PREFACCOUNTS, TITRAQ_DEFACCOUNTS));
-    pUserpanel->setEvents(m_pPrefs->getString(TITRAQ_PREFASFILE, TITRAQ_DEFASFILE));
+    pUserpanel->setEvents(m_pPrefs->getString(TITRAQ_PREFASDIR, TITRAQ_DEFASDIR));
     pUserpanel->setUser(m_pPrefs->getString(TITRAQ_PREFUSER, TITRAQ_DEFUSER));
     pUserpanel->setHome(m_pPrefs->getString(TITRAQ_PREFHOME, TITRAQ_DEFHOME));
     pUserpanel->setCorbahost(m_pPrefs->getString(TITRAQ_PREFCORBHOST, TITRAQ_DEFCORBHOST));
@@ -1185,7 +1173,7 @@
     // Modal panel handler
     if (pUserpanel->exec() == QDialog::Accepted) {
         m_pPrefs->setString(TITRAQ_PREFACCOUNTS, pUserpanel->getAccounts());
-        m_pPrefs->setString(TITRAQ_PREFASFILE, pUserpanel->getEvents());
+        m_pPrefs->setString(TITRAQ_PREFASDIR, pUserpanel->getEvents());
         m_pPrefs->setString(TITRAQ_PREFUSER, pUserpanel->getUser());
         m_pPrefs->setString(TITRAQ_PREFHOME, pUserpanel->getHome());
         m_pPrefs->setString(TITRAQ_PREFCORBHOST, pUserpanel->getCorbahost());

CVSTrac 2.0.1