[Libreoffice-commits] core.git: cui/source cui/uiconfig

Susobhan Ghosh susobhang70 at gmail.com
Wed May 4 15:41:28 UTC 2016


 cui/source/inc/cuires.hrc                |    1 
 cui/source/options/personalization.cxx   |  168 +++++++----
 cui/source/options/personalization.hxx   |   11 
 cui/source/options/personalization.src   |    5 
 cui/uiconfig/ui/personalization_tab.ui   |   15 
 cui/uiconfig/ui/select_persona_dialog.ui |  470 ++++++++++++++++---------------
 6 files changed, 392 insertions(+), 278 deletions(-)

New commits:
commit 46c87a5e8a52afd0060a399f71e8814cc120852c
Author: Susobhan Ghosh <susobhang70 at gmail.com>
Date:   Mon Mar 21 03:25:27 2016 +0530

    tdf#88502 Firefox Theme URL in custom theme search
    
    Persona Dialog modified. Search supports Firefox Theme URL.
    Added display of installed theme on personalization dialog.
    Fixed category buttons. Added SOLID as category. Removed
    invalid/duplicate results.
    
    Change-Id: I603c0c292fe5c3e380553b9a2eaab6f4bc0683e1
    Reviewed-on: https://gerrit.libreoffice.org/23385
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 98cbb8d..f0a8ccd 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -443,6 +443,7 @@
 #define RID_SVXSTR_PERSONA_COLOR                            (RID_SVX_START + 1287)
 #define RID_SVXSTR_PERSONA_MUSIC                            (RID_SVX_START + 1288)
 #define RID_SVXSTR_PERSONA_NATURE                           (RID_SVX_START + 1289)
+#define RID_SVXSTR_PERSONA_SOLID                            (RID_SVX_START + 1290)
 
 #define RID_SVXPAGE_OPENCL                                  (RID_SVX_START + 254)
 
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index d781688..70a2f8d 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -26,6 +26,7 @@
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/graphicfilter.hxx>
+#include <vcl/mnemonic.hxx>
 #include <dialmgr.hxx>
 #include "cuires.hrc"
 
@@ -36,6 +37,8 @@
 #include "ucbhelper/content.hxx"
 #include <comphelper/simplefileaccessinteraction.hxx>
 
+#define MAX_RESULTS 9
+
 using namespace com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ucb;
@@ -67,8 +70,11 @@ SelectPersonaDialog::SelectPersonaDialog( vcl::Window *pParent )
     m_vSearchSuggestions[4]->SetText( CUI_RES( RID_SVXSTR_PERSONA_NATURE ) );
     m_vSearchSuggestions[4]->SetClickHdl( LINK( this, SelectPersonaDialog, SearchPersonas ) );
 
+    get( m_vSearchSuggestions[5], "suggestion6" );
+    m_vSearchSuggestions[5]->SetText( CUI_RES( RID_SVXSTR_PERSONA_SOLID ) );
+    m_vSearchSuggestions[5]->SetClickHdl( LINK( this, SelectPersonaDialog, SearchPersonas ) );
+
     get( m_pEdit, "search_term" );
-    m_pEdit->SetPlaceholderText( CUI_RES( RID_SVXSTR_SEARCHTERM ) );
 
     get( m_pProgressLabel, "progress_label" );
 
@@ -131,11 +137,12 @@ IMPL_LINK_TYPED( SelectPersonaDialog, SearchPersonas, Button*, pButton, void )
         searchTerm = m_pEdit->GetText();
     else
     {
-        for(VclPtr<PushButton> & i : m_vSearchSuggestions)
+        for( VclPtr<PushButton> & i : m_vSearchSuggestions )
         {
             if( pButton == i )
             {
-                searchTerm = i->GetDisplayText();
+                // GetDisplayText() is returning a blank string, thus removing mnemonics explicitly.
+                searchTerm = MnemonicGenerator::EraseAllMnemonicChars(i->GetText());
                 break;
             }
         }
@@ -144,8 +151,14 @@ IMPL_LINK_TYPED( SelectPersonaDialog, SearchPersonas, Button*, pButton, void )
     if( searchTerm.isEmpty( ) )
         return;
 
-    OUString rSearchURL = "https://services.addons.mozilla.org/en-US/firefox/api/1.5/search/" + searchTerm + "/9/9";
-    m_rSearchThread = new SearchAndParseThread( this, rSearchURL );
+    // 15 results so that invalid and duplicate search results whose names can't be retreived can be skipped
+    OUString rSearchURL = "https://services.addons.allizom.org/en-US/firefox/api/1.5/search/" + searchTerm + "/9/15";
+
+    if ( searchTerm.startsWith( "https://addons.mozilla.org/en-US/firefox/addon" ) )
+        m_rSearchThread = new SearchAndParseThread( this, searchTerm, true );
+    else
+        m_rSearchThread = new SearchAndParseThread( this, rSearchURL, false );
+
     m_rSearchThread->launch();
 }
 
@@ -155,7 +168,7 @@ IMPL_LINK_NOARG_TYPED( SelectPersonaDialog, ActionOK, Button*, void )
 
     if( !aSelectedPersona.isEmpty() )
     {
-        m_rSearchThread = new SearchAndParseThread( this, aSelectedPersona );
+        m_rSearchThread = new SearchAndParseThread( this, aSelectedPersona, false );
         m_rSearchThread->launch();
     }
 
@@ -250,6 +263,7 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( vcl::Window *pParent, cons
     // persona
     get( m_pNoPersona, "no_persona" );
     get( m_pDefaultPersona, "default_persona" );
+    get( m_pAppliedThemeLabel, "applied_theme" );
 
     get( m_pOwnPersona, "own_persona" );
     m_pOwnPersona->SetClickHdl( LINK( this, SvxPersonalizationTabPage, ForceSelect ) );
@@ -273,6 +287,7 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( vcl::Window *pParent, cons
 
     get ( m_pExtensionLabel, "extensions_label" );
 
+    CheckAppliedTheme();
     LoadDefaultImages();
     LoadExtensionThemes();
 }
@@ -361,9 +376,31 @@ void SvxPersonalizationTabPage::Reset( const SfxItemSet * )
 void SvxPersonalizationTabPage::SetPersonaSettings( const OUString& aPersonaSettings )
 {
     m_aPersonaSettings = aPersonaSettings;
+    ShowAppliedThemeLabel( m_aPersonaSettings );
     m_pOwnPersona->Check();
 }
 
+void SvxPersonalizationTabPage::CheckAppliedTheme()
+{
+    uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
+    OUString aPersona( "default" ), aPersonaSetting;
+    if ( xContext.is())
+    {
+        aPersona = officecfg::Office::Common::Misc::Persona::get( xContext );
+        aPersonaSetting = officecfg::Office::Common::Misc::PersonaSettings::get( xContext );
+    }
+    if(aPersona == "own")
+        ShowAppliedThemeLabel(aPersonaSetting);
+}
+
+void SvxPersonalizationTabPage::ShowAppliedThemeLabel(const OUString& aPersonaSetting)
+{
+    sal_Int32 nNameIndex = aPersonaSetting.indexOf( '/' );
+    OUString aName = "(" + aPersonaSetting.copy( 0, nNameIndex ) +")";
+    m_pAppliedThemeLabel->Show();
+    m_pAppliedThemeLabel->SetText( aName );
+}
+
 void SvxPersonalizationTabPage::LoadDefaultImages()
 {
     // Load the pre saved personas
@@ -545,16 +582,16 @@ static bool parsePersonaInfo( const OString &rBuffer, OUString *pHeaderURL, OUSt
     *pName = searchValue( rBuffer, persona, ""name":"" );
     if ( pName->isEmpty() )
         return false;
-
     return true;
 }
 
 SearchAndParseThread::SearchAndParseThread( SelectPersonaDialog* pDialog,
-                          const OUString& rURL ) :
+                          const OUString& rURL, bool bDirectURL ) :
             Thread( "cuiPersonasSearchThread" ),
             m_pPersonaDialog( pDialog ),
             m_aURL( rURL ),
-            m_bExecute( true )
+            m_bExecute( true ),
+            m_bDirectURL( bDirectURL )
 {
 }
 
@@ -569,65 +606,86 @@ void SearchAndParseThread::execute()
         m_pPersonaDialog->ClearSearchResults();
         OUString sProgress( CUI_RES( RID_SVXSTR_SEARCHING ) );
         m_pPersonaDialog->SetProgress( sProgress );
+
+        PersonasDocHandler* pHandler = new PersonasDocHandler();
         Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
         Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(xContext);
-        PersonasDocHandler* pHandler = new PersonasDocHandler();
         Reference< xml::sax::XDocumentHandler > xDocHandler = pHandler;
         uno::Reference< ucb::XSimpleFileAccess3 > xFileAccess( ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), uno::UNO_QUERY );
         uno::Reference< io::XInputStream > xStream;
         xParser->setDocumentHandler( xDocHandler );
 
-        if ( !xFileAccess.is() )
-            return;
-
-        try {
-            css:: uno::Reference< task::XInteractionHandler > xIH(
-                css::task::InteractionHandler::createWithParent( xContext, nullptr ) );
-
-            xFileAccess->setInteractionHandler( new comphelper::SimpleFileAccessInteraction( xIH ) );
+        if( !m_bDirectURL )
+        {
+            if ( !xFileAccess.is() )
+                return;
 
-            xStream = xFileAccess->openFileRead( m_aURL );
-            if( !xStream.is() )
+            try {
+                css:: uno::Reference< task::XInteractionHandler > xIH(
+                    css::task::InteractionHandler::createWithParent( xContext, nullptr ) );
+
+                xFileAccess->setInteractionHandler( new comphelper::SimpleFileAccessInteraction( xIH ) );
+
+                xStream = xFileAccess->openFileRead( m_aURL );
+                if( !xStream.is() )
+                {
+                    // in case of a returned CommandFailedException
+                    // SimpleFileAccess serves it, returning an empty stream
+                    sProgress = CUI_RES(RID_SVXSTR_SEARCHERROR);
+                    sProgress = sProgress.replaceAll("%1", m_aURL);
+                    m_pPersonaDialog->SetProgress(sProgress);
+                    return;
+                }
+            }
+            catch (...)
             {
-                // in case of a returned CommandFailedException
-                // SimpleFileAccess serves it, returning an empty stream
+                // a catch all clause, in case the exception is not
+                // served elsewhere
                 sProgress = CUI_RES(RID_SVXSTR_SEARCHERROR);
                 sProgress = sProgress.replaceAll("%1", m_aURL);
                 m_pPersonaDialog->SetProgress(sProgress);
                 return;
             }
-        }
-        catch (...)
-        {
-            // a catch all clause, in case the exception is not
-            // served elsewhere
-            sProgress = CUI_RES(RID_SVXSTR_SEARCHERROR);
-            sProgress = sProgress.replaceAll("%1", m_aURL);
-            m_pPersonaDialog->SetProgress(sProgress);
-            return;
-        }
 
-        xml::sax::InputSource aParserInput;
-        aParserInput.aInputStream = xStream;
-        xParser->parseStream( aParserInput );
+            xml::sax::InputSource aParserInput;
+            aParserInput.aInputStream = xStream;
+            xParser->parseStream( aParserInput );
 
-        if( !pHandler->hasResults() )
-        {
-            sProgress = CUI_RES( RID_SVXSTR_NORESULTS );
-            m_pPersonaDialog->SetProgress( sProgress );
-            return;
+            if( !pHandler->hasResults() )
+            {
+                sProgress = CUI_RES( RID_SVXSTR_NORESULTS );
+                m_pPersonaDialog->SetProgress( sProgress );
+                return;
+            }
         }
 
-        std::vector<OUString> vLearnmoreURLs = pHandler->getLearnmoreURLs();
+        std::vector<OUString> vLearnmoreURLs;
         std::vector<OUString>::iterator it;
         sal_Int32 nIndex = 0;
         GraphicFilter aFilter;
         Graphic aGraphic;
 
-        for( it = vLearnmoreURLs.begin(); it!=vLearnmoreURLs.end(); ++it )
+        if( !m_bDirectURL )
+            vLearnmoreURLs = pHandler->getLearnmoreURLs();
+        else
+            vLearnmoreURLs.push_back( m_aURL );
+
+        for( it = vLearnmoreURLs.begin(); it!=vLearnmoreURLs.end() && nIndex < MAX_RESULTS; ++it )
         {
             OUString sPreviewFile, aPersonaSetting;
-            getPreviewFile( *it, &sPreviewFile, &aPersonaSetting );
+            bool bResult = getPreviewFile( *it, &sPreviewFile, &aPersonaSetting );
+            // parsing is buggy at times, as HTML is not proper. Skip it.
+            if(aPersonaSetting.isEmpty() || !bResult)
+            {
+                if( m_bDirectURL )
+                {
+                    sProgress = CUI_RES(RID_SVXSTR_SEARCHERROR);
+                    sProgress = sProgress.replaceAll("%1", m_aURL);
+                    m_pPersonaDialog->SetProgress(sProgress);
+                    return;
+                }
+                continue;
+            }
             INetURLObject aURLObj( sPreviewFile );
             aFilter.ImportGraphic( aGraphic, aURLObj );
             Bitmap aBmp = aGraphic.GetBitmap();
@@ -719,25 +777,28 @@ void SearchAndParseThread::execute()
     }
 }
 
-void SearchAndParseThread::getPreviewFile( const OUString& rURL, OUString *pPreviewFile, OUString *pPersonaSetting )
+bool SearchAndParseThread::getPreviewFile( const OUString& rURL, OUString *pPreviewFile, OUString *pPersonaSetting )
 {
     uno::Reference< ucb::XSimpleFileAccess3 > xFileAccess( ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), uno::UNO_QUERY );
     if ( !xFileAccess.is() )
-        return;
+        return false;
 
+    Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
     uno::Reference< io::XInputStream > xStream;
     try {
+        css:: uno::Reference< task::XInteractionHandler > xIH(
+            css::task::InteractionHandler::createWithParent( xContext, nullptr ) );
+
+        xFileAccess->setInteractionHandler( new comphelper::SimpleFileAccessInteraction( xIH ) );
         xStream = xFileAccess->openFileRead( rURL );
+
+        if( !xStream.is() )
+            return false;
     }
     catch (...)
     {
-        OUString sProgress( CUI_RES( RID_SVXSTR_SEARCHERROR ) );
-        sProgress = sProgress.replaceAll("%1", m_aURL);
-        m_pPersonaDialog->SetProgress( sProgress );
-        return;
+        return false;
     }
-    if ( !xStream.is() )
-        return;
 
     // read the persona specification
     // NOTE: Parsing for real is an overkill here; and worse - I tried, and
@@ -759,7 +820,7 @@ void SearchAndParseThread::getPreviewFile( const OUString& rURL, OUString *pPrev
     OUString aHeaderURL, aFooterURL, aTextColor, aAccentColor, aPreviewURL, aName;
 
     if ( !parsePersonaInfo( aBuffer.makeStringAndClear(), &aHeaderURL, &aFooterURL, &aTextColor, &aAccentColor, &aPreviewURL, &aName ) )
-        return;
+        return false;
 
     // copy the images to the user's gallery
     OUString gallery = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
@@ -775,10 +836,11 @@ void SearchAndParseThread::getPreviewFile( const OUString& rURL, OUString *pPrev
     }
     catch ( const uno::Exception & )
     {
-        return;
+        return false;
     }
     *pPreviewFile = gallery + aPreviewFile;
     *pPersonaSetting = aName + ";" + aHeaderURL + ";" + aFooterURL + ";" + aTextColor + ";" + aAccentColor;
+    return true;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx
index 7bef5a6..d801a56 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -34,6 +34,7 @@ private:
     VclPtr<ListBox> m_pPersonaList;                    ///< The ListBox to show the list of installed personas
     OUString m_aPersonaSettings;                ///< Header and footer images + color to be set in the settings.
     VclPtr<FixedText> m_pExtensionLabel;               ///< The "select persona installed via extensions" label
+    VclPtr<FixedText> m_pAppliedThemeLabel;        ///< The label for showing applied custom theme
 
     std::vector<OUString> m_vDefaultPersonaSettings;
     std::vector<OUString> m_vExtensionPersonaSettings;
@@ -52,6 +53,8 @@ public:
     virtual void Reset( const SfxItemSet *rSet ) override;
 
     void SetPersonaSettings( const OUString& );
+    void CheckAppliedTheme();
+    void ShowAppliedThemeLabel( const OUString& );
 
     void LoadDefaultImages();
     void LoadExtensionThemes();
@@ -82,7 +85,7 @@ private:
     VclPtr<PushButton> m_pSearchButton;            ///< The search button
     VclPtr<FixedText> m_pProgressLabel;            ///< The label for showing progress of search
     VclPtr<PushButton> m_vResultList[9];           ///< List of buttons to show search results
-    VclPtr<PushButton> m_vSearchSuggestions[5];    ///< List of buttons for the search suggestions
+    VclPtr<PushButton> m_vSearchSuggestions[6];    ///< List of buttons for the search suggestions
     VclPtr<PushButton> m_pOkButton;                ///< The OK button
     VclPtr<PushButton> m_pCancelButton;            ///< The Cancel button
 
@@ -118,16 +121,16 @@ private:
 
     VclPtr<SelectPersonaDialog> m_pPersonaDialog;
     OUString m_aURL;
-    bool m_bExecute;
+    bool m_bExecute, m_bDirectURL;
 
     virtual ~SearchAndParseThread();
     virtual void execute() override;
-    void getPreviewFile( const OUString&, OUString *, OUString * );
+    bool getPreviewFile( const OUString&, OUString *, OUString * );
 
 public:
 
     SearchAndParseThread( SelectPersonaDialog* pDialog,
-                          const OUString& rURL );
+                          const OUString& rURL, bool bDirectURL );
 
     void StopExecution() { m_bExecute = false; }
 };
diff --git a/cui/source/options/personalization.src b/cui/source/options/personalization.src
index eba74b8..c98fd49 100644
--- a/cui/source/options/personalization.src
+++ b/cui/source/options/personalization.src
@@ -69,4 +69,9 @@ String RID_SVXSTR_PERSONA_NATURE
     Text [ en-US ] = "Nature";
 };
 
+String RID_SVXSTR_PERSONA_SOLID
+{
+    Text [ en-US ] = "Solid";
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/personalization_tab.ui b/cui/uiconfig/ui/personalization_tab.ui
index bb4383c..d240a2d 100644
--- a/cui/uiconfig/ui/personalization_tab.ui
+++ b/cui/uiconfig/ui/personalization_tab.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
   <requires lib="gtk+" version="3.0"/>
   <object class="GtkVBox" id="PersonalizationTabPage">
@@ -131,6 +131,17 @@
                       </packing>
                     </child>
                     <child>
+                      <object class="GtkLabel" id="applied_theme">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
                       <object class="GtkButton" id="select_persona">
                         <property name="label" translatable="yes">Select Theme</property>
                         <property name="visible">True</property>
@@ -140,7 +151,7 @@
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
-                        <property name="position">1</property>
+                        <property name="position">2</property>
                       </packing>
                     </child>
                   </object>
diff --git a/cui/uiconfig/ui/select_persona_dialog.ui b/cui/uiconfig/ui/select_persona_dialog.ui
index c34e518..600bd8d 100644
--- a/cui/uiconfig/ui/select_persona_dialog.ui
+++ b/cui/uiconfig/ui/select_persona_dialog.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.16.1 -->
 <interface>
   <requires lib="gtk+" version="3.0"/>
   <object class="GtkDialog" id="SelectPersonaDialog">
@@ -13,80 +13,8 @@
         <property name="can_focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="ok">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</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="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="help">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">2</property>
-                <property name="secondary">True</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="progress_label">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="ellipsize">end</property>
-                <property name="max_width_chars">45</property>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
-                <property name="secondary">True</property>
-                <property name="non_homogeneous">True</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">3</property>
-          </packing>
-        </child>
         <child>
-          <object class="GtkFrame" id="frame5">
+          <object class="GtkFrame" id="frame1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
@@ -125,7 +53,8 @@
                         </child>
                         <child>
                           <object class="GtkButton" id="search_personas">
-                            <property name="label" translatable="yes">_Search</property>
+                            <property name="label" translatable="yes">_Go</property>
+                            <property name="width_request">85</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="can_default">True</property>
@@ -151,10 +80,10 @@
               </object>
             </child>
             <child type="label">
-              <object class="GtkLabel" id="label7">
+              <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Custom Search</property>
+                <property name="label" translatable="yes">Search Term or Firefox Theme URL</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
                 </attributes>
@@ -186,24 +115,11 @@
                     <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
-                      <object class="GtkLabel" id="label2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">Categories:</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
                       <object class="GtkBox" id="box7">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="spacing">6</property>
+                        <property name="homogeneous">True</property>
                         <child>
                           <object class="GtkButton" id="suggestion1">
                             <property name="visible">True</property>
@@ -279,145 +195,26 @@
                             <property name="position">4</property>
                           </packing>
                         </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkGrid" id="grid1">
-                        <property name="width_request">624</property>
-                        <property name="height_request">219</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="row_spacing">6</property>
-                        <property name="column_spacing">6</property>
-                        <property name="row_homogeneous">True</property>
-                        <property name="column_homogeneous">True</property>
-                        <child>
-                          <object class="GtkButton" id="result1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="result2">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">0</property>
-                          </packing>
-                        </child>
                         <child>
-                          <object class="GtkButton" id="result3">
+                          <object class="GtkButton" id="suggestion6">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="top_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="result4">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="result5">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="result6">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="top_attach">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="result7">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="result8">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="result9">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="hexpand">True</property>
-                            <property name="vexpand">True</property>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </object>
                           <packing>
-                            <property name="left_attach">2</property>
-                            <property name="top_attach">2</property>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">5</property>
                           </packing>
                         </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">True</property>
-                        <property name="position">3</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
                   </object>
@@ -428,7 +225,7 @@
               <object class="GtkLabel" id="label6">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Suggested Themes by Category</property>
+                <property name="label" translatable="yes">Suggested Categories</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
                 </attributes>
@@ -441,6 +238,241 @@
             <property name="position">1</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkSeparator" id="separator1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid1">
+            <property name="width_request">624</property>
+            <property name="height_request">219</property>
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="row_spacing">6</property>
+            <property name="column_spacing">6</property>
+            <property name="row_homogeneous">True</property>
+            <property name="column_homogeneous">True</property>
+            <child>
+              <object class="GtkButton" id="result1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="result2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="result3">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="result4">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="result5">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="result6">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="result7">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="result8">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="result9">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</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="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">2</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="progress_label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="ellipsize">end</property>
+                <property name="max_width_chars">45</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+                <property name="secondary">True</property>
+                <property name="non_homogeneous">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
       </object>
     </child>
     <action-widgets>


More information about the Libreoffice-commits mailing list