openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #28354
[Merge] lp:~thelinuxguy/openlp/fix-stylesheet into lp:openlp
Simon Hanna has proposed merging lp:~thelinuxguy/openlp/fix-stylesheet into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~thelinuxguy/openlp/fix-stylesheet/+merge/282126
Reenable the stylesheet
remove the icons from mediamanager so that display in plasma works
--
Your team OpenLP Core is requested to review the proposed merge of lp:~thelinuxguy/openlp/fix-stylesheet into lp:openlp.
=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py 2015-12-31 22:46:06 +0000
+++ openlp/core/lib/plugin.py 2016-01-10 20:08:31 +0000
@@ -275,7 +275,7 @@
"""
if self.media_item:
self.media_item.initialise()
- self.main_window.media_dock_manager.insert_dock(self.media_item, self.icon, self.weight)
+ self.main_window.media_dock_manager.add_item_to_dock(self.media_item)
def finalise(self):
"""
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2016-01-09 19:10:56 +0000
+++ openlp/core/ui/mainwindow.py 2016-01-10 20:08:31 +0000
@@ -153,8 +153,7 @@
# Create the MediaManager
self.media_manager_dock = OpenLPDockWidget(main_window, 'media_manager_dock',
':/system/system_mediamanager.png')
- # TODO: Figure out how to fix the stylesheet and add it back in
- # self.media_manager_dock.setStyleSheet(MEDIA_MANAGER_STYLE)
+ self.media_manager_dock.setStyleSheet(MEDIA_MANAGER_STYLE)
# Create the media toolbox
self.media_tool_box = QtWidgets.QToolBox(self.media_manager_dock)
self.media_tool_box.setObjectName('media_tool_box')
=== modified file 'openlp/core/ui/mediadockmanager.py'
--- openlp/core/ui/mediadockmanager.py 2015-12-31 22:46:06 +0000
+++ openlp/core/ui/mediadockmanager.py 2016-01-10 20:08:31 +0000
@@ -39,23 +39,12 @@
"""
self.media_dock = media_dock
- def add_dock(self, media_item, icon, weight):
+ def add_item_to_dock(self, media_item):
"""
Add a MediaManagerItem to the dock
-
- :param media_item: The item to add to the dock
- :param icon: An icon for this dock item
- :param weight:
- """
- visible_title = media_item.plugin.get_string(StringContent.VisibleName)
- log.info('Adding %s dock' % visible_title)
- self.media_dock.addItem(media_item, icon, visible_title['title'])
-
- def insert_dock(self, media_item, icon, weight):
- """
- This should insert a dock item at a given location
- This does not work as it gives a Segmentation error.
- For now add at end of stack if not present
+ If the item has been added before, it's silently skipped
+
+ :param media_item: The item to add to the dock
"""
visible_title = media_item.plugin.get_string(StringContent.VisibleName)
log.debug('Inserting %s dock' % visible_title['title'])
@@ -65,7 +54,7 @@
match = True
break
if not match:
- self.media_dock.addItem(media_item, icon, visible_title['title'])
+ self.media_dock.addItem(media_item, visible_title['title'])
def remove_dock(self, media_item):
"""
=== modified file 'tests/functional/openlp_plugins/images/test_imagetab.py'
--- tests/functional/openlp_plugins/images/test_imagetab.py 2015-12-31 22:46:06 +0000
+++ tests/functional/openlp_plugins/images/test_imagetab.py 2016-01-10 20:08:31 +0000
@@ -80,12 +80,14 @@
def save_tab_change_test_test(self):
"""
- Test a change triggers post processing.
+ Test a color change is applied and triggers post processing.
"""
# GIVEN: Apply a change to the form.
- self.form.background_color = '#999999'
+ self.form.on_background_color_changed('#999999')
# WHEN: the save is invoked
self.form.save()
# THEN: the post process should be requested
self.assertEqual(1, self.form.settings_form.register_post_process.call_count,
'Image Post processing should have been requested')
+ # THEN: The color should be set
+ self.assertEqual(self.form.background_color, '#999999', 'The updated color should have been saved')
Follow ups