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
4e31658c
Kaydet (Commit)
4e31658c
authored
Kas 30, 2012
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Personas: Enable / disable the push buttons according to radio buttons.
Change-Id: Iece525f43238a3494b8a76d5a3d84886cd5c1317
üst
4102ed7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
1 deletion
+80
-1
personalization.cxx
cui/source/options/personalization.cxx
+61
-0
personalization.hxx
cui/source/options/personalization.hxx
+19
-1
No files found.
cui/source/options/personalization.cxx
Dosyayı görüntüle @
4e31658c
...
...
@@ -14,7 +14,26 @@
SvxPersonalizationTabPage
::
SvxPersonalizationTabPage
(
Window
*
pParent
,
const
SfxItemSet
&
rSet
)
:
SfxTabPage
(
pParent
,
"PersonalizationTabPage"
,
"cui/ui/personalization_tab.ui"
,
rSet
)
{
get
(
m_pNoBackground
,
"no_background"
);
get
(
m_pDefaultBackground
,
"default_background"
);
get
(
m_pOwnBackground
,
"own_background"
);
m_pNoBackground
->
SetClickHdl
(
LINK
(
this
,
SvxPersonalizationTabPage
,
EnableDisableSelectionButtons
)
);
m_pDefaultBackground
->
SetClickHdl
(
LINK
(
this
,
SvxPersonalizationTabPage
,
EnableDisableSelectionButtons
)
);
m_pOwnBackground
->
SetClickHdl
(
LINK
(
this
,
SvxPersonalizationTabPage
,
EnableDisableSelectionButtons
)
);
get
(
m_pSelectBackground
,
"select_background"
);
m_pSelectBackground
->
SetClickHdl
(
LINK
(
this
,
SvxPersonalizationTabPage
,
SelectBackground
)
);
get
(
m_pNoPersona
,
"no_persona"
);
get
(
m_pDefaultPersona
,
"default_persona"
);
get
(
m_pOwnPersona
,
"own_persona"
);
m_pNoPersona
->
SetClickHdl
(
LINK
(
this
,
SvxPersonalizationTabPage
,
EnableDisableSelectionButtons
)
);
m_pDefaultPersona
->
SetClickHdl
(
LINK
(
this
,
SvxPersonalizationTabPage
,
EnableDisableSelectionButtons
)
);
m_pOwnPersona
->
SetClickHdl
(
LINK
(
this
,
SvxPersonalizationTabPage
,
EnableDisableSelectionButtons
)
);
get
(
m_pSelectPersona
,
"select_persona"
);
LINK
(
this
,
SvxPersonalizationTabPage
,
SelectPersona
);
m_pSelectPersona
->
SetClickHdl
(
LINK
(
this
,
SvxPersonalizationTabPage
,
SelectPersona
)
);
}
SvxPersonalizationTabPage
::~
SvxPersonalizationTabPage
()
...
...
@@ -26,4 +45,46 @@ SfxTabPage* SvxPersonalizationTabPage::Create( Window *pParent, const SfxItemSet
return
new
SvxPersonalizationTabPage
(
pParent
,
rSet
);
}
IMPL_LINK
(
SvxPersonalizationTabPage
,
EnableDisableSelectionButtons
,
RadioButton
*
,
pButton
)
{
PushButton
*
pPushButton
=
NULL
;
RadioButton
*
pRadioButton
=
NULL
;
if
(
pButton
==
m_pNoBackground
||
pButton
==
m_pDefaultBackground
||
pButton
==
m_pOwnBackground
)
{
pPushButton
=
m_pSelectBackground
;
pRadioButton
=
m_pOwnBackground
;
}
else
if
(
pButton
==
m_pNoPersona
||
pButton
==
m_pDefaultPersona
||
pButton
==
m_pOwnPersona
)
{
pPushButton
=
m_pSelectPersona
;
pRadioButton
=
m_pOwnPersona
;
}
else
return
0
;
if
(
pRadioButton
->
IsChecked
()
&&
!
pPushButton
->
IsEnabled
()
)
{
pPushButton
->
Enable
();
pPushButton
->
Invalidate
();
}
else
if
(
!
pRadioButton
->
IsChecked
()
&&
pPushButton
->
IsEnabled
()
)
{
pPushButton
->
Disable
();
pPushButton
->
Invalidate
();
}
return
0
;
}
IMPL_LINK
(
SvxPersonalizationTabPage
,
SelectBackground
,
PushButton
*
,
/*pButton*/
)
{
return
0
;
}
IMPL_LINK
(
SvxPersonalizationTabPage
,
SelectPersona
,
PushButton
*
,
/*pButton*/
)
{
return
0
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cui/source/options/personalization.hxx
Dosyayı görüntüle @
4e31658c
...
...
@@ -19,13 +19,31 @@ class SvxPersonalizationTabPage : public SfxTabPage
using
SfxTabPage
::
DeactivatePage
;
private
:
RadioButton
*
m_pNoPersona
;
///< Just the default look, without any bitmap
RadioButton
*
m_pNoBackground
;
///< Just the default look, without any bitmap
RadioButton
*
m_pDefaultBackground
;
///< Use the built-in bitmap for Writer background
RadioButton
*
m_pOwnBackground
;
///< Use the user-defined bitmap
PushButton
*
m_pSelectBackground
;
///< Let the user select in the 'own' case
RadioButton
*
m_pNoPersona
;
///< Just the default look, without any bitmap
RadioButton
*
m_pDefaultPersona
;
///< Use the built-in bitmap
RadioButton
*
m_pOwnPersona
;
///< Use the user-defined bitmap
PushButton
*
m_pSelectPersona
;
///< Let the user select in the 'own' case
public
:
SvxPersonalizationTabPage
(
Window
*
pParent
,
const
SfxItemSet
&
rSet
);
~
SvxPersonalizationTabPage
();
static
SfxTabPage
*
Create
(
Window
*
pParent
,
const
SfxItemSet
&
rSet
);
private
:
/// Maintain sane behavior of the m_pSelect(Background|Persona) buttons
DECL_LINK
(
EnableDisableSelectionButtons
,
RadioButton
*
);
/// Handle the bacground selection
DECL_LINK
(
SelectBackground
,
PushButton
*
);
/// Handle the Persona selection
DECL_LINK
(
SelectPersona
,
PushButton
*
);
};
#endif // SVX_PERSONALIZATION_HXX
...
...
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