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
1fbe4809
Kaydet (Commit)
1fbe4809
authored
Tem 09, 2015
tarafından
Szymon Kłos
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
RemoteFilesDialog: enable controls in one place
Change-Id: I21aab300a71c96308bc335ea4ac641f02ec2a4fc
üst
37928c2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
17 deletions
+42
-17
RemoteFilesDialog.hxx
include/svtools/RemoteFilesDialog.hxx
+3
-0
RemoteFilesDialog.cxx
svtools/source/dialogs/RemoteFilesDialog.cxx
+39
-17
No files found.
include/svtools/RemoteFilesDialog.hxx
Dosyayı görüntüle @
1fbe4809
...
...
@@ -121,6 +121,7 @@ private:
SvtRemoteDlgType
m_eType
;
bool
m_bMultiselection
;
bool
m_bIsUpdated
;
bool
m_bIsConnected
;
Image
m_aFolderImage
;
OUString
m_sPath
;
...
...
@@ -152,6 +153,8 @@ private:
FileViewResult
OpenURL
(
OUString
sURL
);
void
EnableControls
();
DECL_LINK
(
AddServiceHdl
,
void
*
);
DECL_LINK
(
SelectServiceHdl
,
void
*
);
DECL_LINK_TYPED
(
EditServiceMenuHdl
,
MenuButton
*
,
void
);
...
...
svtools/source/dialogs/RemoteFilesDialog.cxx
Dosyayı görüntüle @
1fbe4809
...
...
@@ -250,6 +250,7 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
m_eType
=
(
nBits
&
WB_PATH
)
?
REMOTEDLG_TYPE_PATHDLG
:
REMOTEDLG_TYPE_FILEDLG
;
m_bMultiselection
=
(
nBits
&
SFXWB_MULTISELECTION
)
?
true
:
false
;
m_bIsUpdated
=
false
;
m_bIsConnected
=
false
;
m_nCurrentFilter
=
LISTBOX_ENTRY_NOTFOUND
;
m_pFilter_lb
->
Enable
(
false
);
...
...
@@ -442,8 +443,8 @@ void RemoteFilesDialog::FillServicesListbox()
if
(
m_pServices_lb
->
GetEntryCount
()
>
0
)
m_pServices_lb
->
SelectEntryPos
(
0
);
else
m_pServices_lb
->
Enable
(
false
);
EnableControls
(
);
}
int
RemoteFilesDialog
::
GetSelectedServicePos
()
...
...
@@ -502,18 +503,42 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString sURL )
{
m_pPath
->
SetURL
(
sURL
);
m_pTreeView
->
SetTreePath
(
sURL
);
m_pFilter_lb
->
Enable
(
true
);
m_pName_ed
->
Enable
(
true
);
m_pContainer
->
Enable
(
true
);
if
(
!
m_pName_ed
->
GetText
().
isEmpty
()
)
m_pOk_btn
->
Enable
(
true
);
m_bIsConnected
=
true
;
EnableControls
(
);
}
}
return
eResult
;
}
void
RemoteFilesDialog
::
EnableControls
()
{
if
(
m_pServices_lb
->
GetEntryCount
()
>
0
)
m_pServices_lb
->
Enable
(
true
);
else
m_pServices_lb
->
Enable
(
false
);
if
(
m_bIsConnected
)
{
m_pFilter_lb
->
Enable
(
true
);
m_pName_ed
->
Enable
(
true
);
m_pContainer
->
Enable
(
true
);
if
(
!
m_pName_ed
->
GetText
().
isEmpty
()
)
m_pOk_btn
->
Enable
(
true
);
else
m_pOk_btn
->
Enable
(
false
);
}
else
{
m_pFilter_lb
->
Enable
(
false
);
m_pName_ed
->
Enable
(
false
);
m_pContainer
->
Enable
(
false
);
m_pOk_btn
->
Enable
(
false
);
}
}
IMPL_LINK_NOARG
(
RemoteFilesDialog
,
AddServiceHdl
)
{
ScopedVclPtrInstance
<
PlaceEditDialog
>
aDlg
(
this
);
...
...
@@ -525,7 +550,6 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, AddServiceHdl )
{
ServicePtr
newService
=
aDlg
->
GetPlace
();
m_aServices
.
push_back
(
newService
);
m_pServices_lb
->
Enable
(
true
);
OUString
sPrefix
=
lcl_GetServiceType
(
newService
);
...
...
@@ -536,6 +560,8 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, AddServiceHdl )
m_pServices_lb
->
SelectEntryPos
(
m_pServices_lb
->
GetEntryCount
()
-
1
);
m_bIsUpdated
=
true
;
EnableControls
();
break
;
}
case
RET_CANCEL
:
...
...
@@ -625,12 +651,13 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton,
else
{
m_pServices_lb
->
SetNoSelection
();
m_pServices_lb
->
Enable
(
false
);
}
m_bIsUpdated
=
true
;
}
}
EnableControls
();
}
IMPL_LINK_NOARG
(
RemoteFilesDialog
,
DoubleClickHdl
)
...
...
@@ -664,16 +691,15 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl )
m_sPath
=
pData
->
maURL
;
m_pName_ed
->
SetText
(
INetURLObject
::
decode
(
aURL
.
GetLastName
(),
INetURLObject
::
DECODE_WITH_CHARSET
)
);
m_pOk_btn
->
Enable
(
true
);
}
else
{
m_pOk_btn
->
Enable
(
false
);
m_sPath
=
""
;
m_pName_ed
->
SetText
(
""
);
}
EnableControls
();
return
1
;
}
...
...
@@ -686,11 +712,7 @@ IMPL_LINK_NOARG( RemoteFilesDialog, FileNameGetFocusHdl )
IMPL_LINK_NOARG
(
RemoteFilesDialog
,
FileNameModifyHdl
)
{
m_pFileView
->
SetNoSelection
();
if
(
!
m_pName_ed
->
GetText
().
isEmpty
()
)
m_pOk_btn
->
Enable
(
true
);
else
m_pOk_btn
->
Enable
(
false
);
EnableControls
();
return
1
;
}
...
...
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