Merge lp:~trb143/openlp/bitsandbobs into lp:openlp
- bitsandbobs
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~trb143/openlp/bitsandbobs |
Merge into: | lp:openlp |
Diff against target: |
978 lines 18 files modified
openlp.pyw (+2/-1) openlp/core/lib/dockwidget.py (+0/-5) openlp/core/lib/mediamanageritem.py (+4/-4) openlp/core/lib/pluginmanager.py (+1/-1) openlp/core/lib/settingsmanager.py (+0/-10) openlp/core/ui/mainwindow.py (+14/-0) openlp/core/ui/pluginform.py (+5/-1) openlp/core/ui/servicemanager.py (+45/-17) openlp/core/ui/settingsform.py (+0/-15) openlp/core/ui/thememanager.py (+30/-7) openlp/core/utils/__init__.py (+1/-0) openlp/core/utils/latestversion.py (+57/-0) openlp/plugins/audit/auditplugin.py (+4/-26) openlp/plugins/audit/forms/auditdeletedialog.py (+4/-4) openlp/plugins/audit/forms/auditdetaildialog.py (+7/-3) openlp/plugins/audit/forms/auditdetailform.py (+38/-199) resources/forms/auditdeletedialog.ui (+14/-8) resources/forms/auditdetaildialog.ui (+70/-2) |
To merge this branch: | bzr merge lp:~trb143/openlp/bitsandbobs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raoul Snyman | Needs Fixing | ||
Review via email: mp+13188@code.launchpad.net |
This proposal has been superseded by a proposal from 2009-10-12.
Commit message
Description of the change
Tim Bentley (trb143) wrote : | # |
Raoul Snyman (raoul-snyman) wrote : | # |
Two things...
Firstly, is there a reason for a whole object to check the latest version? Why not just put
a "check_version" function in the utils/__init__.py file?
Secondly, our coding standards say that only Qt-derivative classes should use camelCase method names. For all pure-Python objects, we use under_score method names.
Raoul Snyman (raoul-snyman) wrote : | # |
Also, there are various other bits and pieces of coding-style fixes.
No spaces between parent, = and None
def __init__(self, parent = None):
Should be:
def __init__(self, parent=None):
Even if it's not your code, please fix it when you see it.
- 596. By Jonathan Corwin
-
More Presentation fixes
- 597. By Tim Bentley
-
Various changes and fixes
- 598. By Jonathan Corwin
-
TLC for the asv
- 599. By Raoul Snyman
-
Merged in lp:~raoul-snyman/openlp/versionfix
- 600. By Tim Bentley
-
Add Web Bibles to Advanced Tab and other nice features
- 601. By Jonathan Corwin
-
Presentation changes
- 602. By Tim Bentley
-
Update config files for deployment
- 603. By Tim Bentley
-
Changes to settings and SlideController handling
- 604. By Jon Tibble
-
Python 2.5 fixes
- 605. By Raoul Snyman
-
Merged in lp:~raoul-snyman/openlp/uifixes
- 606. By Raoul Snyman
-
Merge from lp:~raoul-snyman/openlp/uifixes
- 607. By Jonathan Corwin
-
Merged in lp:~j-corwin/openlp/present
- 608. By Raoul Snyman
- 609. By Tim Bentley
-
Theme Image and Presentation fixes
- 610. By Jon Tibble
-
General fixes
- 611. By Tim Bentley
-
General Tab Changes
- 612. By Tim Bentley
-
SlideControler UI fixes
- 613. By Tim Bentley
-
SlideControler UI fixes - take 2
- 614. By Tim Bentley
-
SlideControler UI fixes - take 3
Unmerged revisions
Preview Diff
1 | === modified file 'openlp.pyw' |
2 | --- openlp.pyw 2009-09-29 12:51:38 +0000 |
3 | +++ openlp.pyw 2009-10-11 19:40:23 +0000 |
4 | @@ -49,6 +49,7 @@ |
5 | """ |
6 | Run the OpenLP application. |
7 | """ |
8 | + applicationVersion = u'1.9.0' |
9 | #set the default string encoding |
10 | try: |
11 | sys.setappdefaultencoding(u'utf-8') |
12 | @@ -58,7 +59,7 @@ |
13 | QtCore.QObject.connect(Receiver.get_receiver(), |
14 | QtCore.SIGNAL(u'process_events'), self.processEvents) |
15 | self.setApplicationName(u'OpenLP') |
16 | - self.setApplicationVersion(u'1.9.0') |
17 | + self.setApplicationVersion(applicationVersion) |
18 | show_splash = str_to_bool(ConfigHelper.get_registry().get_value( |
19 | u'general', u'show splash', True)) |
20 | if show_splash: |
21 | |
22 | === modified file 'openlp/core/lib/dockwidget.py' |
23 | --- openlp/core/lib/dockwidget.py 2009-09-29 12:51:38 +0000 |
24 | +++ openlp/core/lib/dockwidget.py 2009-10-11 19:40:23 +0000 |
25 | @@ -46,8 +46,3 @@ |
26 | self.parent.settingsmanager.setUIItemVisibility( |
27 | self.objectName(), False) |
28 | event.accept() |
29 | - |
30 | - def resizeEvent(self, event): |
31 | - if self.objectName() == u'MediaManagerDock': |
32 | - if event.size().width() != event.oldSize().width(): |
33 | - self.parent.settingsmanager.setDockbarLeft(event.size().width()) |
34 | |
35 | === modified file 'openlp/core/lib/mediamanageritem.py' |
36 | --- openlp/core/lib/mediamanageritem.py 2009-10-03 13:08:18 +0000 |
37 | +++ openlp/core/lib/mediamanageritem.py 2009-10-11 19:40:23 +0000 |
38 | @@ -281,22 +281,22 @@ |
39 | self.ListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) |
40 | if self.hasEditIcon: |
41 | self.ListView.addAction(contextMenuAction(self.ListView, |
42 | - ':' +self.IconPath+u'_new.png', |
43 | + u':' +self.IconPath+u'_new.png', |
44 | translate(self.TranslationContext, |
45 | u'&Edit ' + self.PluginTextShort), |
46 | self.onEditClick)) |
47 | self.ListView.addAction(contextMenuSeparator(self.ListView)) |
48 | self.ListView.addAction(contextMenuAction( |
49 | - self.ListView, ':/system/system_preview.png', |
50 | + self.ListView, u':/system/system_preview.png', |
51 | translate(self.TranslationContext, |
52 | u'&Preview ' + self.PluginTextShort), |
53 | self.onPreviewClick)) |
54 | self.ListView.addAction(contextMenuAction( |
55 | - self.ListView, ':/system/system_live.png', |
56 | + self.ListView, u':/system/system_live.png', |
57 | translate(self.TranslationContext, u'&Show Live'), |
58 | self.onLiveClick)) |
59 | self.ListView.addAction(contextMenuAction( |
60 | - self.ListView, ':/system/system_add.png', |
61 | + self.ListView, u':/system/system_add.png', |
62 | translate(self.TranslationContext, u'&Add to Service'), |
63 | self.onAddClick)) |
64 | QtCore.QObject.connect(self.ListView, |
65 | |
66 | === modified file 'openlp/core/lib/pluginmanager.py' |
67 | --- openlp/core/lib/pluginmanager.py 2009-10-10 04:56:06 +0000 |
68 | +++ openlp/core/lib/pluginmanager.py 2009-10-11 19:40:23 +0000 |
69 | @@ -90,7 +90,7 @@ |
70 | try: |
71 | __import__(modulename, globals(), locals(), []) |
72 | except ImportError, e: |
73 | - log.error(u'Failed to import module %s on path %s for reason %s', |
74 | + log.exception(u'Failed to import module %s on path %s for reason %s', |
75 | modulename, path, e.args[0]) |
76 | plugin_classes = Plugin.__subclasses__() |
77 | self.plugins = [] |
78 | |
79 | === modified file 'openlp/core/lib/settingsmanager.py' |
80 | --- openlp/core/lib/settingsmanager.py 2009-09-29 17:05:34 +0000 |
81 | +++ openlp/core/lib/settingsmanager.py 2009-10-11 19:40:23 +0000 |
82 | @@ -46,11 +46,6 @@ |
83 | self.mainwindow_left = mainwindow_docbars |
84 | self.mainwindow_right = mainwindow_docbars |
85 | |
86 | - #self.mainwindow_left = int( ConfigHelper.get_config( |
87 | - # u'user interface', u'mediamanager left', self.mainwindow_left)) |
88 | - #self.mainwindow_right = int( ConfigHelper.get_config( |
89 | - # u'user interface', u'mediamanager right', self.mainwindow_right)) |
90 | - |
91 | self.slidecontroller = (self.width - ( |
92 | self.mainwindow_left + self.mainwindow_right) - 100 ) / 2 |
93 | self.slidecontroller_image = self.slidecontroller - 50 |
94 | @@ -79,8 +74,3 @@ |
95 | def togglePreviewPanel(self, isVisible): |
96 | ConfigHelper.set_config(u'user interface', u'display previewpanel', |
97 | isVisible) |
98 | - |
99 | - def setDockbarLeft(self, value): |
100 | - #ConfigHelper.set_config(u'user interface', u'mediamanager left', value) |
101 | - pass |
102 | - |
103 | |
104 | === modified file 'openlp/core/ui/mainwindow.py' |
105 | --- openlp/core/ui/mainwindow.py 2009-10-10 12:10:05 +0000 |
106 | +++ openlp/core/ui/mainwindow.py 2009-10-11 19:40:23 +0000 |
107 | @@ -33,6 +33,7 @@ |
108 | from openlp.core.lib import translate, RenderManager, PluginConfig, \ |
109 | OpenLPDockWidget, SettingsManager, PluginManager, Receiver, \ |
110 | buildIcon |
111 | +from openlp.core.utils import LatestVersion |
112 | |
113 | |
114 | class Ui_MainWindow(object): |
115 | @@ -524,6 +525,19 @@ |
116 | self.ThemeManagerContents.loadThemes() |
117 | log.info(u'Load data from Settings') |
118 | self.settingsForm.postSetUp() |
119 | + self.versionCheck() |
120 | + |
121 | + def versionCheck(self): |
122 | + applicationVersion = self.generalConfig.get_config(u'Application version', u'1.9.0-595') |
123 | + version = LatestVersion(self.generalConfig).checkVersion(applicationVersion) |
124 | + if applicationVersion != version: |
125 | + QtGui.QMessageBox.question(None, |
126 | + translate(u'mainWindow', u'OpenLP version Updated'), |
127 | + translate(u'mainWindow', u'OpenLP version %s has been updated to version %s' |
128 | + % (applicationVersion, version)), |
129 | + QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok), |
130 | + QtGui.QMessageBox.Ok) |
131 | + self.generalConfig.set_config(u'Application version', version) |
132 | |
133 | |
134 | def getMonitorNumber(self): |
135 | |
136 | === modified file 'openlp/core/ui/pluginform.py' |
137 | --- openlp/core/ui/pluginform.py 2009-10-08 19:58:49 +0000 |
138 | +++ openlp/core/ui/pluginform.py 2009-10-11 19:40:23 +0000 |
139 | @@ -83,7 +83,11 @@ |
140 | log.debug('PluginStatus: %s', str(self.activePlugin.status)) |
141 | self.VersionNumberLabel.setText(self.activePlugin.version) |
142 | self.AboutTextBrowser.setHtml(self.activePlugin.about()) |
143 | - self.StatusComboBox.setCurrentIndex(int(self.activePlugin.status)) |
144 | + if self.activePlugin.can_be_disabled(): |
145 | + self.StatusComboBox.setCurrentIndex(int(self.activePlugin.status)) |
146 | + self.StatusComboBox.setEnabled(True) |
147 | + else: |
148 | + self.StatusComboBox.setEnabled(False) |
149 | |
150 | def onPluginListWidgetSelectionChanged(self): |
151 | if self.PluginListWidget.currentItem() is None: |
152 | |
153 | === modified file 'openlp/core/ui/servicemanager.py' |
154 | --- openlp/core/ui/servicemanager.py 2009-10-01 16:56:42 +0000 |
155 | +++ openlp/core/ui/servicemanager.py 2009-10-11 19:40:23 +0000 |
156 | @@ -66,6 +66,20 @@ |
157 | else: |
158 | event.ignore() |
159 | |
160 | + def mouseMoveEvent(self, event): |
161 | + """ |
162 | + Drag and drop event does not care what data is selected |
163 | + as the recipient will use events to request the data move |
164 | + just tell it what plugin to call |
165 | + """ |
166 | + if event.buttons() != QtCore.Qt.LeftButton: |
167 | + return |
168 | + drag = QtGui.QDrag(self) |
169 | + mimeData = QtCore.QMimeData() |
170 | + drag.setMimeData(mimeData) |
171 | + mimeData.setText(u'ServiceManager') |
172 | + dropAction = drag.start(QtCore.Qt.CopyAction) |
173 | + |
174 | class Iter(QtGui.QTreeWidgetItemIterator): |
175 | def __init__(self, *args): |
176 | QtGui.QTreeWidgetItemIterator.__init__(self, *args) |
177 | @@ -490,23 +504,16 @@ |
178 | Service Item to be added |
179 | |
180 | """ |
181 | - self.serviceItems.append({u'data': item, |
182 | - u'order': len(self.serviceItems)+1, u'expanded':True}) |
183 | - treewidgetitem = QtGui.QTreeWidgetItem(self.ServiceManagerList) |
184 | - treewidgetitem.setText(0,item.title) |
185 | - treewidgetitem.setIcon(0,item.iconic_representation) |
186 | - treewidgetitem.setData(0, QtCore.Qt.UserRole, |
187 | - QtCore.QVariant(len(self.serviceItems))) |
188 | - treewidgetitem.setExpanded(True) |
189 | + sitem, count = self.findServiceItem() |
190 | item.render() |
191 | - count = 0 |
192 | - for frame in item.frames: |
193 | - treewidgetitem1 = QtGui.QTreeWidgetItem(treewidgetitem) |
194 | - text = frame[u'title'] |
195 | - treewidgetitem1.setText(0,text[:40]) |
196 | - treewidgetitem1.setData(0, QtCore.Qt.UserRole, |
197 | - QtCore.QVariant(count)) |
198 | - count = count + 1 |
199 | + if sitem == -1: |
200 | + self.serviceItems.append({u'data': item, |
201 | + u'order': len(self.serviceItems) + 1, u'expanded':True}) |
202 | + self.repaintServiceList(len(self.serviceItems) + 1, 0) |
203 | + else: |
204 | + self.serviceItems.insert(sitem + 1, {u'data': item, |
205 | + u'order': len(self.serviceItems)+1, u'expanded':True}) |
206 | + self.repaintServiceList(sitem + 1, 0) |
207 | self.parent.serviceChanged(False, self.serviceName) |
208 | |
209 | def makePreview(self): |
210 | @@ -565,7 +572,28 @@ |
211 | link = event.mimeData() |
212 | if link.hasText(): |
213 | plugin = event.mimeData().text() |
214 | - Receiver().send_message(u'%s_add_service_item' % plugin) |
215 | + if plugin == u'ServiceManager': |
216 | + startpos, startCount = self.findServiceItem() |
217 | + item = self.ServiceManagerList.itemAt(event.pos()) |
218 | + if item == None: |
219 | + endpos = len(self.serviceItems) |
220 | + else: |
221 | + parentitem = item.parent() |
222 | + if parentitem is None: |
223 | + endpos = item.data(0, QtCore.Qt.UserRole).toInt()[0] |
224 | + else: |
225 | + endpos = parentitem.data(0, QtCore.Qt.UserRole).toInt()[0] |
226 | + endpos -= 1 |
227 | + if endpos < startpos: |
228 | + newpos = endpos |
229 | + else: |
230 | + newpos = endpos + 1 |
231 | + serviceItem = self.serviceItems[startpos] |
232 | + self.serviceItems.remove(serviceItem) |
233 | + self.serviceItems.insert(newpos, serviceItem) |
234 | + self.repaintServiceList(endpos, startCount) |
235 | + else: |
236 | + Receiver().send_message(u'%s_add_service_item' % plugin) |
237 | |
238 | def updateThemeList(self, theme_list): |
239 | """ |
240 | |
241 | === modified file 'openlp/core/ui/settingsform.py' |
242 | --- openlp/core/ui/settingsform.py 2009-10-10 04:56:06 +0000 |
243 | +++ openlp/core/ui/settingsform.py 2009-10-11 19:40:23 +0000 |
244 | @@ -53,28 +53,13 @@ |
245 | def insertTab(self, tab, location): |
246 | log.debug(u'Inserting %s tab' % tab.title()) |
247 | self.SettingsTabWidget.insertTab(location + 13, tab, tab.title()) |
248 | - #for tab_index in range(0, self.SettingsTabWidget.count()): |
249 | - #print self.SettingsTabWidget.widget(tab_index).title() |
250 | - #if self.SettingsTabWidget.widget(tab_index).title() == name: |
251 | - #print "Insert match" |
252 | - #print self.SettingsTabWidget.widget(tab_index).isVisible() |
253 | - #self.SettingsTabWidget.setTabEnabled(tab_index, True) |
254 | - #self.SettingsTabWidget.removeTab(tab_index) |
255 | - #print self.SettingsTabWidget.widget(tab_index).isVisible() |
256 | - |
257 | |
258 | def removeTab(self, name): |
259 | log.debug(u'remove %s tab' % name) |
260 | - #print ">>>>>>>>>>> remove settings" |
261 | for tab_index in range(0, self.SettingsTabWidget.count()): |
262 | if self.SettingsTabWidget.widget(tab_index) is not None: |
263 | - #print "rt", self.SettingsTabWidget.widget(tab_index).title(), name |
264 | if self.SettingsTabWidget.widget(tab_index).title() == name: |
265 | - #print "remove match" |
266 | - #print self.SettingsTabWidget.widget(tab_index).isVisible() |
267 | - #self.SettingsTabWidget.setTabEnabled(tab_index, False) |
268 | self.SettingsTabWidget.removeTab(tab_index) |
269 | - #print self.SettingsTabWidget.widget(tab_index).isVisible() |
270 | |
271 | def accept(self): |
272 | for tab_index in range(0, self.SettingsTabWidget.count()): |
273 | |
274 | === modified file 'openlp/core/ui/thememanager.py' |
275 | --- openlp/core/ui/thememanager.py 2009-09-25 00:43:42 +0000 |
276 | +++ openlp/core/ui/thememanager.py 2009-10-11 19:40:23 +0000 |
277 | @@ -33,7 +33,8 @@ |
278 | from openlp.core.ui import AmendThemeForm |
279 | from openlp.core.theme import Theme |
280 | from openlp.core.lib import PluginConfig, OpenLPToolbar, ThemeXML, translate, \ |
281 | - str_to_bool, file_to_xml, buildIcon, Receiver |
282 | + str_to_bool, file_to_xml, buildIcon, Receiver, contextMenuAction, \ |
283 | + contextMenuSeparator |
284 | from openlp.core.utils import ConfigHelper |
285 | |
286 | class ThemeManager(QtGui.QWidget): |
287 | @@ -77,6 +78,25 @@ |
288 | self.ThemeListWidget.setAlternatingRowColors(True) |
289 | self.ThemeListWidget.setIconSize(QtCore.QSize(88,50)) |
290 | self.Layout.addWidget(self.ThemeListWidget) |
291 | + self.ThemeListWidget.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) |
292 | + self.ThemeListWidget.addAction(contextMenuAction(self.ThemeListWidget, |
293 | + u':/themes/theme_edit.png', |
294 | + translate(u'ThemeManager', u'Edit a theme'), |
295 | + self.onEditTheme)) |
296 | + self.ThemeListWidget.addAction(contextMenuSeparator(self.ThemeListWidget)) |
297 | + self.ThemeListWidget.addAction(contextMenuAction(self.ThemeListWidget, |
298 | + u':/themes/theme_delete.png', |
299 | + translate(u'ThemeManager', u'Delete theme'), |
300 | + self.onDeleteTheme)) |
301 | + self.ThemeListWidget.addAction(contextMenuAction(self.ThemeListWidget, |
302 | + u':/themes/theme_export.png', |
303 | + translate(u'ThemeManager', u'Make Global'), |
304 | + self.changeGlobalFromScreen)) |
305 | + self.ThemeListWidget.addAction(contextMenuAction(self.ThemeListWidget, |
306 | + u':/themes/theme_export.png', |
307 | + translate(u'ThemeManager', u'Export theme'), |
308 | + self.onExportTheme)) |
309 | + self.ThemeListWidget.addAction(contextMenuSeparator(self.ThemeListWidget)) |
310 | #Signals |
311 | QtCore.QObject.connect(self.ThemeListWidget, |
312 | QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), |
313 | @@ -109,8 +129,9 @@ |
314 | u'default')) |
315 | self.ThemeListWidget.item(count).setText(name) |
316 | |
317 | - def changeGlobalFromScreen(self, index): |
318 | + def changeGlobalFromScreen(self, index = -1): |
319 | log.debug(u'changeGlobalFromScreen %s', index) |
320 | + selected_row = self.ThemeListWidget.currentRow() |
321 | for count in range (0, self.ThemeListWidget.count()): |
322 | item = self.ThemeListWidget.item(count) |
323 | oldName = item.text() |
324 | @@ -119,7 +140,7 @@ |
325 | self.ThemeListWidget.item(count).setText( |
326 | unicode(item.data(QtCore.Qt.UserRole).toString())) |
327 | #Set the new name |
328 | - if count == index.row(): |
329 | + if count == selected_row: |
330 | self.global_theme = unicode( |
331 | self.ThemeListWidget.item(count).text()) |
332 | name = u'%s (%s)' % (self.global_theme, |
333 | @@ -186,14 +207,15 @@ |
334 | u'You have not selected a theme!'), |
335 | QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok)) |
336 | return |
337 | - theme = unicode(item.text()) |
338 | + theme = unicode(item.data(QtCore.Qt.UserRole).toString()) |
339 | path = QtGui.QFileDialog.getExistingDirectory(self, |
340 | - u'Save Theme',self.config.get_last_dir(1) ) |
341 | + u'Save Theme - (%s)' % theme, |
342 | + self.config.get_last_dir(1) ) |
343 | path = unicode(path) |
344 | if path != u'': |
345 | self.config.set_last_dir(path, 1) |
346 | themePath = os.path.join(path, theme + u'.theme') |
347 | - zip = zipfile.ZipFile(themePath, 'w') |
348 | + zip = zipfile.ZipFile(themePath, u'w') |
349 | source = os.path.join(self.path, theme) |
350 | for root, dirs, files in os.walk(source): |
351 | for name in files: |
352 | @@ -203,7 +225,8 @@ |
353 | |
354 | def onImportTheme(self): |
355 | files = QtGui.QFileDialog.getOpenFileNames(None, |
356 | - translate(u'ThemeManager', u'Select Theme Import File'), |
357 | + translate(u'ThemeManager', |
358 | + u'Select Theme Import File'), |
359 | self.path, u'Theme (*.*)') |
360 | log.info(u'New Themes %s', unicode(files)) |
361 | if len(files) > 0: |
362 | |
363 | === modified file 'openlp/core/utils/__init__.py' |
364 | --- openlp/core/utils/__init__.py 2009-09-08 19:58:05 +0000 |
365 | +++ openlp/core/utils/__init__.py 2009-10-11 19:40:23 +0000 |
366 | @@ -24,5 +24,6 @@ |
367 | |
368 | from registry import Registry |
369 | from confighelper import ConfigHelper |
370 | +from latestversion import LatestVersion |
371 | |
372 | __all__ = ['Registry', 'ConfigHelper'] |
373 | |
374 | === added file 'openlp/core/utils/latestversion.py' |
375 | --- openlp/core/utils/latestversion.py 1970-01-01 00:00:00 +0000 |
376 | +++ openlp/core/utils/latestversion.py 2009-10-11 19:40:23 +0000 |
377 | @@ -0,0 +1,57 @@ |
378 | +# -*- coding: utf-8 -*- |
379 | +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 |
380 | + |
381 | +############################################################################### |
382 | +# OpenLP - Open Source Lyrics Projection # |
383 | +# --------------------------------------------------------------------------- # |
384 | +# Copyright (c) 2008-2009 Raoul Snyman # |
385 | +# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten # |
386 | +# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri # |
387 | +# --------------------------------------------------------------------------- # |
388 | +# This program is free software; you can redistribute it and/or modify it # |
389 | +# under the terms of the GNU General Public License as published by the Free # |
390 | +# Software Foundation; version 2 of the License. # |
391 | +# # |
392 | +# This program is distributed in the hope that it will be useful, but WITHOUT # |
393 | +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # |
394 | +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # |
395 | +# more details. # |
396 | +# # |
397 | +# You should have received a copy of the GNU General Public License along # |
398 | +# with this program; if not, write to the Free Software Foundation, Inc., 59 # |
399 | +# Temple Place, Suite 330, Boston, MA 02111-1307 USA # |
400 | +############################################################################### |
401 | + |
402 | +import logging |
403 | +import urllib2 |
404 | +from datetime import datetime |
405 | + |
406 | + |
407 | +class LatestVersion(object): |
408 | + """ |
409 | + """ |
410 | + global log |
411 | + log = logging.getLogger(u'LatestVersion') |
412 | + log.info(u'Latest Version detector loaded') |
413 | + |
414 | + def __init__(self, config): |
415 | + self.config = config |
416 | + |
417 | + def checkVersion(self, current_version): |
418 | + version_string = current_version |
419 | + lastTest = self.config.get_config(u'Application version Test', datetime.now().date()) |
420 | + thisTest = unicode(datetime.now().date()) |
421 | + self.config.set_config(u'Application version Test', thisTest) |
422 | + if lastTest != thisTest: |
423 | + print "Now check" |
424 | + version_string = u'' |
425 | + req = urllib2.Request(u'http://www.openlp.org/files/version.txt') |
426 | + req.add_header(u'User-Agent', u'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)') |
427 | + try: |
428 | + handle = urllib2.urlopen(req, None, 1) |
429 | + html = handle.read() |
430 | + version_string = unicode(html).rstrip() |
431 | + except IOError, e: |
432 | + if hasattr(e, u'reason'): |
433 | + log.exception(u'Reason for failure: %s', e.reason) |
434 | + return version_string |
435 | |
436 | === modified file 'openlp/plugins/audit/auditplugin.py' |
437 | --- openlp/plugins/audit/auditplugin.py 2009-10-03 18:39:44 +0000 |
438 | +++ openlp/plugins/audit/auditplugin.py 2009-10-11 19:40:23 +0000 |
439 | @@ -64,14 +64,7 @@ |
440 | self.AuditMenu.setObjectName(u'AuditMenu') |
441 | self.AuditMenu.setTitle( |
442 | translate(u'AuditPlugin', u'&Audit')) |
443 | - #Audit Delete All |
444 | - self.AuditDeleteAll = QtGui.QAction(tools_menu) |
445 | - self.AuditDeleteAll.setText( |
446 | - translate(u'AuditPlugin', u'Au&dit Delete all')) |
447 | - self.AuditDeleteAll.setStatusTip( |
448 | - translate(u'AuditPlugin', u'Deleted all Audit records')) |
449 | - self.AuditDeleteAll.setObjectName(u'AuditDeleteAll') |
450 | - #Audit Delete |
451 | + #Audit Delete |
452 | self.AuditDelete = QtGui.QAction(tools_menu) |
453 | self.AuditDelete.setText( |
454 | translate(u'AuditPlugin', u'Audit &Delete')) |
455 | @@ -81,9 +74,9 @@ |
456 | #Audit Report |
457 | self.AuditReport = QtGui.QAction(tools_menu) |
458 | self.AuditReport.setText( |
459 | - translate(u'AuditPlugin', u'Au&dit &Report')) |
460 | + translate(u'AuditPlugin', u'Au&dit &Extract')) |
461 | self.AuditReport.setStatusTip( |
462 | - translate(u'AuditPlugin', u'Generate Reports on Audit Data')) |
463 | + translate(u'AuditPlugin', u'Generate Extracts on Audit Data')) |
464 | self.AuditReport.setObjectName(u'AuditReport') |
465 | #Audit activation |
466 | AuditIcon = buildIcon(u':/tools/tools_alert.png') |
467 | @@ -100,9 +93,7 @@ |
468 | self.toolsMenu.addAction(self.AuditMenu.menuAction()) |
469 | self.AuditMenu.addAction(self.AuditStatus) |
470 | self.AuditMenu.addSeparator() |
471 | - self.AuditMenu.addAction(self.AuditDeleteAll) |
472 | self.AuditMenu.addAction(self.AuditDelete) |
473 | - self.AuditMenu.addSeparator() |
474 | self.AuditMenu.addAction(self.AuditReport) |
475 | # Signals and slots |
476 | QtCore.QObject.connect(self.AuditStatus, |
477 | @@ -111,8 +102,6 @@ |
478 | QtCore.QObject.connect(self.AuditStatus, |
479 | QtCore.SIGNAL(u'triggered(bool)'), |
480 | self.toggleAuditState) |
481 | - QtCore.QObject.connect(self.AuditDeleteAll, |
482 | - QtCore.SIGNAL(u'triggered()'), self.onAuditDeleteAll) |
483 | QtCore.QObject.connect(self.AuditDelete, |
484 | QtCore.SIGNAL(u'triggered()'), self.onAuditDelete) |
485 | QtCore.QObject.connect(self.AuditReport, |
486 | @@ -132,7 +121,7 @@ |
487 | if self.auditmanager is None: |
488 | self.auditmanager = AuditManager(self.config) |
489 | self.auditdeleteform = AuditDeleteForm(self.auditmanager) |
490 | - self.auditdetailform = AuditDetailForm(self.auditmanager) |
491 | + self.auditdetailform = AuditDetailForm(self) |
492 | self.AuditMenu.menuAction().setVisible(True) |
493 | |
494 | def finalise(self): |
495 | @@ -170,17 +159,6 @@ |
496 | self.config.get_config(u'audit active', False)) |
497 | self.AuditStatus.setEnabled(True) |
498 | |
499 | - def onAuditDeleteAll(self): |
500 | - ret = QtGui.QMessageBox.question(None, |
501 | - translate(u'mainWindow', u'Delete All Audit Events?'), |
502 | - translate(u'mainWindow', u'Are you sure you want to delete all Audit Data?'), |
503 | - QtGui.QMessageBox.StandardButtons( |
504 | - QtGui.QMessageBox.Ok | |
505 | - QtGui.QMessageBox.Cancel), |
506 | - QtGui.QMessageBox.Cancel) |
507 | - if ret == QtGui.QMessageBox.Ok: |
508 | - self.auditmanager.delete_all() |
509 | - |
510 | def onAuditDelete(self): |
511 | self.auditdeleteform.exec_() |
512 | |
513 | |
514 | === modified file 'openlp/plugins/audit/forms/auditdeletedialog.py' |
515 | --- openlp/plugins/audit/forms/auditdeletedialog.py 2009-09-25 20:12:35 +0000 |
516 | +++ openlp/plugins/audit/forms/auditdeletedialog.py 2009-10-11 19:40:23 +0000 |
517 | @@ -2,7 +2,7 @@ |
518 | |
519 | # Form implementation generated from reading ui file 'auditdeletedialog.ui' |
520 | # |
521 | -# Created: Fri Sep 25 21:03:48 2009 |
522 | +# Created: Sun Oct 11 11:34:45 2009 |
523 | # by: PyQt4 UI code generator 4.5.4 |
524 | # |
525 | # WARNING! All changes made in this file will be lost! |
526 | @@ -12,7 +12,7 @@ |
527 | class Ui_AuditDeleteDialog(object): |
528 | def setupUi(self, AuditDeleteDialog): |
529 | AuditDeleteDialog.setObjectName("AuditDeleteDialog") |
530 | - AuditDeleteDialog.resize(291, 202) |
531 | + AuditDeleteDialog.resize(291, 243) |
532 | self.layoutWidget = QtGui.QWidget(AuditDeleteDialog) |
533 | self.layoutWidget.setGeometry(QtCore.QRect(20, 10, 247, 181)) |
534 | self.layoutWidget.setObjectName("layoutWidget") |
535 | @@ -24,10 +24,10 @@ |
536 | self.DeleteCalendar.setVerticalHeaderFormat(QtGui.QCalendarWidget.NoVerticalHeader) |
537 | self.DeleteCalendar.setObjectName("DeleteCalendar") |
538 | self.verticalLayout.addWidget(self.DeleteCalendar) |
539 | - self.buttonBox = QtGui.QDialogButtonBox(self.layoutWidget) |
540 | + self.buttonBox = QtGui.QDialogButtonBox(AuditDeleteDialog) |
541 | + self.buttonBox.setGeometry(QtCore.QRect(30, 210, 245, 25)) |
542 | self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) |
543 | self.buttonBox.setObjectName("buttonBox") |
544 | - self.verticalLayout.addWidget(self.buttonBox) |
545 | |
546 | self.retranslateUi(AuditDeleteDialog) |
547 | QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), AuditDeleteDialog.accept) |
548 | |
549 | === modified file 'openlp/plugins/audit/forms/auditdetaildialog.py' |
550 | --- openlp/plugins/audit/forms/auditdetaildialog.py 2009-09-25 20:12:35 +0000 |
551 | +++ openlp/plugins/audit/forms/auditdetaildialog.py 2009-10-11 19:40:23 +0000 |
552 | @@ -2,7 +2,7 @@ |
553 | |
554 | # Form implementation generated from reading ui file 'auditdetaildialog.ui' |
555 | # |
556 | -# Created: Fri Sep 25 21:04:08 2009 |
557 | +# Created: Sun Oct 11 11:40:02 2009 |
558 | # by: PyQt4 UI code generator 4.5.4 |
559 | # |
560 | # WARNING! All changes made in this file will be lost! |
561 | @@ -136,6 +136,10 @@ |
562 | self.retranslateUi(AuditDetailDialog) |
563 | QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), AuditDetailDialog.accept) |
564 | QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), AuditDetailDialog.close) |
565 | + QtCore.QObject.connect(self.FirstCheckBox, QtCore.SIGNAL("stateChanged(int)"), AuditDetailDialog.changeFirstService) |
566 | + QtCore.QObject.connect(self.SecondCheckBox, QtCore.SIGNAL("stateChanged(int)"), AuditDetailDialog.changeSecondService) |
567 | + QtCore.QObject.connect(self.ThirdCheckBox, QtCore.SIGNAL("stateChanged(int)"), AuditDetailDialog.changeThirdService) |
568 | + QtCore.QObject.connect(self.SaveFilePushButton, QtCore.SIGNAL("pressed()"), AuditDetailDialog.defineOutputLocation) |
569 | QtCore.QMetaObject.connectSlotsByName(AuditDetailDialog) |
570 | |
571 | def retranslateUi(self, AuditDetailDialog): |
572 | @@ -144,11 +148,11 @@ |
573 | self.ReportTypeGroup.setTitle(QtGui.QApplication.translate("AuditDetailDialog", "Report Type", None, QtGui.QApplication.UnicodeUTF8)) |
574 | self.SummaryReport.setText(QtGui.QApplication.translate("AuditDetailDialog", "Summary", None, QtGui.QApplication.UnicodeUTF8)) |
575 | self.DetailedReport.setText(QtGui.QApplication.translate("AuditDetailDialog", "Detailed", None, QtGui.QApplication.UnicodeUTF8)) |
576 | - self.DateRangeGroupBox.setTitle(QtGui.QApplication.translate("AuditDetailDialog", "Date Range", None, QtGui.QApplication.UnicodeUTF8)) |
577 | + self.DateRangeGroupBox.setTitle(QtGui.QApplication.translate("AuditDetailDialog", "Select Date Range", None, QtGui.QApplication.UnicodeUTF8)) |
578 | self.FromDateEdit.setDisplayFormat(QtGui.QApplication.translate("AuditDetailDialog", "dd/MM/yyyy", None, QtGui.QApplication.UnicodeUTF8)) |
579 | self.To.setText(QtGui.QApplication.translate("AuditDetailDialog", "to", None, QtGui.QApplication.UnicodeUTF8)) |
580 | self.ToDateEdit.setDisplayFormat(QtGui.QApplication.translate("AuditDetailDialog", "dd/MM/yyyy", None, QtGui.QApplication.UnicodeUTF8)) |
581 | - self.TimePeriodGroupBox.setTitle(QtGui.QApplication.translate("AuditDetailDialog", "Time Periods", None, QtGui.QApplication.UnicodeUTF8)) |
582 | + self.TimePeriodGroupBox.setTitle(QtGui.QApplication.translate("AuditDetailDialog", "Select Time Periods", None, QtGui.QApplication.UnicodeUTF8)) |
583 | self.FirstCheckBox.setText(QtGui.QApplication.translate("AuditDetailDialog", "First Service", None, QtGui.QApplication.UnicodeUTF8)) |
584 | self.FirstFromTimeEdit.setDisplayFormat(QtGui.QApplication.translate("AuditDetailDialog", "hh:mm AP", None, QtGui.QApplication.UnicodeUTF8)) |
585 | self.FirstTo.setText(QtGui.QApplication.translate("AuditDetailDialog", "to", None, QtGui.QApplication.UnicodeUTF8)) |
586 | |
587 | === modified file 'openlp/plugins/audit/forms/auditdetailform.py' |
588 | --- openlp/plugins/audit/forms/auditdetailform.py 2009-09-25 20:12:35 +0000 |
589 | +++ openlp/plugins/audit/forms/auditdetailform.py 2009-10-11 19:40:23 +0000 |
590 | @@ -32,209 +32,48 @@ |
591 | """ |
592 | Class documentation goes here. |
593 | """ |
594 | - def __init__(self, auditmanager, parent = None): |
595 | + def __init__(self, parent = None): |
596 | """ |
597 | Constructor |
598 | """ |
599 | - QtGui.QDialog.__init__(self, parent) |
600 | - #self.parent = parent |
601 | + QtGui.QDialog.__init__(self, None) |
602 | + self.parent = parent |
603 | self.setupUi(self) |
604 | -# # Connecting signals and slots |
605 | -# QtCore.QObject.connect(self.buttonBox, |
606 | -# QtCore.SIGNAL(u'rejected()'), self.rejected) |
607 | -# QtCore.QObject.connect(self.buttonBox, |
608 | -# QtCore.SIGNAL(u'accepted()'), self.accept) |
609 | -# QtCore.QObject.connect(self.AddButton, |
610 | -# QtCore.SIGNAL(u'pressed()'), self.onAddButtonPressed) |
611 | -# QtCore.QObject.connect(self.EditButton, |
612 | -# QtCore.SIGNAL(u'pressed()'), self.onEditButtonPressed) |
613 | -# QtCore.QObject.connect(self.EditAllButton, |
614 | -# QtCore.SIGNAL(u'pressed()'), self.onEditAllButtonPressed) |
615 | -# QtCore.QObject.connect(self.SaveButton, |
616 | -# QtCore.SIGNAL(u'pressed()'), self.onSaveButtonPressed) |
617 | -# QtCore.QObject.connect(self.DeleteButton, |
618 | -# QtCore.SIGNAL(u'pressed()'), self.onDeleteButtonPressed) |
619 | -# QtCore.QObject.connect(self.ClearButton, |
620 | -# QtCore.SIGNAL(u'pressed()'), self.onClearButtonPressed) |
621 | -# QtCore.QObject.connect(self.UpButton, |
622 | -# QtCore.SIGNAL(u'pressed()'), self.onUpButtonPressed) |
623 | -# QtCore.QObject.connect(self.DownButton, |
624 | -# QtCore.SIGNAL(u'pressed()'), self.onDownButtonPressed) |
625 | -# |
626 | -# QtCore.QObject.connect(self.VerseListView, |
627 | -# QtCore.SIGNAL(u'itemDoubleClicked(QListWidgetItem*)'), |
628 | -# self.onVerseListViewSelected) |
629 | -# QtCore.QObject.connect(self.VerseListView, |
630 | -# QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), |
631 | -# self.onVerseListViewPressed) |
632 | -# QtCore.QObject.connect(Receiver.get_receiver(), |
633 | -# QtCore.SIGNAL(u'update_themes'), self.loadThemes) |
634 | -# # Create other objects and forms |
635 | -# self.custommanager = custommanager |
636 | self.initialise() |
637 | |
638 | def initialise(self): |
639 | - pass |
640 | -# self.editAll = False |
641 | -# self.DeleteButton.setEnabled(False) |
642 | -# self.EditButton.setEnabled(False) |
643 | -# self.EditAllButton.setEnabled(True) |
644 | -# self.SaveButton.setEnabled(False) |
645 | -# self.ClearButton.setEnabled(False) |
646 | -# self.TitleEdit.setText(u'') |
647 | -# self.CreditEdit.setText(u'') |
648 | -# self.VerseTextEdit.clear() |
649 | -# self.VerseListView.clear() |
650 | -# #make sure we have a new item |
651 | -# self.customSlide = CustomSlide() |
652 | -# self.ThemeComboBox.addItem(u'') |
653 | -# |
654 | -# def loadThemes(self, themelist): |
655 | -# self.ThemeComboBox.clear() |
656 | -# self.ThemeComboBox.addItem(u'') |
657 | -# for themename in themelist: |
658 | -# self.ThemeComboBox.addItem(themename) |
659 | -# |
660 | -# def loadCustom(self, id): |
661 | -# self.customSlide = CustomSlide() |
662 | -# self.initialise() |
663 | -# if id != 0: |
664 | -# self.customSlide = self.custommanager.get_custom(id) |
665 | -# self.TitleEdit.setText(self.customSlide.title) |
666 | -# self.CreditEdit.setText(self.customSlide.credits) |
667 | -# |
668 | -# songXML = SongXMLParser(self.customSlide.text) |
669 | -# verseList = songXML.get_verses() |
670 | -# for verse in verseList: |
671 | -# self.VerseListView.addItem(verse[1]) |
672 | -# theme = unicode(self.customSlide.theme_name) |
673 | -# id = self.ThemeComboBox.findText(theme, QtCore.Qt.MatchExactly) |
674 | -# if id == -1: |
675 | -# id = 0 # Not Found |
676 | -# self.ThemeComboBox.setCurrentIndex(id) |
677 | -# else: |
678 | -# self.ThemeComboBox.setCurrentIndex(0) |
679 | -# |
680 | -# def accept(self): |
681 | -# valid, message = self._validate() |
682 | -# if not valid: |
683 | -# QtGui.QMessageBox.critical(self, |
684 | -# translate(u'customEditDialog', u'Error'), message, |
685 | -# QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok)) |
686 | -# return |
687 | -# sxml = SongXMLBuilder() |
688 | -# sxml.new_document() |
689 | -# sxml.add_lyrics_to_song() |
690 | -# count = 1 |
691 | -# for i in range (0, self.VerseListView.count()): |
692 | -# sxml.add_verse_to_lyrics( |
693 | -# u'custom', unicode(count), |
694 | -# unicode(self.VerseListView.item(i).text())) |
695 | -# count += 1 |
696 | -# self.customSlide.title = unicode(self.TitleEdit.displayText()) |
697 | -# self.customSlide.text = unicode(sxml.extract_xml()) |
698 | -# self.customSlide.credits = unicode(self.CreditEdit.displayText()) |
699 | -# self.customSlide.theme_name = unicode(self.ThemeComboBox.currentText()) |
700 | -# self.custommanager.save_slide(self.customSlide) |
701 | -# self.close() |
702 | -# |
703 | -# def rejected(self): |
704 | -# self.close() |
705 | -# |
706 | -# def onUpButtonPressed(self): |
707 | -# selectedRow = self.VerseListView.currentRow() |
708 | -# if selectedRow != 0: |
709 | -# qw = self.VerseListView.takeItem(selectedRow) |
710 | -# self.VerseListView.insertItem(selectedRow - 1, qw) |
711 | -# self.VerseListView.setCurrentRow(selectedRow - 1) |
712 | -# |
713 | -# def onDownButtonPressed(self): |
714 | -# selectedRow = self.VerseListView.currentRow() |
715 | -# # zero base arrays |
716 | -# if selectedRow != self.VerseListView.count() - 1: |
717 | -# qw = self.VerseListView.takeItem(selectedRow) |
718 | -# self.VerseListView.insertItem(selectedRow + 1, qw) |
719 | -# self.VerseListView.setCurrentRow(selectedRow + 1) |
720 | -# |
721 | -# def onClearButtonPressed(self): |
722 | -# self.VerseTextEdit.clear() |
723 | -# self.editAll = False |
724 | -# self.AddButton.setEnabled(True) |
725 | -# self.EditAllButton.setEnabled(True) |
726 | -# self.SaveButton.setEnabled(False) |
727 | -# |
728 | -# def onVerseListViewPressed(self, item): |
729 | -# self.DeleteButton.setEnabled(True) |
730 | -# self.EditButton.setEnabled(True) |
731 | -# |
732 | -# def onVerseListViewSelected(self, item): |
733 | -# self.editText(item.text()) |
734 | -# |
735 | -# def onAddButtonPressed(self): |
736 | -# self.VerseListView.addItem(self.VerseTextEdit.toPlainText()) |
737 | -# self.DeleteButton.setEnabled(False) |
738 | -# self.VerseTextEdit.clear() |
739 | -# |
740 | -# def onEditButtonPressed(self): |
741 | -# self.editText(self.VerseListView.currentItem().text()) |
742 | -# |
743 | -# def onEditAllButtonPressed(self): |
744 | -# self.editAll = True |
745 | -# self.AddButton.setEnabled(False) |
746 | -# if self.VerseListView.count() > 0: |
747 | -# verse_list = u'' |
748 | -# for row in range(0, self.VerseListView.count()): |
749 | -# item = self.VerseListView.item(row) |
750 | -# verse_list += item.text() |
751 | -# verse_list += u'\n---\n' |
752 | -# self.editText(verse_list) |
753 | -# |
754 | -# def editText(self, text): |
755 | -# self.beforeText = text |
756 | -# self.VerseTextEdit.setPlainText(text) |
757 | -# self.DeleteButton.setEnabled(False) |
758 | -# self.EditButton.setEnabled(False) |
759 | -# self.EditAllButton.setEnabled(False) |
760 | -# self.SaveButton.setEnabled(True) |
761 | -# self.ClearButton.setEnabled(True) |
762 | -# |
763 | -# def onSaveButtonPressed(self): |
764 | -# if self.editAll: |
765 | -# self.VerseListView.clear() |
766 | -# for row in unicode(self.VerseTextEdit.toPlainText()).split(u'\n---\n'): |
767 | -# self.VerseListView.addItem(row) |
768 | -# else: |
769 | -# self.VerseListView.currentItem().setText( |
770 | -# self.VerseTextEdit.toPlainText()) |
771 | -# #number of lines has change |
772 | -# if len(self.beforeText.split(u'\n')) != \ |
773 | -# len(self.VerseTextEdit.toPlainText().split(u'\n')): |
774 | -# tempList = {} |
775 | -# for row in range(0, self.VerseListView.count()): |
776 | -# tempList[row] = self.VerseListView.item(row).text() |
777 | -# self.VerseListView.clear() |
778 | -# for row in range (0, len(tempList)): |
779 | -# self.VerseListView.addItem(tempList[row]) |
780 | -# self.VerseListView.repaint() |
781 | -# self.AddButton.setEnabled(True) |
782 | -# self.SaveButton.setEnabled(False) |
783 | -# self.EditButton.setEnabled(False) |
784 | -# self.EditAllButton.setEnabled(True) |
785 | -# self.VerseTextEdit.clear() |
786 | -# |
787 | -# def onDeleteButtonPressed(self): |
788 | -# self.VerseListView.takeItem(self.VerseListView.currentRow()) |
789 | -# self.EditButton.setEnabled(False) |
790 | -# self.EditAllButton.setEnabled(True) |
791 | -# |
792 | -# def _validate(self): |
793 | -# if len(self.TitleEdit.displayText()) == 0: |
794 | -# self.TitleEdit.setFocus() |
795 | -# return False, translate( |
796 | -# u'customEditDialog', u'You need to enter a title \n') |
797 | -# # must have 1 slide |
798 | -# if self.VerseListView.count() == 0: |
799 | -# self.VerseTextEdit.setFocus() |
800 | -# return False, translate( |
801 | -# u'customEditDialog', u'You need to enter a slide \n') |
802 | -# return True, u'' |
803 | + self.firstService = \ |
804 | + int(self.parent.config.get_config(u'first service', QtCore.Qt.Checked)) |
805 | + self.secondService = \ |
806 | + int(self.parent.config.get_config(u'second service', QtCore.Qt.Checked)) |
807 | + self.resetWindow() |
808 | + |
809 | + def changeFirstService(self, value): |
810 | + self.firstService = value |
811 | + self.parent.config.set_config(u'first service', value) |
812 | + self.resetWindow() |
813 | + |
814 | + def changeSecondService(self, value): |
815 | + self.secondService = value |
816 | + self.parent.config.set_config(u'second service', value) |
817 | + self.resetWindow() |
818 | + |
819 | + def changeThirdService(self, value): |
820 | + pass |
821 | + |
822 | + def defineOutputLocation(self): |
823 | + pass |
824 | + |
825 | + def resetWindow(self): |
826 | + if self.firstService == QtCore.Qt.Unchecked: |
827 | + self.FirstFromTimeEdit.setEnabled(False) |
828 | + self.FirstToTimeEdit.setEnabled(False) |
829 | + else: |
830 | + self.FirstFromTimeEdit.setEnabled(True) |
831 | + self.FirstToTimeEdit.setEnabled(True) |
832 | + if self.secondService == QtCore.Qt.Unchecked: |
833 | + self.SecondFromTimeEdit.setEnabled(False) |
834 | + self.SecondToTimeEdit.setEnabled(False) |
835 | + else: |
836 | + self.SecondFromTimeEdit.setEnabled(True) |
837 | + self.SecondToTimeEdit.setEnabled(True) |
838 | |
839 | === modified file 'resources/forms/auditdeletedialog.ui' |
840 | --- resources/forms/auditdeletedialog.ui 2009-09-25 20:12:35 +0000 |
841 | +++ resources/forms/auditdeletedialog.ui 2009-10-11 19:40:23 +0000 |
842 | @@ -7,7 +7,7 @@ |
843 | <x>0</x> |
844 | <y>0</y> |
845 | <width>291</width> |
846 | - <height>202</height> |
847 | + <height>243</height> |
848 | </rect> |
849 | </property> |
850 | <property name="windowTitle"> |
851 | @@ -36,15 +36,21 @@ |
852 | </property> |
853 | </widget> |
854 | </item> |
855 | - <item> |
856 | - <widget class="QDialogButtonBox" name="buttonBox"> |
857 | - <property name="standardButtons"> |
858 | - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
859 | - </property> |
860 | - </widget> |
861 | - </item> |
862 | </layout> |
863 | </widget> |
864 | + <widget class="QDialogButtonBox" name="buttonBox"> |
865 | + <property name="geometry"> |
866 | + <rect> |
867 | + <x>30</x> |
868 | + <y>210</y> |
869 | + <width>245</width> |
870 | + <height>25</height> |
871 | + </rect> |
872 | + </property> |
873 | + <property name="standardButtons"> |
874 | + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
875 | + </property> |
876 | + </widget> |
877 | </widget> |
878 | <resources/> |
879 | <connections> |
880 | |
881 | === modified file 'resources/forms/auditdetaildialog.ui' |
882 | --- resources/forms/auditdetaildialog.ui 2009-09-26 06:46:26 +0000 |
883 | +++ resources/forms/auditdetaildialog.ui 2009-10-11 19:40:23 +0000 |
884 | @@ -108,7 +108,7 @@ |
885 | <item> |
886 | <widget class="QGroupBox" name="DateRangeGroupBox"> |
887 | <property name="title"> |
888 | - <string>Date Range</string> |
889 | + <string>Select Date Range</string> |
890 | </property> |
891 | <layout class="QVBoxLayout" name="verticalLayout_2"> |
892 | <item> |
893 | @@ -148,7 +148,7 @@ |
894 | <item> |
895 | <widget class="QGroupBox" name="TimePeriodGroupBox"> |
896 | <property name="title"> |
897 | - <string>Time Periods</string> |
898 | + <string>Select Time Periods</string> |
899 | </property> |
900 | <layout class="QVBoxLayout" name="verticalLayout"> |
901 | <item> |
902 | @@ -336,8 +336,76 @@ |
903 | </hint> |
904 | </hints> |
905 | </connection> |
906 | + <connection> |
907 | + <sender>FirstCheckBox</sender> |
908 | + <signal>stateChanged(int)</signal> |
909 | + <receiver>AuditDetailDialog</receiver> |
910 | + <slot>changeFirstService(int)</slot> |
911 | + <hints> |
912 | + <hint type="sourcelabel"> |
913 | + <x>26</x> |
914 | + <y>285</y> |
915 | + </hint> |
916 | + <hint type="destinationlabel"> |
917 | + <x>136</x> |
918 | + <y>483</y> |
919 | + </hint> |
920 | + </hints> |
921 | + </connection> |
922 | + <connection> |
923 | + <sender>SecondCheckBox</sender> |
924 | + <signal>stateChanged(int)</signal> |
925 | + <receiver>AuditDetailDialog</receiver> |
926 | + <slot>changeSecondService(int)</slot> |
927 | + <hints> |
928 | + <hint type="sourcelabel"> |
929 | + <x>41</x> |
930 | + <y>323</y> |
931 | + </hint> |
932 | + <hint type="destinationlabel"> |
933 | + <x>103</x> |
934 | + <y>494</y> |
935 | + </hint> |
936 | + </hints> |
937 | + </connection> |
938 | + <connection> |
939 | + <sender>ThirdCheckBox</sender> |
940 | + <signal>stateChanged(int)</signal> |
941 | + <receiver>AuditDetailDialog</receiver> |
942 | + <slot>changeThirdService(int)</slot> |
943 | + <hints> |
944 | + <hint type="sourcelabel"> |
945 | + <x>38</x> |
946 | + <y>351</y> |
947 | + </hint> |
948 | + <hint type="destinationlabel"> |
949 | + <x>155</x> |
950 | + <y>463</y> |
951 | + </hint> |
952 | + </hints> |
953 | + </connection> |
954 | + <connection> |
955 | + <sender>SaveFilePushButton</sender> |
956 | + <signal>pressed()</signal> |
957 | + <receiver>AuditDetailDialog</receiver> |
958 | + <slot>defineOutputLocation()</slot> |
959 | + <hints> |
960 | + <hint type="sourcelabel"> |
961 | + <x>538</x> |
962 | + <y>419</y> |
963 | + </hint> |
964 | + <hint type="destinationlabel"> |
965 | + <x>385</x> |
966 | + <y>480</y> |
967 | + </hint> |
968 | + </hints> |
969 | + </connection> |
970 | </connections> |
971 | <slots> |
972 | <slot>accept()</slot> |
973 | + <slot>changeFirstService(int)</slot> |
974 | + <slot>changeSecondService(int)</slot> |
975 | + <slot>changeThirdService(int)</slot> |
976 | + <slot>defineOutputLocation()</slot> |
977 | </slots> |
978 | </ui> |
New toys:
Fixed Themes so default can be exported
Fixed Plugin list so can_be_disabled works
Fixed up drap and drop in service manager. New items and moving items around
Added version checking at start up once per day only.
Started to clean up Audit a bit.