Rssguard now remembers fullscreen settings.
This commit is contained in:
parent
609a0c81b1
commit
ca916c847b
@ -38,12 +38,12 @@ CREATE TABLE IF NOT EXISTS Feeds (
|
|||||||
DROP TABLE IF EXISTS FeedsData;
|
DROP TABLE IF EXISTS FeedsData;
|
||||||
-- !
|
-- !
|
||||||
CREATE TABLE IF NOT EXISTS FeedsData (
|
CREATE TABLE IF NOT EXISTS FeedsData (
|
||||||
id INTEGER NOT NULL,
|
feed_id INTEGER NOT NULL,
|
||||||
key TEXT NOT NULL,
|
key TEXT NOT NULL,
|
||||||
value TEXT,
|
value TEXT,
|
||||||
|
|
||||||
PRIMARY KEY (id, key),
|
PRIMARY KEY (feed_id, key),
|
||||||
FOREIGN KEY (id) REFERENCES Feeds (id)
|
FOREIGN KEY (feed_id) REFERENCES Feeds (id)
|
||||||
);
|
);
|
||||||
-- !
|
-- !
|
||||||
DROP TABLE IF EXISTS Messages;
|
DROP TABLE IF EXISTS Messages;
|
||||||
|
@ -36,12 +36,12 @@ CREATE TABLE IF NOT EXISTS Feeds (
|
|||||||
DROP TABLE IF EXISTS FeedsData;
|
DROP TABLE IF EXISTS FeedsData;
|
||||||
-- !
|
-- !
|
||||||
CREATE TABLE IF NOT EXISTS FeedsData (
|
CREATE TABLE IF NOT EXISTS FeedsData (
|
||||||
id INTEGER NOT NULL,
|
feed_id INTEGER NOT NULL,
|
||||||
key TEXT NOT NULL,
|
key TEXT NOT NULL,
|
||||||
value TEXT,
|
value TEXT,
|
||||||
|
|
||||||
PRIMARY KEY (id, key),
|
PRIMARY KEY (feed_id, key),
|
||||||
FOREIGN KEY (id) REFERENCES Feeds (id)
|
FOREIGN KEY (feed_id) REFERENCES Feeds (id)
|
||||||
);
|
);
|
||||||
-- !
|
-- !
|
||||||
DROP TABLE IF EXISTS Messages;
|
DROP TABLE IF EXISTS Messages;
|
||||||
|
@ -128,8 +128,8 @@ void FormMain::quit() {
|
|||||||
qApp->quit();
|
qApp->quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormMain::switchFullscreenMode(bool turn_fullscreen_on) {
|
void FormMain::switchFullscreenMode() {
|
||||||
if (turn_fullscreen_on) {
|
if (!isFullScreen()) {
|
||||||
showFullScreen();
|
showFullScreen();
|
||||||
} else {
|
} else {
|
||||||
showNormal();
|
showNormal();
|
||||||
@ -256,6 +256,12 @@ void FormMain::loadSize() {
|
|||||||
"window_position",
|
"window_position",
|
||||||
screen.center() - rect().center()).toPoint());
|
screen.center() - rect().center()).toPoint());
|
||||||
|
|
||||||
|
// If user exited the application while in fullsreen mode,
|
||||||
|
// then re-enable it now.
|
||||||
|
if (settings->value(APP_CFG_GUI, "start_in_fullscreen", false).toBool()) {
|
||||||
|
switchFullscreenMode();
|
||||||
|
}
|
||||||
|
|
||||||
// Adjust dimensions of "feeds & messages" widget.
|
// Adjust dimensions of "feeds & messages" widget.
|
||||||
m_ui->m_tabWidget->feedMessageViewer()->loadSize();
|
m_ui->m_tabWidget->feedMessageViewer()->loadSize();
|
||||||
}
|
}
|
||||||
@ -265,6 +271,8 @@ void FormMain::saveSize() {
|
|||||||
|
|
||||||
settings->setValue(APP_CFG_GUI, "window_position", pos());
|
settings->setValue(APP_CFG_GUI, "window_position", pos());
|
||||||
settings->setValue(APP_CFG_GUI, "window_size", size());
|
settings->setValue(APP_CFG_GUI, "window_size", size());
|
||||||
|
settings->setValue(APP_CFG_GUI, "start_in_fullscreen", isFullScreen());
|
||||||
|
|
||||||
m_ui->m_tabWidget->feedMessageViewer()->saveSize();
|
m_ui->m_tabWidget->feedMessageViewer()->saveSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,7 +291,7 @@ void FormMain::createConnections() {
|
|||||||
connect(m_ui->m_actionQuit, SIGNAL(triggered()), this, SLOT(quit()));
|
connect(m_ui->m_actionQuit, SIGNAL(triggered()), this, SLOT(quit()));
|
||||||
|
|
||||||
// Menu "View" connections.
|
// Menu "View" connections.
|
||||||
connect(m_ui->m_actionFullscreen, SIGNAL(triggered(bool)), this, SLOT(switchFullscreenMode(bool)));
|
connect(m_ui->m_actionFullscreen, SIGNAL(triggered()), this, SLOT(switchFullscreenMode()));
|
||||||
|
|
||||||
// Menu "Tools" connections.
|
// Menu "Tools" connections.
|
||||||
connect(m_ui->m_actionSettings, SIGNAL(triggered()), this, SLOT(showSettings()));
|
connect(m_ui->m_actionSettings, SIGNAL(triggered()), this, SLOT(showSettings()));
|
||||||
|
@ -77,7 +77,7 @@ class FormMain : public QMainWindow {
|
|||||||
void switchVisibility();
|
void switchVisibility();
|
||||||
|
|
||||||
// Turns on/off fullscreen mode
|
// Turns on/off fullscreen mode
|
||||||
void switchFullscreenMode(bool turn_fullscreen_on);
|
void switchFullscreenMode();
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
// Last-minute reactors.
|
// Last-minute reactors.
|
||||||
|
@ -187,17 +187,14 @@
|
|||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_actionFullscreen">
|
<action name="m_actionFullscreen">
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Fullscreen mode</string>
|
<string>Switch &fullscreen/normal mode</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Switch fullscreen mode.</string>
|
<string>Switch fullscreen mode.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true">Ctrl+Shift+F</string>
|
<string>Ctrl+Shift+F</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_actionAddBrowser">
|
<action name="m_actionAddBrowser">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user