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
454ff1a4
Kaydet (Commit)
454ff1a4
authored
Agu 13, 2013
tarafından
Krisztian Pinter
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
startcenter: Disable tabs for modules not installed
Change-Id: I74dbd1dab44efa87a78ad3268658895f2d1542db
üst
c09a301d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
65 deletions
+75
-65
backingwindow.cxx
sfx2/source/dialog/backingwindow.cxx
+60
-50
backingwindow.hxx
sfx2/source/dialog/backingwindow.hxx
+7
-7
startcenter.ui
sfx2/uiconfig/ui/startcenter.ui
+8
-8
No files found.
sfx2/source/dialog/backingwindow.cxx
Dosyayı görüntüle @
454ff1a4
...
@@ -70,21 +70,22 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
...
@@ -70,21 +70,22 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
"sfx/ui/startcenter.ui"
,
"sfx/ui/startcenter.ui"
,
"StartCenter"
);
"StartCenter"
);
get
(
mpOpenButton
,
"open"
);
get
(
mpOpenButton
,
"open"
);
get
(
mpTemplateButton
,
"templates"
);
get
(
mpTemplateButton
,
"templates"
);
get
(
mpWriterButton
,
"writer"
);
get
(
mpModuleNotebook
,
"modules_notebook"
);
get
(
mpCalcButton
,
"calc"
);
get
(
mpImpressButton
,
"impress"
);
get
(
mpWriterButton
,
"writer"
);
get
(
mpDrawButton
,
"draw"
);
get
(
mpCalcButton
,
"calc"
);
get
(
mpDBButton
,
"database"
);
get
(
mpImpressButton
,
"impress"
);
get
(
mpMathButton
,
"math"
);
get
(
mpDrawButton
,
"draw"
);
get
(
mpDBButton
,
"database"
);
get
(
mpMathButton
,
"math"
);
get
(
mpExtensionsButton
,
"extension"
);
get
(
mpExtensionsButton
,
"extension"
);
get
(
mpInfoButton
,
"info"
);
get
(
mpInfoButton
,
"info"
);
get
(
mpTplRepButton
,
"add_temp"
);
get
(
mpTplRepButton
,
"add_temp"
);
get
(
mpAllRecentThumbnails
,
"all_recent"
);
get
(
mpAllRecentThumbnails
,
"all_recent"
);
get
(
mpWriterRecentThumbnails
,
"writer_recent"
);
get
(
mpWriterRecentThumbnails
,
"writer_recent"
);
get
(
mpCalcRecentThumbnails
,
"calc_recent"
);
get
(
mpCalcRecentThumbnails
,
"calc_recent"
);
...
@@ -93,23 +94,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
...
@@ -93,23 +94,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
get
(
mpDatabaseRecentThumbnails
,
"database_recent"
);
get
(
mpDatabaseRecentThumbnails
,
"database_recent"
);
get
(
mpMathRecentThumbnails
,
"math_recent"
);
get
(
mpMathRecentThumbnails
,
"math_recent"
);
mpAllRecentThumbnails
->
addFileType
(
TYPE_WRITER
|
TYPE_CALC
|
TYPE_IMPRESS
|
TYPE_DRAW
|
TYPE_DATABASE
|
TYPE_MATH
|
TYPE_OTHER
);
mpWriterRecentThumbnails
->
addFileType
(
TYPE_WRITER
);
mpCalcRecentThumbnails
->
addFileType
(
TYPE_CALC
);
mpImpressRecentThumbnails
->
addFileType
(
TYPE_IMPRESS
);
mpDrawRecentThumbnails
->
addFileType
(
TYPE_DRAW
);
mpDatabaseRecentThumbnails
->
addFileType
(
TYPE_DATABASE
);
mpMathRecentThumbnails
->
addFileType
(
TYPE_MATH
);
mpAllRecentThumbnails
->
loadRecentDocs
();
mpWriterRecentThumbnails
->
loadRecentDocs
();
mpCalcRecentThumbnails
->
loadRecentDocs
();
mpImpressRecentThumbnails
->
loadRecentDocs
();
mpDrawRecentThumbnails
->
loadRecentDocs
();
mpDatabaseRecentThumbnails
->
loadRecentDocs
();
mpMathRecentThumbnails
->
loadRecentDocs
();
try
try
{
{
mxContext
.
set
(
::
comphelper
::
getProcessComponentContext
(),
uno
::
UNO_SET_THROW
);
mxContext
.
set
(
::
comphelper
::
getProcessComponentContext
(),
uno
::
UNO_SET_THROW
);
...
@@ -211,23 +195,39 @@ void BackingWindow::initControls()
...
@@ -211,23 +195,39 @@ void BackingWindow::initControls()
aFileNewAppsAvailable
.
insert
(
sURL
);
aFileNewAppsAvailable
.
insert
(
sURL
);
}
}
setupButton
(
mpWriterButton
,
WRITER_URL
,
aFileNewAppsAvailable
,
setupModuleTab
(
"tab_writer"
,
mpWriterRecentThumbnails
,
TYPE_WRITER
,
aModuleOptions
,
SvtModuleOptions
::
E_SWRITER
);
WRITER_URL
,
aFileNewAppsAvailable
,
aModuleOptions
,
setupButton
(
mpDrawButton
,
DRAW_URL
,
aFileNewAppsAvailable
,
SvtModuleOptions
::
E_SWRITER
);
aModuleOptions
,
SvtModuleOptions
::
E_SDRAW
);
setupModuleTab
(
"tab_calc"
,
mpCalcRecentThumbnails
,
TYPE_CALC
,
setupButton
(
mpCalcButton
,
CALC_URL
,
aFileNewAppsAvailable
,
DRAW_URL
,
aFileNewAppsAvailable
,
aModuleOptions
,
aModuleOptions
,
SvtModuleOptions
::
E_SCALC
);
SvtModuleOptions
::
E_SDRAW
);
setupButton
(
mpDBButton
,
BASE_URL
,
aFileNewAppsAvailable
,
setupModuleTab
(
"tab_impress"
,
mpImpressRecentThumbnails
,
TYPE_IMPRESS
,
aModuleOptions
,
SvtModuleOptions
::
E_SDATABASE
);
CALC_URL
,
aFileNewAppsAvailable
,
aModuleOptions
,
setupButton
(
mpImpressButton
,
IMPRESS_WIZARD_URL
,
aFileNewAppsAvailable
,
SvtModuleOptions
::
E_SCALC
);
aModuleOptions
,
SvtModuleOptions
::
E_SIMPRESS
);
setupModuleTab
(
"tab_draw"
,
mpDrawRecentThumbnails
,
TYPE_DRAW
,
setupButton
(
mpMathButton
,
MATH_URL
,
aFileNewAppsAvailable
,
BASE_URL
,
aFileNewAppsAvailable
,
aModuleOptions
,
aModuleOptions
,
SvtModuleOptions
::
E_SMATH
);
SvtModuleOptions
::
E_SDATABASE
);
setupModuleTab
(
"tab_database"
,
mpDatabaseRecentThumbnails
,
TYPE_DATABASE
,
setupButton
(
mpOpenButton
,
""
,
aFileNewAppsAvailable
,
IMPRESS_WIZARD_URL
,
aFileNewAppsAvailable
,
aModuleOptions
,
aModuleOptions
,
SvtModuleOptions
::
E_SWRITER
);
SvtModuleOptions
::
E_SIMPRESS
);
setupButton
(
mpTemplateButton
,
""
,
aFileNewAppsAvailable
,
setupModuleTab
(
"tab_math"
,
mpMathRecentThumbnails
,
TYPE_MATH
,
aModuleOptions
,
SvtModuleOptions
::
E_SWRITER
);
MATH_URL
,
aFileNewAppsAvailable
,
aModuleOptions
,
SvtModuleOptions
::
E_SMATH
);
// File types for mpAllRecentThumbnails are added in the above calls
// of setupModuleTab. TYPE_OTHER is always added.
mpAllRecentThumbnails
->
mnFileTypes
|=
TYPE_OTHER
;
mpAllRecentThumbnails
->
loadRecentDocs
();
setupButton
(
mpWriterButton
);
setupButton
(
mpDrawButton
);
setupButton
(
mpCalcButton
);
setupButton
(
mpDBButton
);
setupButton
(
mpImpressButton
);
setupButton
(
mpMathButton
);
setupButton
(
mpOpenButton
);
setupButton
(
mpTemplateButton
);
setupExternalLink
(
mpExtensionsButton
);
setupExternalLink
(
mpExtensionsButton
);
setupExternalLink
(
mpInfoButton
);
setupExternalLink
(
mpInfoButton
);
...
@@ -238,17 +238,27 @@ void BackingWindow::initControls()
...
@@ -238,17 +238,27 @@ void BackingWindow::initControls()
mpWriterButton
->
GrabFocus
();
mpWriterButton
->
GrabFocus
();
}
}
void
BackingWindow
::
setup
Button
(
PushButton
*
pButton
,
const
OUString
&
rURL
,
void
BackingWindow
::
setup
ModuleTab
(
const
OString
&
rTabName
,
RecentDocsView
*
pRecView
,
int
nFileTypes
,
const
std
::
set
<
OUString
>&
rURLS
,
const
OUString
&
rURL
,
const
std
::
set
<
OUString
>&
rURLS
,
SvtModuleOptions
&
rOpt
,
SvtModuleOptions
&
rOpt
,
SvtModuleOptions
::
EModule
eMod
)
SvtModuleOptions
::
EModule
eMod
)
{
{
pButton
->
SetClickHdl
(
LINK
(
this
,
BackingWindow
,
ClickHdl
)
);
// disable the parts that are not installed
if
(
!
rURL
.
isEmpty
()
&&
(
!
rOpt
.
IsModuleInstalled
(
eMod
)
||
rURLS
.
find
(
rURL
)
==
rURLS
.
end
())
)
if
(
!
rURL
.
isEmpty
()
&&
(
!
rOpt
.
IsModuleInstalled
(
eMod
)
||
rURLS
.
find
(
rURL
)
==
rURLS
.
end
())
)
{
{
pButton
->
Enable
(
sal_False
);
// disable the parts that are not installed
mpModuleNotebook
->
RemovePage
(
mpModuleNotebook
->
GetPageId
(
rTabName
)
);
}
else
{
// if a module is installed, add that filetype to the "All" page
mpAllRecentThumbnails
->
mnFileTypes
|=
nFileTypes
;
pRecView
->
mnFileTypes
|=
nFileTypes
;
pRecView
->
loadRecentDocs
();
}
}
}
void
BackingWindow
::
setupButton
(
PushButton
*
pButton
)
{
pButton
->
SetClickHdl
(
LINK
(
this
,
BackingWindow
,
ClickHdl
)
);
// setup text - slighly larger font than normal labels on the texts
// setup text - slighly larger font than normal labels on the texts
Font
aFont
;
Font
aFont
;
...
...
sfx2/source/dialog/backingwindow.hxx
Dosyayı görüntüle @
454ff1a4
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include <vcl/builder.hxx>
#include <vcl/builder.hxx>
#include <vcl/button.hxx>
#include <vcl/button.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/layout.hxx>
#include <vcl/layout.hxx>
#include <sfx2/recentdocsview.hxx>
#include <sfx2/recentdocsview.hxx>
...
@@ -49,6 +50,8 @@ class BackingWindow
...
@@ -49,6 +50,8 @@ class BackingWindow
PushButton
*
mpOpenButton
;
PushButton
*
mpOpenButton
;
PushButton
*
mpTemplateButton
;
PushButton
*
mpTemplateButton
;
TabControl
*
mpModuleNotebook
;
PushButton
*
mpWriterButton
;
PushButton
*
mpWriterButton
;
PushButton
*
mpCalcButton
;
PushButton
*
mpCalcButton
;
PushButton
*
mpImpressButton
;
PushButton
*
mpImpressButton
;
...
@@ -68,19 +71,16 @@ class BackingWindow
...
@@ -68,19 +71,16 @@ class BackingWindow
RecentDocsView
*
mpDatabaseRecentThumbnails
;
RecentDocsView
*
mpDatabaseRecentThumbnails
;
RecentDocsView
*
mpMathRecentThumbnails
;
RecentDocsView
*
mpMathRecentThumbnails
;
BitmapEx
maBackgroundLeft
;
BitmapEx
maBackgroundMiddle
;
BitmapEx
maBackgroundRight
;
Rectangle
maStartCentButtons
;
Rectangle
maStartCentButtons
;
bool
mbInitControls
;
bool
mbInitControls
;
sal_Int32
mnHideExternalLinks
;
sal_Int32
mnHideExternalLinks
;
svt
::
AcceleratorExecute
*
mpAccExec
;
svt
::
AcceleratorExecute
*
mpAccExec
;
void
setupButton
(
PushButton
*
pButton
,
const
OUString
&
rURL
,
const
std
::
set
<
OUString
>&
rURLS
,
void
setupModuleTab
(
const
OString
&
rTabName
,
RecentDocsView
*
pRecView
,
int
nFileTypes
,
SvtModuleOptions
&
rOpt
,
SvtModuleOptions
::
EModule
eMod
);
const
OUString
&
rURL
,
const
std
::
set
<
OUString
>&
rURLS
,
SvtModuleOptions
&
rOpt
,
SvtModuleOptions
::
EModule
eMod
);
void
setupButton
(
PushButton
*
pButton
);
void
setupExternalLink
(
PushButton
*
pButton
);
void
setupExternalLink
(
PushButton
*
pButton
);
void
dispatchURL
(
const
OUString
&
i_rURL
,
void
dispatchURL
(
const
OUString
&
i_rURL
,
...
...
sfx2/uiconfig/ui/startcenter.ui
Dosyayı görüntüle @
454ff1a4
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<property
name=
"row_spacing"
>
12
</property>
<property
name=
"row_spacing"
>
12
</property>
<property
name=
"column_spacing"
>
12
</property>
<property
name=
"column_spacing"
>
12
</property>
<child>
<child>
<object
class=
"GtkNotebook"
id=
"
notebook1
"
>
<object
class=
"GtkNotebook"
id=
"
modules_notebook
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
</object>
</object>
</child>
</child>
<child
type=
"tab"
>
<child
type=
"tab"
>
<object
class=
"GtkLabel"
id=
"
label1
"
>
<object
class=
"GtkLabel"
id=
"
tab_all
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
All Recent
</property>
<property
name=
"label"
translatable=
"yes"
>
All Recent
</property>
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
</packing>
</packing>
</child>
</child>
<child
type=
"tab"
>
<child
type=
"tab"
>
<object
class=
"GtkLabel"
id=
"
label2
"
>
<object
class=
"GtkLabel"
id=
"
tab_writer
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Documents
</property>
<property
name=
"label"
translatable=
"yes"
>
Documents
</property>
...
@@ -214,7 +214,7 @@
...
@@ -214,7 +214,7 @@
</packing>
</packing>
</child>
</child>
<child
type=
"tab"
>
<child
type=
"tab"
>
<object
class=
"GtkLabel"
id=
"
label3
"
>
<object
class=
"GtkLabel"
id=
"
tab_calc
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Spreadsheets
</property>
<property
name=
"label"
translatable=
"yes"
>
Spreadsheets
</property>
...
@@ -278,7 +278,7 @@
...
@@ -278,7 +278,7 @@
</packing>
</packing>
</child>
</child>
<child
type=
"tab"
>
<child
type=
"tab"
>
<object
class=
"GtkLabel"
id=
"
label4
"
>
<object
class=
"GtkLabel"
id=
"
tab_impress
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Presentations
</property>
<property
name=
"label"
translatable=
"yes"
>
Presentations
</property>
...
@@ -342,7 +342,7 @@
...
@@ -342,7 +342,7 @@
</packing>
</packing>
</child>
</child>
<child
type=
"tab"
>
<child
type=
"tab"
>
<object
class=
"GtkLabel"
id=
"
label5
"
>
<object
class=
"GtkLabel"
id=
"
tab_draw
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Drawings
</property>
<property
name=
"label"
translatable=
"yes"
>
Drawings
</property>
...
@@ -406,7 +406,7 @@
...
@@ -406,7 +406,7 @@
</packing>
</packing>
</child>
</child>
<child
type=
"tab"
>
<child
type=
"tab"
>
<object
class=
"GtkLabel"
id=
"
label6
"
>
<object
class=
"GtkLabel"
id=
"
tab_database
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Databases
</property>
<property
name=
"label"
translatable=
"yes"
>
Databases
</property>
...
@@ -470,7 +470,7 @@
...
@@ -470,7 +470,7 @@
</packing>
</packing>
</child>
</child>
<child
type=
"tab"
>
<child
type=
"tab"
>
<object
class=
"GtkLabel"
id=
"
label7
"
>
<object
class=
"GtkLabel"
id=
"
tab_math
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Formulas
</property>
<property
name=
"label"
translatable=
"yes"
>
Formulas
</property>
...
...
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