many others, a complete list can be found in the file AUTHORS.
This program is Free Software; you can redistribute it and/or
modify it under the terms of version two of the GNU General Public
- License as published by the Free Software Foundation plus additions
- that are listed in the file LICENSE.
+ License as published by the Free Software Foundation and included
+ in the file LICENSE.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
connect(unmarkButton, SIGNAL(pressed()), this, SLOT(unmarkButtonPushed()));
connect(okButton, SIGNAL(pressed()), this, SLOT(okButtonPushed()));
connect(cancelButton, SIGNAL(pressed()), this, SLOT(cancelButtonPushed()));
+
+ fileWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
+ fileWidget->addAction(actionMark);
+ fileWidget->addAction(actionUnMark);
+ connect(actionMark, SIGNAL(triggered()), this, SLOT(markButtonPushed()));
+ connect(actionUnMark, SIGNAL(triggered()), this, SLOT(unmarkButtonPushed()));
+
setFont(m_console->get_font());
m_console->displayToPrompt();
get_cwd();
+ readSettings();
fillDirectory();
dockPage();
setCurrent();
this->show();
}
+restorePage::~restorePage()
+{
+ writeSettings();
+}
+
/*
* Fill the fileWidget box with the contents of the current directory
*/
void restorePage::okButtonPushed()
{
+ printf("In restorePage::okButtonPushed\n");
this->hide();
m_console->write("done");
m_console->notify(true);
m_console->discardToPrompt();
return m_cwd.toUtf8().data();
}
+
+/*
+ * Save user settings associated with this page
+ */
+void restorePage::writeSettings()
+{
+ QSettings settings(m_console->m_dir->name(), "bat");
+ settings.beginGroup("RestorePage");
+ settings.setValue("splitterSizes", splitter->saveState());
+ settings.endGroup();
+}
+
+/*
+ * Read and restore user settings associated with this page
+ */
+void restorePage::readSettings()
+{
+ QSettings settings(m_console->m_dir->name(), "bat");
+ settings.beginGroup("RestorePage");
+ splitter->restoreState(settings.value("splitterSizes").toByteArray());
+ settings.endGroup();
+}