[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - 3 commits - include/svtools svtools/source svtools/uiconfig
Szymon Kłos
eszkadev at gmail.com
Wed Aug 12 05:25:48 PDT 2015
include/svtools/PlaceEditDialog.hxx | 4 ++-
svtools/source/dialogs/PlaceEditDialog.cxx | 29 ++++++++++++++++++++++++
svtools/uiconfig/ui/placeedit.ui | 35 +++++++++++++++++++++--------
3 files changed, 58 insertions(+), 10 deletions(-)
New commits:
commit b5d7bdb623c67481e37d6db2b04e3adc45b900c8
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Wed Aug 12 14:23:47 2015 +0200
User field before Refresh Repos button in the form
Change-Id: I2a1aa420c1a0537b80aee3ef2602b1892a131919
diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index eb769f8..8f4e0e5 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -244,7 +244,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
@@ -272,7 +272,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -284,7 +284,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -403,7 +403,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
@@ -416,7 +416,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">5</property>
</packing>
</child>
<child>
@@ -428,7 +428,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">5</property>
</packing>
</child>
<child>
@@ -442,7 +442,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
commit 968367d6bca49f52bdb41bb23d5feec4fd2afd55
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Wed Aug 12 12:34:42 2015 +0200
don't enable password control, when whole frame is inactive
Change-Id: I165f08a3709b1d32ddab4632342d21b43d3f8ff1
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index 51d7828..a04f8f3 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -158,7 +158,7 @@ void PlaceEditDialog::ShowPasswordControl( bool bShow )
IMPL_LINK( PlaceEditDialog, ToggledPassHdl, CheckBox*, pCheckBox )
{
- bool bChecked = pCheckBox->IsChecked();
+ bool bChecked = pCheckBox->IsEnabled() && pCheckBox->IsChecked();
m_pEDPassword->Enable( bChecked );
m_pFTPasswordLabel->Enable( bChecked );
commit 0464d9682fe23f5af770b613edfbf66fb89f4dcf
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Wed Aug 12 11:05:17 2015 +0200
added 'Remember password' checkbox
Change-Id: I4231acd92d263ca772a1aa7b3e178c5681ee86e0
diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx
index 79ec348..c8cdabe 100644
--- a/include/svtools/PlaceEditDialog.hxx
+++ b/include/svtools/PlaceEditDialog.hxx
@@ -34,6 +34,7 @@ private:
std::shared_ptr< DetailsContainer > m_xCurrentDetails;
VclPtr<Edit> m_pEDUsername;
+ VclPtr<CheckBox> m_pCBPassword;
VclPtr<Edit> m_pEDPassword;
VclPtr<FixedText> m_pFTPasswordLabel;
VclPtr<OKButton> m_pBTOk;
@@ -72,7 +73,7 @@ public :
OUString GetPassword() { return m_pEDPassword->GetText(); };
OUString GetUser() { return m_pEDUsername->GetText(); };
- void ShowPasswordControl( bool bShow = true ) { m_pEDPassword->Show( bShow ); m_pFTPasswordLabel->Show( bShow ); }
+ void ShowPasswordControl( bool bShow = true );
private:
@@ -85,6 +86,7 @@ private:
DECL_LINK ( SelectTypeHdl, void * );
DECL_LINK ( EditLabelHdl, void * );
DECL_LINK ( EditUsernameHdl, void * );
+ DECL_LINK ( ToggledPassHdl, CheckBox * pCheckBox );
};
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx
index b02e927..51d7828 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -31,11 +31,14 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent)
get( m_pBTCancel, "cancel" );
get( m_pBTDelete, "delete" );
get( m_pBTRepoRefresh, "repositoriesRefresh" );
+ get( m_pCBPassword, "rememberPassword" );
get( m_pEDPassword, "password" );
get( m_pFTPasswordLabel, "passwordLabel" );
m_pEDPassword->Hide();
m_pFTPasswordLabel->Hide();
+ m_pCBPassword->Hide();
+ m_pCBPassword->SetToggleHdl( LINK( this, PlaceEditDialog, ToggledPassHdl ) );
m_pBTOk->SetClickHdl( LINK( this, PlaceEditDialog, OKHdl) );
m_pBTOk->Enable( false );
@@ -64,11 +67,14 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Pla
get( m_pBTCancel, "cancel" );
get( m_pBTDelete, "delete" );
get( m_pTypeGrid, "TypeGrid" );
+ get( m_pCBPassword, "rememberPassword" );
get( m_pEDPassword, "password" );
get( m_pFTPasswordLabel, "passwordLabel" );
m_pEDPassword->Hide();
m_pFTPasswordLabel->Hide();
+ m_pCBPassword->Hide();
+ m_pCBPassword->SetToggleHdl( LINK( this, PlaceEditDialog, ToggledPassHdl ) );
m_pBTOk->SetClickHdl( LINK( this, PlaceEditDialog, OKHdl) );
m_pBTDelete->SetClickHdl ( LINK( this, PlaceEditDialog, DelHdl) );
@@ -141,6 +147,28 @@ std::shared_ptr<Place> PlaceEditDialog::GetPlace()
return std::make_shared<Place>(m_pEDServerName->GetText(), GetServerUrl(), true);
}
+void PlaceEditDialog::ShowPasswordControl( bool bShow )
+{
+ m_pCBPassword->Show( bShow );
+ m_pEDPassword->Show( bShow );
+ m_pFTPasswordLabel->Show( bShow );
+
+ ToggledPassHdl( m_pCBPassword );
+}
+
+IMPL_LINK( PlaceEditDialog, ToggledPassHdl, CheckBox*, pCheckBox )
+{
+ bool bChecked = pCheckBox->IsChecked();
+
+ m_pEDPassword->Enable( bChecked );
+ m_pFTPasswordLabel->Enable( bChecked );
+
+ if ( !bChecked )
+ m_pEDPassword->SetText( "" );
+
+ return 0;
+}
+
void PlaceEditDialog::InitDetails( )
{
// Create CMIS controls for each server type
@@ -326,6 +354,7 @@ IMPL_LINK_NOARG( PlaceEditDialog, SelectTypeHdl )
m_nCurrentType = nPos;
m_xCurrentDetails->show(true);
+ ToggledPassHdl( m_pCBPassword );
SetSizePixel(GetOptimalSize());
diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index 07b0835..eb769f8 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -192,7 +192,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">7</property>
+ <property name="top_attach">8</property>
</packing>
</child>
<child>
@@ -204,7 +204,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">7</property>
+ <property name="top_attach">8</property>
</packing>
</child>
<child>
@@ -298,7 +298,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">7</property>
</packing>
</child>
<child>
@@ -310,7 +310,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">7</property>
</packing>
</child>
<child>
@@ -411,12 +411,12 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Password*:</property>
+ <property name="label" translatable="yes">Password:</property>
<property name="mnemonic_widget">password</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="top_attach">6</property>
</packing>
</child>
<child>
@@ -428,12 +428,29 @@
</object>
<packing>
<property name="left_attach">1</property>
+ <property name="top_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="rememberPassword">
+ <property name="label" translatable="yes">Remember password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
<property name="top_attach">5</property>
</packing>
</child>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">False</property>
More information about the Libreoffice-commits
mailing list