diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-12-17 21:00:50 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-12-18 09:32:46 +0100 |
commit | 75353e716720f8c83b985b60545586f9a9e616c7 (patch) | |
tree | 828ccc82f0c1106e5fa8364554d3105fc5287286 /svtools | |
parent | 315b9b4a5c53eed5fd283bc329e05d7d8fbc9ebc (diff) |
File picker: add Path field for CMIS like other protocols
Change-Id: I9745831da13646d351858f221b1367374ebf737f
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/ServerDetailsControls.hxx | 1 | ||||
-rw-r--r-- | svtools/source/dialogs/ServerDetailsControls.cxx | 7 | ||||
-rw-r--r-- | svtools/uiconfig/ui/placeedit.ui | 194 |
3 files changed, 118 insertions, 84 deletions
diff --git a/svtools/inc/svtools/ServerDetailsControls.hxx b/svtools/inc/svtools/ServerDetailsControls.hxx index c6ab63f36637..1dfc05110b1e 100644 --- a/svtools/inc/svtools/ServerDetailsControls.hxx +++ b/svtools/inc/svtools/ServerDetailsControls.hxx @@ -143,6 +143,7 @@ class CmisDetailsContainer : public DetailsContainer ListBox* m_pLBRepository; Button* m_pBTRepoRefresh; ListBox* m_pLBServerType; + Edit* m_pEDPath; public: CmisDetailsContainer( VclBuilderContainer* pBuilder ); diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index 88f57e67ce8c..8b10c1038b23 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -293,6 +293,9 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder ) : pBuilder->get( m_pBTRepoRefresh, "repositoriesRefresh" ); m_pBTRepoRefresh->SetClickHdl( LINK( this, CmisDetailsContainer, RefreshReposHdl ) ); + pBuilder->get( m_pEDPath, "cmisPath" ); + m_pEDPath->SetModifyHdl( LINK( this, DetailsContainer, ValueChangeHdl ) ); + show( false ); // Load the ServerType entries @@ -308,6 +311,7 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder ) : INetURLObject CmisDetailsContainer::getUrl( ) { rtl::OUString sBindingUrl = rtl::OUString( m_pEDBinding->GetText() ).trim( ); + rtl::OUString sPath = rtl::OUString( m_pEDPath->GetText() ).trim( ); rtl::OUString sUrl; if ( !sBindingUrl.isEmpty( ) && !m_sRepoId.isEmpty() ) @@ -319,6 +323,7 @@ INetURLObject CmisDetailsContainer::getUrl( ) RTL_TEXTENCODING_UTF8 ); sUrl = "vnd.libreoffice.cmis://" + sEncodedBinding; } + sUrl += sPath; return INetURLObject( sUrl ); } @@ -338,8 +343,8 @@ bool CmisDetailsContainer::setUrl( const INetURLObject& rUrl ) sRepositoryId = aHostUrl.GetMark( ); m_pEDBinding->SetText( sBindingUrl ); + m_pEDPath->SetText( rUrl.GetURLPath() ); } - return bSuccess; } diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui index 285b0234e6df..36dd3fab7387 100644 --- a/svtools/uiconfig/ui/placeedit.ui +++ b/svtools/uiconfig/ui/placeedit.ui @@ -250,128 +250,102 @@ </packing> </child> <child> - <object class="GtkFrame" id="CmisDetails"> + <object class="GtkFrame" id="SmbDetails"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> - <object class="GtkAlignment" id="alignment3"> + <object class="GtkAlignment" id="alignment2"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="left_padding">12</property> <child> - <object class="GtkGrid" id="grid5"> + <object class="GtkGrid" id="grid4"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="row_spacing">6</property> <property name="column_spacing">6</property> <child> - <object class="GtkLabel" id="bindingLabel"> + <object class="GtkLabel" id="label9"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> - <property name="label" translatable="yes">Binding URL</property> + <property name="label" translatable="yes">Host</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="top_attach">0</property> <property name="width">1</property> <property name="height">1</property> </packing> </child> <child> - <object class="GtkLabel" id="repositoryLabel"> + <object class="GtkLabel" id="label10"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> - <property name="label" translatable="yes">Repository</property> + <property name="label" translatable="yes">Share</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="top_attach">1</property> <property name="width">1</property> <property name="height">1</property> </packing> </child> <child> - <object class="GtkEntry" id="binding"> + <object class="GtkLabel" id="label11"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="invisible_char">●</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Path</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left_attach">0</property> + <property name="top_attach">2</property> <property name="width">1</property> <property name="height">1</property> </packing> </child> <child> - <object class="GtkGrid" id="grid6"> + <object class="GtkEntry" id="smbHost"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="column_spacing">6</property> - <child> - <object class="GtkComboBox" id="repositories"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> - <child> - <object class="GtkButton" id="repositoriesRefresh"> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> - <property name="image">image1</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="invisible_char">●</property> </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="top_attach">0</property> <property name="width">1</property> <property name="height">1</property> </packing> </child> <child> - <object class="GtkLabel" id="label3"> + <object class="GtkEntry" id="smbShare"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes">Server Type</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="invisible_char">●</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left_attach">1</property> + <property name="top_attach">1</property> <property name="width">1</property> <property name="height">1</property> </packing> </child> <child> - <object class="GtkComboBox" id="serverType"> + <object class="GtkEntry" id="smbPath"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="invisible_char">●</property> </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="top_attach">2</property> <property name="width">1</property> <property name="height">1</property> </packing> @@ -381,7 +355,7 @@ </object> </child> <child type="label"> - <object class="GtkLabel" id="label12"> + <object class="GtkLabel" id="label8"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Server Details</property> @@ -398,70 +372,124 @@ </packing> </child> <child> - <object class="GtkFrame" id="SmbDetails"> + <object class="GtkFrame" id="CmisDetails"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> - <object class="GtkAlignment" id="alignment2"> + <object class="GtkAlignment" id="alignment3"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="left_padding">12</property> <child> - <object class="GtkGrid" id="grid4"> + <object class="GtkGrid" id="grid5"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="row_spacing">6</property> <property name="column_spacing">6</property> <child> - <object class="GtkLabel" id="label9"> + <object class="GtkLabel" id="bindingLabel"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> - <property name="label" translatable="yes">Host</property> + <property name="label" translatable="yes">Binding URL</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="top_attach">1</property> <property name="width">1</property> <property name="height">1</property> </packing> </child> <child> - <object class="GtkLabel" id="label10"> + <object class="GtkLabel" id="repositoryLabel"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> - <property name="label" translatable="yes">Share</property> + <property name="label" translatable="yes">Repository</property> </object> <packing> <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="binding"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="left_attach">1</property> <property name="top_attach">1</property> <property name="width">1</property> <property name="height">1</property> </packing> </child> <child> - <object class="GtkLabel" id="label11"> + <object class="GtkGrid" id="grid6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkComboBox" id="repositories"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="repositoriesRefresh"> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_action_appearance">False</property> + <property name="image">image1</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label3"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="halign">start</property> - <property name="label" translatable="yes">Path</property> + <property name="label" translatable="yes">Server Type</property> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="top_attach">0</property> <property name="width">1</property> <property name="height">1</property> </packing> </child> <child> - <object class="GtkEntry" id="smbHost"> + <object class="GtkComboBox" id="serverType"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="invisible_char">●</property> + <property name="can_focus">False</property> </object> <packing> <property name="left_attach">1</property> @@ -471,29 +499,29 @@ </packing> </child> <child> - <object class="GtkEntry" id="smbShare"> + <object class="GtkLabel" id="label5"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="invisible_char">●</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="yalign">0.49000000953674316</property> + <property name="label" translatable="yes">Path</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left_attach">0</property> + <property name="top_attach">3</property> <property name="width">1</property> <property name="height">1</property> </packing> </child> <child> - <object class="GtkEntry" id="smbPath"> + <object class="GtkEntry" id="cmisPath"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hexpand">True</property> <property name="invisible_char">●</property> </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="top_attach">3</property> <property name="width">1</property> <property name="height">1</property> </packing> @@ -503,7 +531,7 @@ </object> </child> <child type="label"> - <object class="GtkLabel" id="label8"> + <object class="GtkLabel" id="label12"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Server Details</property> |