Add option to disable Home tab (fix #1368)

This commit is contained in:
David Capello 2016-12-18 14:44:39 -03:00
parent f8874f4f7b
commit 7ae63156c5
4 changed files with 14 additions and 0 deletions

View File

@ -95,6 +95,7 @@
<option id="screen_scale" type="int" default="0" />
<option id="ui_scale" type="int" default="1" migrate="experimental.ui_scale" />
<option id="gpu_acceleration" type="bool" default="false" />
<option id="show_home" type="bool" default="true" />
<option id="visible_timeline" type="bool" default="false" />
<option id="autoshow_timeline" type="bool" default="true" migrate="Options.AutoShowTimeline" />
<option id="rewind_on_stop" type="bool" default="false" />

View File

@ -40,6 +40,7 @@
</grid>
</hbox>
<check text="GPU acceleration" id="gpu_acceleration" tooltip="Check this option to enable hardware acceleration" />
<check text="Show Home tab when Aseprite is started" id="show_home" />
<check text="Expand menu bar items on mouseover" id="expand_menubar_on_mouseover" tooltip="Check this option to get&#10;this old menus behavior." />
<hbox>
<check text="Automatically save recovery data every" id="enable_data_recovery" tooltip="With this option you can recover your documents&#10;if the program finalizes unexpectedly." />

View File

@ -194,6 +194,8 @@ public:
gpuAcceleration()->setVisible(false);
}
showHome()->setSelected(m_pref.general.showHome());
// Right-click
static_assert(int(app::gen::RightClickMode::PAINT_BGCOLOR) == 0, "");
@ -353,6 +355,10 @@ public:
reset_screen = true;
}
bool newShowHome = showHome()->isSelected();
if (newShowHome != m_pref.general.showHome())
m_pref.general.showHome(newShowHome);
m_pref.save();
if (!warnings.empty()) {

View File

@ -229,6 +229,12 @@ void MainWindow::showNotification(INotificationDelegate* del)
void MainWindow::showHomeOnOpen()
{
// Don't open Home tab
if (!Preferences::instance().general.showHome()) {
configureWorkspaceLayout();
return;
}
if (!getHomeView()->parent()) {
TabView* selectedTab = m_tabsBar->getSelectedTab();