[Libreoffice-commits] .: framework/uiconfig officecfg/registry sfx2/inc sfx2/sdi sfx2/source svx/inc

Thorsten Behrens thorsten at kemper.freedesktop.org
Fri Nov 5 06:33:10 PDT 2010


 framework/uiconfig/startmodule/menubar/menubar.xml                   |    1 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |    5 +
 sfx2/inc/sfx2/sfxsids.hrc                                            |    1 
 sfx2/sdi/appslots.sdi                                                |    4 +
 sfx2/sdi/sfx.sdi                                                     |   25 +++++++++
 sfx2/source/appl/appserv.cxx                                         |   27 ++++++++--
 svx/inc/globlmn_tmpl.hrc                                             |   10 +++
 7 files changed, 69 insertions(+), 4 deletions(-)

New commits:
commit 309a07689d52a89948e4cb5ce4a475a7b2024e9a
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Fri Nov 5 14:30:55 2010 +0100

    Adds extra credits item to help menu
    
    As agreed on yesterday, we want a dedicated credits document
    displayed from the help menu. This is the UI/code change for that,
    actual credits doc still missing.
    (cherry picked from commit 00d6d03478bc8ddb3ebd07ff47f54c9668c242d9)

diff --git a/framework/uiconfig/startmodule/menubar/menubar.xml b/framework/uiconfig/startmodule/menubar/menubar.xml
index b7bcbd5..fac0b3c 100644
--- a/framework/uiconfig/startmodule/menubar/menubar.xml
+++ b/framework/uiconfig/startmodule/menubar/menubar.xml
@@ -76,6 +76,7 @@
             <menu:menuseparator/>
             <menu:menuitem menu:id=".uno:ShowLicense"/>
             <menu:menuseparator/>
+            <menu:menuitem menu:id=".uno:Credits"/>
             <menu:menuitem menu:id=".uno:About"/>
         </menu:menupopup>
     </menu:menu>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index e154a5e..15dd7d2 100755
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -4145,6 +4145,11 @@
                     <value xml:lang="en-US">License Information...</value>
                 </prop>
             </node>
+            <node oor:name=".uno:Credits" oor:op="replace">
+                <prop oor:name="Label" oor:type="xs:string">
+                    <value xml:lang="en-US">%PRODUCTNAME Credits...</value>
+                </prop>
+            </node>
             <node oor:name=".uno:StatusBarVisible" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
                     <value xml:lang="en-US">Status ~Bar</value>
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index ae27983..161237b 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -126,6 +126,7 @@
 #define SID_HELP_HELPFILEBOX				(SID_SFX_START + 419)
 #define SID_HELP_HELPFILEBOX_SELECTED		(SID_SFX_START + 420)
 #define SID_SHOW_LICENSE					(SID_SFX_START + 1683)
+#define SID_SHOW_CREDITS					(SID_SFX_START + 1684)
 #define SID_HELP_TUTORIALS					(SID_SFX_START + 1695)
 
 // default-ids for document
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
index 6b736da..026f8bb 100644
--- a/sfx2/sdi/appslots.sdi
+++ b/sfx2/sdi/appslots.sdi
@@ -171,6 +171,10 @@ interface Application
     [
         ExecMethod = MiscExec_Impl ;
     ]
+    SID_SHOW_CREDITS
+    [
+        ExecMethod = MiscExec_Impl ;
+    ]
     SID_RECENTFILELIST
     [
     ]
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 2569249..7e9b5cc 100755
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -7391,6 +7391,31 @@ SfxVoidItem ShowLicense SID_SHOW_LICENSE
 ]
 
 //--------------------------------------------------------------------------
+SfxVoidItem ShowCredits SID_SHOW_CREDITS
+()
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = FALSE,
+    HasCoreId = FALSE,
+    HasDialog = FALSE,
+    ReadOnlyDoc = TRUE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Synchron;
+
+    /* config: */
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = TRUE,
+    GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
 SfxVoidItem HelpTutorials SID_HELP_TUTORIALS
 ()
 [
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 5cca2d5..3f1b44e 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -356,6 +356,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
             break;
         }
 
+        case SID_SHOW_CREDITS:
         case SID_SHOW_LICENSE:
         {
             try {
@@ -365,11 +366,29 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
               args[0].Value <<= sal_True;
               args[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
               args[1].Value <<= sal_True;
-
+              
               rtl::OUString aURL;
-              if ( checkURL ( "LICENSE.odt", aURL ) ||
-                   checkURL ( "LICENSE.html", aURL ) ||
-                   checkURL ( "LICENSE", aURL ) ) {
+              char const** pNames;
+              if( rReq.GetSlot() == SID_SHOW_LICENSE )
+              {
+                  static char const* pLicenseStrings[] = 
+                  {
+                      "LICENSE.odt", "LICENSE.html", "LICENSE"
+                  };
+                  pNames = pLicenseStrings;
+              }
+              else
+              {
+                  static char const* pCreditsStrings[] = 
+                  {
+                      "CREDITS.odt", "CREDITS.html", "CREDITS"
+                  };
+                  pNames = pCreditsStrings;
+              }
+
+              if ( checkURL ( pNames[0], aURL ) ||
+                   checkURL ( pNames[1], aURL ) ||
+                   checkURL ( pNames[2], aURL ) ) {
                   xLoader->loadComponentFromURL( aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_blank")), 0, args );
               }
             } catch (const ::com::sun::star::uno::Exception &) {
diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc
index 12312ed..23d5666 100644
--- a/svx/inc/globlmn_tmpl.hrc
+++ b/svx/inc/globlmn_tmpl.hrc
@@ -1055,6 +1055,12 @@
     HelpID = SID_SHOW_LICENSE ; \
     Text [ en-US ] = "License information..." ;	\
 
+#define ITEM_SHOW_CREDITS \
+    Identifier = SID_SHOW_CREDITS ; \
+    Command = ".uno:ShowCredits" ; \
+    HelpID = SID_SHOW_CREDITS ; \
+    Text [ en-US ] = "%PRODUCTNAME Credits..." ;
+
 #define ITEM_HELP_ONLINE_REGISTRATION \
     Identifier = SID_ONLINE_REGISTRATION ; \
     Command = ".uno:OnlineRegistrationDlg" ; \
@@ -1114,6 +1120,10 @@
                 };\
                 MenuItem\
                 {\
+                    ITEM_SHOW_CREDITS\
+                };\
+                MenuItem\
+                {\
                     ITEM_HELP_ABOUT\
                     About = TRUE ; \
                 };\


More information about the Libreoffice-commits mailing list