Kaydet (Commit) 6a41cef3 authored tarafından pv2k's avatar pv2k Kaydeden (comit) Katarina Behrens

tdf#103391: ask user whether to open online help

opens a dialog box from which user can choose to take online help or cancel it

Change-Id: I8c1278aab88d55901a65c38b15fcc8519360dc59
Reviewed-on: https://gerrit.libreoffice.org/31385Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
Tested-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst 618785df
...@@ -29,6 +29,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\ ...@@ -29,6 +29,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/helpcontrol \ sfx2/uiconfig/ui/helpcontrol \
sfx2/uiconfig/ui/helpcontentpage \ sfx2/uiconfig/ui/helpcontentpage \
sfx2/uiconfig/ui/helpindexpage \ sfx2/uiconfig/ui/helpindexpage \
sfx2/uiconfig/ui/helpmanual \
sfx2/uiconfig/ui/helpsearchpage \ sfx2/uiconfig/ui/helpsearchpage \
sfx2/uiconfig/ui/inputdialog \ sfx2/uiconfig/ui/inputdialog \
sfx2/uiconfig/ui/licensedialog \ sfx2/uiconfig/ui/licensedialog \
......
...@@ -611,12 +611,25 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const ...@@ -611,12 +611,25 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const
if ( !impl_hasHelpInstalled() ) if ( !impl_hasHelpInstalled() )
{ {
if ( impl_showOnlineHelp( aHelpURL ) ) ScopedVclPtrInstance< MessageDialog > aQueryBox(const_cast< vcl::Window* >( pWindow ),"onlinehelpmanual","sfx/ui/helpmanual.ui");
return true; short OnlineHelpBox = aQueryBox->Execute();
if(OnlineHelpBox == RET_OK)
{
if ( impl_showOnlineHelp( aHelpURL ) )
return true;
else
{
ScopedVclPtrInstance< NoHelpErrorBox > aErrBox(const_cast< vcl::Window* >( pWindow ));
aErrBox->Execute();
return false;
}
}
else
{
return false;
}
ScopedVclPtrInstance< NoHelpErrorBox > aErrBox(const_cast< vcl::Window* >( pWindow ));
aErrBox->Execute();
return false;
} }
Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkMessageDialog" id="onlinehelpmanual">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="message_type">question</property>
<property name="text" translatable="yes"> %PRODUCTNAME built-in help is not installed</property>
<child internal-child="vbox">
<object class="GtkBox" id="internal_box">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="btnbox">
<property name="can_focus">False</property>
<property name="homogeneous">True</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="website">
<property name="label" translatable="yes">Read Help Online</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="1">website</action-widget>
</action-widgets>
</object>
</interface>
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