Merge lp:~trb143/openlp/bugfixes into lp:openlp

Proposed by Tim Bentley
Status: Merged
Merged at revision: not available
Proposed branch: lp:~trb143/openlp/bugfixes
Merge into: lp:openlp
Diff against target: None lines
To merge this branch: bzr merge lp:~trb143/openlp/bugfixes
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Review via email: mp+10184@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote :

Plugin List screen
Start Presentation dialog - Settings work.
Remotes plugin now can set it's own port if wanted

Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve
lp:~trb143/openlp/bugfixes updated
509. By Tim Bentley

Plugin Screen added
Presentation Plugin started
Remotes now configurable

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/lib/pluginmanager.py'
2--- openlp/core/lib/pluginmanager.py 2009-08-10 20:10:20 +0000
3+++ openlp/core/lib/pluginmanager.py 2009-08-13 20:02:38 +0000
4@@ -86,18 +86,22 @@
5 __import__(modulename, globals(), locals(), [])
6 except ImportError, e:
7 log.error(u'Failed to import module %s on path %s for reason %s', modulename, path, e.args[0])
8- self.plugin_classes = Plugin.__subclasses__()
9+ plugin_classes = Plugin.__subclasses__()
10 self.plugins = []
11+ self.plugin_list=[]
12 plugin_objects = []
13- for p in self.plugin_classes:
14+ for p in plugin_classes:
15 try:
16 plugin = p(self.plugin_helpers)
17 log.debug(u'loaded plugin %s with helpers', unicode(p))
18 log.debug(u'Plugin: %s', unicode(p))
19+ pList = {u'name': plugin.name, u'version':plugin.version, u'status': u'Inactive'}
20 if plugin.check_pre_conditions():
21 log.debug(u'Appending %s ', unicode(p))
22 plugin_objects.append(plugin)
23 eventmanager.register(plugin)
24+ pList[u'status'] = u'Active'
25+ self.plugin_list.append(pList)
26 except TypeError:
27 log.error(u'loaded plugin %s has no helpers', unicode(p))
28 self.plugins = sorted(plugin_objects, self.order_by_weight)
29
30=== modified file 'openlp/core/ui/__init__.py'
31--- openlp/core/ui/__init__.py 2009-07-06 16:34:13 +0000
32+++ openlp/core/ui/__init__.py 2009-08-13 20:02:38 +0000
33@@ -27,6 +27,7 @@
34 from themestab import ThemesTab
35 from about import AboutForm
36 from alertform import AlertForm
37+from plugindialoglistform import PluginForm
38 from settingsform import SettingsForm
39 from servicemanager import ServiceManager
40 from thememanager import ThemeManager
41
42=== modified file 'openlp/core/ui/mainwindow.py'
43--- openlp/core/ui/mainwindow.py 2009-08-10 20:10:20 +0000
44+++ openlp/core/ui/mainwindow.py 2009-08-14 19:12:14 +0000
45@@ -23,7 +23,8 @@
46 from PyQt4 import QtCore, QtGui
47
48 from openlp.core.ui import AboutForm, SettingsForm, AlertForm, \
49- ServiceManager, ThemeManager, MainDisplay, SlideController
50+ ServiceManager, ThemeManager, MainDisplay, SlideController, \
51+ PluginForm
52 from openlp.core.lib import translate, Plugin, MediaManagerItem, \
53 SettingsTab, EventManager, RenderManager, PluginConfig, \
54 SettingsManager, PluginManager, EventType
55@@ -203,6 +204,12 @@
56 QtGui.QIcon.Normal, QtGui.QIcon.Off)
57 self.ToolsAlertItem.setIcon(AlertIcon)
58 self.ToolsAlertItem.setObjectName(u'ToolsAlertItem')
59+ self.PluginItem = QtGui.QAction(MainWindow)
60+ PluginIcon = QtGui.QIcon()
61+ PluginIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_alert.png'),
62+ QtGui.QIcon.Normal, QtGui.QIcon.Off)
63+ self.PluginItem.setIcon(AlertIcon)
64+ self.PluginItem.setObjectName(u'PluginItem')
65 self.HelpDocumentationItem = QtGui.QAction(MainWindow)
66 ContentsIcon = QtGui.QIcon()
67 ContentsIcon.addPixmap(QtGui.QPixmap(u':/system/system_help_contents.png'),
68@@ -264,6 +271,7 @@
69 self.OptionsMenu.addSeparator()
70 self.OptionsMenu.addAction(self.OptionsSettingsItem)
71 self.ToolsMenu.addAction(self.ToolsAlertItem)
72+ self.ToolsMenu.addAction(self.PluginItem)
73 self.ToolsMenu.addSeparator()
74 self.ToolsMenu.addAction(self.ToolsAddToolItem)
75 self.HelpMenu.addAction(self.HelpDocumentationItem)
76@@ -362,6 +370,10 @@
77 self.ToolsAlertItem.setStatusTip(
78 translate(u'mainWindow', u'Show an alert message'))
79 self.ToolsAlertItem.setShortcut(translate(u'mainWindow', u'F7'))
80+ self.PluginItem.setText(translate(u'mainWindow', u'&Plugin'))
81+ self.PluginItem.setStatusTip(
82+ translate(u'mainWindow', u'List the Plugins'))
83+ self.PluginItem.setShortcut(translate(u'mainWindow', u'Alt+F7'))
84 self.HelpDocumentationItem.setText(
85 translate(u'mainWindow', u'&User Guide'))
86 self.HelpAboutItem.setText(translate(u'mainWindow', u'&About'))
87@@ -408,6 +420,7 @@
88 self.mainDisplay = MainDisplay(self, screens)
89 self.generalConfig = PluginConfig(u'General')
90 self.alertForm = AlertForm(self)
91+ self.pluginForm = PluginForm(self)
92 self.aboutForm = AboutForm()
93 self.settingsForm = SettingsForm(self.screenList, self)
94 # Set up the path with plugins
95@@ -441,6 +454,8 @@
96 QtCore.SIGNAL(u'triggered()'), self.onHelpAboutItemClicked)
97 QtCore.QObject.connect(self.ToolsAlertItem,
98 QtCore.SIGNAL(u'triggered()'), self.onToolsAlertItemClicked)
99+ QtCore.QObject.connect(self.PluginItem,
100+ QtCore.SIGNAL(u'triggered()'), self.onPluginItemClicked)
101 QtCore.QObject.connect(self.OptionsSettingsItem,
102 QtCore.SIGNAL(u'triggered()'), self.onOptionsSettingsItemClicked)
103 #warning cyclic dependency
104@@ -514,6 +529,13 @@
105 """
106 self.alertForm.exec_()
107
108+ def onPluginItemClicked(self):
109+ """
110+ Show the Plugin form
111+ """
112+ self.pluginForm.load()
113+ self.pluginForm.exec_()
114+
115 def onOptionsSettingsItemClicked(self):
116 """
117 Show the Settings dialog
118
119=== added file 'openlp/core/ui/plugindialoglistform.py'
120--- openlp/core/ui/plugindialoglistform.py 1970-01-01 00:00:00 +0000
121+++ openlp/core/ui/plugindialoglistform.py 2009-08-14 16:26:22 +0000
122@@ -0,0 +1,76 @@
123+# -*- coding: utf-8 -*-
124+
125+# Form implementation generated from reading ui file 'plugindialoglistform.ui'
126+#
127+# Created: Thu Aug 13 05:52:06 2009
128+# by: PyQt4 UI code generator 4.5.4
129+#
130+# WARNING! All changes made in this file will be lost!
131+
132+import logging
133+from PyQt4 import QtCore, QtGui
134+from openlp.core.lib import translate
135+
136+class PluginForm(QtGui.QDialog):
137+ global log
138+ log = logging.getLogger(u'PluginForm')
139+
140+ def __init__(self, parent=None):
141+ QtGui.QDialog.__init__(self, None)
142+ self.parent = parent
143+ self.setupUi(self)
144+ log.debug(u'Defined')
145+
146+ def setupUi(self, PluginForm):
147+ PluginForm.setObjectName(u'PluginForm')
148+ PluginForm.resize(400, 393)
149+ self.PluginViewList = QtGui.QTableWidget(PluginForm)
150+ self.PluginViewList.setGeometry(QtCore.QRect(20, 10, 371, 331))
151+ self.PluginViewList.setObjectName(u'PluginViewList')
152+ self.PluginViewList.setShowGrid(False)
153+ self.PluginViewList.setGridStyle(QtCore.Qt.SolidLine)
154+ self.PluginViewList.setSortingEnabled(False)
155+ self.PluginViewList.setColumnCount(3)
156+ item = QtGui.QTableWidgetItem()
157+ self.PluginViewList.setHorizontalHeaderItem(0, item)
158+ item = QtGui.QTableWidgetItem()
159+ self.PluginViewList.setHorizontalHeaderItem(1, item)
160+ item = QtGui.QTableWidgetItem()
161+ self.PluginViewList.setHorizontalHeaderItem(2, item)
162+ self.PluginViewList.horizontalHeader().setVisible(True)
163+ self.PluginViewList.verticalHeader().setVisible(False)
164+ self.ButtonBox = QtGui.QDialogButtonBox(PluginForm)
165+ self.ButtonBox.setGeometry(QtCore.QRect(220, 350, 170, 25))
166+ self.ButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
167+ self.ButtonBox.setObjectName(u'ButtonBox')
168+
169+ self.retranslateUi(PluginForm)
170+ QtCore.QObject.connect(self.ButtonBox, QtCore.SIGNAL(u'accepted()'), PluginForm.close)
171+ QtCore.QMetaObject.connectSlotsByName(PluginForm)
172+
173+ def retranslateUi(self, PluginForm):
174+ PluginForm.setWindowTitle(translate(u'PluginForm', u'Plugin list'))
175+ self.PluginViewList.horizontalHeaderItem(0).setText(translate(u'PluginForm', u'Name'))
176+ self.PluginViewList.horizontalHeaderItem(1).setText(translate(u'PluginForm', u'Version'))
177+ self.PluginViewList.horizontalHeaderItem(2).setText(translate(u'PluginForm', u'Status'))
178+
179+ def load(self):
180+ """
181+ Load the plugin details into the screen
182+ """
183+ for plugin in self.parent.plugin_manager.plugin_list:
184+ row = self.PluginViewList.rowCount()
185+ self.PluginViewList.setRowCount(row + 1)
186+ item1 = QtGui.QTableWidgetItem(plugin[u'name'])
187+ item1.setTextAlignment(QtCore.Qt.AlignVCenter)
188+ item2 = QtGui.QTableWidgetItem(plugin[u'version'])
189+ item2.setTextAlignment(QtCore.Qt.AlignVCenter)
190+ item3 = QtGui.QTableWidgetItem(translate(u'PluginForm', plugin[u'status']))
191+ item3.setTextAlignment(QtCore.Qt.AlignVCenter)
192+ self.PluginViewList.setItem(row, 0, item1)
193+ self.PluginViewList.setItem(row, 1, item2)
194+ self.PluginViewList.setItem(row, 2, item3)
195+ self.PluginViewList.setRowHeight(row, 15)
196+
197+
198+
199
200=== modified file 'openlp/plugins/presentations/lib/__init__.py'
201--- openlp/plugins/presentations/lib/__init__.py 2009-08-11 19:21:52 +0000
202+++ openlp/plugins/presentations/lib/__init__.py 2009-08-14 17:41:29 +0000
203@@ -19,6 +19,6 @@
204 """
205 from mediaitem import PresentationMediaItem
206 from presentationtab import PresentationTab
207-from impressslidecontroller import impressToolbar
208+from impresscontroller import impressController
209
210-__all__ = ['PresentationMediaItem', 'PresentationTab', 'impressToolbar']
211+__all__ = ['PresentationMediaItem', 'PresentationTab', 'impressController']
212
213=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
214--- openlp/plugins/presentations/lib/presentationtab.py 2009-06-16 18:21:24 +0000
215+++ openlp/plugins/presentations/lib/presentationtab.py 2009-08-14 19:12:14 +0000
216@@ -20,14 +20,14 @@
217
218 from PyQt4 import Qt, QtCore, QtGui
219
220-from openlp.core.lib import SettingsTab, translate
221+from openlp.core.lib import SettingsTab, translate, str_to_bool
222
223 class PresentationTab(SettingsTab):
224 """
225 PresentationsTab is the Presentations settings tab in the settings dialog.
226 """
227 def __init__(self):
228- SettingsTab.__init__(self, translate(u'PresentationTab', u'Presentation'), u'Presentation')
229+ SettingsTab.__init__(self, translate(u'PresentationTab', u'Presentation'), u'Presentations')
230
231 def setupUi(self):
232 self.setObjectName(u'PresentationTab')
233@@ -41,7 +41,6 @@
234 self.PresentationLeftLayout.setObjectName(u'PresentationLeftLayout')
235 self.PresentationLeftLayout.setSpacing(8)
236 self.PresentationLeftLayout.setMargin(0)
237-
238 self.VerseDisplayGroupBox = QtGui.QGroupBox(self)
239 self.VerseDisplayGroupBox.setObjectName(u'VerseDisplayGroupBox')
240 self.VerseDisplayLayout = QtGui.QGridLayout(self.VerseDisplayGroupBox)
241@@ -53,36 +52,25 @@
242 self.VerseTypeLayout.setSpacing(8)
243 self.VerseTypeLayout.setMargin(0)
244 self.VerseTypeLayout.setObjectName(u'VerseTypeLayout')
245-
246 self.PowerpointCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
247+ self.PowerpointCheckBox.setTristate(False)
248 self.PowerpointCheckBox.setObjectName(u'PowerpointCheckBox')
249 self.VerseDisplayLayout.addWidget(self.PowerpointCheckBox, 0, 0, 1, 1)
250-
251- self.PowerpointPath = QtGui.QLineEdit(self.VerseDisplayGroupBox)
252- self.PowerpointPath.setObjectName(u'PowerpointPath')
253- self.VerseDisplayLayout.addWidget(self.PowerpointPath, 1, 0, 1, 1)
254-
255 self.ImpressCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
256+ self.ImpressCheckBox.setTristate(False)
257 self.ImpressCheckBox.setObjectName(u'ImpressCheckBox')
258 self.VerseDisplayLayout.addWidget(self.ImpressCheckBox, 2, 0, 1, 1)
259-
260- self.ImpressPath = QtGui.QLineEdit(self.VerseDisplayGroupBox)
261- self.ImpressPath.setObjectName(u'ImpressPath')
262- self.VerseDisplayLayout.addWidget(self.ImpressPath, 3, 0, 1, 1)
263-
264 self.PresentationThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
265 self.PresentationThemeWidget.setObjectName(u'PresentationThemeWidget')
266 self.PresentationThemeLayout = QtGui.QHBoxLayout(self.PresentationThemeWidget)
267 self.PresentationThemeLayout.setSpacing(8)
268 self.PresentationThemeLayout.setMargin(0)
269 self.PresentationThemeLayout.setObjectName(u'PresentationThemeLayout')
270-
271 self.PresentationLeftLayout.addWidget(self.VerseDisplayGroupBox)
272 self.PresentationLeftSpacer = QtGui.QSpacerItem(40, 20,
273 QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
274 self.PresentationLeftLayout.addItem(self.PresentationLeftSpacer)
275 self.PresentationLayout.addWidget(self.PresentationLeftWidget)
276-
277 self.PresentationRightWidget = QtGui.QWidget(self)
278 self.PresentationRightWidget.setObjectName(u'PresentationRightWidget')
279 self.PresentationRightLayout = QtGui.QVBoxLayout(self.PresentationRightWidget)
280@@ -94,42 +82,15 @@
281 self.PresentationRightLayout.addItem(self.PresentationRightSpacer)
282 self.PresentationLayout.addWidget(self.PresentationRightWidget)
283
284- # Signals and slots
285- #QtCore.QObject.connect(self.NewChaptersCheckBox,
286- # QtCore.SIGNAL(u'stateChanged(int)'), self.onNewChaptersCheckBoxChanged)
287-
288 def retranslateUi(self):
289 self.PowerpointCheckBox.setText(translate(u'PresentationTab', 'Powerpoint available:'))
290 self.ImpressCheckBox.setText(translate(u'PresentationTab', 'Impress available:'))
291- self.PowerpointPath.setText(u'powerpoint.exe ')
292- self.ImpressPath.setText(u'openoffice.org -nologo -show ')
293-
294- def onNewChaptersCheckBoxChanged(self):
295- check_state = self.NewChaptersCheckBox.checkState()
296- self.show_new_chapters = False
297- if check_state == 2: # we have a set value convert to True/False
298- self.show_new_chapters = True
299-
300
301 def load(self):
302- pass
303-# self.paragraph_style = (self.config.get_config(u'paragraph style', u'True'))
304-# self.show_new_chapters = (self.config.get_config(u'display new chapter', u"False'))
305-# self.display_style = int(self.config.get_config(u'display brackets', u'0'))
306-# self.Presentation_theme = int(self.config.get_config(u'Presentation theme', u'0'))
307-# self.Presentation_search = (self.config.get_config(u'search as type', u'True'))
308-# if self.paragraph_style:
309-# self.ParagraphRadioButton.setChecked(True)
310-# else:
311-# self.VerseRadioButton.setChecked(True)
312-# self.NewChaptersCheckBox.setChecked(self.show_new_chapters)
313-# self.DisplayStyleComboBox.setCurrentIndex(self.display_style)
314-# self.PresentationSearchCheckBox.setChecked(self.Presentation_search)
315+ self.PowerpointCheckBox.setChecked(int(self.config.get_config(u'Powerpoint', 0)))
316+ self.ImpressCheckBox.setChecked(int(self.config.get_config(u'Impress', 0)))
317
318 def save(self):
319- pass
320-# self.config.set_config(u'paragraph style', unicode(self.paragraph_style))
321-# self.config.set_config(u'display new chapter', unicode(self.show_new_chapters))
322-# self.config.set_config(u'display brackets', unicode(self.display_style))
323-# self.config.set_config(u'search as type', unicode(self.Presentation_search))
324-# self.config.set_config(u'Presentation theme', unicode(self.Presentation_theme))
325\ No newline at end of file
326+ self.config.set_config(u'Powerpoint', unicode(self.PowerpointCheckBox.checkState()))
327+ self.config.set_config(u'Impress', unicode(self.ImpressCheckBox.checkState()))
328+ print self.PowerpointCheckBox.checkState(), unicode(self.PowerpointCheckBox.checkState())
329
330=== modified file 'openlp/plugins/presentations/presentationplugin.py'
331--- openlp/plugins/presentations/presentationplugin.py 2009-08-11 19:21:52 +0000
332+++ openlp/plugins/presentations/presentationplugin.py 2009-08-14 19:12:14 +0000
333@@ -24,7 +24,7 @@
334 from PyQt4 import QtCore, QtGui
335
336 from openlp.core.lib import Plugin, MediaManagerItem
337-from openlp.plugins.presentations.lib import PresentationMediaItem, PresentationTab, impressToolbar
338+from openlp.plugins.presentations.lib import PresentationMediaItem, PresentationTab, impressController
339
340 class PresentationPlugin(Plugin):
341
342@@ -66,17 +66,17 @@
343 If Not do not install the plugin.
344 """
345 log.debug('check_pre_conditions')
346- impress = True
347- try:
348- #Check to see if we have uno installed
349- import uno
350- #openoffice = impressToolbar()
351- self.registerControllers(u'Impress', None)
352- except:
353- pass
354+
355+ if int(self.config.get_config(u'Powerpoint', 0)) == 2:
356+ try:
357+ #Check to see if we have uno installed
358+ import uno
359+ #openoffice = impressController()
360+ self.registerControllers(u'Impress', None)
361+ except:
362+ pass
363 #If we have no controllers disable plugin
364 if len(self.controllers) > 0:
365 return True
366 else:
367 return False
368-# return self.openoffice.checkOoPid()
369
370=== modified file 'openlp/plugins/remotes/lib/__init__.py'
371--- openlp/plugins/remotes/lib/__init__.py 2009-08-10 18:20:46 +0000
372+++ openlp/plugins/remotes/lib/__init__.py 2009-08-14 17:41:29 +0000
373@@ -18,4 +18,4 @@
374 Place, Suite 330, Boston, MA 02111-1307 USA
375 """
376
377-from mediaitem import RemoteMediaItem
378+from remotetab import RemoteTab
379
380=== removed file 'openlp/plugins/remotes/lib/mediaitem.py'
381--- openlp/plugins/remotes/lib/mediaitem.py 2009-08-10 18:20:46 +0000
382+++ openlp/plugins/remotes/lib/mediaitem.py 1970-01-01 00:00:00 +0000
383@@ -1,215 +0,0 @@
384-# -*- coding: utf-8 -*-
385-# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
386-"""
387-OpenLP - Open Source Lyrics Projection
388-Copyright (c) 2008 Raoul Snyman
389-Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley
390-
391-This program is free software; you can redistribute it and/or modify it under
392-the terms of the GNU General Public License as published by the Free Software
393-Foundation; version 2 of the License.
394-
395-This program is distributed in the hope that it will be useful, but WITHOUT ANY
396-WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
397-PARTICULAR PURPOSE. See the GNU General Public License for more details.
398-
399-You should have received a copy of the GNU General Public License along with
400-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
401-Place, Suite 330, Boston, MA 02111-1307 USA
402-"""
403-import logging
404-
405-from PyQt4 import QtCore, QtGui
406-
407-from openlp.core.lib import MediaManagerItem, SongXMLParser, ServiceItem, translate, BaseListWithDnD
408-
409-class RemoteListView(BaseListWithDnD):
410- def __init__(self, parent=None):
411- self.PluginName = u'Remote'
412- BaseListWithDnD.__init__(self, parent)
413-
414-class RemoteMediaItem(MediaManagerItem):
415- """
416- This is the custom media manager item for Custom Slides.
417- """
418- global log
419- log=logging.getLogger(u'RemoteMediaItem')
420- log.info(u'Remote Media Item loaded')
421-
422- def __init__(self, parent, icon, title):
423- MediaManagerItem.__init__(self, parent, icon, title)
424- self.parent = parent
425- self.TranslationContext = u'RemotesPlugin'
426- self.PluginTextShort = u'Remotes'
427- self.ConfigSection = u'Remotes'
428- self.ListViewWithDnD_class = RemoteListView
429- MediaManagerItem.__init__(self, parent, icon, title)
430-
431- def initialise(self):
432- pass
433-
434- def setupUi(self):
435- # Add a toolbar
436- self.addToolbar()
437-# # Create buttons for the toolbar
438-# ## New Custom Button ##
439-# self.addToolbarButton(
440-# translate(u'CustomMediaItem',u'New Custom Item'),
441-# translate(u'CustomMediaItem',u'Add a new Custom Item'),
442-# u':/custom/custom_new.png', self.onCustomNewClick, u'CustomNewItem')
443-# ## Edit Custom Button ##
444-# self.addToolbarButton(
445-# translate(u'CustomMediaItem',u'Edit Custom Item'),
446-# translate(u'CustomMediaItem',u'Edit the selected Custom Item'),
447-# u':/custom/custom_edit.png', self.onCustomEditClick, u'CustomEditItem')
448-# ## Delete Custom Button ##
449-# self.addToolbarButton(
450-# translate(u'CustomMediaItem',u'Delete Custom Item'),
451-# translate(u'CustomMediaItem',u'Delete the selected Custom Item'),
452-# u':/custom/custom_delete.png', self.onCustomDeleteClick, u'CustomDeleteItem')
453-# ## Separator Line ##
454-# self.addToolbarSeparator()
455-# ## Preview Custom Button ##
456-# self.addToolbarButton(
457-# translate(u'CustomMediaItem',u'Preview Custom Item'),
458-# translate(u'CustomMediaItem',u'Preview the selected Custom Item'),
459-# u':/system/system_preview.png', self.onCustomPreviewClick, u'CustomPreviewItem')
460-# ## Live Custom Button ##
461-# self.addToolbarButton(
462-# translate(u'CustomMediaItem',u'Go Live'),
463-# translate(u'CustomMediaItem', u'Send the selected Custom live'),
464-# u':/system/system_live.png', self.onCustomLiveClick, u'CustomLiveItem')
465-# ## Add Custom Button ##
466-# self.addToolbarButton(
467-# translate(u'CustomMediaItem',u'Add Custom To Service'),
468-# translate(u'CustomMediaItem',u'Add the selected Custom(s) to the service'),
469-# u':/system/system_add.png', self.onCustomAddClick, u'CustomAddItem')
470-# # Add the Customlist widget
471-# self.CustomWidget = QtGui.QWidget(self)
472-# sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
473-# sizePolicy.setHorizontalStretch(0)
474-# sizePolicy.setVerticalStretch(0)
475-# sizePolicy.setHeightForWidth(self.CustomWidget.sizePolicy().hasHeightForWidth())
476-# self.CustomWidget.setSizePolicy(sizePolicy)
477-# self.CustomWidget.setObjectName(u'CustomWidget')
478-# # Add the Custom widget to the page layout
479-# self.PageLayout.addWidget(self.CustomWidget)
480-# self.CustomListView = CustomList()
481-# self.CustomListView.setAlternatingRowColors(True)
482-# self.CustomListData = TextListData()
483-# self.CustomListView.setModel(self.CustomListData)
484-# self.CustomListView.setDragEnabled(True)
485-# self.PageLayout.addWidget(self.CustomListView)
486-# # Signals
487-# QtCore.QObject.connect(self.CustomListView,
488-# QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onCustomPreviewClick)
489-# #define and add the context menu
490-# self.CustomListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
491-# self.CustomListView.addAction(self.contextMenuAction(self.CustomListView,
492-# ':/custom/custom_edit.png', translate(u'CustomMediaItem', u'&Edit Custom'),
493-# self.onCustomEditClick))
494-# self.CustomListView.addAction(self.contextMenuSeparator(self.CustomListView))
495-# self.CustomListView.addAction(self.contextMenuAction(
496-# self.CustomListView, ':/system/system_preview.png',
497-# translate(u'CustomMediaItem',u'&Preview Custom'), self.onCustomPreviewClick))
498-# self.CustomListView.addAction(self.contextMenuAction(
499-# self.CustomListView, ':/system/system_live.png',
500-# translate(u'CustomMediaItem',u'&Show Live'), self.onCustomLiveClick))
501-# self.CustomListView.addAction(self.contextMenuAction(
502-# self.CustomListView, ':/system/system_add.png',
503-# translate(u'CustomMediaItem',u'&Add to Service'), self.onCustomAddClick))
504-
505-# def retranslateUi(self):
506-# self.ClearTextButton.setText(translate(u'CustomMediaItem', u'Clear'))
507-# self.SearchTextButton.setText(translate(u'CustomMediaItem', u'Search'))
508-
509-# def initialise(self):
510-# self.loadCustomList(self.parent.custommanager.get_all_slides())
511-#
512-# def loadCustomList(self, list):
513-# self.CustomListData.resetStore()
514-# for CustomSlide in list:
515-# self.CustomListData.addRow(CustomSlide.id,CustomSlide.title)
516-#
517-# def onClearTextButtonClick(self):
518-# """
519-# Clear the search text.
520-# """
521-# self.SearchTextEdit.clear()
522-#
523-# def onSearchTextEditChanged(self, text):
524-# # only search if > 3 characters
525-# if len(text) > 3:
526-# self.onSearchTextButtonClick()
527-#
528-# def onSearchTextButtonClick(self):
529-# search_keywords = str(self.SearchTextEdit.displayText())
530-# search_results = []
531-# search_type = self.SearchTypeComboBox.currentText()
532-# search_results = self.Custommanager.search_Custom_lyrics(search_keywords)
533-# self._display_results(search_results)
534-#
535-# def onCustomNewClick(self):
536-# self.parent.edit_custom_form.loadCustom(0)
537-# self.parent.edit_custom_form.exec_()
538-# self.initialise()
539-#
540-# def onCustomEditClick(self):
541-# indexes = self.CustomListView.selectedIndexes()
542-# for index in indexes:
543-# self.parent.edit_custom_form.loadCustom(self.CustomListData.getId(index))
544-# self.parent.edit_custom_form.exec_()
545-# self.initialise()
546-#
547-# def onCustomDeleteClick(self):
548-# indexes = self.CustomListView.selectedIndexes()
549-# for index in indexes:
550-# id = self.CustomListData.getId(index)
551-# self.parent.custommanager.delete_custom(id)
552-# self.CustomListData.deleteRow(index)
553-#
554-# def onCustomPreviewClick(self):
555-# log.debug(u'Custom Preview Requested')
556-# service_item = ServiceItem(self.parent)
557-# service_item.addIcon(u':/media/media_song.png')
558-# self.generateSlideData(service_item)
559-# self.parent.preview_controller.addServiceItem(service_item)
560-#
561-# def onCustomLiveClick(self):
562-# log.debug(u'Custom Live Requested')
563-# service_item = ServiceItem(self.parent)
564-# service_item.addIcon(u':/media/media_song.png')
565-# self.generateSlideData(service_item)
566-# self.parent.live_controller.addServiceItem(service_item)
567-#
568-# def onCustomAddClick(self):
569-# log.debug(u'Custom Add Requested')
570-# service_item = ServiceItem(self.parent)
571-# service_item.addIcon(u':/media/media_song.png')
572-# self.generateSlideData(service_item)
573-# self.parent.service_manager.addServiceItem(service_item)
574-#
575-# def generateSlideData(self, service_item):
576-# raw_slides =[]
577-# raw_footer = []
578-# slide = None
579-# theme = None
580-# indexes = self.CustomListView.selectedIndexes()
581-# for index in indexes:
582-# id = self.CustomListData.getId(index)
583-# customSlide = self.parent.custommanager.get_custom(id)
584-# title = customSlide.title
585-# credit = customSlide.credits
586-# theme = customSlide.theme_name
587-# if len(theme) is not 0 :
588-# service_item.theme = theme
589-# songXML=SongXMLParser(customSlide.text)
590-# verseList = songXML.get_verses()
591-# for verse in verseList:
592-# raw_slides.append(verse[1])
593-# raw_footer.append(title + u' '+ credit)
594-# if theme is not None:
595-# service_item.title = title
596-# for slide in raw_slides:
597-# service_item.add_from_text(slide[:30], slide)
598-# service_item.raw_footer = raw_footer
599
600=== modified file 'openlp/plugins/remotes/remoteplugin.py'
601--- openlp/plugins/remotes/remoteplugin.py 2009-08-12 16:29:00 +0000
602+++ openlp/plugins/remotes/remoteplugin.py 2009-08-14 17:41:29 +0000
603@@ -23,6 +23,7 @@
604 from PyQt4 import QtNetwork, QtGui, QtCore
605
606 from openlp.core.lib import Plugin, Event, EventType
607+from openlp.plugins.remotes.lib import RemoteTab
608
609 class RemotesPlugin(Plugin):
610
611@@ -35,10 +36,16 @@
612 Plugin.__init__(self, u'Remotes', u'1.9.0', plugin_helpers)
613 self.weight = -1
614 self.server = QtNetwork.QUdpSocket()
615- self.server.bind(4316)
616+ self.server.bind(int(self.config.get_config(u'remote port', 4316)))
617 QtCore.QObject.connect(self.server,
618 QtCore.SIGNAL(u'readyRead()'), self.readData)
619
620+ def get_settings_tab(self):
621+ """
622+ Create the settings Tab
623+ """
624+ return RemoteTab()
625+
626 def readData(self):
627 log.info(u'Remoted data has arrived')
628 while self.server.hasPendingDatagrams():
629
630=== added file 'resources/forms/plugindialoglistform.ui'
631--- resources/forms/plugindialoglistform.ui 1970-01-01 00:00:00 +0000
632+++ resources/forms/plugindialoglistform.ui 2009-08-13 20:02:38 +0000
633@@ -0,0 +1,108 @@
634+<?xml version="1.0" encoding="UTF-8"?>
635+<ui version="4.0">
636+ <class>PluginViewDialog</class>
637+ <widget class="QWidget" name="PluginViewDialog">
638+ <property name="geometry">
639+ <rect>
640+ <x>0</x>
641+ <y>0</y>
642+ <width>400</width>
643+ <height>393</height>
644+ </rect>
645+ </property>
646+ <property name="windowTitle">
647+ <string>Plugin list</string>
648+ </property>
649+ <widget class="QTableWidget" name="PluginViewList">
650+ <property name="geometry">
651+ <rect>
652+ <x>20</x>
653+ <y>10</y>
654+ <width>371</width>
655+ <height>331</height>
656+ </rect>
657+ </property>
658+ <property name="showGrid">
659+ <bool>false</bool>
660+ </property>
661+ <property name="gridStyle">
662+ <enum>Qt::SolidLine</enum>
663+ </property>
664+ <property name="rowCount">
665+ <number>1</number>
666+ </property>
667+ <attribute name="horizontalHeaderVisible">
668+ <bool>true</bool>
669+ </attribute>
670+ <attribute name="horizontalHeaderShowSortIndicator" stdset="0">
671+ <bool>true</bool>
672+ </attribute>
673+ <attribute name="verticalHeaderVisible">
674+ <bool>false</bool>
675+ </attribute>
676+ <row/>
677+ <column>
678+ <property name="text">
679+ <string>Name</string>
680+ </property>
681+ </column>
682+ <column>
683+ <property name="text">
684+ <string>Version</string>
685+ </property>
686+ </column>
687+ <column>
688+ <property name="text">
689+ <string>Status</string>
690+ </property>
691+ </column>
692+ <item row="0" column="0">
693+ <property name="text">
694+ <string>qqq</string>
695+ </property>
696+ </item>
697+ <item row="0" column="1">
698+ <property name="text">
699+ <string>aaa</string>
700+ </property>
701+ </item>
702+ <item row="0" column="2">
703+ <property name="text">
704+ <string>ccc</string>
705+ </property>
706+ </item>
707+ </widget>
708+ <widget class="QDialogButtonBox" name="ButtonBox">
709+ <property name="geometry">
710+ <rect>
711+ <x>220</x>
712+ <y>350</y>
713+ <width>170</width>
714+ <height>25</height>
715+ </rect>
716+ </property>
717+ <property name="standardButtons">
718+ <set>QDialogButtonBox::Ok</set>
719+ </property>
720+ </widget>
721+ </widget>
722+ <resources/>
723+ <connections>
724+ <connection>
725+ <sender>ButtonBox</sender>
726+ <signal>accepted()</signal>
727+ <receiver>PluginViewDialog</receiver>
728+ <slot>close()</slot>
729+ <hints>
730+ <hint type="sourcelabel">
731+ <x>370</x>
732+ <y>364</y>
733+ </hint>
734+ <hint type="destinationlabel">
735+ <x>460</x>
736+ <y>367</y>
737+ </hint>
738+ </hints>
739+ </connection>
740+ </connections>
741+</ui>