[Libreoffice-commits] core.git: sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

pv2k vidhey96 at gmail.com
Wed Jan 11 11:22:27 UTC 2017


 sfx2/UIConfig_sfx.mk           |    1 
 sfx2/source/appl/sfxhelp.cxx   |   23 +++++++++++---
 sfx2/uiconfig/ui/helpmanual.ui |   65 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 84 insertions(+), 5 deletions(-)

New commits:
commit 6a41cef3f9972a88de378a1117697199dbf1d436
Author: pv2k <vidhey96 at gmail.com>
Date:   Mon Nov 28 21:48:43 2016 +0530

    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/31385
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    Tested-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index 3d182da..e057deb 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
 	sfx2/uiconfig/ui/helpcontrol \
 	sfx2/uiconfig/ui/helpcontentpage \
 	sfx2/uiconfig/ui/helpindexpage \
+	sfx2/uiconfig/ui/helpmanual \
 	sfx2/uiconfig/ui/helpsearchpage \
 	sfx2/uiconfig/ui/inputdialog \
 	sfx2/uiconfig/ui/licensedialog \
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 6586e79..80117d0 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -611,12 +611,25 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const
 
     if ( !impl_hasHelpInstalled() )
     {
-        if ( impl_showOnlineHelp( aHelpURL ) )
-            return true;
+        ScopedVclPtrInstance< MessageDialog > aQueryBox(const_cast< vcl::Window* >( pWindow ),"onlinehelpmanual","sfx/ui/helpmanual.ui");
+        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() );
diff --git a/sfx2/uiconfig/ui/helpmanual.ui b/sfx2/uiconfig/ui/helpmanual.ui
new file mode 100644
index 0000000..ac6ab51
--- /dev/null
+++ b/sfx2/uiconfig/ui/helpmanual.ui
@@ -0,0 +1,65 @@
+<?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>


More information about the Libreoffice-commits mailing list