|
|
|
@ -186,20 +186,20 @@ Mathemagics::Mathemagics(TQWidget *parent, const char *name, WFlags f)
|
|
|
|
|
// how long do status msgs stay up? in ms
|
|
|
|
|
dispTime = 1500;
|
|
|
|
|
|
|
|
|
|
kapp->config()->setGroup("App");
|
|
|
|
|
tdeApp->config()->setGroup("App");
|
|
|
|
|
|
|
|
|
|
bool showkeys = kapp->config()->readBoolEntry("show keypad", true);
|
|
|
|
|
bool showkeys = tdeApp->config()->readBoolEntry("show keypad", true);
|
|
|
|
|
toggleKeypad(showkeys);
|
|
|
|
|
keypadAct->setChecked(showkeys);
|
|
|
|
|
|
|
|
|
|
slotUpdateConfiguration();
|
|
|
|
|
|
|
|
|
|
kapp->config()->setGroup("Session");
|
|
|
|
|
tdeApp->config()->setGroup("Session");
|
|
|
|
|
|
|
|
|
|
TQStringList stackList = kapp->config()->readListEntry("Stack", ',');
|
|
|
|
|
TQStringList stackList = tdeApp->config()->readListEntry("Stack", ',');
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
TQStringList historyList = kapp->config()->readListEntry("History", ',');
|
|
|
|
|
TQStringList historyList = tdeApp->config()->readListEntry("History", ',');
|
|
|
|
|
int count = historyList.count();
|
|
|
|
|
if (historyList.first() != "Nothing" && count > 0)
|
|
|
|
|
{
|
|
|
|
@ -1051,7 +1051,7 @@ void Mathemagics::closeEvent(TQCloseEvent * /*e*/)
|
|
|
|
|
TQString list;
|
|
|
|
|
unsigned int i;
|
|
|
|
|
|
|
|
|
|
kapp->config()->setGroup("Session");
|
|
|
|
|
tdeApp->config()->setGroup("Session");
|
|
|
|
|
|
|
|
|
|
// save history for next time
|
|
|
|
|
int count = HistoryBox->combo()->count();
|
|
|
|
@ -1064,22 +1064,22 @@ void Mathemagics::closeEvent(TQCloseEvent * /*e*/)
|
|
|
|
|
list.append(',');
|
|
|
|
|
list.append(HistoryBox->combo()->text(i));
|
|
|
|
|
}
|
|
|
|
|
kapp->config()->writeEntry("History", list);
|
|
|
|
|
tdeApp->config()->writeEntry("History", list);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
kapp->config()->writeEntry("History", "Nothing");
|
|
|
|
|
tdeApp->config()->writeEntry("History", "Nothing");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kapp->config()->setGroup("App");
|
|
|
|
|
kapp->config()->writeEntry("show keypad", keypadAct->isChecked());
|
|
|
|
|
tdeApp->config()->setGroup("App");
|
|
|
|
|
tdeApp->config()->writeEntry("show keypad", keypadAct->isChecked());
|
|
|
|
|
|
|
|
|
|
kapp->config()->sync();
|
|
|
|
|
tdeApp->config()->sync();
|
|
|
|
|
|
|
|
|
|
saveFile(TDEGlobal::dirs()->saveLocation("appdata") + "session");
|
|
|
|
|
|
|
|
|
|
saveMainWindowSettings(TDEGlobal::config(), "TopLevelWindow");
|
|
|
|
|
|
|
|
|
|
kapp->quit();
|
|
|
|
|
tdeApp->quit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Mathemagics::slotConfigure()
|
|
|
|
@ -1169,21 +1169,21 @@ void Mathemagics::scrollToBottom()
|
|
|
|
|
|
|
|
|
|
void Mathemagics::slotUpdateConfiguration()
|
|
|
|
|
{
|
|
|
|
|
kapp->config()->setGroup("App");
|
|
|
|
|
tdeApp->config()->setGroup("App");
|
|
|
|
|
|
|
|
|
|
int oldNum = numStackLevels;
|
|
|
|
|
numStackLevels = kapp->config()->readNumEntry("numStackLevels", 12);
|
|
|
|
|
numStackLevels = tdeApp->config()->readNumEntry("numStackLevels", 12);
|
|
|
|
|
if (oldNum != numStackLevels)
|
|
|
|
|
recreateStackLevels();
|
|
|
|
|
|
|
|
|
|
fixedPrec = kapp->config()->readBoolEntry("fixedPrec", false);
|
|
|
|
|
toSaveStack = kapp->config()->readBoolEntry("saveStack", true);
|
|
|
|
|
showPeriod = kapp->config()->readBoolEntry("showPeriod", false);
|
|
|
|
|
formatPrec = kapp->config()->readNumEntry("formatPrec", 8);
|
|
|
|
|
histNum = kapp->config()->readNumEntry("histNum", 15);
|
|
|
|
|
delDrops = kapp->config()->readBoolEntry("delDrops", true);
|
|
|
|
|
histDetail = kapp->config()->readBoolEntry("histDetail", false);
|
|
|
|
|
beep = kapp->config()->readBoolEntry("beep", true);
|
|
|
|
|
fixedPrec = tdeApp->config()->readBoolEntry("fixedPrec", false);
|
|
|
|
|
toSaveStack = tdeApp->config()->readBoolEntry("saveStack", true);
|
|
|
|
|
showPeriod = tdeApp->config()->readBoolEntry("showPeriod", false);
|
|
|
|
|
formatPrec = tdeApp->config()->readNumEntry("formatPrec", 8);
|
|
|
|
|
histNum = tdeApp->config()->readNumEntry("histNum", 15);
|
|
|
|
|
delDrops = tdeApp->config()->readBoolEntry("delDrops", true);
|
|
|
|
|
histDetail = tdeApp->config()->readBoolEntry("histDetail", false);
|
|
|
|
|
beep = tdeApp->config()->readBoolEntry("beep", true);
|
|
|
|
|
|
|
|
|
|
updateStack();
|
|
|
|
|
|
|
|
|
|