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
195007a8
Kaydet (Commit)
195007a8
authored
Şub 08, 2013
tarafından
Xisco Fauli
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
pyagenda: Save configuration after finishing the wizard
Change-Id: Ia0d80ac089608178e714735d6bfc4516030ee5b9
üst
6db8d0ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
41 deletions
+38
-41
AgendaWizardDialogImpl.py
...rds/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
+6
-7
TopicsControl.py
wizards/com/sun/star/wizards/agenda/TopicsControl.py
+14
-10
ConfigSet.py
wizards/com/sun/star/wizards/common/ConfigSet.py
+18
-24
No files found.
wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
Dosyayı görüntüle @
195007a8
...
...
@@ -208,12 +208,6 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
self
.
agenda
,
"cp_ProceedMethod"
,
(
self
.
optCreateAgenda
,
self
.
optMakeChanges
),
True
)
.
updateUI
()
def
saveConfiguration
(
self
):
root
=
Configuration
.
getConfigurationRoot
(
self
.
xMSF
,
"/org.openoffice.Office.Writer/Wizards/Agenda"
,
True
)
self
.
agenda
.
writeConfiguration
(
root
,
"cp_"
)
root
.
commitChanges
()
def
insertRoadmap
(
self
):
self
.
addRoadmap
()
...
...
@@ -360,7 +354,12 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
"writer8_template"
)
if
bSaveSuccess
:
self
.
saveConfiguration
()
self
.
topicsControl
.
saveTopics
(
self
.
agenda
)
root
=
Configuration
.
getConfigurationRoot
(
self
.
xMSF
,
"/org.openoffice.Office.Writer/Wizards/Agenda"
,
True
)
self
.
agenda
.
writeConfiguration
(
root
,
"cp_"
)
root
.
commitChanges
()
self
.
agendaTemplate
.
finish
(
self
.
topicsControl
.
scrollfields
)
...
...
wizards/com/sun/star/wizards/agenda/TopicsControl.py
Dosyayı görüntüle @
195007a8
...
...
@@ -131,12 +131,12 @@ class TopicsControl(ControlScroller):
def
initializeScrollFields
(
self
,
agenda
):
# create a row for each topic with the given values....
for
i
in
range
(
len
(
agenda
.
cp_Topics
.
childrenList
)
):
row
=
self
.
newRow
(
i
)
agenda
.
cp_Topics
.
childrenList
[
i
]
.
setDataToRow
(
row
)
for
i
ndex
,
item
in
enumerate
(
agenda
.
cp_Topics
.
childrenList
):
row
=
self
.
newRow
(
i
ndex
)
item
.
setDataToRow
(
row
)
# a parent class method
self
.
registerControlGroup
(
row
,
i
)
self
.
updateDocumentRow
(
i
)
self
.
registerControlGroup
(
row
,
i
ndex
)
self
.
updateDocumentRow
(
i
ndex
)
# inserts a blank row at the end...
self
.
insertRowAtEnd
()
...
...
@@ -157,6 +157,10 @@ class TopicsControl(ControlScroller):
self
.
ControlGroupVector
[
l
-
self
.
nscrollvalue
]
.
\
setEnabled
(
True
)
def
saveTopics
(
self
,
agenda
):
#last row is always empty
agenda
.
cp_Topics
.
childrenList
=
self
.
scrollfields
[:
-
1
]
'''
remove the last row
'''
...
...
@@ -338,7 +342,7 @@ class TopicsControl(ControlScroller):
def
isRowEmpty
(
self
,
row
):
data
=
self
.
getTopicData
(
row
)
# now - is this row empty?
return
data
[
1
]
.
Value
or
data
[
2
]
.
Value
or
data
[
3
]
.
Value
return
not
data
[
1
]
.
Value
and
not
data
[
2
]
.
Value
and
not
data
[
3
]
.
Value
'''
update the preview document and
...
...
@@ -355,7 +359,7 @@ class TopicsControl(ControlScroller):
return
self
.
updateDocumentCell
(
guiRow
+
self
.
nscrollvalue
,
column
,
data
)
if
not
self
.
isRowEmpty
(
guiRow
+
self
.
nscrollvalue
):
if
self
.
isRowEmpty
(
guiRow
+
self
.
nscrollvalue
):
'''
if this is the row before the last one
(the last row is always empty)
...
...
@@ -370,7 +374,7 @@ class TopicsControl(ControlScroller):
because the last one is always empty...
'''
while
len
(
self
.
scrollfields
)
>
1
\
and
not
self
.
isRowEmpty
(
and
self
.
isRowEmpty
(
len
(
self
.
scrollfields
)
-
2
):
self
.
removeLastRow
()
cr
=
self
.
ControlGroupVector
[
...
...
@@ -593,8 +597,8 @@ class TopicsControl(ControlScroller):
elif
(
row1
+
self
.
nscrollvalue
)
+
\
(
row2
+
self
.
nscrollvalue
)
\
==
(
len
(
self
.
scrollfields
)
*
2
-
5
):
if
not
self
.
isRowEmpty
(
len
(
self
.
scrollfields
)
-
2
)
\
and
not
self
.
isRowEmpty
(
if
self
.
isRowEmpty
(
len
(
self
.
scrollfields
)
-
2
)
\
and
self
.
isRowEmpty
(
len
(
self
.
scrollfields
)
-
1
):
self
.
removeLastRow
()
self
.
reduceDocumentToTopics
()
...
...
wizards/com/sun/star/wizards/common/ConfigSet.py
Dosyayı görüntüle @
195007a8
...
...
@@ -32,31 +32,24 @@ class ConfigSet(ConfigGroup):
def
__init__
(
self
):
self
.
childrenList
=
[]
self
.
childrenListLen
=
0
def
writeConfiguration
(
self
,
configView
,
param
):
names
=
self
.
childrenMap
.
keys
()
if
isinstance
(
self
.
childClass
,
ConfigNode
):
#first I remove all the children from the configuration.
children
=
configView
.
ElementNames
if
children
:
for
i
in
children
:
try
:
Configuration
.
removeNode
(
configView
,
i
)
except
Exception
:
traceback
.
print_exc
()
# and add them new.
for
i
in
names
:
try
:
child
=
self
.
getElement
(
i
)
childView
=
configView
.
getByName
(
i
)
child
.
writeConfiguration
(
childView
,
param
)
except
Exception
:
traceback
.
print_exc
()
else
:
raise
AttributeError
(
"Unable to write primitive sets to configuration (not implemented)"
)
def
writeConfiguration
(
self
,
configurationView
,
param
):
for
i
in
range
(
self
.
childrenListLen
):
#remove previous configuration
configurationView
.
removeByName
(
i
)
for
index
,
item
in
enumerate
(
self
.
childrenList
):
try
:
childView
=
configurationView
.
createInstance
()
configurationView
.
insertByName
(
index
,
childView
)
topic
=
CGTopic
()
topic
.
cp_Index
=
item
[
0
]
.
Value
topic
.
cp_Topic
=
item
[
1
]
.
Value
topic
.
cp_Responsible
=
item
[
2
]
.
Value
topic
.
cp_Time
=
item
[
3
]
.
Value
topic
.
writeConfiguration
(
childView
,
param
)
except
Exception
:
traceback
.
print_exc
()
def
readConfiguration
(
self
,
configurationView
,
param
):
#each iteration represents a Topic row
...
...
@@ -70,3 +63,4 @@ class ConfigSet(ConfigGroup):
self
.
childrenList
.
append
(
topic
)
except
Exception
:
traceback
.
print_exc
()
self
.
childrenListLen
=
len
(
self
.
childrenList
)
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