OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_slot.cpp versions 1.53 and 1.54
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

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