Check-in Number:
|
3858 | |
Date: |
2002-Dec-12 13:45:46 (local)
2002-Dec-12 12:45:46 (UTC) |
User: | ms |
Branch: | |
Comment: |
Implement persistent toolbar preferences. |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/as/as-gui/as_assist.cpp 1.57 -> 1.58
--- as_assist.cpp 2002/12/12 12:19:48 1.57
+++ as_assist.cpp 2002/12/12 12:45:46 1.58
@@ -390,9 +390,9 @@
}
//
-// Construct the file tool bar
+// Construct the tool bars
//
-void Titraqform::setupFiletools(void)
+void Titraqform::setupToolbars(void)
{
// Construct and populate the file tool bar
m_pFiletools = new QToolBar("Toolfile", this, DockTop);
@@ -797,4 +797,17 @@
showTaskcol();
if (!m_pPrefs->getBool(TITRAQ_PREFREMCOL, TITRAQ_DEFREMCOL))
showRemarkcol();
+
+ if (!m_pPrefs->getBool(TITRAQ_PREFFILEBAR, TITRAQ_DEFFILEBAR)) {
+ m_pFiletools->hide();
+ m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXFILEBAR), false);
+ }
+ if (!m_pPrefs->getBool(TITRAQ_PREFEDITBAR, TITRAQ_DEFEDITBAR)) {
+ m_pEdittools->hide();
+ m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXEDITBAR), false);
+ }
+ if (!m_pPrefs->getBool(TITRAQ_PREFWHATBAR, TITRAQ_DEFWHATBAR)) {
+ m_pWhatstools->hide();
+ m_pTbarspopup->setItemChecked(m_pTbarspopup->idAt(TITRAQ_IDXWHATBAR), false);
+ }
}
|
|
ossp-pkg/as/as-gui/as_const.h 1.20 -> 1.21
--- as_const.h 2002/12/12 12:19:48 1.20
+++ as_const.h 2002/12/12 12:45:46 1.21
@@ -75,6 +75,13 @@
#define TITRAQ_PREFREMCOL "remarkcol"
#define TITRAQ_DEFREMCOL true
+#define TITRAQ_PREFFILEBAR "filetoolbar"
+#define TITRAQ_DEFFILEBAR true
+#define TITRAQ_PREFEDITBAR "edittoolbar"
+#define TITRAQ_DEFEDITBAR true
+#define TITRAQ_PREFWHATBAR "whattoolbar"
+#define TITRAQ_DEFWHATBAR true
+
// Other string constants
#define TITRAQ_DATEZERO "0000-00-00"
#define TITRAQ_SEPARATORTOK " "
|
|
ossp-pkg/as/as-gui/as_gui.cpp 1.26 -> 1.27
--- as_gui.cpp 2002/12/12 12:19:48 1.26
+++ as_gui.cpp 2002/12/12 12:45:46 1.27
@@ -60,7 +60,7 @@
setupPrefs();
setupActions();
setupMenubar();
- setupFiletools();
+ setupToolbars();
setupCentralwidget();
setupStatusbar();
setupTable();
|
|
ossp-pkg/as/as-gui/as_gui.h 1.48 -> 1.49
--- as_gui.h 2002/12/12 12:19:48 1.48
+++ as_gui.h 2002/12/12 12:45:46 1.49
@@ -195,7 +195,7 @@
void setupPrefs(void); // Preferences
void setupActions(void); // Actions
void setupMenubar(void); // Menu bar
- void setupFiletools(void); // Tool bar
+ void setupToolbars(void); // Tool bars
void setupStatusbar(void); // Status bar
void setupCentralwidget(void); // Assemble main Frame widget
void setupTable(void); // Table widget
|
|
ossp-pkg/as/as-gui/as_slot.cpp 1.49 -> 1.50
--- as_slot.cpp 2002/12/12 12:19:48 1.49
+++ as_slot.cpp 2002/12/12 12:45:46 1.50
@@ -989,6 +989,11 @@
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)));
+
+ // 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)));
}
//
|
|