summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2012-11-13 20:49:54 +0100
committerXisco Fauli <anistenis@gmail.com>2012-11-13 23:17:07 +0100
commit29f0cbffd0001b9df75969b11b0658a80b1f56af (patch)
treec508faf16515ae34041d3d62211766c183c05c9c /wizards
parent66ec3084378db0cfcc5de76945e0c29e9018dd79 (diff)
pyagenda: fix finish wizard
Change-Id: Ic0a4c4491cfdf0070552f38f706aea0cb53178be
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaTemplate.py16
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py3
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py1
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py22
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py2
5 files changed, 13 insertions, 31 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
index 4f99bfdebc17..590e32a27234 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
@@ -158,9 +158,6 @@ class AgendaTemplate(TextDocument):
self.redrawTitle("txtDate")
self.redrawTitle("txtTime")
self.redrawTitle("cbLocation")
- if AgendaTemplate.agenda.cp_TemplateName is None:
- AgendaTemplate.agenda.cp_TemplateName = ""
- self.setTemplateTitle(AgendaTemplate.agenda.cp_TemplateName)
'''redraws/rewrites the table which contains the given item
This method is called when the user checks/unchecks an item.
@@ -181,14 +178,6 @@ class AgendaTemplate(TextDocument):
traceback.print_exc()
AgendaTemplate.xTextDocument.unlockControllers()
- '''update the documents title property to the given title
- @param newTitle title.
- '''
-
- @synchronized(lock)
- def setTemplateTitle(self, newTitle):
- self.m_xDocProps.Title = newTitle
-
'''checks the data model if the
item corresponding to the given string should be shown
@param itemName a string representing an Item (name or heading).
@@ -336,11 +325,6 @@ class AgendaTemplate(TextDocument):
AgendaTemplate.timeFormat = \
AgendaTemplate.dateUtils.getFormat(TIME_HHMM)
- '''
- get the document properties object.
- '''
-
- self.m_xDocProps = AgendaTemplate.xTextDocument.DocumentProperties
self.initItemsCache()
AgendaTemplate._allItems = self.searchFillInItems(0)
self.initializeTitles()
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
index 605444f0a4a8..c7c0d30e6e01 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
@@ -322,8 +322,7 @@ class AgendaWizardDialog(WizardDialog):
(8, self.resources.reslblTemplateName_value,
97, 62, 6, 602, 101))
self.txtTemplateName = self.insertTextField("txtTemplateName",
- AgendaWizardDialogConst.TXTTEMPLATENAME_TEXT_CHANGED,
- self.PROPS_X,
+ None, self.PROPS_X,
(12, AgendaWizardDialogConst.TXTTEMPLATENAME_HID,
202, 60, 6, 603, 100), self)
self.insertLabel("lblProceed", self.PROPS_TEXT,
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py
index 4e8e7cb3cc57..6b539b2658b9 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py
@@ -38,7 +38,6 @@ class AgendaWizardDialogConst:
CHKUSEOBSERVERS_ITEM_CHANGED = "chkUseObserversItemChanged"
CHKUSERESOURCEPERSONS_ITEM_CHANGED = "chkUseResourcePersonsItemChanged"
LISTPAGEDESIGN_ACTION_PERFORMED = "pageDesignChanged"
- TXTTEMPLATENAME_TEXT_CHANGED = "templateTitleChanged"
BTNTEMPLATEPATH_ACTION_PERFORMED = "saveAs"
BTNINSERT_ACTION_PERFORMED = "insertRow"
BTNREMOVE_ACTION_PERFORMED = "removeRow"
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
index 08d4bd6373ee..31e16bb78dd2 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
@@ -16,7 +16,7 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import traceback
-from .AgendaWizardDialog import AgendaWizardDialog
+from .AgendaWizardDialog import AgendaWizardDialog, uno
from .AgendaWizardDialogConst import HID
from .AgendaTemplate import AgendaTemplate, FileAccess
from .TemplateConsts import TemplateConsts
@@ -30,6 +30,8 @@ from ..common.SystemDialog import SystemDialog
from ..common.Desktop import Desktop
from ..common.HelpIds import HelpIds
from ..common.Configuration import Configuration
+from ..document.OfficeDocument import OfficeDocument
+from ..text.ViewHandler import ViewHandler
from com.sun.star.view.DocumentZoomType import OPTIMAL
from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO
@@ -255,14 +257,6 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
except Exception:
traceback.print_exc()
- '''
- last page, template title changed...
- '''
-
- def templateTitleChanged(self):
- title = Helper.getUnoPropertyValue(getModel(txtTemplateName), "Text")
- self.agendaTemplate.setTemplateTitle(title)
-
#textFields listeners
def txtTitleTextChanged(self):
AgendaTemplate.redrawTitle("txtTitle")
@@ -354,10 +348,14 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
# user said: no, do not overwrite
endWizard = False
return False
-
- xTextDocument = self.agendaTemplate.document
+
+ xDocProps = self.agendaTemplate.xTextDocument.DocumentProperties
+ xDocProps.Title = self.txtTemplateName.Text
+ self.agendaTemplate.setWizardTemplateDocInfo( \
+ self.resources.resAgendaWizardDialog_title,
+ self.resources.resTemplateDescription)
bSaveSuccess = OfficeDocument.store(
- self.xMSF, AgendaTemplate.xTextDocument, self.sPath,
+ self.xMSF, self.agendaTemplate.xTextDocument, self.sPath,
"writer8_template")
if bSaveSuccess:
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
index 67056fb5a5ef..ccff49d3f953 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
@@ -174,3 +174,5 @@ class AgendaWizardDialogResources(Resource):
#Common Resources
self.resOverwriteWarning = self.getResText(
AgendaWizardDialogResources.RID_COMMON_START + 19)
+ self.resTemplateDescription = self.getResText(
+ AgendaWizardDialogResources.RID_COMMON_START + 20)