[Libreoffice-commits] core.git: Changes to 'refs/changes/95/10595/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/95/10595/3'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/18/10518/3'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/95/10595/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/95/10595/4'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/18/10518/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/95/10595/8'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/28/9228/3'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/18/10518/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/28/9228/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/93/10693/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/93/10693/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/95/10595/6'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/93/10693/3'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/28/9228/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/71/7771/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/93/10693/4'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/53/10953/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/03/9203/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/03/9203/3'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/7514/4'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/46/9346/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/42/10842/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/7514/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/7514/6'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/03/9203/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/42/10842/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/03/9203/6'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/46/9346/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/7514/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/53/10953/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/7514/3'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/64/8364/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/7514/5'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/03/9203/4'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/64/8364/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/63/8163/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/63/8163/3'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/63/8163/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/31/10931/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/31/10931/2'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/46/7546/1'

2014-09-29 Thread Rachit Gupta

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-08-17 Thread Rachit Gupta
 cui/uiconfig/ui/applyautofmtpage.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1401c111455c43288c6b5965c433e8bea1c91ee3
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Sun Aug 17 21:55:05 2014 +0530

fdo#72333 Changed [T] description to reduce confusion.

As described in the bug report, removed Autoformat as it was creating
confusion.

Change-Id: Ia22ba529bd3cfa08fe86de4ba7947baef94f4061
Reviewed-on: https://gerrit.libreoffice.org/10953
Reviewed-by: Cor Nouws oo...@nouenoff.nl
Reviewed-by: Joren De Cuyper jore...@libreoffice.org
Tested-by: Joren De Cuyper jore...@libreoffice.org

diff --git a/cui/uiconfig/ui/applyautofmtpage.ui 
b/cui/uiconfig/ui/applyautofmtpage.ui
index 173e386..0ed07bf 100644
--- a/cui/uiconfig/ui/applyautofmtpage.ui
+++ b/cui/uiconfig/ui/applyautofmtpage.ui
@@ -57,7 +57,7 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=xalign0/property
-property name=label translatable=yes[T]: 
AutoFormat/AutoCorrect while typing/property
+property name=label translatable=yes[T]: AutoCorrect 
while typing/property
   /object
   packing
 property name=left_attach1/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-08-15 Thread Rachit Gupta
 cui/source/options/personalization.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit b5688eb1523754f94aaa5af6d372174cab1a4bd7
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Fri Aug 15 14:24:43 2014 +0530

Replaced %1's with URL's to make the errors more descriptive.

Change-Id: I441085a7704eb3464e13723d8dc2ee1df833bd46
Reviewed-on: https://gerrit.libreoffice.org/10931
Reviewed-by: Jan Holesovsky ke...@collabora.com
Tested-by: Jan Holesovsky ke...@collabora.com

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 16def71..9500026 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -695,6 +695,7 @@ void SearchAndParseThread::execute()
 catch ( const uno::Exception  )
 {
 sProgress = CUI_RES( RID_SVXSTR_SEARCHERROR );
+sProgress = sProgress.replaceAll(%1, m_aURL);
 m_pPersonaDialog-SetProgress( sProgress );
 return;
 }
@@ -723,6 +724,7 @@ void SearchAndParseThread::getPreviewFile( const OUString 
rURL, OUString *pPrev
 catch (...)
 {
 OUString sProgress( CUI_RES( RID_SVXSTR_SEARCHERROR ) );
+sProgress = sProgress.replaceAll(%1, m_aURL);
 m_pPersonaDialog-SetProgress( sProgress );
 return;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSOC] Personas - Weekly Report #12

2014-08-12 Thread Rachit Gupta
Hi all,

This week I made some changes to the Personas code and pushed a new branch
for code review (gsoc14-personas2).
Also, I converted RID_XMLSECTP_GENERAL to Widget Layout, which also solved
a 3 year old bug, fdo#44182
https://bugs.freedesktop.org/show_bug.cgi?id=44182.

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: xmlsecurity/inc xmlsecurity/source xmlsecurity/uiconfig xmlsecurity/UIConfig_xmlsec.mk

2014-08-09 Thread Rachit Gupta
 xmlsecurity/UIConfig_xmlsec.mk|1 
 xmlsecurity/inc/xmlsecurity/certificateviewer.hxx |   20 -
 xmlsecurity/source/dialogs/certificateviewer.cxx  |   92 +---
 xmlsecurity/source/dialogs/certificateviewer.src  |  107 -
 xmlsecurity/source/dialogs/dialogs.hrc|   17 -
 xmlsecurity/uiconfig/ui/certgeneral.ui|  239 ++
 6 files changed, 274 insertions(+), 202 deletions(-)

New commits:
commit ab1892d0cdabc305c1264792d5d3d66ed733d823
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Sat Aug 9 11:29:36 2014 +0530

Converted RID_XMLSECTP_GENERAL to Widget Layout.

Change-Id: I52a7f857715dc9cba7aa7748cea5b30b91ed9011
Reviewed-on: https://gerrit.libreoffice.org/10842
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/xmlsecurity/UIConfig_xmlsec.mk b/xmlsecurity/UIConfig_xmlsec.mk
index 1832191..06482e2 100644
--- a/xmlsecurity/UIConfig_xmlsec.mk
+++ b/xmlsecurity/UIConfig_xmlsec.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UIConfig_UIConfig,xmlsec))
 $(eval $(call gb_UIConfig_add_uifiles,xmlsec,\
xmlsecurity/uiconfig/ui/certpage \
xmlsecurity/uiconfig/ui/certdetails \
+   xmlsecurity/uiconfig/ui/certgeneral \
xmlsecurity/uiconfig/ui/digitalsignaturesdialog \
xmlsecurity/uiconfig/ui/securitylevelpage \
xmlsecurity/uiconfig/ui/securitytrustpage \
diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx 
b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
index 9964900..650adc5 100644
--- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
@@ -78,19 +78,13 @@ public:
 class CertificateViewerGeneralTP : public CertificateViewerTP
 {
 private:
-Window  maFrameWin;
-FixedImage  maCertImg;
-FixedInfo   maCertInfoFI;
-FixedLine   maSep1FL;
-FixedInfo   maHintNotTrustedFI;
-FixedLine   maSep2FL;
-FixedInfo   maIssuedToLabelFI;
-FixedInfo   maIssuedToFI;
-FixedInfo   maIssuedByLabelFI;
-FixedInfo   maIssuedByFI;
-FixedInfo   maValidDateFI;
-FixedImage  maKeyImg;
-FixedInfo   maHintCorrespPrivKeyFI;
+FixedImage* m_pCertImg;
+FixedText*  m_pHintNotTrustedFI;
+FixedText*  m_pIssuedToFI;
+FixedText*  m_pIssuedByFI;
+FixedText*  m_pValidDateFI;
+FixedImage* m_pKeyImg;
+FixedText*  m_pHintCorrespPrivKeyFI;
 public:
 CertificateViewerGeneralTP( Window* pParent, 
CertificateViewer* _pDlg );
 
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx 
b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 9ff204a..af1f59a 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -88,21 +88,16 @@ CertificateViewerTP::CertificateViewerTP( Window* _pParent, 
const OString rID,
 }
 
 CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, 
CertificateViewer* _pDlg )
-:CertificateViewerTP( _pParent, XMLSEC_RES( RID_XMLSECTP_GENERAL ), 
_pDlg )
-,maFrameWin ( this, XMLSEC_RES( WIN_FRAME ) )
-,maCertImg  ( this, XMLSEC_RES( IMG_CERT ) )
-,maCertInfoFI   ( this, XMLSEC_RES( FI_CERTINFO ) )
-,maSep1FL   ( this, XMLSEC_RES( FL_SEP1 ) )
-,maHintNotTrustedFI ( this, XMLSEC_RES( FI_HINTNOTTRUST ) )
-,maSep2FL   ( this, XMLSEC_RES( FL_SEP2 ) )
-,maIssuedToLabelFI  ( this, XMLSEC_RES( FI_ISSTOLABEL ) )
-,maIssuedToFI   ( this, XMLSEC_RES( FI_ISSTO ) )
-,maIssuedByLabelFI  ( this, XMLSEC_RES( FI_ISSBYLABEL ) )
-,maIssuedByFI   ( this, XMLSEC_RES( FI_ISSBY ) )
-,maValidDateFI  ( this, XMLSEC_RES( FI_VALIDDATE ) )
-,maKeyImg   ( this, XMLSEC_RES( IMG_KEY ) )
-,maHintCorrespPrivKeyFI ( this, XMLSEC_RES( FI_CORRPRIVKEY ) )
+:CertificateViewerTP( _pParent, CertGeneral, 
xmlsec/ui/certgeneral.ui, _pDlg )
 {
+get( m_pCertImg, certimage );
+get( m_pHintNotTrustedFI, hintnotrust );
+get( m_pIssuedToFI, issuedto );
+get( m_pIssuedByFI, issuedby );
+get( m_pValidDateFI, validdate );
+get( m_pKeyImg, keyimage );
+get( m_pHintCorrespPrivKeyFI, privatekey );
+
 //Verify the certificate
 sal_Int32 certStatus = 
mpDlg-mxSecurityEnvironment-verifyCertificate(mpDlg-mxCert,
  SequenceReferencecss::security::XCertificate ());
@@ -111,80 +106,27 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( 
Window* _pParent, Certif
 
 if ( !bCertValid )
 {
-maCertImg.SetImage(
+m_pCertImg-SetImage(
 Image( XMLSEC_RES( IMG_STATE_NOT_VALIDATED ) ) );
-maHintNotTrustedFI.SetText( XMLSEC_RES( STR_CERTIFICATE_NOT_VALIDATED

[Libreoffice-commits] core.git: Changes to 'feature/gsoc14-personas2'

2014-08-05 Thread Rachit Gupta
New branch 'feature/gsoc14-personas2' available with the following commits:
commit be5b98f43526c9ab8bd0436a5fbd568b252cb8e4
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Aug 5 22:49:22 2014 +0530

Removed hardcoded strings.

Replaced the hardcoded strings with their CUI_RES equivalents.

Change-Id: I1f4e0451839cd9fe10aa9d1c5ae82af9fa13dc4e

commit add94e482716809ca667b494eba15d145e7abdc6
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Aug 5 21:27:20 2014 +0530

Changed Select Persona Dialog.

The result buttons are visible initially but are disabled. These get
enabled when the results are available.

A little code clean up.

Change-Id: I6217d59220d871909bd001a6c7f3636b05cdf911

commit 7809ac111d78c64a46d87266a40acdde677c2609
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 29 19:39:57 2014 +0530

Added title to the Select Persona Dialog.

Change-Id: Ia54e94c84e71fb794e7dec67f89306a5dd465f68

commit d0f95525cbc7000669a18541f478d6e9c5d2be30
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Fri Jul 11 21:50:54 2014 +0530

Fixed crash when cancel is clicked without searching.

Change-Id: I67ca901270874794ec55d5b7db2cd18e6d3a997d

commit ff1e7a1df34e26b0e6b4a0d7694e1efa4d4bf1f0
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Thu Jul 10 23:23:12 2014 +0530

Fixed thread related issues.

Added a data member m_bExecute which defaults to true but is set to
false when StopExecution is called. During execution, the member's value
is checked at various positions, if it is false, the execution is stopped
by returning from the execute method.

Following issues have been resolved:

* Multiple searches can be performed. The previous search is halted.
* Cancel button can be pressed in between any search or application of
  the persona.
* A theme can be selected and applied by clicking on OK while the search
  is being done.

Change-Id: Ic76c224ca0d317a6e1a44b3e8933a3ba50b371cb

commit 7c41f8cbc8396b755eb3280d6c22f6c9420f49ae
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 8 22:09:30 2014 +0530

The Select personas installed via extensions label is invisible by 
default.

The label is not shown if there are no persona extensions installed.

Change-Id: I758bb7ff7f22d56bfb7fe212908f9f5f1f3e7979

commit c7aeada5f674618c0a5e9e8d9bc01bcf1f159b83
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 8 21:53:28 2014 +0530

Improved UI: Large buttons are not shown.

* In the Personalization Tab Page, the button sizes are not affected
  by the presence of the preview buttons. THey remain their original
  size.
* Added some padding and spacing to avoid cluttering of the widgets.

Change-Id: Iea919b9fbfce4a7bfc82f73ccb49f94aa10ec804

commit defdb9e435643b597b5af02e3dbe51b45f9a5ac9
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Wed Jul 2 14:01:59 2014 +0530

Added feature of clearing the registry in case something goes wrong.

If the installed extension is removed, then the persona settings in
the registry are cleared to avoid odd look in the UI.

Change-Id: Iaa99f4c87ec6ce4a663e1a3cebb3f8ff45e02079

commit 8f066be6fab69721c872e442c794c97942837b4c
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Wed Jul 2 10:11:04 2014 +0530

Minor fix: Own persona selected when user selects installed persona.

Change-Id: I5ecd9e3b4a9b878cf5aeb2ccce2e51b45ce9a70a

commit 6cd70e51ef0cf4520a1068e35349df2ec8d722f8
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 1 18:27:42 2014 +0530

Changed Personas installed through extensions procedure.

The UI now consists of a TreeView that lists all the personas that were
installed through extensions. When the user selects any name from the
list, the preview is shown in a button besides the list.

If there are no extensions installed, the list stays hidden.

Change-Id: I030d99549fd5b15d1104224116257ad62cdd1891

commit a774e913dc698048c13e7d6b7dc0f2fee359467f
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 1 15:30:44 2014 +0530

Moved the personas installed through extensions handling to 'own'.

Change-Id: I12baaf22bfad73e228d3ed55dcf365f8eba9cf0a

commit de1422dd9fabf04d9edf5bcc28aa8a58ddee56c8
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 1 13:34:39 2014 +0530

Fixed Bug: Persona info is deleted if No Persona is selected.

If the user selects 'Plain look..' and clicks OK, the previous persona
information is removed from the registry so that if the user selects either
of the other option and clicks OK, the previous theme is not applied.

Change-Id: I5f6a707e5f2724d2a3c39965d155cf47c898d392

commit 43d91a59e9be02a02a13600fb0084e8938988edb
Author: Rachit Gupta rachitgupta1...@gmail.com

[GSOC] Personas - Weekly Report #11

2014-08-04 Thread Rachit Gupta
Hi all,

This week I converted RID_SVX_MDLG_HANGULHANJA and RID_XMLSECTP_DETAILS to
Widget Layout. This week I'll be working on merging my gsoc14-personas
branch to master and getting the code reviewed.

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: xmlsecurity/inc xmlsecurity/source xmlsecurity/uiconfig xmlsecurity/UIConfig_xmlsec.mk

2014-08-03 Thread Rachit Gupta
 xmlsecurity/UIConfig_xmlsec.mk|1 
 xmlsecurity/inc/xmlsecurity/certificateviewer.hxx |   10 -
 xmlsecurity/source/dialogs/certificateviewer.cxx  |   48 +++
 xmlsecurity/source/dialogs/certificateviewer.src  |  145 +-
 xmlsecurity/source/dialogs/dialogs.hrc|   33 +
 xmlsecurity/uiconfig/ui/certdetails.ui|   38 +
 6 files changed, 143 insertions(+), 132 deletions(-)

New commits:
commit e2b0e7571a8b082a2cb532e34b9770060128452b
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Sat Aug 2 19:04:56 2014 +0530

Converted RID_XMLSECTP_DETAILS to Widget Layout.

Change-Id: Ie284f5902879093f882a1f69b481df4a1a319a35
Reviewed-on: https://gerrit.libreoffice.org/10693
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/xmlsecurity/UIConfig_xmlsec.mk b/xmlsecurity/UIConfig_xmlsec.mk
index 1a7ef1e..1832191 100644
--- a/xmlsecurity/UIConfig_xmlsec.mk
+++ b/xmlsecurity/UIConfig_xmlsec.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_UIConfig_UIConfig,xmlsec))
 
 $(eval $(call gb_UIConfig_add_uifiles,xmlsec,\
xmlsecurity/uiconfig/ui/certpage \
+   xmlsecurity/uiconfig/ui/certdetails \
xmlsecurity/uiconfig/ui/digitalsignaturesdialog \
xmlsecurity/uiconfig/ui/securitylevelpage \
xmlsecurity/uiconfig/ui/securitytrustpage \
diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx 
b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
index 9d2f354..9964900 100644
--- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
@@ -101,11 +101,11 @@ public:
 class CertificateViewerDetailsTP : public CertificateViewerTP
 {
 private:
-SvSimpleTableContainer m_aElementsLBContainer;
-SvSimpleTable  maElementsLB;
-MultiLineEdit   maElementML;
-FontmaStdFont;
-FontmaFixedWidthFont;
+SvSimpleTableContainer* m_pElementsLBContainer;
+SvSimpleTable*  m_pElementsLB;
+MultiLineEdit*  m_pValueDetails;
+Fontm_aStdFont;
+Fontm_aFixedWidthFont;
 
 DECL_LINK(  ElementSelectHdl, void* );
 voidClear( void );
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx 
b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 99177dc..9ff204a 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -224,44 +224,45 @@ inline Details_UserDatat::Details_UserDatat( const 
OUString _rTxt, bool _bFixed
 
 void CertificateViewerDetailsTP::Clear( void )
 {
-maElementML.SetText( OUString() );
+m_pValueDetails-SetText( OUString() );
 sal_uLong   i = 0;
-SvTreeListEntry*pEntry = maElementsLB.GetEntry( i );
+SvTreeListEntry*pEntry = m_pElementsLB-GetEntry( i );
 while( pEntry )
 {
 delete ( Details_UserDatat* ) pEntry-GetUserData();
 ++i;
-pEntry = maElementsLB.GetEntry( i );
+pEntry = m_pElementsLB-GetEntry( i );
 }
 
-maElementsLB.Clear();
+m_pElementsLB-Clear();
 }
 
 void CertificateViewerDetailsTP::InsertElement( const OUString _rField, const 
OUString _rValue,
 const OUString _rDetails, 
bool _bFixedWidthFont )
 {
-SvTreeListEntry*pEntry = maElementsLB.InsertEntry( _rField );
-maElementsLB.SetEntryText( _rValue, pEntry, 1 );
+SvTreeListEntry*pEntry = m_pElementsLB-InsertEntry( _rField );
+m_pElementsLB-SetEntryText( _rValue, pEntry, 1 );
 pEntry-SetUserData( ( void* ) new Details_UserDatat( _rDetails, 
_bFixedWidthFont ) );
 }
 
 CertificateViewerDetailsTP::CertificateViewerDetailsTP( Window* _pParent, 
CertificateViewer* _pDlg )
-:CertificateViewerTP( _pParent, XMLSEC_RES( RID_XMLSECTP_DETAILS ), 
_pDlg  )
-,m_aElementsLBContainer(this, XMLSEC_RES(LB_ELEMENTS))
-,maElementsLB(m_aElementsLBContainer)
-,maElementML( this, XMLSEC_RES( ML_ELEMENT ) )
-,maStdFont  ( maElementML.GetControlFont() )
-,maFixedWidthFont   ( OutputDevice::GetDefaultFont( 
DEFAULTFONT_UI_FIXED, LANGUAGE_DONTKNOW, DEFAULTFONT_FLAGS_ONLYONE, this ) )
+:CertificateViewerTP( _pParent, CertDetails, 
xmlsec/ui/certdetails.ui, _pDlg  )
+,m_aFixedWidthFont( OutputDevice::GetDefaultFont( DEFAULTFONT_UI_FIXED, 
LANGUAGE_DONTKNOW, DEFAULTFONT_FLAGS_ONLYONE, this ) )
 {
-WinBits nStyle = maElementsLB.GetStyle();
+get( m_pValueDetails, valuedetails );
+get( m_pElementsLBContainer, tablecontainer );
+m_pElementsLB = new SvSimpleTable( *m_pElementsLBContainer );
+
+m_aStdFont = m_pValueDetails-GetControlFont();
+WinBits nStyle = m_pElementsLB-GetStyle();
 nStyle = ~WB_HSCROLL;
-maElementsLB.SetStyle( nStyle );
+m_pElementsLB-SetStyle( nStyle

[Libreoffice-commits] core.git: cui/AllLangResTarget_cui.mk cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk extras/source

2014-07-29 Thread Rachit Gupta
 cui/AllLangResTarget_cui.mk|2 
 cui/Library_cui.mk |1 
 cui/UIConfig_cui.mk|1 
 cui/source/dialogs/commonlingui.cxx|  232 --
 cui/source/dialogs/commonlingui.hxx|  153 --
 cui/source/dialogs/commonlingui.src|  130 -
 cui/source/dialogs/hangulhanjadlg.cxx  |  372 +++-
 cui/source/dialogs/hangulhanjadlg.hrc  |   80 ---
 cui/source/dialogs/hangulhanjadlg.src  |  182 
 cui/source/inc/hangulhanjadlg.hxx  |   54 +-
 cui/uiconfig/ui/hangulhanjaconversiondialog.ui |  558 +
 extras/source/glade/libreoffice-catalog.xml.in |6 
 12 files changed, 767 insertions(+), 1004 deletions(-)

New commits:
commit e6caeefce4cf1f814bc342324490892ca80356ab
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 22 22:06:48 2014 +0530

Converted RID_SVX_MDLG_HANGULHANJA to Widget Layout.

Also, removed the unused hrc/src files.

Change-Id: Ice45dde1af7492e40e0847ead06bb26f4e58ed9c
Reviewed-on: https://gerrit.libreoffice.org/10595
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index cc4dffa..931fd1f 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -26,11 +26,9 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
 cui/source/customize/acccfg.src \
 cui/source/customize/cfg.src \
 cui/source/customize/macropg.src \
-cui/source/dialogs/commonlingui.src \
 cui/source/dialogs/cuires.src \
 cui/source/dialogs/fmsearch.src \
 cui/source/dialogs/gallery.src \
-cui/source/dialogs/hangulhanjadlg.src \
 cui/source/dialogs/hyperdlg.src \
 cui/source/dialogs/iconcdlg.src \
 cui/source/dialogs/multipat.src \
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 1ac0ed7..d1e98e6 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -84,7 +84,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/customize/selector \
 cui/source/dialogs/about \
 cui/source/dialogs/colorpicker \
-cui/source/dialogs/commonlingui \
 cui/source/dialogs/cuicharmap \
 cui/source/dialogs/cuifmsearch \
 cui/source/dialogs/cuigaldlg \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index e605ff3..dbd98d0 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -71,6 +71,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/galleryupdateprogress \
cui/uiconfig/ui/hangulhanjaadddialog \
cui/uiconfig/ui/hangulhanjaeditdictdialog \
+   cui/uiconfig/ui/hangulhanjaconversiondialog \
cui/uiconfig/ui/hangulhanjaoptdialog \
cui/uiconfig/ui/hatchpage \
cui/uiconfig/ui/hyperlinkdialog \
diff --git a/cui/source/dialogs/commonlingui.cxx 
b/cui/source/dialogs/commonlingui.cxx
deleted file mode 100644
index 48aae68..000
--- a/cui/source/dialogs/commonlingui.cxx
+++ /dev/null
@@ -1,232 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the License); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include commonlingui.hxx
-
-#include cuires.hrc
-#include dialmgr.hxx
-#include vcl/decoview.hxx
-#include sal/macros.h
-
-#include hangulhanjadlg.hrc
-
-
-// SvxClickInfoCtr
-
-
-
-SvxClickInfoCtr::SvxClickInfoCtr( Window* pParent, const ResId rResId ) :
-Control( pParent, rResId ),
-aFixedInfo( this)
-{
-aFixedInfo.SetSizePixel(GetOutputSizePixel());
-aFixedInfo.Show();
-}
-
-
-void SvxClickInfoCtr::MouseButtonDown( const MouseEvent )
-{
-aActivateLink.Call(this);
-}
-
-
-bool SvxClickInfoCtr::PreNotify( NotifyEvent rNEvt )
-{
-if(rNEvt.GetType()==EVENT_GETFOCUS || 
rNEvt.GetType()==EVENT_MOUSEBUTTONDOWN)
-{
-aActivateLink.Call(this);
-}
-
-return Control::PreNotify(rNEvt);
-}
-
-
-void SvxClickInfoCtr::SetText( const OUString rStr )
-{
-aFixedInfo.SetText(rStr );
-}
-
-
-OUString SvxClickInfoCtr::GetText() const
-{
-return aFixedInfo.GetText();
-}
-
-
-SvxClickInfoCtr

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/uiconfig

2014-07-29 Thread Rachit Gupta
 cui/uiconfig/ui/select_persona_dialog.ui |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit e210dae0bab0372c126149307abe701b9af6e999
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 29 19:39:57 2014 +0530

Added title to the Select Persona Dialog.

Change-Id: Ia54e94c84e71fb794e7dec67f89306a5dd465f68

diff --git a/cui/uiconfig/ui/select_persona_dialog.ui 
b/cui/uiconfig/ui/select_persona_dialog.ui
index 7497c5f..0d99bae 100644
--- a/cui/uiconfig/ui/select_persona_dialog.ui
+++ b/cui/uiconfig/ui/select_persona_dialog.ui
@@ -1,9 +1,11 @@
 ?xml version=1.0 encoding=UTF-8?
+!-- Generated with glade 3.16.1 --
 interface
-  !-- interface-requires gtk+ 3.0 --
+  requires lib=gtk+ version=3.0/
   object class=GtkDialog id=SelectPersonaDialog
 property name=can_focusFalse/property
 property name=border_width6/property
+property name=title translatable=yesSelect Persona/property
 property name=type_hintdialog/property
 child internal-child=vbox
   object class=GtkBox id=dialog-vbox1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSOC] Personas - Weekly Report #9

2014-07-28 Thread Rachit Gupta
Hi all.

This week, I  succeeded in converting RID_SVX_MDLG_HANGULHANJA_EDIT to
Widget Layout. This week I'll be working on converting
RID_SVX_MDLG_HANGULHANJA, and then look for more work :-)

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2014-07-25 Thread Rachit Gupta
 cui/UIConfig_cui.mk|1 
 cui/source/dialogs/cuires.src  |5 
 cui/source/dialogs/hangulhanjadlg.cxx  |  145 +-
 cui/source/dialogs/hangulhanjadlg.hrc  |   52 ---
 cui/source/dialogs/hangulhanjadlg.src  |  116 
 cui/source/inc/cuires.hrc  |3 
 cui/source/inc/hangulhanjadlg.hxx  |   30 --
 cui/source/inc/helpid.hrc  |1 
 cui/uiconfig/ui/hangulhanjaeditdictdialog.ui   |  354 +
 extras/source/glade/libreoffice-catalog.xml.in |4 
 10 files changed, 453 insertions(+), 258 deletions(-)

New commits:
commit e153510659506caaea592221f6321ca1280613a8
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Thu Jul 24 23:47:26 2014 +0530

Convert RID_SVX_MDLG_HANGULHANJA_EDIT to Widget Layout.

Change-Id: I63d61a9caeb356e6b5bd340c1f9a5415869a91a1
Reviewed-on: https://gerrit.libreoffice.org/10518
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 15b9ac7..e605ff3 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/gallerytitledialog \
cui/uiconfig/ui/galleryupdateprogress \
cui/uiconfig/ui/hangulhanjaadddialog \
+   cui/uiconfig/ui/hangulhanjaeditdictdialog \
cui/uiconfig/ui/hangulhanjaoptdialog \
cui/uiconfig/ui/hatchpage \
cui/uiconfig/ui/hyperlinkdialog \
diff --git a/cui/source/dialogs/cuires.src b/cui/source/dialogs/cuires.src
index fa223cf..4597d95 100644
--- a/cui/source/dialogs/cuires.src
+++ b/cui/source/dialogs/cuires.src
@@ -117,4 +117,9 @@ String RID_SVXSTR_HYPDLG_ERR_LERR_DOCNOTOPEN
 Text [ en-US ] = Couldn't open the document. ;
 };
 
+String RID_SVXSTR_EDITHINT
+{
+Text [ en-US ] = [Enter text here];
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx 
b/cui/source/dialogs/hangulhanjadlg.cxx
index 699c67a..ea931c6 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1354,12 +1354,12 @@ namespace svx
 if( _bUp )
 {
 if( !m_pPrev )
-bRet = m_rScrollBar.GetThumbPos()  m_rScrollBar.GetRangeMin();
+bRet = m_rScrollBar-GetThumbPos()  
m_rScrollBar-GetRangeMin();
 }
 else
 {
 if( !m_pNext )
-bRet = m_rScrollBar.GetThumbPos()  ( 
m_rScrollBar.GetRangeMax() - 4 );
+bRet = m_rScrollBar-GetThumbPos()  ( 
m_rScrollBar-GetRangeMax() - 4 );
 }
 
 return bRet;
@@ -1370,17 +1370,13 @@ namespace svx
 const Link rLoseFocusHdl = GetLoseFocusHdl();
 if( rLoseFocusHdl.IsSet() )
 rLoseFocusHdl.Call( this );
-m_rScrollBar.SetThumbPos( m_rScrollBar.GetThumbPos() + ( _bUp? -1 : 1 
) );
+m_rScrollBar-SetThumbPos( m_rScrollBar-GetThumbPos() + ( _bUp? -1 : 
1 ) );
 
 ( static_cast HangulHanjaEditDictDialog* ( GetParentDialog() ) 
)-UpdateScrollbar();
 }
 
-SuggestionEdit::SuggestionEdit( Window* pParent, const ResId rResId,
-ScrollBar _rScrollBar, SuggestionEdit* _pPrev, SuggestionEdit* _pNext 
 )
-:Edit( pParent, rResId )
-,m_pPrev( _pPrev )
-,m_pNext( _pNext )
-,m_rScrollBar( _rScrollBar )
+SuggestionEdit::SuggestionEdit( Window* pParent, WinBits nBits )
+:Edit( pParent, nBits )
 {
 }
 
@@ -1437,6 +1433,17 @@ namespace svx
 return nHandled;
 }
 
+void SuggestionEdit::init( ScrollBar* pScrollBar, SuggestionEdit* pPrev, 
SuggestionEdit* pNext)
+{
+m_rScrollBar = pScrollBar;
+m_pPrev = pPrev;
+m_pNext = pNext;
+}
+
+extern C SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSuggestionEdit( 
Window *pParent, VclBuilder::stringmap  )
+{
+return new SuggestionEdit( pParent, WB_LEFT|WB_VCENTER|WB_BORDER );
+}
 
 namespace
 {
@@ -1466,17 +1473,17 @@ namespace svx
 }
 
 
-IMPL_LINK_NOARG(HangulHanjaEditDictDialog, ScrollHdl)
+IMPL_LINK_NOARG( HangulHanjaEditDictDialog, ScrollHdl )
 {
 UpdateScrollbar();
 
 return 0;
 }
 
-IMPL_LINK_NOARG(HangulHanjaEditDictDialog, OriginalModifyHdl)
+IMPL_LINK_NOARG( HangulHanjaEditDictDialog, OriginalModifyHdl )
 {
 m_bModifiedOriginal = true;
-m_aOriginal = comphelper::string::stripEnd(m_aOriginalLB.GetText(), ' 
');
+m_aOriginal = comphelper::string::stripEnd( m_aOriginalLB-GetText(), 
' ' );
 
 UpdateSuggestions();
 UpdateButtonStates();
@@ -1508,13 +1515,13 @@ namespace svx
 return 0;
 }
 
-IMPL_LINK_NOARG(HangulHanjaEditDictDialog, BookLBSelectHdl)
+IMPL_LINK_NOARG( HangulHanjaEditDictDialog, BookLBSelectHdl

[GSOC] Personas - Weekly Report #9

2014-07-21 Thread Rachit Gupta
Hello all.

This week, I have been trying to convert the Hangul Hanja Conversion
dialog. As this is my first attempt at dialog conversion and the dialog
consists of 2 custom widgets, it is taking a bit longer that I anticipated!
I'll be trying  to finish it this week, and look for more work from my
mentors.

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[GSOC] Personas - Weekly Report #8

2014-07-14 Thread Rachit Gupta
Hello all!

This week, I did the following things:

+ Fixed the thread related issues. LO does not crash anymore if the user is
impatient ;)
+ Fixed the UI quirks in personalization_tab page.

This week, I'm working on converting the dialog RID_SVX_MDLG_HANGULHANJA,
as most of the work in my GSoC project is finished.

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-07-11 Thread Rachit Gupta
 cui/source/options/personalization.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9f15a103b627682aeabf1e87f0b3323ed671e236
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Fri Jul 11 21:50:54 2014 +0530

Fixed crash when cancel is clicked without searching.

Change-Id: I67ca901270874794ec55d5b7db2cd18e6d3a997d

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index d69076e..905801d 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -159,7 +159,8 @@ IMPL_LINK( SelectPersonaDialog, ActionOK, PushButton*, /* 
pButton */ )
 
 IMPL_LINK( SelectPersonaDialog, ActionCancel, PushButton*, /* pButton */ )
 {
-m_rSearchThread-StopExecution();
+if( m_rSearchThread.is() )
+m_rSearchThread-StopExecution();
 
 EndDialog( RET_CANCEL );
 return 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-07-10 Thread Rachit Gupta
 cui/source/options/personalization.cxx |   28 +++-
 cui/source/options/personalization.hxx |3 +++
 2 files changed, 26 insertions(+), 5 deletions(-)

New commits:
commit bba5ba8a7e02e8f35d1a5f9e65723a19fdc57d28
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Thu Jul 10 23:23:12 2014 +0530

Fixed thread related issues.

Added a data member m_bExecute which defaults to true but is set to
false when StopExecution is called. During execution, the member's value
is checked at various positions, if it is false, the execution is stopped
by returning from the execute method.

Following issues have been resolved:

* Multiple searches can be performed. The previous search is halted.
* Cancel button can be pressed in between any search or application of
  the persona.
* A theme can be selected and applied by clicking on OK while the search
  is being done.

Change-Id: Ic76c224ca0d317a6e1a44b3e8933a3ba50b371cb

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index e67318a..d69076e 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -112,7 +112,10 @@ OUString SelectPersonaDialog::GetSelectedPersona() const
 IMPL_LINK( SelectPersonaDialog, SearchPersonas, PushButton*, pButton )
 {
 OUString searchTerm;
-if( pButton ==  m_pSearchButton)
+if( m_rSearchThread.is() )
+m_rSearchThread-StopExecution();
+
+if( pButton ==  m_pSearchButton )
 searchTerm = m_pEdit-GetText();
 else
 {
@@ -146,14 +149,17 @@ IMPL_LINK( SelectPersonaDialog, ActionOK, PushButton*, /* 
pButton */ )
 }
 
 else
+{
+if( m_rSearchThread.is() )
+m_rSearchThread-StopExecution();
 EndDialog( RET_OK );
+}
 return 0;
 }
 
 IMPL_LINK( SelectPersonaDialog, ActionCancel, PushButton*, /* pButton */ )
 {
-if( m_rSearchThread.is() )
-m_rSearchThread-terminate();
+m_rSearchThread-StopExecution();
 
 EndDialog( RET_CANCEL );
 return 0;
@@ -161,6 +167,9 @@ IMPL_LINK( SelectPersonaDialog, ActionCancel, PushButton*, 
/* pButton */ )
 
 IMPL_LINK( SelectPersonaDialog, SelectPersona, PushButton*, pButton )
 {
+if( m_rSearchThread.is() )
+m_rSearchThread-StopExecution();
+
 for( sal_Int32 index = 0; index  9; index++ )
 {
 if( pButton == m_vResultList[index] )
@@ -526,7 +535,8 @@ SearchAndParseThread::SearchAndParseThread( 
SelectPersonaDialog* pDialog,
   const OUString rURL ) :
 Thread( cuiPersonasSearchThread ),
 m_pPersonaDialog( pDialog ),
-m_aURL( rURL )
+m_aURL( rURL ),
+m_bExecute( true )
 {
 }
 
@@ -587,6 +597,9 @@ void SearchAndParseThread::execute()
 aFilter.ImportGraphic( aGraphic, aURLObj );
 Bitmap aBmp = aGraphic.GetBitmap();
 
+if( !m_bExecute )
+return;
+
 // for VCL to be able to do visual changes in the thread
 SolarMutexGuard aGuard;
 m_pPersonaDialog-SetImages( Image( aBmp ), nIndex++ );
@@ -594,8 +607,10 @@ void SearchAndParseThread::execute()
 m_pPersonaDialog-AddPersonaSetting( aPersonaSetting );
 }
 
-SolarMutexGuard aGuard;
+if( !m_bExecute )
+return;
 
+SolarMutexGuard aGuard;
 sProgress = ;
 m_pPersonaDialog-SetProgress( sProgress );
 m_pPersonaDialog-setOptimalLayoutSize();
@@ -657,6 +672,9 @@ void SearchAndParseThread::execute()
 return;
 }
 
+if( !m_bExecute )
+return;
+
 SolarMutexGuard aGuard;
 
 aPersonaSetting = aHeaderFile + ; + aFooterFile + ; + aTextColor + 
; + aAccentColor;
diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index a09226e..92ce3de 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -116,6 +116,7 @@ private:
 
 SelectPersonaDialog *m_pPersonaDialog;
 OUString m_aURL;
+bool m_bExecute;
 
 virtual ~SearchAndParseThread();
 virtual void execute() SAL_OVERRIDE;
@@ -125,6 +126,8 @@ public:
 
 SearchAndParseThread( SelectPersonaDialog* pDialog,
   const OUString rURL );
+
+void StopExecution() { m_bExecute = false; }
 };
 
 #endif // INCLUDED_CUI_SOURCE_OPTIONS_PERSONALIZATION_HXX
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSOC] Personas - Weekly Report #7

2014-07-08 Thread Rachit Gupta
Hello all,

This week, I achieved the following things:

+ Fixed a bug regarding Persona registry.
+ Changed the installation of Personas through extensions process. All the
installed personas are listed in a TreeView, and the selected persona is
previewed in a button and applied when user clicks OK.
+ The registry entries are cleared in case the installed extension is
removed.

My mentor, Kendy is not available for this week. So, I'll be working on a
few UI related tasks for the first part of the week, and focus on the tasks
given by my co-mentor, quikee, for the remainder of the week

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - 2 commits - cui/source cui/uiconfig

2014-07-08 Thread Rachit Gupta
 cui/source/options/personalization.cxx |3 +++
 cui/source/options/personalization.hxx |1 +
 cui/uiconfig/ui/personalization_tab.ui |9 -
 3 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 53b5adcbc8c03a6ec15d9abdf4ae3136315d569b
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 8 22:09:30 2014 +0530

The Select personas installed via extensions label is invisible by 
default.

The label is not shown if there are no persona extensions installed.

Change-Id: I758bb7ff7f22d56bfb7fe212908f9f5f1f3e7979

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 69afe39..e67318a 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -250,6 +250,8 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( 
Window *pParent, const Sfx
 
 get( m_pExtensionPersonaPreview, persona_preview );
 
+get ( m_pExtensionLabel, extensions_label );
+
 LoadDefaultImages();
 LoadExtensionThemes();
 }
@@ -371,6 +373,7 @@ void SvxPersonalizationTabPage::LoadExtensionThemes()
 return;
 
 m_pPersonaList-Show();
+m_pExtensionLabel-Show();
 
 for( sal_Int32 nIndex = 0; nIndex  nLength; nIndex++ )
 {
diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index e3f40c6..a09226e 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -33,6 +33,7 @@ private:
 PushButton *m_pExtensionPersonaPreview; /// Buttons to show the last 
3 personas installed via extensions
 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.
+FixedText *m_pExtensionLabel;   /// The select persona 
installed via extensions label
 
 std::vectorOUString m_vDefaultPersonaSettings;
 std::vectorOUString m_vExtensionPersonaSettings;
diff --git a/cui/uiconfig/ui/personalization_tab.ui 
b/cui/uiconfig/ui/personalization_tab.ui
index c76e00f..f288a90 100644
--- a/cui/uiconfig/ui/personalization_tab.ui
+++ b/cui/uiconfig/ui/personalization_tab.ui
@@ -151,8 +151,7 @@
   /packing
 /child
 child
-  object class=GtkLabel id=label1
-property name=visibleTrue/property
+  object class=GtkLabel id=extensions_label
 property name=can_focusFalse/property
 property name=xalign0/property
 property name=label translatable=yesOr, select from 
the personas installed via extensions/property
commit f28e4bd999efc5ea2bd76b2a921efc9f89a50c7c
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 8 21:53:28 2014 +0530

Improved UI: Large buttons are not shown.

* In the Personalization Tab Page, the button sizes are not affected
  by the presence of the preview buttons. THey remain their original
  size.
* Added some padding and spacing to avoid cluttering of the widgets.

Change-Id: Iea919b9fbfce4a7bfc82f73ccb49f94aa10ec804

diff --git a/cui/uiconfig/ui/personalization_tab.ui 
b/cui/uiconfig/ui/personalization_tab.ui
index f19e1db..c76e00f 100644
--- a/cui/uiconfig/ui/personalization_tab.ui
+++ b/cui/uiconfig/ui/personalization_tab.ui
@@ -18,13 +18,14 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=top_padding6/property
+property name=bottom_padding6/property
 property name=left_padding12/property
+property name=right_padding6/property
 child
   object class=GtkVBox id=vbox2
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=spacing2/property
-property name=homogeneousTrue/property
+property name=spacing12/property
 child
   object class=GtkRadioButton id=no_persona
 property name=label translatable=yesPlain look, do 
not use Themes/property
@@ -169,7 +170,6 @@
 property name=spacing6/property
 child
   object class=GtkTreeView 
id=installed_personas:border
-property name=visibleFalse/property
 property name=can_focusTrue/property
 child internal-child=selection
   object class=GtkTreeSelection 
id=treeview-selection2/
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - vcl/source

2014-07-02 Thread Rachit Gupta
 vcl/source/app/settings.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 07fee9d02dfd96fb8719ce5b151f4c1199c90d8e
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Wed Jul 2 14:01:59 2014 +0530

Added feature of clearing the registry in case something goes wrong.

If the installed extension is removed, then the persona settings in
the registry are cleared to avoid odd look in the UI.

Change-Id: Iaa99f4c87ec6ce4a663e1a3cebb3f8ff45e02079

diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index fbcb7a6..41a2484 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2163,6 +2163,16 @@ static void setupPersonaHeaderFooter( WhichPersona 
eWhich, OUString rHeaderFoot
 if ( rHeaderFooterBitmap.IsEmpty() )
 rHeaderFooterBitmap = readBitmapEx( $BRAND_BASE_DIR/ 
LIBO_ETC_FOLDER / + aName );
 }
+
+// Something went wrong. Probably, the images are missing. Clear the 
persona properties in the registry.
+
+if( rHeaderFooterBitmap.IsEmpty() )
+{
+boost::shared_ptr comphelper::ConfigurationChanges  batch( 
comphelper::ConfigurationChanges::create() );
+officecfg::Office::Common::Misc::Persona::set( no, batch );
+officecfg::Office::Common::Misc::PersonaSettings::set( , batch );
+batch-commit();
+}
 }
 
 const BitmapEx StyleSettings::GetPersonaHeader() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-07-01 Thread Rachit Gupta
 cui/source/options/personalization.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5cbfed7b2633c21abaaf84b4fda0e2e384845c41
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 1 13:34:39 2014 +0530

Fixed Bug: Persona info is deleted if No Persona is selected.

If the user selects 'Plain look..' and clicks OK, the previous persona
information is removed from the registry so that if the user selects either
of the other option and clicks OK, the previous theme is not applied.

Change-Id: I5f6a707e5f2724d2a3c39965d155cf47c898d392

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 0a431f0..dd96fd4 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -285,6 +285,8 @@ bool SvxPersonalizationTabPage::FillItemSet( SfxItemSet  )
 
 // write
 boost::shared_ptr comphelper::ConfigurationChanges  batch( 
comphelper::ConfigurationChanges::create() );
+if( aPersona == no )
+m_aPersonaSettings = ;
 officecfg::Office::Common::Misc::Persona::set( aPersona, batch );
 officecfg::Office::Common::Misc::PersonaSettings::set( m_aPersonaSettings, 
batch );
 batch-commit();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source cui/uiconfig vcl/source

2014-07-01 Thread Rachit Gupta
 cui/source/options/personalization.cxx |   20 +++-
 cui/source/options/personalization.hxx |4 
 cui/uiconfig/ui/personalization_tab.ui |  137 ++---
 vcl/source/app/settings.cxx|4 
 4 files changed, 99 insertions(+), 66 deletions(-)

New commits:
commit e23bd6a56c5f9868d042ee79c4810ac47d41745b
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 1 15:30:44 2014 +0530

Moved the personas installed through extensions handling to 'own'.

Change-Id: I12baaf22bfad73e228d3ed55dcf365f8eba9cf0a

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index dd96fd4..616fd14 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -245,15 +245,16 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( 
Window *pParent, const Sfx
 m_vDefaultPersonaImages[2]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
 
 get( m_vExtensionPersonas[0], extension1 );
-m_vExtensionPersonas[0]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+m_vExtensionPersonas[0]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, InstalledPersona ) );
 
 get( m_vExtensionPersonas[1], extension2 );
-m_vExtensionPersonas[1]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+m_vExtensionPersonas[1]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, InstalledPersona ) );
 
 get( m_vExtensionPersonas[2], extension3 );
-m_vExtensionPersonas[2]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+m_vExtensionPersonas[2]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, InstalledPersona ) );
 
 LoadDefaultImages();
+LoadExtensionImages();
 }
 
 SvxPersonalizationTabPage::~SvxPersonalizationTabPage()
@@ -360,13 +361,18 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 m_vDefaultPersonaImages[nIndex]-Show();
 m_vDefaultPersonaImages[nIndex++]-SetModeImage( Image( aBmp ) );
 }
+}
 
+void SvxPersonalizationTabPage::LoadExtensionImages()
+{
 // See if any extensions are used to install personas. If yes, load them.
 
+GraphicFilter aFilter;
+Graphic aGraphic;
+sal_Int32 nIndex = 0;
 css::uno::SequenceOUString installedPersonas( 
officecfg::Office::Common::Misc::PersonasList::get()-getElementNames() );
 sal_Int32 nLength = installedPersonas.getLength();
 sal_Int32 nCount = 0;
-nIndex = 0;
 
 if( nLength == 0 )
 return;
@@ -442,6 +448,12 @@ IMPL_LINK( SvxPersonalizationTabPage, DefaultPersona, 
PushButton*, pButton )
 m_aPersonaSettings = m_vDefaultPersonaSettings[nIndex];
 }
 
+return 0;
+}
+
+IMPL_LINK( SvxPersonalizationTabPage, InstalledPersona, PushButton*, pButton )
+{
+m_pOwnPersona-Check();
 for( sal_Int32 nIndex = 0; nIndex  3; nIndex++ )
 {
 if( pButton == m_vExtensionPersonas[nIndex] )
diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index 0865037..d5e4bcf 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -52,6 +52,7 @@ public:
 void SetPersonaSettings( const OUString );
 
 void LoadDefaultImages();
+void LoadExtensionImages();
 
 private:
 /// Handle the Persona selection
@@ -62,6 +63,9 @@ private:
 
 /// Handle the default Persona selection
 DECL_LINK( DefaultPersona, PushButton* );
+
+/// Handle the Personas installed through extensions selection
+DECL_LINK( InstalledPersona, PushButton* );
 };
 
 /** Dialog that will allow the user to choose a Persona to use.
diff --git a/cui/uiconfig/ui/personalization_tab.ui 
b/cui/uiconfig/ui/personalization_tab.ui
index e2f4332..2b53e02 100644
--- a/cui/uiconfig/ui/personalization_tab.ui
+++ b/cui/uiconfig/ui/personalization_tab.ui
@@ -58,11 +58,9 @@
   /packing
 /child
 child
-  object class=GtkGrid id=grid1
+  object class=GtkBox id=box1
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=row_spacing6/property
-property name=column_spacing6/property
 child
   object class=GtkButton id=default1
 property name=can_focusTrue/property
@@ -71,10 +69,9 @@
 property name=vexpandTrue/property
   /object
   packing
-property name=left_attach0/property
-property name=top_attach0/property
-property name=width1/property
-property name=height1/property
+property name=expandFalse/property
+property name=fillTrue/property

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source cui/uiconfig

2014-07-01 Thread Rachit Gupta
 cui/source/options/personalization.cxx |   63 +++--
 cui/source/options/personalization.hxx |   19 +
 cui/uiconfig/ui/personalization_tab.ui |   29 +++
 3 files changed, 46 insertions(+), 65 deletions(-)

New commits:
commit 7b6d0027af81b406014226bc0172d0646be545c5
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jul 1 18:27:42 2014 +0530

Changed Personas installed through extensions procedure.

The UI now consists of a TreeView that lists all the personas that were
installed through extensions. When the user selects any name from the
list, the preview is shown in a button besides the list.

If there are no extensions installed, the list stays hidden.

Change-Id: I030d99549fd5b15d1104224116257ad62cdd1891

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 616fd14..0bc8fb5 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -21,6 +21,7 @@
 #include tools/urlobj.hxx
 #include vcl/edit.hxx
 #include vcl/msgbox.hxx
+#include vcl/lstbox.hxx
 #include vcl/svapp.hxx
 #include vcl/settings.hxx
 #include vcl/graphicfilter.hxx
@@ -244,17 +245,13 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( 
Window *pParent, const Sfx
 get( m_vDefaultPersonaImages[2], default3 );
 m_vDefaultPersonaImages[2]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
 
-get( m_vExtensionPersonas[0], extension1 );
-m_vExtensionPersonas[0]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, InstalledPersona ) );
+get( m_pPersonaList, installed_personas );
+m_pPersonaList-SetSelectHdl( LINK( this, SvxPersonalizationTabPage, 
SelectInstalledPersona ) );
 
-get( m_vExtensionPersonas[1], extension2 );
-m_vExtensionPersonas[1]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, InstalledPersona ) );
-
-get( m_vExtensionPersonas[2], extension3 );
-m_vExtensionPersonas[2]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, InstalledPersona ) );
+get( m_pExtensionPersonaPreview, persona_preview );
 
 LoadDefaultImages();
-LoadExtensionImages();
+LoadExtensionThemes();
 }
 
 SvxPersonalizationTabPage::~SvxPersonalizationTabPage()
@@ -363,37 +360,28 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 }
 }
 
-void SvxPersonalizationTabPage::LoadExtensionImages()
+void SvxPersonalizationTabPage::LoadExtensionThemes()
 {
 // See if any extensions are used to install personas. If yes, load them.
 
-GraphicFilter aFilter;
-Graphic aGraphic;
-sal_Int32 nIndex = 0;
 css::uno::SequenceOUString installedPersonas( 
officecfg::Office::Common::Misc::PersonasList::get()-getElementNames() );
 sal_Int32 nLength = installedPersonas.getLength();
-sal_Int32 nCount = 0;
 
 if( nLength == 0 )
 return;
 
-if( nLength  3 )
-nIndex = nLength - 3;
+m_pPersonaList-Show();
 
-for( ; nIndex  nLength; nIndex++ )
+for( sal_Int32 nIndex = 0; nIndex  nLength; nIndex++ )
 {
 Reference XPropertySet  xPropertySet( 
officecfg::Office::Common::Misc::PersonasList::get()-getByName( 
installedPersonas[nIndex] ), UNO_QUERY_THROW );
 OUString aPersonaName, aPreviewFile, aHeaderFile, aFooterFile, 
aTextColor, aAccentColor, aPersonaSettings;
-Any aValue = xPropertySet-getPropertyValue( Preview );
-aValue = aPreviewFile;
-INetURLObject aURLObj( aPreviewFile );
-aFilter.ImportGraphic( aGraphic, aURLObj );
-Bitmap aBmp = aGraphic.GetBitmap();
-m_vExtensionPersonas[nCount]-Show();
-m_vExtensionPersonas[nCount++]-SetModeImage( Image( aBmp ) );
-
-aValue = xPropertySet-getPropertyValue( Name );
+Any aValue = xPropertySet-getPropertyValue( Name );
 aValue = aPersonaName;
+m_pPersonaList-InsertEntry( aPersonaName );
+
+aValue = xPropertySet-getPropertyValue( Preview );
+aValue = aPreviewFile;
 
 aValue = xPropertySet-getPropertyValue( Header );
 aValue = aHeaderFile;
@@ -407,7 +395,7 @@ void SvxPersonalizationTabPage::LoadExtensionImages()
 aValue = xPropertySet-getPropertyValue( AccentColor );
 aValue = aAccentColor;
 
-aPersonaSettings = aHeaderFile + ; + aFooterFile + ; + aTextColor 
+ ; + aAccentColor;
+aPersonaSettings = aPreviewFile + ; + aHeaderFile + ; + 
aFooterFile + ; + aTextColor + ; + aAccentColor;
 rtl::Bootstrap::expandMacros( aPersonaSettings );
 m_vExtensionPersonaSettings.push_back( aPersonaSettings );
 }
@@ -451,14 +439,23 @@ IMPL_LINK( SvxPersonalizationTabPage, DefaultPersona, 
PushButton*, pButton )
 return 0;
 }
 
-IMPL_LINK( SvxPersonalizationTabPage, InstalledPersona, PushButton*, pButton )
+IMPL_LINK( SvxPersonalizationTabPage, SelectInstalledPersona, ListBox*, )
 {
-m_pOwnPersona-Check();
-for( sal_Int32 nIndex = 0; nIndex  3

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-07-01 Thread Rachit Gupta
 cui/source/options/personalization.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a848adedd0eb6adf46b7bb70734a4264bee53a87
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Wed Jul 2 10:11:04 2014 +0530

Minor fix: Own persona selected when user selects installed persona.

Change-Id: I5ecd9e3b4a9b878cf5aeb2ccce2e51b45ce9a70a

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 0bc8fb5..69afe39 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -441,6 +441,8 @@ IMPL_LINK( SvxPersonalizationTabPage, DefaultPersona, 
PushButton*, pButton )
 
 IMPL_LINK( SvxPersonalizationTabPage, SelectInstalledPersona, ListBox*, )
 {
+m_pOwnPersona-Check();
+
 // Get the details of the selected theme.
 m_pExtensionPersonaPreview-Show();
 sal_Int32 nSelectedPos = m_pPersonaList-GetSelectEntryPos();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source officecfg/registry

2014-06-30 Thread Rachit Gupta
 cui/source/options/personalization.cxx |   25 ---
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   29 +++--
 2 files changed, 44 insertions(+), 10 deletions(-)

New commits:
commit 888a0e4ceb8d379f6c44d449863ea8c1b5a599e2
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Mon Jun 30 15:28:05 2014 +0530

Changed application of personas through extensions procedure.

The PersonasEntry template in the registry now stores the setting as
splitted values rather than ';' separated terms. The corresponding ';'
separated setting is prepared and stored.

Change-Id: I154d519c475a48763a75b5c35ad20f170c1d7996

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 1cc8b75..e78c779 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -375,8 +375,8 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 for( ; nIndex  nLength; nIndex++ )
 {
 Reference XPropertySet  xPropertySet( 
officecfg::Office::Common::Misc::PersonasList::get()-getByName( 
installedPersonas[nIndex] ), UNO_QUERY_THROW );
+OUString aPersonaName, aPreviewFile, aHeaderFile, aFooterFile, 
aTextColor, aAccentColor, aPersonaSettings;
 Any aValue = xPropertySet-getPropertyValue( PersonaPreview );
-OUString aPreviewFile;
 aValue = aPreviewFile;
 INetURLObject aURLObj( aPreviewFile );
 aFilter.ImportGraphic( aGraphic, aURLObj );
@@ -384,11 +384,24 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 m_vExtensionPersonas[nCount]-Show();
 m_vExtensionPersonas[nCount++]-SetModeImage( Image( aBmp ) );
 
-aValue = xPropertySet-getPropertyValue( PersonaSettings );
-OUString sPersonaSettings;
-aValue = sPersonaSettings;
-rtl::Bootstrap::expandMacros( sPersonaSettings );
-m_vExtensionPersonaSettings.push_back( sPersonaSettings );
+aValue = xPropertySet-getPropertyValue( PersonaName );
+aValue = aPersonaName;
+
+aValue = xPropertySet-getPropertyValue( PersonaHeader );
+aValue = aHeaderFile;
+
+aValue = xPropertySet-getPropertyValue( PersonaFooter );
+aValue = aFooterFile;
+
+aValue = xPropertySet-getPropertyValue( PersonaTextColor );
+aValue = aTextColor;
+
+aValue = xPropertySet-getPropertyValue( PersonaAccentColor );
+aValue = aAccentColor;
+
+aPersonaSettings = aHeaderFile + ; + aFooterFile + ; + aTextColor 
+ ; + aAccentColor;
+rtl::Bootstrap::expandMacros( aPersonaSettings );
+m_vExtensionPersonaSettings.push_back( aPersonaSettings );
 }
 }
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index d5e926b..6548445 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -810,16 +810,37 @@
   info
 descStores the details of the installed personas./desc
   /info
+  prop oor:name=PersonaName oor:type=xs:string oor:nillable=false
+info
+  descThe Persona's name/desc
+/info
+  /prop
   prop oor:name=PersonaPreview oor:type=xs:string 
oor:nillable=false
 info
   descName of the preview file for the Persona to show in the 
UI/desc
 /info
   /prop
-  prop oor:name=PersonaSettings oor:type=xs:string 
oor:nillable=false
+  prop oor:name=PersonaHeader oor:type=xs:string oor:nillable=false
 info
-  descNames of the header and footer images, and colors for text and
-accent.  When set, the value has form
-header.jpg;footer.jpg;#RGBTXT;#RGBACC./desc
+  descName of the header file for the Persona/desc
+/info
+value/
+  /prop
+  prop oor:name=PersonaFooter oor:type=xs:string oor:nillable=false
+info
+  descName of the footer file for the Persona/desc
+/info
+value/
+  /prop
+  prop oor:name=PersonaTextColor oor:type=xs:string 
oor:nillable=false
+info
+  descValue of the text color for the Persona/desc
+/info
+value/
+  /prop
+  prop oor:name=PersonaAccentColor oor:type=xs:string 
oor:nillable=false
+info
+  descValue of the accent color for the Persona/desc
 /info
 value/
   /prop
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source officecfg/registry

2014-06-30 Thread Rachit Gupta
 cui/source/options/personalization.cxx |   12 ++--
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   12 ++--
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit c64c61ff06e27791e38f36fed7cda3d283ac5115
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Mon Jun 30 18:46:47 2014 +0530

Dropped 'Persona' from the properties in PersonasEntry template.

Change-Id: Ic662f59c084eacc7e99762c3e94fbcc191629557

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index e78c779..0a431f0 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -376,7 +376,7 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 {
 Reference XPropertySet  xPropertySet( 
officecfg::Office::Common::Misc::PersonasList::get()-getByName( 
installedPersonas[nIndex] ), UNO_QUERY_THROW );
 OUString aPersonaName, aPreviewFile, aHeaderFile, aFooterFile, 
aTextColor, aAccentColor, aPersonaSettings;
-Any aValue = xPropertySet-getPropertyValue( PersonaPreview );
+Any aValue = xPropertySet-getPropertyValue( Preview );
 aValue = aPreviewFile;
 INetURLObject aURLObj( aPreviewFile );
 aFilter.ImportGraphic( aGraphic, aURLObj );
@@ -384,19 +384,19 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 m_vExtensionPersonas[nCount]-Show();
 m_vExtensionPersonas[nCount++]-SetModeImage( Image( aBmp ) );
 
-aValue = xPropertySet-getPropertyValue( PersonaName );
+aValue = xPropertySet-getPropertyValue( Name );
 aValue = aPersonaName;
 
-aValue = xPropertySet-getPropertyValue( PersonaHeader );
+aValue = xPropertySet-getPropertyValue( Header );
 aValue = aHeaderFile;
 
-aValue = xPropertySet-getPropertyValue( PersonaFooter );
+aValue = xPropertySet-getPropertyValue( Footer );
 aValue = aFooterFile;
 
-aValue = xPropertySet-getPropertyValue( PersonaTextColor );
+aValue = xPropertySet-getPropertyValue( TextColor );
 aValue = aTextColor;
 
-aValue = xPropertySet-getPropertyValue( PersonaAccentColor );
+aValue = xPropertySet-getPropertyValue( AccentColor );
 aValue = aAccentColor;
 
 aPersonaSettings = aHeaderFile + ; + aFooterFile + ; + aTextColor 
+ ; + aAccentColor;
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 6548445..408874f 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -810,35 +810,35 @@
   info
 descStores the details of the installed personas./desc
   /info
-  prop oor:name=PersonaName oor:type=xs:string oor:nillable=false
+  prop oor:name=Name oor:type=xs:string oor:nillable=false
 info
   descThe Persona's name/desc
 /info
   /prop
-  prop oor:name=PersonaPreview oor:type=xs:string 
oor:nillable=false
+  prop oor:name=Preview oor:type=xs:string oor:nillable=false
 info
   descName of the preview file for the Persona to show in the 
UI/desc
 /info
   /prop
-  prop oor:name=PersonaHeader oor:type=xs:string oor:nillable=false
+  prop oor:name=Header oor:type=xs:string oor:nillable=false
 info
   descName of the header file for the Persona/desc
 /info
 value/
   /prop
-  prop oor:name=PersonaFooter oor:type=xs:string oor:nillable=false
+  prop oor:name=Footer oor:type=xs:string oor:nillable=false
 info
   descName of the footer file for the Persona/desc
 /info
 value/
   /prop
-  prop oor:name=PersonaTextColor oor:type=xs:string 
oor:nillable=false
+  prop oor:name=TextColor oor:type=xs:string oor:nillable=false
 info
   descValue of the text color for the Persona/desc
 /info
 value/
   /prop
-  prop oor:name=PersonaAccentColor oor:type=xs:string 
oor:nillable=false
+  prop oor:name=AccentColor oor:type=xs:string oor:nillable=false
 info
   descValue of the accent color for the Persona/desc
 /info
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSOC] Personas - Weekly Report #6

2014-06-30 Thread Rachit Gupta
Hello all,

This week, I accomplished the following things:

+ The personas can be installed through oxt extensions. I created a
template in the Common.xcs registry to include the Peronas details and
created a corresponding set.
Whenever an oxt is installed, the persona details are added to the set and
the installed themes are displayed in the Personalization tab for the user
to choose from.

For the coming week, I'll be focusing on:

- UI issues.
- Thread related bugs.

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source cui/uiconfig officecfg/registry vcl/source

2014-06-27 Thread Rachit Gupta
 cui/source/options/personalization.cxx |   54 +
 cui/source/options/personalization.hxx |2 
 cui/uiconfig/ui/personalization_tab.ui |   76 +
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   23 +++
 vcl/source/app/settings.cxx|2 
 5 files changed, 137 insertions(+), 20 deletions(-)

New commits:
commit e62172ebbe41e0fe184e8a65c84dbd06f87bb01b
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Fri Jun 27 23:52:42 2014 +0530

The Personas can be install through oxt extensions.

The user can install an oxt extension and choose his/her theme from
the Personalization page.

* Created a template in Common.xcs registry to hold the values for the
  PersonasList set.
* Added 3 buttons to personalization_tab.ui to incorporate the latest 3
  personas installed through extensions.
* Currently, only 3 installed personas are shown alongwith the default
  available personas.

Change-Id: I30a40ae48d17f4ed8caef33854ef88afcbec5a54

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index ec7..1cc8b75 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -14,6 +14,8 @@
 
 #include comphelper/processfactory.hxx
 #include officecfg/Office/Common.hxx
+#include com/sun/star/container/XNameAccess.hpp
+#include com/sun/star/beans/XPropertySet.hpp
 #include osl/file.hxx
 #include rtl/bootstrap.hxx
 #include tools/urlobj.hxx
@@ -31,6 +33,7 @@
 using namespace com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ucb;
+using namespace ::com::sun::star::beans;
 
 SelectPersonaDialog::SelectPersonaDialog( Window *pParent )
 : ModalDialog( pParent, SelectPersonaDialog, 
cui/ui/select_persona_dialog.ui )
@@ -241,6 +244,15 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( 
Window *pParent, const Sfx
 get( m_vDefaultPersonaImages[2], default3 );
 m_vDefaultPersonaImages[2]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
 
+get( m_vExtensionPersonas[0], extension1 );
+m_vExtensionPersonas[0]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+
+get( m_vExtensionPersonas[1], extension2 );
+m_vExtensionPersonas[1]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+
+get( m_vExtensionPersonas[2], extension3 );
+m_vExtensionPersonas[2]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+
 LoadDefaultImages();
 }
 
@@ -273,7 +285,6 @@ bool SvxPersonalizationTabPage::FillItemSet( SfxItemSet  )
 
 // write
 boost::shared_ptr comphelper::ConfigurationChanges  batch( 
comphelper::ConfigurationChanges::create() );
-
 officecfg::Office::Common::Misc::Persona::set( aPersona, batch );
 officecfg::Office::Common::Misc::PersonaSettings::set( m_aPersonaSettings, 
batch );
 batch-commit();
@@ -316,6 +327,8 @@ void SvxPersonalizationTabPage::SetPersonaSettings( const 
OUString aPersonaSetti
 
 void SvxPersonalizationTabPage::LoadDefaultImages()
 {
+// Load the pre saved personas
+
 OUString gallery(  );
 gallery = $BRAND_BASE_DIR/ LIBO_SHARE_FOLDER;
 gallery += /gallery/personas/;
@@ -345,6 +358,38 @@ void SvxPersonalizationTabPage::LoadDefaultImages()
 m_vDefaultPersonaImages[nIndex]-Show();
 m_vDefaultPersonaImages[nIndex++]-SetModeImage( Image( aBmp ) );
 }
+
+// See if any extensions are used to install personas. If yes, load them.
+
+css::uno::SequenceOUString installedPersonas( 
officecfg::Office::Common::Misc::PersonasList::get()-getElementNames() );
+sal_Int32 nLength = installedPersonas.getLength();
+sal_Int32 nCount = 0;
+nIndex = 0;
+
+if( nLength == 0 )
+return;
+
+if( nLength  3 )
+nIndex = nLength - 3;
+
+for( ; nIndex  nLength; nIndex++ )
+{
+Reference XPropertySet  xPropertySet( 
officecfg::Office::Common::Misc::PersonasList::get()-getByName( 
installedPersonas[nIndex] ), UNO_QUERY_THROW );
+Any aValue = xPropertySet-getPropertyValue( PersonaPreview );
+OUString aPreviewFile;
+aValue = aPreviewFile;
+INetURLObject aURLObj( aPreviewFile );
+aFilter.ImportGraphic( aGraphic, aURLObj );
+Bitmap aBmp = aGraphic.GetBitmap();
+m_vExtensionPersonas[nCount]-Show();
+m_vExtensionPersonas[nCount++]-SetModeImage( Image( aBmp ) );
+
+aValue = xPropertySet-getPropertyValue( PersonaSettings );
+OUString sPersonaSettings;
+aValue = sPersonaSettings;
+rtl::Bootstrap::expandMacros( sPersonaSettings );
+m_vExtensionPersonaSettings.push_back( sPersonaSettings );
+}
 }
 
 IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, PushButton*, /*pButton*/ )
@@ -381,6 +426,13 @@ IMPL_LINK

[GSOC] Personas - Weekly Report #5

2014-06-23 Thread Rachit Gupta
Hello all,

This week, I completed the following things:

+ Some code clean up.
+ Kendy fixed some UI quirks.
+ Functionality to apply default themes.
+ Improved search, the images are displayed as they are available.
+ Some default search terms are available for searching directly.

Over the next week, my focus will be on:

- Applying the personas as extensions
- Mid term evaluations :-)

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source cui/uiconfig

2014-06-20 Thread Rachit Gupta
 cui/source/options/personalization.cxx   |   21 +
 cui/source/options/personalization.hxx   |2 +-
 cui/uiconfig/ui/select_persona_dialog.ui |4 
 3 files changed, 14 insertions(+), 13 deletions(-)

New commits:
commit 84deacb87c1437d8409e4b7df4e182275f9723b8
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Fri Jun 20 15:38:26 2014 +0530

Improved search: the images are displayed as they are downloaded.

Previously, all the search result images were displayed in one go,
but now the images are shown as they are downloaded.

Change-Id: I95990f36c242a0c90bd2b2fd65fd76953f46bcc2

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index e592126..f708d43 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -166,15 +166,10 @@ void SelectPersonaDialog::SetProgress( OUString 
rProgress )
 }
 }
 
-void SelectPersonaDialog::SetImages( std::vectorImage rImageList )
+void SelectPersonaDialog::SetImages( Image aImage, sal_Int32 nIndex )
 {
-sal_Int32 nCount = 0;
-for( std::vectorImage::iterator it=rImageList.begin(); 
it!=rImageList.end(); ++it )
-{
-m_vResultList[nCount]-Show();
-m_vResultList[nCount]-SetModeImage( *it );
-nCount++;
-}
+m_vResultList[nIndex]-Show();
+m_vResultList[nIndex]-SetModeImage( aImage );
 }
 
 void SelectPersonaDialog::AddPersonaSetting( OUString rPersonaSetting )
@@ -465,7 +460,7 @@ void SearchAndParseThread::execute()
 
 std::vectorOUString vLearnmoreURLs = pHandler-getLearnmoreURLs();
 std::vectorOUString::iterator it;
-std::vectorImage vResultList;
+sal_Int32 nIndex = 0;
 GraphicFilter aFilter;
 Graphic aGraphic;
 
@@ -476,14 +471,16 @@ void SearchAndParseThread::execute()
 INetURLObject aURLObj( sPreviewFile );
 aFilter.ImportGraphic( aGraphic, aURLObj );
 Bitmap aBmp = aGraphic.GetBitmap();
-vResultList.push_back( Image( aBmp ) );
+
+// for VCL to be able to do visual changes in the thread
+SolarMutexGuard aGuard;
+m_pPersonaDialog-SetImages( Image( aBmp ), nIndex++ );
+m_pPersonaDialog-setOptimalLayoutSize();
 m_pPersonaDialog-AddPersonaSetting( aPersonaSetting );
 }
 
-// for VCL to be able to do visual changes in the thread
 SolarMutexGuard aGuard;
 
-m_pPersonaDialog-SetImages( vResultList );
 sProgress = ;
 m_pPersonaDialog-SetProgress( sProgress );
 m_pPersonaDialog-setOptimalLayoutSize();
diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index fb26c70..da17122 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -87,7 +87,7 @@ public:
 
 OUString GetSelectedPersona() const;
 void SetProgress( OUString );
-void SetImages( std::vectorImage);
+void SetImages( Image, sal_Int32 );
 void AddPersonaSetting( OUString );
 void ClearSearchResults();
 void SetAppliedPersonaSetting( OUString );
diff --git a/cui/uiconfig/ui/select_persona_dialog.ui 
b/cui/uiconfig/ui/select_persona_dialog.ui
index cf551dc..51d8bcb 100644
--- a/cui/uiconfig/ui/select_persona_dialog.ui
+++ b/cui/uiconfig/ui/select_persona_dialog.ui
@@ -154,6 +154,10 @@
 property name=vexpandTrue/property
 property name=row_spacing6/property
 property name=column_spacing6/property
+property name=width_request624/property
+property name=height_request219/property
+property name=row_homogeneousTrue/property
+property name=column_homogeneousTrue/property
 child
   object class=GtkButton id=result1
 property name=can_focusTrue/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source cui/uiconfig

2014-06-20 Thread Rachit Gupta
 cui/source/options/personalization.cxx   |   38 ++
 cui/source/options/personalization.hxx   |1 
 cui/uiconfig/ui/select_persona_dialog.ui |  110 +--
 3 files changed, 142 insertions(+), 7 deletions(-)

New commits:
commit cb5236f244cc7231816af3c191be3987daf3c673
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Fri Jun 20 21:20:37 2014 +0530

Added some pre-defined search terms.

The user can now enter his/her own search term or can use the commonly
used search terms to browse for themes.

Change-Id: Ife4ad6b820784a6321f5b916a0069a915c114c7e

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index f708d43..ec7 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -38,6 +38,26 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent )
 get( m_pSearchButton, search_personas );
 m_pSearchButton-SetClickHdl( LINK( this, SelectPersonaDialog, 
SearchPersonas ) );
 
+get( m_vSearchSuggestions[0], suggestion1 );
+m_vSearchSuggestions[0]-SetText( libreoffice );
+m_vSearchSuggestions[0]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SearchPersonas ) );
+
+get( m_vSearchSuggestions[1], suggestion2 );
+m_vSearchSuggestions[1]-SetText( science );
+m_vSearchSuggestions[1]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SearchPersonas ) );
+
+get( m_vSearchSuggestions[2], suggestion3 );
+m_vSearchSuggestions[2]-SetText( firefox );
+m_vSearchSuggestions[2]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SearchPersonas ) );
+
+get( m_vSearchSuggestions[3], suggestion4 );
+m_vSearchSuggestions[3]-SetText( nasa );
+m_vSearchSuggestions[3]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SearchPersonas ) );
+
+get( m_vSearchSuggestions[4], suggestion5 );
+m_vSearchSuggestions[4]-SetText( harry potter );
+m_vSearchSuggestions[4]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SearchPersonas ) );
+
 get( m_pEdit, search_term );
 m_pEdit-SetPlaceholderText( Search term... );
 
@@ -85,9 +105,23 @@ OUString SelectPersonaDialog::GetSelectedPersona() const
 return OUString();
 }
 
-IMPL_LINK( SelectPersonaDialog, SearchPersonas, PushButton*, /*pButton*/ )
+IMPL_LINK( SelectPersonaDialog, SearchPersonas, PushButton*, pButton )
 {
-OUString searchTerm = m_pEdit-GetText();
+OUString searchTerm;
+if( pButton ==  m_pSearchButton)
+searchTerm = m_pEdit-GetText();
+else
+{
+for( sal_Int32 nIndex = 0; nIndex  5; nIndex++ )
+{
+if( pButton == m_vSearchSuggestions[nIndex] )
+{
+searchTerm = m_vSearchSuggestions[nIndex]-GetDisplayText();
+break;
+}
+}
+}
+
 if( searchTerm.isEmpty( ) )
 return 0;
 
diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index da17122..8e0520e 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -74,6 +74,7 @@ private:
 PushButton *m_pSearchButton;/// The search button
 FixedText *m_pProgressLabel;/// The label for showing 
progress of search
 PushButton *m_vResultList[9];   /// List of buttons to show 
search results
+PushButton *m_vSearchSuggestions[9];/// List of buttons for the 
search suggestions
 PushButton *m_pOkButton;/// The OK button
 PushButton *m_pCancelButton;/// The Cancel button
 
diff --git a/cui/uiconfig/ui/select_persona_dialog.ui 
b/cui/uiconfig/ui/select_persona_dialog.ui
index 51d8bcb..7497c5f 100644
--- a/cui/uiconfig/ui/select_persona_dialog.ui
+++ b/cui/uiconfig/ui/select_persona_dialog.ui
@@ -104,7 +104,6 @@
 property name=can_focusTrue/property
 property name=hexpandTrue/property
 property name=invisible_char●/property
-property name=invisible_char_setTrue/property
 property name=primary_icon_activatableFalse/property
 property 
name=secondary_icon_activatableFalse/property
   /object
@@ -136,9 +135,12 @@
   /packing
 /child
 child
-  object class=GtkLabel id=progress_label
+  object class=GtkLabel id=label2
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=xalign0/property
+property name=label translatable=yesOr, use these 
commonly used terms to _browse themes:/property
+property name=use_underlineTrue/property
   /object
   packing
 property name=expandFalse/property
@@ -147,15 +149,113 @@
   /packing
 /child
 child
+  object class=GtkBox id

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-06-20 Thread Rachit Gupta
 cui/source/options/personalization.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8f1e214887adf28e7ae2f5aceb409038684cdbe8
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Sat Jun 21 09:16:16 2014 +0530

Fixed Typo.

Change-Id: I8d0b34e0c34c349baaa7c9a56fd1e6cfe3ad6934

diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index 8e0520e..1254e82 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -74,7 +74,7 @@ private:
 PushButton *m_pSearchButton;/// The search button
 FixedText *m_pProgressLabel;/// The label for showing 
progress of search
 PushButton *m_vResultList[9];   /// List of buttons to show 
search results
-PushButton *m_vSearchSuggestions[9];/// List of buttons for the 
search suggestions
+PushButton *m_vSearchSuggestions[5];/// List of buttons for the 
search suggestions
 PushButton *m_pOkButton;/// The OK button
 PushButton *m_pCancelButton;/// The Cancel button
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source cui/uiconfig vcl/source

2014-06-19 Thread Rachit Gupta
 cui/source/options/personalization.cxx |   81 +++--
 cui/source/options/personalization.hxx |   10 +++-
 cui/uiconfig/ui/personalization_tab.ui |   66 ++
 vcl/source/app/settings.cxx|8 ---
 4 files changed, 142 insertions(+), 23 deletions(-)

New commits:
commit dc7092fe6e48e5d50a438bf27332cf151d86b2ca
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Thu Jun 19 18:49:36 2014 +0530

Added functionality to apply default themes.

* The themes are stored in the share folder under the personas directory
  in the gallery. The information is stored in a personas_list.txt which
  contains the info in the form headerFile;footerFile;textColor;AccentColor
  for the default themes.
* Changed the personalization_tab.ui to include _three_ buttons to show
  the default images.
* Changed the vcl/source/app/settings.cxx to read the persona information
  properly in the case of default personas.
* Some variable name changes.

Change-Id: Ib5f2167729a5fb7eb8061925679560accb934a44

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index e6307f4..e592126 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -202,6 +202,17 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( 
Window *pParent, const Sfx
 
 get( m_pSelectPersona, select_persona );
 m_pSelectPersona-SetClickHdl( LINK( this, SvxPersonalizationTabPage, 
SelectPersona ) );
+
+get( m_vDefaultPersonaImages[0], default1 );
+m_vDefaultPersonaImages[0]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+
+get( m_vDefaultPersonaImages[1], default2 );
+m_vDefaultPersonaImages[1]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+
+get( m_vDefaultPersonaImages[2], default3 );
+m_vDefaultPersonaImages[2]-SetClickHdl( LINK( this, 
SvxPersonalizationTabPage, DefaultPersona ) );
+
+LoadDefaultImages();
 }
 
 SvxPersonalizationTabPage::~SvxPersonalizationTabPage()
@@ -268,6 +279,45 @@ void SvxPersonalizationTabPage::Reset( const SfxItemSet  )
 m_pDefaultPersona-Check();
 }
 
+void SvxPersonalizationTabPage::SetPersonaSettings( const OUString 
aPersonaSettings )
+{
+m_aPersonaSettings = aPersonaSettings;
+m_pOwnPersona-Check();
+}
+
+void SvxPersonalizationTabPage::LoadDefaultImages()
+{
+OUString gallery(  );
+gallery = $BRAND_BASE_DIR/ LIBO_SHARE_FOLDER;
+gallery += /gallery/personas/;
+rtl::Bootstrap::expandMacros( gallery );
+OUString aPersonasList = gallery + personas_list.txt;
+SvFileStream aStream( aPersonasList, STREAM_READ );
+GraphicFilter aFilter;
+Graphic aGraphic;
+sal_Int32 nIndex = 0;
+
+while( aStream.IsOpen()  !aStream.IsEof() )
+{
+OString aLine;
+aStream.ReadLine( aLine );
+OUString aPersonaSetting( OStringToOUString( aLine, 
RTL_TEXTENCODING_UTF8 ) );
+OUString aPreviewFile;
+sal_Int32 nNewIndex = aPersonaSetting.indexOf( ';', 0 );
+if( nNewIndex  0 )
+break;
+aPreviewFile = aPersonaSetting.copy( 0, nNewIndex );
+aPersonaSetting = aPersonaSetting.copy( nNewIndex + 1 );
+m_vDefaultPersonaSettings.push_back( aPersonaSetting );
+
+INetURLObject aURLObj( gallery + aPreviewFile );
+aFilter.ImportGraphic( aGraphic, aURLObj );
+Bitmap aBmp = aGraphic.GetBitmap();
+m_vDefaultPersonaImages[nIndex]-Show();
+m_vDefaultPersonaImages[nIndex++]-SetModeImage( Image( aBmp ) );
+}
+}
+
 IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, PushButton*, /*pButton*/ )
 {
 SelectPersonaDialog aDialog( NULL );
@@ -277,7 +327,7 @@ IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, 
PushButton*, /*pButton*/ )
 OUString aPersonaSetting( aDialog.GetAppliedPersonaSetting() );
 if ( !aPersonaSetting.isEmpty() )
 {
-setPersonaSettings( aPersonaSetting );
+SetPersonaSettings( aPersonaSetting );
 }
 
 break;
@@ -294,6 +344,17 @@ IMPL_LINK( SvxPersonalizationTabPage, ForceSelect, 
RadioButton*, pButton )
 return 0;
 }
 
+IMPL_LINK( SvxPersonalizationTabPage, DefaultPersona, PushButton*, pButton )
+{
+m_pDefaultPersona-Check();
+for( sal_Int32 nIndex = 0; nIndex  3; nIndex++ )
+{
+if( pButton == m_vDefaultPersonaImages[nIndex] )
+m_aPersonaSettings = m_vDefaultPersonaSettings[nIndex];
+}
+return 0;
+}
+
 /// Find the value on the Persona page, and convert it to a usable form.
 static OUString searchValue( const OString rBuffer, sal_Int32 from, const 
OString rIdentifier )
 {
@@ -351,12 +412,6 @@ static bool parsePersonaInfo( const OString rBuffer, 
OUString *pHeaderURL, OUSt
 return true;
 }
 
-void SvxPersonalizationTabPage::setPersonaSettings( const OUString 
aPersonaSettings

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-06-18 Thread Rachit Gupta
 cui/source/options/personalization.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit b3ed6f893c1b2839d176977cd82ad88a9c9d9905
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Wed Jun 18 12:09:56 2014 +0530

The selected theme is shown in the progress label.

The name of the theme is displayed in the progress label whenever
the user clicks on one of the results.

Change-Id: I4810c9e5faec1b1a5156716b9a62b1256951425c

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index fa5b1a3..e6307f4 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -128,8 +128,15 @@ IMPL_LINK( SelectPersonaDialog, SelectPersona, 
PushButton*, pButton )
 if( pButton == m_vResultList[index] )
 {
 if( !m_vPersonaSettings[index].isEmpty() )
+{
 m_aSelectedPersona = m_vPersonaSettings[index];
-
+// get the persona name from the setting variable to show in 
the progress.
+sal_Int32 nNameIndex = m_aSelectedPersona.indexOf( ';' );
+OUString aName = m_aSelectedPersona.copy( 0, nNameIndex );
+OUString aProgress( Selected Persona:  );
+aProgress += aName;
+SetProgress( aProgress );
+}
 break;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-06-17 Thread Rachit Gupta
 cui/source/options/personalization.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 94099ca3e03af26e9209ca586d0303c16575947b
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Jun 17 18:08:55 2014 +0530

Minor Fixes.

Changed number of search results from 1 (development code) to
9 (production code).

Change-Id: I9229f1db1df21bde3df60fd9d80e02307286b305

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index dab1925..4646f1a 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -91,7 +91,7 @@ IMPL_LINK( SelectPersonaDialog, SearchPersonas, PushButton*, 
/*pButton*/ )
 if( searchTerm.isEmpty( ) )
 return 0;
 
-OUString rSearchURL = 
https://addons.allizom.org/en-US/firefox/api/1.5/search/; + searchTerm + 
/9/1;
+OUString rSearchURL = 
https://addons.allizom.org/en-US/firefox/api/1.5/search/; + searchTerm + 
/9/9;
 m_rSearchThread = new SearchAndParseThread( this, rSearchURL );
 m_rSearchThread-launch();
 return 0;
@@ -314,7 +314,7 @@ IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, 
PushButton*, /*pButton*/ )
 OUString aPersonaSetting( aDialog.GetAppliedPersonaSetting() );
 if ( !aPersonaSetting.isEmpty() )
 {
-m_aPersonaSettings = aPersonaSetting;
+setPersonaSettings( aPersonaSetting );
 }
 
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-06-17 Thread Rachit Gupta
 cui/source/options/personalization.cxx |   76 ++---
 1 file changed, 16 insertions(+), 60 deletions(-)

New commits:
commit 87999291caecde2f8fede6743705aeca5e1a0bf9
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Wed Jun 18 11:13:43 2014 +0530

Code cleanup.

Change-Id: Ifefc528b425ed9ae7f1cdba47282a4f0875bd728

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 4646f1a..fa5b1a3 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -49,31 +49,31 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent )
 get( m_pCancelButton, cancel );
 m_pCancelButton-SetClickHdl( LINK( this, SelectPersonaDialog, 
ActionCancel ) );
 
-get(m_vResultList[0], result1);
+get( m_vResultList[0], result1 );
 m_vResultList[0]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 
-get(m_vResultList[1], result2);
+get( m_vResultList[1], result2 );
 m_vResultList[1]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 
-get(m_vResultList[2], result3);
+get( m_vResultList[2], result3 );
 m_vResultList[2]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 
-get(m_vResultList[3], result4);
+get( m_vResultList[3], result4 );
 m_vResultList[3]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 
-get(m_vResultList[4], result5);
+get( m_vResultList[4], result5 );
 m_vResultList[4]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 
-get(m_vResultList[5], result6);
+get( m_vResultList[5], result6 );
 m_vResultList[5]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 
-get(m_vResultList[6], result7);
+get( m_vResultList[6], result7 );
 m_vResultList[6]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 
-get(m_vResultList[7], result8);
+get( m_vResultList[7], result8 );
 m_vResultList[7]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 
-get(m_vResultList[8], result9);
+get( m_vResultList[8], result9 );
 m_vResultList[8]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 }
 
@@ -123,60 +123,16 @@ IMPL_LINK( SelectPersonaDialog, ActionCancel, 
PushButton*, /* pButton */ )
 
 IMPL_LINK( SelectPersonaDialog, SelectPersona, PushButton*, pButton )
 {
-if( pButton == m_vResultList[0] )
+for( sal_Int32 index = 0; index  9; index++ )
 {
-if( !m_vPersonaSettings[0].isEmpty() )
-m_aSelectedPersona = m_vPersonaSettings[0];
-}
-
-else if( pButton == m_vResultList[1] )
-{
-if( !m_vPersonaSettings[1].isEmpty() )
-m_aSelectedPersona = m_vPersonaSettings[1];
-}
-
-else if( pButton == m_vResultList[2] )
-{
-if( !m_vPersonaSettings[2].isEmpty() )
-m_aSelectedPersona = m_vPersonaSettings[2];
-}
-
-else if( pButton == m_vResultList[3] )
-{
-if( !m_vPersonaSettings[3].isEmpty() )
-m_aSelectedPersona = m_vPersonaSettings[3];
-}
-
-else if( pButton == m_vResultList[4] )
-{
-if( !m_vPersonaSettings[4].isEmpty() )
-m_aSelectedPersona = m_vPersonaSettings[4];
-}
-
-else if( pButton == m_vResultList[5] )
-{
-if( !m_vPersonaSettings[5].isEmpty() )
-m_aSelectedPersona = m_vPersonaSettings[5];
-}
-
-else if( pButton == m_vResultList[6] )
-{
-if( !m_vPersonaSettings[6].isEmpty() )
-m_aSelectedPersona = m_vPersonaSettings[6];
-}
-
-else if( pButton == m_vResultList[7] )
-{
-if( !m_vPersonaSettings[7].isEmpty() )
-m_aSelectedPersona = m_vPersonaSettings[7];
-}
+if( pButton == m_vResultList[index] )
+{
+if( !m_vPersonaSettings[index].isEmpty() )
+m_aSelectedPersona = m_vPersonaSettings[index];
 
-else if( pButton == m_vResultList[8] )
-{
-if( !m_vPersonaSettings[8].isEmpty() )
-m_aSelectedPersona = m_vPersonaSettings[8];
+break;
+}
 }
-
 return 0;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSOC] Personas - Weekly Report #4

2014-06-16 Thread Rachit Gupta
Hello all,

This week, I was able to achieve the following things:

+ The complete theme is downloaded in a separate folder, allowing multiple
themes to be stored in the system.
+ The header and footer files of the selected theme are downloaded in a
separate thread.
+ Fixed many bugs introduced by the code.
+ Added error messages in case anything goes wrong (no Internet or no
results)

For the coming week, I'll be focusing on:

- Terminating the transfer if the user clicks on Cancel while the theme is
downloading.
- Improving the performance so the search results are shown quickly.

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-06-14 Thread Rachit Gupta
 cui/source/options/personalization.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit c57b0961cf9337436f14a4d6c51619bfe4924325
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Sat Jun 14 21:30:20 2014 +0530

Added error message to the progess label if something goes wrong.

Change-Id: If9e7a76bea49fa681e3fc7b3586b04fbbcbe279d

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index dadb88f..2cc6cf8 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -426,6 +426,8 @@ void SearchAndParseThread::execute()
 }
 catch (...)
 {
+sProgress = Something went wrong. Please try again.;
+m_pPersonaDialog-SetProgress( sProgress );
 return;
 }
 
@@ -510,6 +512,8 @@ void SearchAndParseThread::execute()
 }
 catch ( const uno::Exception  )
 {
+sProgress = Something went wrong. Please try again.;
+m_pPersonaDialog-SetProgress( sProgress );
 return;
 }
 
@@ -533,6 +537,8 @@ void SearchAndParseThread::getPreviewFile( const OUString 
rURL, OUString *pHead
 }
 catch (...)
 {
+sProgress = Something went wrong. Please try again.;
+m_pPersonaDialog-SetProgress( sProgress );
 return;
 }
 if ( !xStream.is() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - 2 commits - cui/source

2014-06-14 Thread Rachit Gupta
 cui/source/options/personalization.cxx|   14 --
 cui/source/options/personasdochandler.cxx |   15 +++
 cui/source/options/personasdochandler.hxx |6 --
 3 files changed, 27 insertions(+), 8 deletions(-)

New commits:
commit 818a18bc0424c95a8fe658c8f3b5068da5f03ef7
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Sun Jun 15 10:56:16 2014 +0530

Fixed Bug: SelectPersonaDialog was not closing on clicking OK.

The dialog did not close on clicking OK if nothing was selected or if
nothing was searched. It does now.

Change-Id: I92f777bca8f306fea8da3ebd18ca41c34443a733

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 0379a47..dab1925 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -315,8 +315,9 @@ IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, 
PushButton*, /*pButton*/ )
 if ( !aPersonaSetting.isEmpty() )
 {
 m_aPersonaSettings = aPersonaSetting;
-break;
 }
+
+break;
 }
 
 return 0;
commit ff69ba7d792eed61eff517bbd947fd721382a8d3
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Sun Jun 15 10:05:34 2014 +0530

Added check for no results.

The XML root node contains total_results attribute. If there are no
results matching the search term, then the user is notified of it.

Change-Id: I4b2ae5efe4af700dbc7a554a22a558f94c56e3bc

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 2cc6cf8..0379a47 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -223,6 +223,8 @@ void SelectPersonaDialog::ClearSearchResults()
 {
 m_vPersonaSettings.clear();
 m_aSelectedPersona = ;
+for( sal_Int32 nIndex = 0; nIndex  9; nIndex++ )
+m_vResultList[nIndex]-Hide();
 }
 
 SvxPersonalizationTabPage::SvxPersonalizationTabPage( Window *pParent, const 
SfxItemSet rSet )
@@ -435,6 +437,13 @@ void SearchAndParseThread::execute()
 aParserInput.aInputStream = xStream;
 xParser-parseStream( aParserInput );
 
+if( !pHandler-hasResults() )
+{
+sProgress = No results found.;
+m_pPersonaDialog-SetProgress( sProgress );
+return;
+}
+
 std::vectorOUString vLearnmoreURLs = pHandler-getLearnmoreURLs();
 std::vectorOUString::iterator it;
 std::vectorImage vResultList;
@@ -537,7 +546,7 @@ void SearchAndParseThread::getPreviewFile( const OUString 
rURL, OUString *pHead
 }
 catch (...)
 {
-sProgress = Something went wrong. Please try again.;
+OUString sProgress = Something went wrong. Please try again.;
 m_pPersonaDialog-SetProgress( sProgress );
 return;
 }
diff --git a/cui/source/options/personasdochandler.cxx 
b/cui/source/options/personasdochandler.cxx
index 521b561..020b9fc 100644
--- a/cui/source/options/personasdochandler.cxx
+++ b/cui/source/options/personasdochandler.cxx
@@ -29,7 +29,7 @@ void SAL_CALL
 PersonasDocHandler::characters( const OUString  aChars)
 throw ( xml::sax::SAXException, RuntimeException, std::exception )
 {
-if( m_bLearnmoreTag )
+if( m_isLearnmoreTag )
 m_vLearnmoreURLs.push_back( aChars );
 }
 
@@ -55,14 +55,21 @@ PersonasDocHandler::setDocumentLocator(
 
 void SAL_CALL
 PersonasDocHandler::startElement( const OUString aName,
-const Reference xml::sax::XAttributeList   )
+const Reference xml::sax::XAttributeList  xAttribs )
 throw ( xml::sax::SAXException,
 RuntimeException, std::exception )
 {
+if( aName == searchresults )
+{
+OUString aTotalResults = xAttribs-getValueByName( total_results );
+if( !aTotalResults.equals( 0 ) )
+m_hasResults = true;
+}
+
 if ( aName == learnmore )
-m_bLearnmoreTag = true;
+m_isLearnmoreTag = true;
 else
-m_bLearnmoreTag = false;
+m_isLearnmoreTag = false;
 }
 
 void SAL_CALL PersonasDocHandler::endElement( const OUString  )
diff --git a/cui/source/options/personasdochandler.hxx 
b/cui/source/options/personasdochandler.hxx
index d38f0f3..2383452 100644
--- a/cui/source/options/personasdochandler.hxx
+++ b/cui/source/options/personasdochandler.hxx
@@ -19,10 +19,12 @@ class PersonasDocHandler : public ::cppu::WeakImplHelper1 
css::xml::sax::XDocum
 {
 private:
 std::vectorOUString m_vLearnmoreURLs;
-bool m_bLearnmoreTag;
+bool m_isLearnmoreTag, m_hasResults;
 public:
-PersonasDocHandler(){ m_bLearnmoreTag = false; }
+PersonasDocHandler(){ m_isLearnmoreTag = false; m_hasResults = false; }
 std::vectorOUString getLearnmoreURLs() { return m_vLearnmoreURLs; }
+bool hasResults() { return m_hasResults; }
+
 // XDocumentHandler
 virtual void SAL_CALL startDocument()
 throw ( css::xml::sax::SAXException, css::uno

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - 2 commits - cui/source

2014-06-13 Thread Rachit Gupta
 cui/source/options/personalization.cxx |   14 +-
 cui/source/options/personalization.hxx |1 +
 2 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit ec40e0e86cd3a65fe554e28bca33f3b6e0ad7373
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Fri Jun 13 13:42:25 2014 +0530

Fixed Bug: Multiple searches result in correct theme to be applied.

The vector that stores the persona settings is cleared every time a
new search is performed. This results in the correct theme being
selected for downloading and applying.

Change-Id: I8c0413a117c5a7ed660cd785c292c2fad4abd486

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 6afdcb6..ffc1d8b 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -179,6 +179,12 @@ void SelectPersonaDialog::AddPersonaSetting( OUString 
rPersonaSetting )
 m_vPersonaSettings.push_back( rPersonaSetting );
 }
 
+void SelectPersonaDialog::ClearSearchResults()
+{
+m_vPersonaSettings.clear();
+m_aSelectedPersona = ;
+}
+
 SvxPersonalizationTabPage::SvxPersonalizationTabPage( Window *pParent, const 
SfxItemSet rSet )
 : SfxTabPage( pParent, PersonalizationTabPage, 
cui/ui/personalization_tab.ui, rSet )
 {
@@ -377,6 +383,7 @@ void SearchAndParseThread::execute()
 {
 if(m_pPersonaDialog)
 {
+m_pPersonaDialog-ClearSearchResults();
 OUString sProgress( Searching.. Please Wait.. );
 m_pPersonaDialog-SetProgress( sProgress );
 ReferenceXComponentContext xContext( 
::comphelper::getProcessComponentContext() );
diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index d514843..212a4e5 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -81,6 +81,7 @@ public:
 void SetProgress( OUString );
 void SetImages( std::vectorImage);
 void AddPersonaSetting( OUString );
+void ClearSearchResults();
 
 private:
 /// Handle the Search button
commit a4fdb0ec00ea484753c279746a16d822bcafa54e
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Fri Jun 13 11:34:59 2014 +0530

Fixed Bug: Progress label was not shown after another search.

If another search was performed with the same instance of the dialog,
then the progress label was not visible. It is visible now.

Change-Id: Ic9526248d4f79585f59f24197aac832a0bcaaeb9

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index f428230..6afdcb6 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -155,7 +155,12 @@ void SelectPersonaDialog::SetProgress( OUString rProgress 
)
 if(rProgress.isEmpty())
 m_pProgressLabel-Hide();
 else
+{
+SolarMutexGuard aGuard;
+m_pProgressLabel-Show();
 m_pProgressLabel-SetText( rProgress );
+setOptimalLayoutSize();
+}
 }
 
 void SelectPersonaDialog::SetImages( std::vectorImage rImageList )
@@ -390,7 +395,7 @@ void SearchAndParseThread::execute()
 }
 catch (...)
 {
-return;
+return;
 }
 
 xml::sax::InputSource aParserInput;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - 2 commits - cui/source cui/uiconfig

2014-06-13 Thread Rachit Gupta
 cui/source/options/personalization.cxx   |   76 +--
 cui/source/options/personalization.hxx   |   13 ++---
 cui/uiconfig/ui/select_persona_dialog.ui |   18 +++
 3 files changed, 69 insertions(+), 38 deletions(-)

New commits:
commit 8cd23b0862cf9de31babd1859b8968c6801d6272
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Fri Jun 13 22:54:45 2014 +0530

Moved the application of persona process to SelectPersonaDialog.

The theme is downloaded now when the user clicks OK on
SelectPersonaDialog instead of SvxPersonalizationTabPage. The task
is done in a separate thread.

Change-Id: I93173cce2ae9030ee8e271bd53b40e713c560731

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index ffc1d8b..dadb88f 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -43,6 +43,12 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent )
 
 get( m_pProgressLabel, progress_label );
 
+get( m_pOkButton, ok );
+m_pOkButton-SetClickHdl( LINK( this, SelectPersonaDialog, ActionOK ) );
+
+get( m_pCancelButton, cancel );
+m_pCancelButton-SetClickHdl( LINK( this, SelectPersonaDialog, 
ActionCancel ) );
+
 get(m_vResultList[0], result1);
 m_vResultList[0]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 
@@ -91,6 +97,30 @@ IMPL_LINK( SelectPersonaDialog, SearchPersonas, PushButton*, 
/*pButton*/ )
 return 0;
 }
 
+IMPL_LINK( SelectPersonaDialog, ActionOK, PushButton*, /* pButton */ )
+{
+OUString aSelectedPersona = GetSelectedPersona();
+
+if( !aSelectedPersona.isEmpty() )
+{
+m_rSearchThread = new SearchAndParseThread( this, aSelectedPersona );
+m_rSearchThread-launch();
+}
+
+else
+EndDialog( RET_OK );
+return 0;
+}
+
+IMPL_LINK( SelectPersonaDialog, ActionCancel, PushButton*, /* pButton */ )
+{
+if( m_rSearchThread.is() )
+m_rSearchThread-terminate();
+
+EndDialog( RET_CANCEL );
+return 0;
+}
+
 IMPL_LINK( SelectPersonaDialog, SelectPersona, PushButton*, pButton )
 {
 if( pButton == m_vResultList[0] )
@@ -150,6 +180,16 @@ IMPL_LINK( SelectPersonaDialog, SelectPersona, 
PushButton*, pButton )
 return 0;
 }
 
+void SelectPersonaDialog::SetAppliedPersonaSetting( OUString rPersonaSetting )
+{
+m_aAppliedPersona = rPersonaSetting;
+}
+
+OUString SelectPersonaDialog::GetAppliedPersonaSetting() const
+{
+return m_aAppliedPersona;
+}
+
 void SelectPersonaDialog::SetProgress( OUString rProgress )
 {
 if(rProgress.isEmpty())
@@ -269,10 +309,10 @@ IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, 
PushButton*, /*pButton*/ )
 
 while ( aDialog.Execute() == RET_OK )
 {
-OUString aURL( aDialog.GetSelectedPersona() );
-if ( !aURL.isEmpty() )
+OUString aPersonaSetting( aDialog.GetAppliedPersonaSetting() );
+if ( !aPersonaSetting.isEmpty() )
 {
-CopyPersonaToGallery( aURL );
+m_aPersonaSettings = aPersonaSetting;
 break;
 }
 }
@@ -345,12 +385,6 @@ static bool parsePersonaInfo( const OString rBuffer, 
OUString *pHeaderURL, OUSt
 return true;
 }
 
-void SvxPersonalizationTabPage::CopyPersonaToGallery( const OUString rURL )
-{
-m_rApplyThread = new SearchAndParseThread( this, rURL );
-m_rApplyThread-launch();
-}
-
 void SvxPersonalizationTabPage::setPersonaSettings( const OUString 
aPersonaSettings )
 {
 m_aPersonaSettings = aPersonaSettings;
@@ -361,16 +395,6 @@ SearchAndParseThread::SearchAndParseThread( 
SelectPersonaDialog* pDialog,
   const OUString rURL ) :
 Thread( cuiPersonasSearchThread ),
 m_pPersonaDialog( pDialog ),
-m_pPersonalizationTabPage( NULL ),
-m_aURL( rURL )
-{
-}
-
-SearchAndParseThread::SearchAndParseThread( SvxPersonalizationTabPage* pDialog,
-  const OUString rURL ) :
-Thread( cuiPersonasSearchThread ),
-m_pPersonaDialog( NULL ),
-m_pPersonalizationTabPage( pDialog ),
 m_aURL( rURL )
 {
 }
@@ -381,7 +405,7 @@ SearchAndParseThread::~SearchAndParseThread()
 
 void SearchAndParseThread::execute()
 {
-if(m_pPersonaDialog)
+if( m_aURL.startsWith( https://; ) )
 {
 m_pPersonaDialog-ClearSearchResults();
 OUString sProgress( Searching.. Please Wait.. );
@@ -437,12 +461,15 @@ void SearchAndParseThread::execute()
 
 else
 {
+OUString sProgress( Applying persona.. );
+m_pPersonaDialog-SetProgress( sProgress );
+
 uno::Reference ucb::XSimpleFileAccess3  xFileAccess( 
ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), 
uno::UNO_QUERY );
 if ( !xFileAccess.is() )
 return;
 
 OUString aName, aHeaderURL, aFooterURL, aTextColor, aAccentColor;
-OUString m_aPersonaSettings

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-06-12 Thread Rachit Gupta
 cui/source/options/personalization.cxx |  221 ++---
 cui/source/options/personalization.hxx |   10 +
 2 files changed, 130 insertions(+), 101 deletions(-)

New commits:
commit cdd2b7aa6ed57e0e1090cc65c292ffe943f5457e
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Thu Jun 12 17:13:33 2014 +0530

The theme is download and applied in a separate thread.

Changed the SearchAndPersonaThread to include an instance of
SvxPersonalizationTabPage along with an instance of
SelectPersonaDialog. The constructor sets one of the instance and
the other one as null. In the execute() method, whichever instance
is null, the other one's process is done in the thread.

Change-Id: Iabfbdba63ce532ab794d3697977b6fab3fdaa832

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 3e04336..f428230 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -85,9 +85,9 @@ IMPL_LINK( SelectPersonaDialog, SearchPersonas, PushButton*, 
/*pButton*/ )
 if( searchTerm.isEmpty( ) )
 return 0;
 
-OUString rSearchURL = 
https://addons.allizom.org/en-US/firefox/api/1.5/search/; + searchTerm + 
/9/9;
-m_aSearchThread = new SearchAndParseThread( this, rSearchURL );
-m_aSearchThread-launch();
+OUString rSearchURL = 
https://addons.allizom.org/en-US/firefox/api/1.5/search/; + searchTerm + 
/9/1;
+m_rSearchThread = new SearchAndParseThread( this, rSearchURL );
+m_rSearchThread-launch();
 return 0;
 }
 
@@ -261,11 +261,9 @@ IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, 
PushButton*, /*pButton*/ )
 OUString aURL( aDialog.GetSelectedPersona() );
 if ( !aURL.isEmpty() )
 {
-if ( CopyPersonaToGallery( aURL ) )
-m_pOwnPersona-Check();
+CopyPersonaToGallery( aURL );
 break;
 }
-// else TODO msgbox that the URL did not match
 }
 
 return 0;
@@ -336,67 +334,32 @@ static bool parsePersonaInfo( const OString rBuffer, 
OUString *pHeaderURL, OUSt
 return true;
 }
 
-bool SvxPersonalizationTabPage::CopyPersonaToGallery( const OUString rURL )
+void SvxPersonalizationTabPage::CopyPersonaToGallery( const OUString rURL )
 {
-// init the input stream
-uno::Reference ucb::XSimpleFileAccess3  xFileAccess( 
ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), 
uno::UNO_QUERY );
-if ( !xFileAccess.is() )
-return false;
-
-OUString aName, aHeaderURL, aFooterURL, aTextColor, aAccentColor;
-
-// get the required fields from rURL
-sal_Int32 nOldIndex = 0;
-sal_Int32 nNewIndex = rURL.indexOf( ';', nOldIndex );
-aName = rURL.copy( nOldIndex, ( nNewIndex - nOldIndex ) );
-
-nOldIndex = nNewIndex + 1;
-nNewIndex = rURL.indexOf( ';', nOldIndex );
-aHeaderURL = rURL.copy(nOldIndex , ( nNewIndex - nOldIndex ) );
-
-nOldIndex = nNewIndex + 1;
-nNewIndex = rURL.indexOf( ';', nOldIndex );
-aFooterURL = rURL.copy( nOldIndex,  ( nNewIndex - nOldIndex ) );
-
-nOldIndex = nNewIndex + 1;
-nNewIndex = rURL.indexOf( ';', nOldIndex );
-aTextColor = rURL.copy( nOldIndex, ( nNewIndex - nOldIndex ) );
-
-nOldIndex = nNewIndex + 1;
-nNewIndex = rURL.getLength();
-aAccentColor = rURL.copy( nOldIndex, ( nNewIndex - nOldIndex ) );
-
-// copy the images to the user's gallery
-OUString gallery = ${$BRAND_BASE_DIR/ LIBO_ETC_FOLDER / 
SAL_CONFIGFILE( bootstrap) ::UserInstallation};
-rtl::Bootstrap::expandMacros( gallery );
-gallery += /user/gallery/personas/;
-osl::Directory::createPath( gallery );
-
-OUString aHeaderFile( INetURLObject( aHeaderURL ).getName() );
-OUString aFooterFile( INetURLObject( aFooterURL ).getName() );
-
-aHeaderFile = aName + / + aHeaderFile;
-aFooterFile = aName + / + aFooterFile;
-
-try {
-xFileAccess-copy( aHeaderURL, gallery + aHeaderFile );
-xFileAccess-copy( aFooterURL, gallery + aFooterFile );
-}
-catch ( const uno::Exception  )
-{
-return false;
-}
-
-m_aPersonaSettings = aHeaderFile + ; + aFooterFile + ; + aTextColor + 
; + aAccentColor;
-
-return true;
+m_rApplyThread = new SearchAndParseThread( this, rURL );
+m_rApplyThread-launch();
 }
 
+void SvxPersonalizationTabPage::setPersonaSettings( const OUString 
aPersonaSettings )
+{
+m_aPersonaSettings = aPersonaSettings;
+m_pOwnPersona-Check();
+}
 
 SearchAndParseThread::SearchAndParseThread( SelectPersonaDialog* pDialog,
   const OUString rURL ) :
 Thread( cuiPersonasSearchThread ),
 m_pPersonaDialog( pDialog ),
+m_pPersonalizationTabPage( NULL ),
+m_aURL( rURL )
+{
+}
+
+SearchAndParseThread::SearchAndParseThread( SvxPersonalizationTabPage* pDialog,
+  const OUString rURL ) :
+Thread

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-06-11 Thread Rachit Gupta
 cui/source/options/personalization.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 14f72d1e6a05484007e2ae4d9bcc89b3859083b7
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Wed Jun 11 22:42:12 2014 +0530

Changed the Persona application process a bit.

The header and footer files of the selected theme are downloaded and
saved in the Theme's own folder and applied.

Change-Id: Ie974c9bedc01a20c70cb342196fb60550cb39a0f

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 5ef6ff1..3e04336 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -370,12 +370,14 @@ bool SvxPersonalizationTabPage::CopyPersonaToGallery( 
const OUString rURL )
 OUString gallery = ${$BRAND_BASE_DIR/ LIBO_ETC_FOLDER / 
SAL_CONFIGFILE( bootstrap) ::UserInstallation};
 rtl::Bootstrap::expandMacros( gallery );
 gallery += /user/gallery/personas/;
-// gallery += aName + /;
 osl::Directory::createPath( gallery );
 
 OUString aHeaderFile( INetURLObject( aHeaderURL ).getName() );
 OUString aFooterFile( INetURLObject( aFooterURL ).getName() );
 
+aHeaderFile = aName + / + aHeaderFile;
+aFooterFile = aName + / + aFooterFile;
+
 try {
 xFileAccess-copy( aHeaderURL, gallery + aHeaderFile );
 xFileAccess-copy( aFooterURL, gallery + aFooterFile );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSOC] Personas - Weekly Report #3

2014-06-09 Thread Rachit Gupta
Hello all,

I couldn't work this week till Friday due to my exams (they are finally
over!). However, I worked during the weekend, and I achieved the following:

+ The user can click on the theme he/she likes, and the selected theme is
stored in  a variable.
+ If the user clicks on OK, the selected theme is downloaded and applied
to the UI.

For the coming week, I'll be focusing on:

+ Running the application of theme code in a separate thread.
+ Improving the user interface of the selection dialog.

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - 2 commits - cui/source

2014-06-08 Thread Rachit Gupta
 cui/source/options/personalization.cxx |  174 +++--
 cui/source/options/personalization.hxx |   24 ++--
 2 files changed, 138 insertions(+), 60 deletions(-)

New commits:
commit 5e26c46ad1516bfc50c95fb937a8b56db0ebed93
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Sun Jun 8 20:33:50 2014 +0530

The selected theme is now applied to the suite.

1. Added IMPL_LINKs for the result buttons.
2. Created a vector to store the temporary persona settings in the
   format: name;headerURL;footerURL;textColor;accentColor.
3. When a button is clicked, the corresponding setting is copied to
   m_aPersonaSetting.
4. The persona setting is parsed in CopyPersonaToGallery and the
   header and footer images are downloaded.

Change-Id: Ib83016ad5bdfa83963843146ef6a4674fcd73868

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 677ff11..5ef6ff1 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -44,22 +44,37 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent )
 get( m_pProgressLabel, progress_label );
 
 get(m_vResultList[0], result1);
+m_vResultList[0]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
+
 get(m_vResultList[1], result2);
+m_vResultList[1]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
+
 get(m_vResultList[2], result3);
+m_vResultList[2]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
+
 get(m_vResultList[3], result4);
+m_vResultList[3]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
+
 get(m_vResultList[4], result5);
+m_vResultList[4]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
+
 get(m_vResultList[5], result6);
+m_vResultList[5]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
+
 get(m_vResultList[6], result7);
+m_vResultList[6]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
+
 get(m_vResultList[7], result8);
+m_vResultList[7]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
+
 get(m_vResultList[8], result9);
+m_vResultList[8]-SetClickHdl( LINK( this, SelectPersonaDialog, 
SelectPersona ) );
 }
 
-OUString SelectPersonaDialog::GetPersonaURL() const
+OUString SelectPersonaDialog::GetSelectedPersona() const
 {
-OUString aText( m_pEdit-GetText() );
-
-if ( aText.startsWith( https://addons.mozilla.org/; ) )
-return aText;
+if( !m_aSelectedPersona.isEmpty( ) )
+return m_aSelectedPersona;
 
 return OUString();
 }
@@ -67,12 +82,74 @@ OUString SelectPersonaDialog::GetPersonaURL() const
 IMPL_LINK( SelectPersonaDialog, SearchPersonas, PushButton*, /*pButton*/ )
 {
 OUString searchTerm = m_pEdit-GetText();
+if( searchTerm.isEmpty( ) )
+return 0;
+
 OUString rSearchURL = 
https://addons.allizom.org/en-US/firefox/api/1.5/search/; + searchTerm + 
/9/9;
 m_aSearchThread = new SearchAndParseThread( this, rSearchURL );
 m_aSearchThread-launch();
 return 0;
 }
 
+IMPL_LINK( SelectPersonaDialog, SelectPersona, PushButton*, pButton )
+{
+if( pButton == m_vResultList[0] )
+{
+if( !m_vPersonaSettings[0].isEmpty() )
+m_aSelectedPersona = m_vPersonaSettings[0];
+}
+
+else if( pButton == m_vResultList[1] )
+{
+if( !m_vPersonaSettings[1].isEmpty() )
+m_aSelectedPersona = m_vPersonaSettings[1];
+}
+
+else if( pButton == m_vResultList[2] )
+{
+if( !m_vPersonaSettings[2].isEmpty() )
+m_aSelectedPersona = m_vPersonaSettings[2];
+}
+
+else if( pButton == m_vResultList[3] )
+{
+if( !m_vPersonaSettings[3].isEmpty() )
+m_aSelectedPersona = m_vPersonaSettings[3];
+}
+
+else if( pButton == m_vResultList[4] )
+{
+if( !m_vPersonaSettings[4].isEmpty() )
+m_aSelectedPersona = m_vPersonaSettings[4];
+}
+
+else if( pButton == m_vResultList[5] )
+{
+if( !m_vPersonaSettings[5].isEmpty() )
+m_aSelectedPersona = m_vPersonaSettings[5];
+}
+
+else if( pButton == m_vResultList[6] )
+{
+if( !m_vPersonaSettings[6].isEmpty() )
+m_aSelectedPersona = m_vPersonaSettings[6];
+}
+
+else if( pButton == m_vResultList[7] )
+{
+if( !m_vPersonaSettings[7].isEmpty() )
+m_aSelectedPersona = m_vPersonaSettings[7];
+}
+
+else if( pButton == m_vResultList[8] )
+{
+if( !m_vPersonaSettings[8].isEmpty() )
+m_aSelectedPersona = m_vPersonaSettings[8];
+}
+
+return 0;
+}
+
 void SelectPersonaDialog::SetProgress( OUString rProgress )
 {
 if(rProgress.isEmpty())
@@ -92,6 +169,11 @@ void SelectPersonaDialog::SetImages( std::vectorImage 
rImageList )
 }
 }
 
+void SelectPersonaDialog::AddPersonaSetting( OUString

[GSOC] Peronas - Weekly Report #2

2014-06-02 Thread Rachit Gupta
Hello All.

I couldn't work much this week owing to my University examinations.
However, I managed to do the following:

   - Convert images to buttons and load images on top of them.
   - Add a spacing of 6 between the images.

I have my last exam on Thursday, but I'll work throughout this week. My
focus will be on:

   - Application of the selected theme.
   - UI quirks.

Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source cui/uiconfig

2014-06-02 Thread Rachit Gupta
 cui/source/options/personalization.cxx   |   28 +-
 cui/source/options/personalization.hxx   |2 
 cui/uiconfig/ui/select_persona_dialog.ui |   83 ---
 3 files changed, 72 insertions(+), 41 deletions(-)

New commits:
commit 8c5811cc945fea05d75f52bf917f315b1a09069d
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Mon Jun 2 23:26:11 2014 +0530

Changed images to buttons so they are clickable.

Changed some variable names too.

Change-Id: I166d996389c84d00782cba42169c991f8f0f923e

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index e4d82ef..9c8d345 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -43,15 +43,15 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent )
 
 get( m_pProgressLabel, progress_label );
 
-get(m_vImageList[0], image1);
-get(m_vImageList[1], image2);
-get(m_vImageList[2], image3);
-get(m_vImageList[3], image4);
-get(m_vImageList[4], image5);
-get(m_vImageList[5], image6);
-get(m_vImageList[6], image7);
-get(m_vImageList[7], image8);
-get(m_vImageList[8], image9);
+get(m_vResultList[0], result1);
+get(m_vResultList[1], result2);
+get(m_vResultList[2], result3);
+get(m_vResultList[3], result4);
+get(m_vResultList[4], result5);
+get(m_vResultList[5], result6);
+get(m_vResultList[6], result7);
+get(m_vResultList[7], result8);
+get(m_vResultList[8], result9);
 }
 
 OUString SelectPersonaDialog::GetPersonaURL() const
@@ -86,7 +86,9 @@ void SelectPersonaDialog::SetImages( std::vectorImage 
rImageList )
 sal_Int32 nCount = 0;
 for( std::vectorImage::iterator it=rImageList.begin(); 
it!=rImageList.end(); ++it )
 {
-m_vImageList[nCount++]-SetImage( *it );
+m_vResultList[nCount]-Show();
+m_vResultList[nCount]-SetModeImage( *it );
+nCount++;
 }
 }
 
@@ -357,7 +359,7 @@ void SearchAndParseThread::execute()
 
 std::vectorOUString vLearnmoreURLs = pHandler-getLearnmoreURLs();
 std::vectorOUString::iterator it;
-std::vectorImage vImageList;
+std::vectorImage vResultList;
 GraphicFilter aFilter;
 Graphic aGraphic;
 
@@ -367,9 +369,9 @@ void SearchAndParseThread::execute()
 INetURLObject aURLObj( sHeaderFile );
 aFilter.ImportGraphic( aGraphic, aURLObj );
 Bitmap aBmp = aGraphic.GetBitmap();
-vImageList.push_back( Image( aBmp ) );
+vResultList.push_back( Image( aBmp ) );
 }
-m_pPersonaDialog-SetImages( vImageList );
+m_pPersonaDialog-SetImages( vResultList );
 sProgress = ;
 m_pPersonaDialog-SetProgress( sProgress );
 m_pPersonaDialog-setOptimalLayoutSize();
diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index e7f02c9..9bc99a7 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -65,7 +65,7 @@ private:
 Edit *m_pEdit;  /// The input line for the 
Persona URL
 PushButton *m_pButton;
 FixedText *m_pProgressLabel;
-FixedImage *m_vImageList[9];
+PushButton *m_vResultList[9];
 
 public:
 SelectPersonaDialog( Window *pParent );
diff --git a/cui/uiconfig/ui/select_persona_dialog.ui 
b/cui/uiconfig/ui/select_persona_dialog.ui
index ab4c89c..2c9f5a1 100644
--- a/cui/uiconfig/ui/select_persona_dialog.ui
+++ b/cui/uiconfig/ui/select_persona_dialog.ui
@@ -132,11 +132,16 @@
   object class=GtkGrid id=grid1
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=row_spacing6/property
+property name=column_spacing6/property
 child
-  object class=GtkImage id=image1
+  object class=GtkButton id=result1
 property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=stockgtk-missing-image/property
+property name=can_focusTrue/property
+property name=receives_defaultTrue/property
+child
+  placeholder/
+/child
   /object
   packing
 property name=left_attach0/property
@@ -146,10 +151,13 @@
   /packing
 /child
 child
-  object class=GtkImage id=image2
+  object class=GtkButton id=result2
 property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=stockgtk-missing-image/property
+property name=can_focusTrue/property
+property name=receives_defaultTrue/property
+child

[GSOC] Personas - Weekly Report #1

2014-05-26 Thread Rachit Gupta
Hello All,

I'm working on improving the usability of Personas in LibreOffice. I
started working since the Community Bonding period, and with the help of
Kendy, I've done the following things:

   - Read about the Mozilla AMO API. The search API in particular and the
   data it returns, which is XML.
   - Created an XML Parser (PersonasDocHandler) to parse the XML results.
   - Changed the GUI in select_persona_dialog.ui to include a search bar
   and a 3x3 grid of images to show the results.
   - Created a thread (SearchAndParseThread) to retrieve and parse the
   search data in background, so the UI is not blocked. The preview images are
   downloaded from the HTML of the themes into their respective folders in the
   Gallery folder, and displayed in the grid.

I have my University exams this week, so I won't be able to work much (will
work on weekend). Still, my next work includes:

   - Adding spacing between images.
   - Images can't be clicked, so think of a way of using button with images.
   - Other UI quirks.

Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source

2014-05-25 Thread Rachit Gupta
 cui/source/options/personalization.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 1e5ae6180a65ff5dfe7371a8e0a3240319da1e81
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Sun May 25 17:29:21 2014 +0530

Added setOptimalLayoutSize() to resize the dialog after images load.

Change-Id: If85d4baacbffb6b7e6bf8feceb9c58697ee158d8

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 357d5ab..e4d82ef 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -372,6 +372,7 @@ void SearchAndParseThread::execute()
 m_pPersonaDialog-SetImages( vImageList );
 sProgress = ;
 m_pPersonaDialog-SetProgress( sProgress );
+m_pPersonaDialog-setOptimalLayoutSize();
 }
 
 // TODO: Think of some way to retrieve only the preview image and skip the 
rest!
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-personas' - cui/source cui/uiconfig

2014-05-22 Thread Rachit Gupta
 cui/source/options/personalization.cxx|  129 -
 cui/source/options/personalization.hxx|   10 +
 cui/source/options/personasdochandler.hxx |1 
 cui/uiconfig/ui/select_persona_dialog.ui  |  151 +++---
 4 files changed, 269 insertions(+), 22 deletions(-)

New commits:
commit 62df0a31f5298843586c3c4936434761fdf4268c
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Thu May 22 20:48:34 2014 +0530

The search result images are shown in the dialog.

1. Changed the UI to include a 3x3 grid of images
2. The preview images are downloaded in the thread
3. The images are downloaded in their respective folders
4. A progress label is shown

Change-Id: Id87e72343d28e03b37e0c422e5ebfe1a9a37c1b5

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index b454d17..357d5ab 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -35,11 +35,23 @@ using namespace ::com::sun::star::ucb;
 SelectPersonaDialog::SelectPersonaDialog( Window *pParent )
 : ModalDialog( pParent, SelectPersonaDialog, 
cui/ui/select_persona_dialog.ui )
 {
-get( pButton, search_personas );
-pButton-SetClickHdl( LINK( this, SelectPersonaDialog, VisitPersonas ) );
+get( m_pButton, search_personas );
+m_pButton-SetClickHdl( LINK( this, SelectPersonaDialog, VisitPersonas ) );
 
 get( m_pEdit, search_term );
 m_pEdit-SetPlaceholderText( Search term... );
+
+get( m_pProgressLabel, progress_label );
+
+get(m_vImageList[0], image1);
+get(m_vImageList[1], image2);
+get(m_vImageList[2], image3);
+get(m_vImageList[3], image4);
+get(m_vImageList[4], image5);
+get(m_vImageList[5], image6);
+get(m_vImageList[6], image7);
+get(m_vImageList[7], image8);
+get(m_vImageList[8], image9);
 }
 
 OUString SelectPersonaDialog::GetPersonaURL() const
@@ -55,12 +67,29 @@ OUString SelectPersonaDialog::GetPersonaURL() const
 IMPL_LINK( SelectPersonaDialog, VisitPersonas, PushButton*, /*pButton*/ )
 {
 OUString searchTerm = m_pEdit-GetText();
-OUString rURL = https://addons.allizom.org/en-US/firefox/api/1.5/search/; 
+ searchTerm + /9/;
+OUString rURL = https://addons.allizom.org/en-US/firefox/api/1.5/search/; 
+ searchTerm + /9/9;
 m_aSearchThread = new SearchAndParseThread( this, rURL );
 m_aSearchThread-launch();
 return 0;
 }
 
+void SelectPersonaDialog::SetProgress( OUString rProgress )
+{
+if(rProgress.isEmpty())
+m_pProgressLabel-Hide();
+else
+m_pProgressLabel-SetText( rProgress );
+}
+
+void SelectPersonaDialog::SetImages( std::vectorImage rImageList )
+{
+sal_Int32 nCount = 0;
+for( std::vectorImage::iterator it=rImageList.begin(); 
it!=rImageList.end(); ++it )
+{
+m_vImageList[nCount++]-SetImage( *it );
+}
+}
+
 SvxPersonalizationTabPage::SvxPersonalizationTabPage( Window *pParent, const 
SfxItemSet rSet )
 : SfxTabPage( pParent, PersonalizationTabPage, 
cui/ui/personalization_tab.ui, rSet )
 {
@@ -187,7 +216,9 @@ static OUString searchValue( const OString rBuffer, 
sal_Int32 from, const OStri
 }
 
 /// Parse the Persona web page, and find where to get the bitmaps + the color 
values.
-static bool parsePersonaInfo( const OString rBuffer, OUString *pHeaderURL, 
OUString *pFooterURL, OUString *pTextColor, OUString *pAccentColor )
+static bool parsePersonaInfo( const OString rBuffer, OUString *pHeaderURL, 
OUString *pFooterURL,
+  OUString *pTextColor, OUString *pAccentColor, 
OUString *pPreviewURL,
+  OUString *pName )
 {
 // it is the first attribute that contains persona=
 sal_Int32 persona = rBuffer.indexOf( data-browsertheme=\{ );
@@ -211,6 +242,14 @@ static bool parsePersonaInfo( const OString rBuffer, 
OUString *pHeaderURL, OUSt
 if ( pAccentColor-isEmpty() )
 return false;
 
+*pPreviewURL = searchValue( rBuffer, persona, #34;previewURL#34;:#34; 
);
+if ( pAccentColor-isEmpty() )
+return false;
+
+*pName = searchValue( rBuffer, persona, #34;name#34;:#34; );
+if ( pAccentColor-isEmpty() )
+return false;
+
 return true;
 }
 
@@ -249,9 +288,9 @@ bool SvxPersonalizationTabPage::CopyPersonaToGallery( const 
OUString rURL )
 xStream-closeInput();
 
 // get the important bits of info
-OUString aHeaderURL, aFooterURL, aTextColor, aAccentColor;
+OUString aHeaderURL, aFooterURL, aTextColor, aAccentColor, aPreviewURL, 
aName;
 
-if ( !parsePersonaInfo( aBuffer.makeStringAndClear(), aHeaderURL, 
aFooterURL, aTextColor, aAccentColor ) )
+if ( !parsePersonaInfo( aBuffer.makeStringAndClear(), aHeaderURL, 
aFooterURL, aTextColor, aAccentColor, aPreviewURL, aName ) ) // Temp
 return false;
 
 // copy the images to the user's gallery
@@ -292,6 +331,8 @@ SearchAndParseThread::~SearchAndParseThread()
 
 void

[Libreoffice-commits] core.git: Changes to 'feature/gsoc14-personas'

2014-05-19 Thread Rachit Gupta
New branch 'feature/gsoc14-personas' available with the following commits:
commit 1c1396260dbd3ea44a930b44cfcc2eaf35f5167d
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Mon May 19 19:56:44 2014 +0530

Moved definition of SelectPersonaDialog to personalization.hxx

Change-Id: Ic6ffcfb394e36d4d9ce9825b26095fe2a0f34fdd

commit ab238d8646abf39fea86613f462117bbd6180045
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Mon May 19 18:56:24 2014 +0530

Changed license and added #ifdef.

Change-Id: If1b0d447eba7c7afdc28aa4246556d14e2fcc98e

commit 10b31c18825f01e4ea20c355efeb2e9d974d4c72
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue May 13 22:16:05 2014 +0530

Created std::vector to store learnmore URLs.

For now, we have to parse the HTML and display the images as the
result XML does not contain the header and footer URLs.

Change-Id: Ie95a75e218bc3da12802c971ea744fb38951e574

commit 22edb5fc5ae170e9f04b0a859cfcc12bca9111c7
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Thu May 1 23:55:41 2014 +0530

select_persona_dialog.ui changed to include search.

The entered text is searched on Mozilla's test server and the result is 
parsed.

Change-Id: I2be660b0f7f60d2bdb2c54cbc958084b87ad1e05

commit 515ba328f94fd88d0e4237f28efe67bc0d926146
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Tue Apr 29 19:48:48 2014 +0530

Created basic architecture for PersonasDocHandler.

Change-Id: Ic1454344756c48090ebe821799d10dd6ace0264c

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Fwd: Help on solving fdo#49091

2014-04-23 Thread Rachit Gupta
Hello, I'm working on
fdo#49091https://bugs.freedesktop.org/show_bug.cgi?id=49091,
according to the comment posted on it recently, when a table is being
edited and the user presses Alt+Left, then the default action is to reduce
the column width. But if the user has assigned a separate action to
Alt+Left, then that action is to be performed as well? Or does the default
action gets overridden?

Also, I have noticed that in Calc, when one assigns an action to say,
Alt+Left, then the default action is overridden by the action set by user.
Do we need something similar in writer as well?

Thanks,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Help on solving fdo#49091

2014-04-21 Thread Rachit Gupta
Hello, I'm working on
fdo#49091https://bugs.freedesktop.org/show_bug.cgi?id=49091,
according to the comment posted on it recently, when a table is being
edited and the user presses Alt+Left, then the default action is to reduce
the column width. But if the user has assigned a separate action to
Alt+Left, then that action is to be performed as well?

Also, I have noticed that in calc, when one assigns an action to say,
Alt+Left, then the default action is overridden by the action set by user.
Do we need something similar in writer as well?


Thanks,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Need further help on fdo#49091

2014-04-19 Thread Rachit Gupta
Hello,

This is in continuation to my previous mail about
https://bugs.freedesktop.org/show_bug.cgi?id=49091. Comment#4 on the report
suggests that the default bindings should still work after any changes are
made. But, I noticed that in Calc, if one assigns an action to, say
Alt+Left, then the default action (reducing in current cell width) is
overridden by the action set by the user. So, should something similar be
done with Writer as well?

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Need help for fdo#490941

2014-04-18 Thread Rachit Gupta
Hello everyone,

I'm working on fdo#49091 (https://bugs.freedesktop.org/show_bug.cgi?id=49091),
according to the comment posted on it recently, when a table is being
edited and the user presses Alt+Left, then the default action is to reduce
the column width. But if the user has assigned a separate action to
Alt+Left, then that action is to be performed as well?


Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Need help for fdo#490941

2014-04-18 Thread Rachit Gupta
But the comment#4 on the report (
https://bugs.freedesktop.org/show_bug.cgi?id=49091#c4) specifically says to
make sure the existing bindings should still work after any changes are
made. What to do in such a case?


On Sat, Apr 19, 2014 at 12:34 AM, John Smith lbalba...@gmail.com wrote:

 Perhaps, in an ideal world, it is user configurable (the user gets to
 choose) whether, in case of conflict, system default key-assignments
 can be overridden by custom user assignments or not. ?

 On Fri, Apr 18, 2014 at 5:59 PM, Rachit Gupta rachitgupta1...@gmail.com
 wrote:
  Hello everyone,
 
  I'm working on fdo#49091
  (https://bugs.freedesktop.org/show_bug.cgi?id=49091), according to the
  comment posted on it recently, when a table is being edited and the user
  presses Alt+Left, then the default action is to reduce the column width.
 But
  if the user has assigned a separate action to Alt+Left, then that action
 is
  to be performed as well?
 
 
  Regards,
  Rachit Gupta
 
  ___
  LibreOffice mailing list
  LibreOffice@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Help with fdo#49091

2014-04-14 Thread Rachit Gupta
Hello everyone,

I have been working on fdo#49091 (
https://bugs.freedesktop.org/show_bug.cgi?id=49091)

After some debugging, I found out the reason that Alt+Left or Alt+Right and
many other combinations don't work is because of the various cases in
http://opengrok.libreoffice.org/xref/core/sw/source/core/uibase/docvw/edtwin.cxx#1614,
followed by
http://opengrok.libreoffice.org/xref/core/sw/source/core/uibase/docvw/edtwin.cxx#2203,
where eKeyState gets set to KS_End, that is, eKeyState never gets set to
KS_KeyToView and hence the action is never called!

I need some help in moving forward with this one.

-- 
Thanks,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: vcl/unx

2014-03-01 Thread Rachit Gupta
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 55eb86699d7d4b2151530e9a0b3ca2e99033595b
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Wed Feb 26 19:12:08 2014 +0530

fdo#74064 The filename gets properly highlighted in the Save As dialog.

The filename was missing the extension which was causing problems.
The extension is retained now by disabling the autoextension checkbox.

Change-Id: If913124c22265da2bacb043d83386fd8f5710ca8
Reviewed-on: https://gerrit.libreoffice.org/8364
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx 
b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 2365565..6e524b9 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -1345,9 +1345,13 @@ void SAL_CALL SalGtkFilePicker::setValue( sal_Int16 
nControlId, sal_Int16 nContr
 OSL_TRACE(enable unknown control %d, nControlId);
 else if( tType == GTK_TYPE_TOGGLE_BUTTON )
 {
-bool bChecked = false;
-rValue = bChecked;
-gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( pWidget ), bChecked );
+// fdo#74064, not activating the auto_extension checkbox so that 
proper filename is highlighted.
+if(nControlId != ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION)
+{
+bool bChecked = false;
+rValue = bChecked;
+gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( pWidget ), 
bChecked );
+}
 }
 else if( tType == GTK_TYPE_COMBO_BOX )
 HandleSetListValue(GTK_COMBO_BOX(pWidget), nControlAction, rValue);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-02-22 Thread Rachit Gupta
 sfx2/source/dialog/dialog.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e274337e6d05bc2891b349e7eab7847e91302597
Author: Rachit Gupta rachitgupta1...@gmail.com
Date:   Fri Feb 21 23:05:33 2014 +0530

fdo#74913 The delete style confirmation dialog asks the question now.

Change-Id: I9d2ed3b233f83d05314c2ad1453be487b25d6be8
Reviewed-on: https://gerrit.libreoffice.org/8163
Reviewed-by: Joren De Cuyper jore...@libreoffice.org
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src
index b1fffdb..08371c4 100644
--- a/sfx2/source/dialog/dialog.src
+++ b/sfx2/source/dialog/dialog.src
@@ -54,7 +54,7 @@ InfoBox MSG_POOL_STYLE_NAME
 };
 String STR_DELETE_STYLE_USED
 {
-Text [ en-US ] = One or more of the selected styles is in use in this 
document.\nIf you delete these styles, text will revert to the parent style.\n 
;
+Text [ en-US ] = One or more of the selected styles is in use in this 
document.\nIf you delete these styles, text will revert to the parent 
style.\nDo you still wish to delete these styles?\n ;
 };
 String STR_DELETE_STYLE
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Rachit Gupta license statement

2014-02-21 Thread Rachit Gupta
All of my past  future contributions to LibreOffice may be licensed
under the MPLv2/LGPLv3+ dual license.

-- 
Regards,
Rachit Gupta
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


  1   2   >