Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
a736dc21
Kaydet (Commit)
a736dc21
authored
Haz 04, 2015
tarafından
Szymon Kłos
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
added fields for name and filters
Change-Id: I758bb4e1009c44aad7f4f5d3d0e07939b9962ce5
üst
c9934f5b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
3 deletions
+95
-3
RemoteFilesDialog.hxx
include/svtools/RemoteFilesDialog.hxx
+6
-0
RemoteFilesDialog.cxx
svtools/source/dialogs/RemoteFilesDialog.cxx
+29
-2
remotefilesdialog.ui
svtools/uiconfig/ui/remotefilesdialog.ui
+60
-1
No files found.
include/svtools/RemoteFilesDialog.hxx
Dosyayı görüntüle @
a736dc21
...
...
@@ -21,6 +21,7 @@
#include <vcl/vclptr.hxx>
#include <svtools/fileview.hxx>
#include <svtools/treelistentry.hxx>
#include <officecfg/Office/Common.hxx>
#include <com/sun/star/uno/Sequence.hxx>
...
...
@@ -71,6 +72,8 @@ private:
VclPtr
<
Edit
>
m_pPath_ed
;
VclPtr
<
SvtFileView
>
m_pFileView
;
VclPtr
<
FileViewContainer
>
m_pContainer
;
VclPtr
<
ListBox
>
m_pFilter_lb
;
VclPtr
<
Edit
>
m_pName_ed
;
std
::
vector
<
ServicePtr
>
m_aServices
;
...
...
@@ -79,6 +82,8 @@ private:
/* If failure returns < 0 */
int
GetSelectedServicePos
();
OUString
getCurrentFilter
();
void
OpenURL
(
OUString
sURL
);
DECL_LINK
(
AddServiceHdl
,
void
*
);
...
...
@@ -86,6 +91,7 @@ private:
DECL_LINK_TYPED
(
EditServiceMenuHdl
,
MenuButton
*
,
void
);
DECL_LINK
(
DoubleClickHdl
,
void
*
);
DECL_LINK
(
SelectHdl
,
void
*
);
};
#endif // INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX
...
...
svtools/source/dialogs/RemoteFilesDialog.cxx
Dosyayı görüntüle @
a736dc21
...
...
@@ -11,7 +11,7 @@
using
namespace
::
com
::
sun
::
star
::
uno
;
#define
NO_FILTER
"*.*"
#define
FILTER_ALL
"*.*"
class
FileViewContainer
:
public
vcl
::
Window
{
...
...
@@ -65,6 +65,8 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits)
get
(
m_pAddService_btn
,
"add_service_btn"
);
get
(
m_pServices_lb
,
"services_lb"
);
get
(
m_pPath_ed
,
"path"
);
get
(
m_pFilter_lb
,
"filter_lb"
);
get
(
m_pName_ed
,
"name_ed"
);
m_eMode
=
(
nBits
&
WB_SAVEAS
)
?
REMOTEDLG_MODE_SAVE
:
REMOTEDLG_MODE_OPEN
;
m_eType
=
(
nBits
&
WB_PATH
)
?
REMOTEDLG_TYPE_PATHDLG
:
REMOTEDLG_TYPE_FILEDLG
;
...
...
@@ -94,6 +96,7 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits)
m_pFileView
->
Show
();
m_pFileView
->
EnableAutoResize
();
m_pFileView
->
SetDoubleClickHdl
(
LINK
(
this
,
RemoteFilesDialog
,
DoubleClickHdl
)
);
m_pFileView
->
SetSelectHdl
(
LINK
(
this
,
RemoteFilesDialog
,
SelectHdl
)
);
m_pContainer
->
init
(
m_pFileView
);
m_pContainer
->
Show
();
...
...
@@ -105,6 +108,9 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits)
FillServicesListbox
();
m_pServices_lb
->
SetSelectHdl
(
LINK
(
this
,
RemoteFilesDialog
,
SelectServiceHdl
)
);
m_pFilter_lb
->
InsertEntry
(
FILTER_ALL
);
m_pFilter_lb
->
SelectEntryPos
(
0
);
}
RemoteFilesDialog
::~
RemoteFilesDialog
()
...
...
@@ -196,16 +202,26 @@ int RemoteFilesDialog::GetSelectedServicePos()
return
nPos
;
}
OUString
RemoteFilesDialog
::
getCurrentFilter
()
{
OUString
sFilter
;
sFilter
=
m_pFilter_lb
->
GetSelectEntry
();
return
sFilter
;
}
void
RemoteFilesDialog
::
OpenURL
(
OUString
sURL
)
{
if
(
m_pFileView
)
{
OUStringList
BlackList
;
FileViewResult
eResult
=
eFailure
;
OUString
sFilter
=
getCurrentFilter
();
m_pFileView
->
EndInplaceEditing
(
false
);
m_pPath_ed
->
SetText
(
sURL
);
eResult
=
m_pFileView
->
Initialize
(
sURL
,
NO_FILTER
,
NULL
,
BlackList
);
eResult
=
m_pFileView
->
Initialize
(
sURL
,
sFilter
,
NULL
,
BlackList
);
}
}
...
...
@@ -320,4 +336,15 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl )
return
1
;
}
IMPL_LINK_NOARG
(
RemoteFilesDialog
,
SelectHdl
)
{
SvTreeListEntry
*
pEntry
=
m_pFileView
->
FirstSelected
();
SvtContentEntry
*
pData
=
static_cast
<
SvtContentEntry
*>
(
pEntry
->
GetUserData
());
INetURLObject
aURL
(
pData
->
maURL
);
m_pName_ed
->
SetText
(
aURL
.
GetLastName
());
return
1
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svtools/uiconfig/ui/remotefilesdialog.ui
Dosyayı görüntüle @
a736dc21
...
...
@@ -65,7 +65,7 @@
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
3
</property>
<property
name=
"position"
>
4
</property>
</packing>
</child>
<child>
...
...
@@ -152,6 +152,65 @@
<property
name=
"position"
>
2
</property>
</packing>
</child>
<child>
<object
class=
"GtkGrid"
id=
"grid1"
>
<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=
"filterLabel"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Filter
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"nameLabel"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Full name
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkEntry"
id=
"name_ed"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkComboBox"
id=
"filter_lb"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"hexpand"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
0
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
3
</property>
</packing>
</child>
</object>
</child>
</object>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment