← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/fixes into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/fixes into lp:openlp.

    Requested reviews:
    OpenLP Core (openlp-core)


Remove "Can_be_disabled" as no longer require
Sort out status handling in plugin form.
-- 
https://code.launchpad.net/~trb143/openlp/fixes/+merge/14579
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py	2009-11-03 18:14:25 +0000
+++ openlp/core/lib/plugin.py	2009-11-07 08:00:40 +0000
@@ -139,14 +139,6 @@
         """
         return True
 
-    def can_be_disabled(self):
-        """
-        Indicates whether the plugin can be disabled by the plugin list.
-
-        Returns True or False.
-        """
-        return False
-
     def set_status(self):
         """
         Sets the status of the plugin

=== modified file 'openlp/core/lib/pluginmanager.py'
--- openlp/core/lib/pluginmanager.py	2009-11-03 18:14:25 +0000
+++ openlp/core/lib/pluginmanager.py	2009-11-07 08:00:40 +0000
@@ -105,10 +105,7 @@
         for plugin in plugins_list:
             if plugin.check_pre_conditions():
                 log.debug(u'Plugin %s active', unicode(plugin.name))
-                if plugin.can_be_disabled():
-                    plugin.set_status()
-                else:
-                    plugin.status = PluginStatus.Active
+                plugin.set_status()
             else:
                 plugin.status = PluginStatus.Disabled
             self.plugins.append(plugin)

=== modified file 'openlp/core/ui/pluginform.py'
--- openlp/core/ui/pluginform.py	2009-11-03 18:14:25 +0000
+++ openlp/core/ui/pluginform.py	2009-11-07 08:00:40 +0000
@@ -79,17 +79,16 @@
         self.StatusComboBox.setCurrentIndex(-1)
         self.VersionNumberLabel.setText(u'')
         self.AboutTextBrowser.setHtml(u'')
+        self.StatusComboBox.setEnabled(False)
 
     def _setDetails(self):
         log.debug('PluginStatus: %s', str(self.activePlugin.status))
         self.VersionNumberLabel.setText(self.activePlugin.version)
         self.AboutTextBrowser.setHtml(self.activePlugin.about())
-        if self.activePlugin.can_be_disabled():
-            self.programaticChange = True
-            self.StatusComboBox.setCurrentIndex(int(self.activePlugin.status))
-            self.StatusComboBox.setEnabled(True)
-        else:
-            self.StatusComboBox.setEnabled(False)
+        self.programaticChange = True
+        self.StatusComboBox.setCurrentIndex(int(self.activePlugin.status))
+        self.StatusComboBox.setEnabled(True)
+        self.programaticChange = False
 
     def onPluginListWidgetSelectionChanged(self):
         if self.PluginListWidget.currentItem() is None:
@@ -107,9 +106,6 @@
             self._clearDetails()
 
     def onStatusComboBoxChanged(self, status):
-        if self.programaticChange:
-            self.programaticChange = False
-            return
         self.activePlugin.toggle_status(status)
         if status == PluginStatus.Active:
             self.activePlugin.initialise()

=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py	2009-11-03 19:01:53 +0000
+++ openlp/plugins/bibles/bibleplugin.py	2009-11-07 08:00:40 +0000
@@ -41,9 +41,6 @@
         #Register the bible Manager
         self.biblemanager = None
 
-    def can_be_disabled(self):
-        return True
-
     def initialise(self):
         log.info(u'bibles Initialising')
         if self.biblemanager is None:

=== modified file 'openlp/plugins/custom/customplugin.py'
--- openlp/plugins/custom/customplugin.py	2009-10-30 20:34:11 +0000
+++ openlp/plugins/custom/customplugin.py	2009-11-07 08:00:40 +0000
@@ -54,9 +54,6 @@
         # Create the CustomManagerItem object
         return CustomMediaItem(self, self.icon, self.name)
 
-    def can_be_disabled(self):
-        return True
-
     def initialise(self):
         log.info(u'Plugin Initialising')
         Plugin.initialise(self)

=== modified file 'openlp/plugins/images/imageplugin.py'
--- openlp/plugins/images/imageplugin.py	2009-10-30 20:34:11 +0000
+++ openlp/plugins/images/imageplugin.py	2009-11-07 08:00:40 +0000
@@ -37,9 +37,6 @@
         self.weight = -7
         self.icon = buildIcon(u':/media/media_image.png')
 
-    def can_be_disabled(self):
-        return True
-
     def initialise(self):
         log.info(u'Plugin Initialising')
         Plugin.initialise(self)
@@ -60,7 +57,7 @@
         about_text = self.trUtf8(u'<b>Image Plugin</b><br>Allows images of '
             u'all types to be displayed.  If a number of images are selected '
             u'together and presented on the live controller it is possible '
-            u'to turn them into a timed loop.<br>From the plugin if the '
+            u'to turn them into a timed loop.<br<br>From the plugin if the '
             u'<i>Override background</i> is chosen and an image is selected '
             u'any somgs which are rendered will use the selected image from '
             u'the background instead of the one provied by the theme.<br>')

=== modified file 'openlp/plugins/media/mediaplugin.py'
--- openlp/plugins/media/mediaplugin.py	2009-10-30 20:34:11 +0000
+++ openlp/plugins/media/mediaplugin.py	2009-11-07 08:00:40 +0000
@@ -42,9 +42,6 @@
     def get_settings_tab(self):
         return MediaTab(self.name)
 
-    def can_be_disabled(self):
-        return True
-
     def initialise(self):
         log.info(u'Plugin Initialising')
         Plugin.initialise(self)

=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py	2009-10-30 20:34:11 +0000
+++ openlp/plugins/presentations/presentationplugin.py	2009-11-07 08:00:40 +0000
@@ -46,9 +46,6 @@
         """
         return PresentationTab(self.name, self.controllers)
 
-    def can_be_disabled(self):
-        return True
-
     def initialise(self):
         log.info(u'Presentations Initialising')
         Plugin.initialise(self)

=== modified file 'openlp/plugins/remotes/remoteplugin.py'
--- openlp/plugins/remotes/remoteplugin.py	2009-11-03 19:01:53 +0000
+++ openlp/plugins/remotes/remoteplugin.py	2009-11-07 08:00:40 +0000
@@ -40,9 +40,6 @@
         self.weight = -1
         self.server = None
 
-    def can_be_disabled(self):
-        return True
-
     def initialise(self):
         log.debug(u'initialise')
         Plugin.initialise(self)

=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py	2009-10-30 20:34:11 +0000
+++ openlp/plugins/songs/songsplugin.py	2009-11-07 08:00:40 +0000
@@ -57,9 +57,6 @@
         self.opensong_export_form = OpenSongExportForm()
         self.icon = buildIcon(u':/media/media_song.png')
 
-    def can_be_disabled(self):
-        return True
-
     def get_settings_tab(self):
         return SongsTab(self.name)
 

=== modified file 'openlp/plugins/songusage/songusageplugin.py'
--- openlp/plugins/songusage/songusageplugin.py	2009-10-30 17:44:16 +0000
+++ openlp/plugins/songusage/songusageplugin.py	2009-11-07 08:00:40 +0000
@@ -44,9 +44,6 @@
         self.songusagemanager = None
         self.songusageActive = False
 
-    def can_be_disabled(self):
-        return True
-
     def add_tools_menu_item(self, tools_menu):
         """
         Give the SongUsage plugin the opportunity to add items to the


Follow ups