Kaydet (Commit) 4e8bc546 authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: tdf#101196 prompt to restart after OpenGL config changes

Change-Id: If0ade12ed4cf360bdac8cfbec7bb09c9a640fc6d
üst 40c88910
......@@ -868,8 +868,13 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
}
}
mpOpenGLConfig->setUseOpenGL(m_pUseOpenGL->IsChecked());
mpOpenGLConfig->setForceOpenGL(m_pForceOpenGL->IsChecked());
if (m_pUseOpenGL->IsValueChangedFromSaved() ||
m_pForceOpenGL->IsValueChangedFromSaved())
{
mpOpenGLConfig->setUseOpenGL(m_pUseOpenGL->IsChecked());
mpOpenGLConfig->setForceOpenGL(m_pForceOpenGL->IsChecked());
bModified = true;
}
if( bMenuOptModified )
{
......@@ -898,6 +903,15 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
}
}
if (m_pUseOpenGL->IsValueChangedFromSaved() ||
m_pForceOpenGL->IsValueChangedFromSaved())
{
SolarMutexGuard aGuard;
svtools::executeRestartDialog(
comphelper::getProcessComponentContext(), nullptr,
svtools::RESTART_REASON_OPENGL);
}
return bModified;
}
......@@ -985,6 +999,9 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
#endif
m_pFontShowCB->SaveValue();
m_pUseOpenGL->SaveValue();
m_pForceOpenGL->SaveValue();
#if defined( UNX )
LINK( this, OfaViewTabPage, OnAntialiasingToggled ).Call( *m_pFontAntiAliasing );
#endif
......
......@@ -50,9 +50,12 @@ enum RestartReason {
RESTART_REASON_EXP_FEATURES,
// "For the modified experimental features to take effect,
// %PRODUCTNAME must be restarted."
RESTART_REASON_EXTENSION_INSTALL
RESTART_REASON_EXTENSION_INSTALL,
// "For the extension to work properly,
// %PRODUCTNAME must be restarted."
RESTART_REASON_OPENGL
// "For the OpenGL changes to take effect,
// %PRODUCTNAME must be restarted."
};
// Must be called with the solar mutex locked:
......
......@@ -61,6 +61,9 @@ public:
case svtools::RESTART_REASON_EXTENSION_INSTALL:
get(reason_, "reason_extension_install");
break;
case svtools::RESTART_REASON_OPENGL:
get(reason_, "reason_opengl");
break;
default:
assert(false); // this cannot happen
}
......
......@@ -210,6 +210,21 @@
<property name="position">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="reason_opengl">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">For the OpenGL changes to take effect, %PRODUCTNAME must be restarted.</property>
<property name="wrap">True</property>
<property name="max_width_chars">50</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">10</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label">
<property name="visible">True</property>
......@@ -221,7 +236,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">10</property>
<property name="position">11</property>
</packing>
</child>
</object>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment