OSSP CVS Repository

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

Check-in Number: 3866
Date: 2002-Dec-12 21:52:13 (local)
2002-Dec-12 20:52:13 (UTC)
User:ms
Branch:
Comment: Many layout and preference changes to support more flexibility.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/TODO      1.38 -> 1.39     1 inserted, 0 deleted
ossp-pkg/as/as-gui/as_assist.cpp      1.62 -> 1.63     35 inserted, 23 deleted
ossp-pkg/as/as-gui/as_const.h      1.21 -> 1.22     57 inserted, 27 deleted
ossp-pkg/as/as-gui/as_gui.cpp      1.28 -> 1.29     11 inserted, 10 deleted
ossp-pkg/as/as-gui/as_slot.cpp      1.53 -> 1.54     53 inserted, 23 deleted

ossp-pkg/as/as-gui/TODO 1.38 -> 1.39

--- TODO 2002/12/12 17:14:49     1.38
+++ TODO 2002/12/12 20:52:13     1.39
@@ -38,6 +38,7 @@
 Change default config location to homedir, with --confgen option
 Quitting is the same as closing the (only) window
 IDs in as_const.h much better choosing, so they make sense
+Preserve main window geo and dock pos with << operators
 
 Beim Editmodus
 ---------------


ossp-pkg/as/as-gui/as_assist.cpp 1.62 -> 1.63

--- as_assist.cpp        2002/12/12 18:48:16     1.62
+++ as_assist.cpp        2002/12/12 20:52:13     1.63
@@ -492,22 +492,33 @@
     // Table header row
     m_pTablehead = m_pMaintable->horizontalHeader();
     m_pMaintable->setHScrollBarMode(QScrollView::AlwaysOff);
-    m_pTablehead->setLabel(TITRAQ_IDXSTATUS, QObject::trUtf8("Stat"), 24);
+    m_pTablehead->setLabel(TITRAQ_IDXSTATUS, QObject::trUtf8("Stat"),
+        m_pPrefs->getNumber(TITRAQ_PREFSTATCOLWIDTH, TITRAQ_DEFSTATCOLWIDTH));
     m_pMaintable->setColumnReadOnly (TITRAQ_IDXSTATUS, true);
-    m_pTablehead->setLabel(TITRAQ_IDXLINE, QObject::trUtf8("Line"), 32);
+    m_pTablehead->setLabel(TITRAQ_IDXLINE, QObject::trUtf8("Line"),
+        m_pPrefs->getNumber(TITRAQ_PREFLCOLWIDTH, TITRAQ_DEFLCOLWIDTH));
     m_pMaintable->setColumnReadOnly (TITRAQ_IDXLINE, true);
-    m_pTablehead->setLabel(TITRAQ_IDXUSER, QObject::trUtf8("User"), 32);
-    m_pTablehead->setLabel(TITRAQ_IDXGUID, QObject::trUtf8("GUID"), 36);
+    m_pTablehead->setLabel(TITRAQ_IDXUSER, QObject::trUtf8("User"),
+        m_pPrefs->getNumber(TITRAQ_PREFUCOLWIDTH, TITRAQ_DEFUCOLWIDTH));
+    m_pTablehead->setLabel(TITRAQ_IDXGUID, QObject::trUtf8("GUID"),
+        m_pPrefs->getNumber(TITRAQ_PREFGCOLWIDTH, TITRAQ_DEFGCOLWIDTH));
     m_pMaintable->setColumnReadOnly (TITRAQ_IDXGUID, true);
-    m_pTablehead->setLabel(TITRAQ_IDXCRC, QObject::trUtf8("CRC"), 32);
+    m_pTablehead->setLabel(TITRAQ_IDXCRC, QObject::trUtf8("CRC"),
+        m_pPrefs->getNumber(TITRAQ_PREFCCOLWIDTH, TITRAQ_DEFCCOLWIDTH));
     m_pMaintable->setColumnReadOnly (TITRAQ_IDXCRC, true);
-    m_pTablehead->setLabel(TITRAQ_IDXREV, QObject::trUtf8("Rev"), 32);
+    m_pTablehead->setLabel(TITRAQ_IDXREV, QObject::trUtf8("Rev"),
+        m_pPrefs->getNumber(TITRAQ_PREFREVCOLWIDTH, TITRAQ_DEFREVCOLWIDTH));
     m_pMaintable->setColumnReadOnly (TITRAQ_IDXREV, true);
-    m_pTablehead->setLabel(TITRAQ_IDXDATE, QObject::trUtf8("Date"), 94);
-    m_pTablehead->setLabel(TITRAQ_IDXSTART, QObject::trUtf8("Begin"), 80);
-    m_pTablehead->setLabel(TITRAQ_IDXFINISH, QObject::trUtf8("End"), 80);
-    m_pTablehead->setLabel(TITRAQ_IDXAMOUNT, QObject::trUtf8("Amount"), 98);
-    m_pTablehead->setLabel(TITRAQ_IDXTASK, QObject::trUtf8("Task"), 96);
+    m_pTablehead->setLabel(TITRAQ_IDXDATE, QObject::trUtf8("Date"),
+        m_pPrefs->getNumber(TITRAQ_PREFDCOLWIDTH, TITRAQ_DEFDCOLWIDTH));
+    m_pTablehead->setLabel(TITRAQ_IDXSTART, QObject::trUtf8("Begin"),
+        m_pPrefs->getNumber(TITRAQ_PREFSTARTCOLWIDTH, TITRAQ_DEFSTARTCOLWIDTH));
+    m_pTablehead->setLabel(TITRAQ_IDXFINISH, QObject::trUtf8("End"),
+        m_pPrefs->getNumber(TITRAQ_PREFFCOLWIDTH, TITRAQ_DEFFCOLWIDTH));
+    m_pTablehead->setLabel(TITRAQ_IDXAMOUNT, QObject::trUtf8("Amount"),
+        m_pPrefs->getNumber(TITRAQ_PREFACOLWIDTH, TITRAQ_DEFACOLWIDTH));
+    m_pTablehead->setLabel(TITRAQ_IDXTASK, QObject::trUtf8("Task"),
+        m_pPrefs->getNumber(TITRAQ_PREFTCOLWIDTH, TITRAQ_DEFTCOLWIDTH));
     m_pTablehead->setLabel(TITRAQ_IDXREMARK, QObject::trUtf8("Remark"));
 
     m_pPackagelayout->addWidget(m_pMaintable);  // Finally add the damn table
@@ -786,31 +797,32 @@
 void Titraqform::setupColumns(void)
 {
     // Handle column view handling presets and defaults
-    if (!m_pPrefs->getBool(TITRAQ_PREFSTATCOL, TITRAQ_DEFSTATCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFSTATCOLON, TITRAQ_DEFSTATCOLON))
         showStatcol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFLCOL, TITRAQ_DEFLCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFLCOLON, TITRAQ_DEFLCOLON))
         showLinecol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFUCOL, TITRAQ_DEFUCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFUCOLON, TITRAQ_DEFUCOLON))
         showUsercol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFGCOL, TITRAQ_DEFGCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFGCOLON, TITRAQ_DEFGCOLON))
         showGuidcol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFCCOL, TITRAQ_DEFCCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFCCOLON, TITRAQ_DEFCCOLON))
         showCrccol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFREVCOL, TITRAQ_DEFREVCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFREVCOLON, TITRAQ_DEFREVCOLON))
         showRevcol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFDCOL, TITRAQ_DEFDCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFDCOLON, TITRAQ_DEFDCOLON))
         showDatecol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFSTARTCOL, TITRAQ_DEFSTARTCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFSTARTCOLON, TITRAQ_DEFSTARTCOLON))
         showStartcol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFFCOL, TITRAQ_DEFFCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFFCOLON, TITRAQ_DEFFCOLON))
         showFinishcol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFACOL, TITRAQ_DEFACOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFACOLON, TITRAQ_DEFACOLON))
         showAmountcol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFTCOL, TITRAQ_DEFTCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFTCOLON, TITRAQ_DEFTCOLON))
         showTaskcol();
-    if (!m_pPrefs->getBool(TITRAQ_PREFREMCOL, TITRAQ_DEFREMCOL))
+    if (!m_pPrefs->getBool(TITRAQ_PREFREMCOLON, TITRAQ_DEFREMCOLON))
         showRemarkcol();
 
+    // Handle tool bar view handling presets and defaults
     if (!m_pPrefs->getBool(TITRAQ_PREFFILEBAR, TITRAQ_DEFFILEBAR)) {
         m_pFiletools->hide();
         m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR), false);


ossp-pkg/as/as-gui/as_const.h 1.21 -> 1.22

--- as_const.h   2002/12/12 12:45:46     1.21
+++ as_const.h   2002/12/12 20:52:13     1.22
@@ -49,31 +49,63 @@
 #define TITRAQ_PREFLOCALLOG     "loglocal"
 #define TITRAQ_DEFLOCALLOG      "no"
 
-// Column view preferences
-#define TITRAQ_PREFSTATCOL      "statcol"
-#define TITRAQ_DEFSTATCOL       true
-#define TITRAQ_PREFLCOL         "linecol"
-#define TITRAQ_DEFLCOL          true
-#define TITRAQ_PREFUCOL         "usercol"
-#define TITRAQ_DEFUCOL          false
-#define TITRAQ_PREFGCOL         "guidcol"
-#define TITRAQ_DEFGCOL          false
-#define TITRAQ_PREFCCOL         "crccol"
-#define TITRAQ_DEFCCOL          false
-#define TITRAQ_PREFREVCOL       "revcol"
-#define TITRAQ_DEFREVCOL        false
-#define TITRAQ_PREFDCOL         "datecol"
-#define TITRAQ_DEFDCOL          true
-#define TITRAQ_PREFSTARTCOL     "startcol"
-#define TITRAQ_DEFSTARTCOL      false
-#define TITRAQ_PREFFCOL         "finishcol"
-#define TITRAQ_DEFFCOL          false
-#define TITRAQ_PREFACOL         "amountcol"
-#define TITRAQ_DEFACOL          true
-#define TITRAQ_PREFTCOL         "taskcol"
-#define TITRAQ_DEFTCOL          true
-#define TITRAQ_PREFREMCOL       "remarkcol"
-#define TITRAQ_DEFREMCOL        true
+// Column show preferences
+#define TITRAQ_PREFSTATCOLON    "statcolshow"
+#define TITRAQ_DEFSTATCOLON     true
+#define TITRAQ_PREFLCOLON       "linecolshow"
+#define TITRAQ_DEFLCOLON        true
+#define TITRAQ_PREFUCOLON       "usercolshow"
+#define TITRAQ_DEFUCOLON        false
+#define TITRAQ_PREFGCOLON       "guidcolshow"
+#define TITRAQ_DEFGCOLON        false
+#define TITRAQ_PREFCCOLON       "crccolshow"
+#define TITRAQ_DEFCCOLON        false
+#define TITRAQ_PREFREVCOLON     "revcolshow"
+#define TITRAQ_DEFREVCOLON      false
+#define TITRAQ_PREFDCOLON       "datecolshow"
+#define TITRAQ_DEFDCOLON        true
+#define TITRAQ_PREFSTARTCOLON   "startcolshow"
+#define TITRAQ_DEFSTARTCOLON    false
+#define TITRAQ_PREFFCOLON       "finishcolshow"
+#define TITRAQ_DEFFCOLON        false
+#define TITRAQ_PREFACOLON       "amountcolshow"
+#define TITRAQ_DEFACOLON        true
+#define TITRAQ_PREFTCOLON       "taskcolshow"
+#define TITRAQ_DEFTCOLON        true
+#define TITRAQ_PREFREMCOLON     "remarkcolshow"
+#define TITRAQ_DEFREMCOLON      true
+
+// Frame geometry preferences
+#define TITRAQ_PREFFRAMEWIDTH   "framewidth"
+#define TITRAQ_DEFFRAMEWIDTH    640
+#define TITRAQ_PREFFRAMEHEIGHT  "frameheight"
+#define TITRAQ_DEFFRAMEHEIGHT   480
+
+// Column width preferences
+#define TITRAQ_PREFSTATCOLWIDTH   "statcolwidth"
+#define TITRAQ_DEFSTATCOLWIDTH    24
+#define TITRAQ_PREFLCOLWIDTH      "linecolwidth"
+#define TITRAQ_DEFLCOLWIDTH       32
+#define TITRAQ_PREFUCOLWIDTH      "usercolwidth"
+#define TITRAQ_DEFUCOLWIDTH       32
+#define TITRAQ_PREFGCOLWIDTH      "guidcolwidth"
+#define TITRAQ_DEFGCOLWIDTH       36
+#define TITRAQ_PREFCCOLWIDTH      "crccolwidth"
+#define TITRAQ_DEFCCOLWIDTH       32
+#define TITRAQ_PREFREVCOLWIDTH    "revcolwidth"
+#define TITRAQ_DEFREVCOLWIDTH     32
+#define TITRAQ_PREFDCOLWIDTH      "datecolwidth"
+#define TITRAQ_DEFDCOLWIDTH       94
+#define TITRAQ_PREFSTARTCOLWIDTH  "startcolwidth"
+#define TITRAQ_DEFSTARTCOLWIDTH   80
+#define TITRAQ_PREFFCOLWIDTH      "finishcolwidth"
+#define TITRAQ_DEFFCOLWIDTH       80
+#define TITRAQ_PREFACOLWIDTH      "amountcolwidth"
+#define TITRAQ_DEFACOLWIDTH       98
+#define TITRAQ_PREFTCOLWIDTH      "taskcolwidth"
+#define TITRAQ_DEFTCOLWIDTH       96
+#define TITRAQ_PREFREMCOLWIDTH    "remarkcolwidth"
+#define TITRAQ_DEFREMCOLWIDTH     120
 
 #define TITRAQ_PREFFILEBAR      "filetoolbar"
 #define TITRAQ_DEFFILEBAR       true
@@ -123,8 +155,6 @@
 #define TITRAQ_IDXWHATBAR       3
 
 // Values
-#define TITRAQ_MAINWINWIDTH     640         // Default main window width
-#define TITRAQ_MAINWINHEIGHT    480         // Default main window height
 #define TITRAQ_MARGIN           10          // Default layout margin
 #define TITRAQ_SPACING          6           // Default layout spacing
 #define TITRAQ_NUMBLOCKS        32          // Block size of a timesheet


ossp-pkg/as/as-gui/as_gui.cpp 1.28 -> 1.29

--- as_gui.cpp   2002/12/12 13:35:45     1.28
+++ as_gui.cpp   2002/12/12 20:52:13     1.29
@@ -45,16 +45,6 @@
     this->setDirty(false);
     m_szFilename = new QString();
 
-    // Initial widget manipulations
-    if (!kszName)
-        setName(trUtf8("Titraqform"));
-    resize(TITRAQ_MAINWINWIDTH, TITRAQ_MAINWINHEIGHT);
-    setCaption("OSSP Titraq");
-
-//    // Lock down window size
-//    setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0,
-//        (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth()));
-
     try {
         setupPrefs();           // Load general preferences
         setupActions();         // Create and initialize actions
@@ -71,6 +61,17 @@
         exit(1);
     }
 
+    // Initial widget manipulations
+    if (!kszName)
+        setName(trUtf8("Titraqform"));
+    resize(m_pPrefs->getNumber(TITRAQ_PREFFRAMEWIDTH, TITRAQ_DEFFRAMEWIDTH),
+        m_pPrefs->getNumber(TITRAQ_PREFFRAMEHEIGHT, TITRAQ_DEFFRAMEHEIGHT));
+    setCaption("OSSP Titraq");
+
+//    // Lock down window size
+//    setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0,
+//        (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth()));
+
     m_pStatbar->message(trUtf8("Ready"));   // Signal a ready condition
 }
 


ossp-pkg/as/as-gui/as_slot.cpp 1.53 -> 1.54

--- as_slot.cpp  2002/12/12 16:18:54     1.53
+++ as_slot.cpp  2002/12/12 20:52:13     1.54
@@ -376,27 +376,27 @@
 {
     switch (nSection) {
     case TITRAQ_IDXALLCTRLS:
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) > 0)
             m_pStatusedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTATUS) - TITRAQ_SPACING);
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) > 0)
             m_pLineedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXLINE) - TITRAQ_SPACING);
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) > 0)
             m_pUseredit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXUSER) - TITRAQ_SPACING);
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) > 0)
             m_pGuidedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXGUID) - TITRAQ_SPACING);
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) > 0)
             m_pCrcedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXCRC) - TITRAQ_SPACING);
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) > 0)
             m_pRevedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREV) - TITRAQ_SPACING);
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) > 0)
             m_pDateedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) - TITRAQ_SPACING);
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) > 0)
             m_pStarttime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) - TITRAQ_SPACING);
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) > 0)
             m_pEndtime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) - TITRAQ_SPACING);
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) > 0)
             m_pAmount->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) - TITRAQ_SPACING);
-        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXTCOL)))
+        if (m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) > 0)
             m_pTasks->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) - TITRAQ_SPACING);
 //        if (m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXRCOL)))
 //            m_pRemark->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREMARK) - TITRAQ_SPACING);
@@ -1019,23 +1019,53 @@
 void Titraqform::savePrefs(void)
 {
     // Get check status from column menu and pass it to prefs handler
-    m_pPrefs->setBool(TITRAQ_PREFSTATCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL)));
-    m_pPrefs->setBool(TITRAQ_PREFLCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL)));
-    m_pPrefs->setBool(TITRAQ_PREFUCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL)));
-    m_pPrefs->setBool(TITRAQ_PREFGCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL)));
-    m_pPrefs->setBool(TITRAQ_PREFCCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL)));
-    m_pPrefs->setBool(TITRAQ_PREFREVCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL)));
-    m_pPrefs->setBool(TITRAQ_PREFDCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL)));
-    m_pPrefs->setBool(TITRAQ_PREFSTARTCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL)));
-    m_pPrefs->setBool(TITRAQ_PREFFCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL)));
-    m_pPrefs->setBool(TITRAQ_PREFACOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL)));
-    m_pPrefs->setBool(TITRAQ_PREFFCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL)));
-    m_pPrefs->setBool(TITRAQ_PREFREMCOL, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFSTATCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTATCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFLCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXLCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFUCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXUCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFGCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXGCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFCCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXCCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFREVCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREVCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFDCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXDCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFSTARTCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXSTARTCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFFCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFACOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXACOL)));
+    m_pPrefs->setBool(TITRAQ_PREFFCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXFCOL)));
+    m_pPrefs->setBool(TITRAQ_PREFREMCOLON, m_pColspopup->isItemChecked(m_pColspopup->idAt(TITRAQ_IDXREMCOL)));
 
     // Get check status from toolbar menu and pass it to prefs handler
     m_pPrefs->setBool(TITRAQ_PREFFILEBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR)));
     m_pPrefs->setBool(TITRAQ_PREFEDITBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR)));
     m_pPrefs->setBool(TITRAQ_PREFWHATBAR, m_pTbarspopup->isItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR)));
+
+    // Get column widths from main table and pass it to prefs handler
+    if (m_pMaintable->columnWidth(TITRAQ_IDXSTATUS) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFSTATCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXSTATUS));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXLINE) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFLCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXLINE));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXUSER) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFUCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXUSER));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXGUID) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFGCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXGUID));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXCRC) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFCCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXCRC));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXREV) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFREVCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXREV));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXDATE) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFDCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXDATE));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXSTART) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFSTARTCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXSTART));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXFINISH) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFFCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXFINISH));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXAMOUNT) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFACOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXAMOUNT));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXTASK) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFTCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXTASK));
+    if (m_pMaintable->columnWidth(TITRAQ_IDXREMARK) > 0)
+        m_pPrefs->setNumber(TITRAQ_PREFREMCOLWIDTH, (long)m_pMaintable->columnWidth(TITRAQ_IDXREMARK));
+
+    // Set frame geometry preferences
+    m_pPrefs->setNumber(TITRAQ_PREFFRAMEWIDTH, (long)this->width());
+    m_pPrefs->setNumber(TITRAQ_PREFFRAMEHEIGHT, (long)this->height());
 }
 
 //

CVSTrac 2.0.1