openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #27764
Re: [Merge] lp:~trb143/openlp/bugs-2_4b into lp:openlp
Review: Needs Fixing
Minor "nitpicking"
Diff comments:
>
> === modified file 'openlp/core/ui/advancedtab.py'
> --- openlp/core/ui/advancedtab.py 2015-01-18 13:39:21 +0000
> +++ openlp/core/ui/advancedtab.py 2015-10-28 21:25:33 +0000
> @@ -349,6 +354,8 @@
> self.default_color = settings.value('default color')
> self.default_file_edit.setText(settings.value('default image'))
> self.slide_limits = settings.value('slide limits')
> + self.search_as_you_type = settings.value('search as type')
"self.is_search_as_you_type_enabled"
> + self.search_as_type_check_box.setChecked(self.search_as_you_type)
"self.is_search_as_you_type_enabled"
> # Prevent the dialog displayed by the alternate_rows_check_box to display.
> self.alternate_rows_check_box.blockSignals(True)
> self.alternate_rows_check_box.setChecked(settings.value('alternate rows'))
> @@ -424,8 +431,14 @@
> settings.setValue('x11 bypass wm', self.x11_bypass_check_box.isChecked())
> self.settings_form.register_post_process('config_screen_changed')
> self.settings_form.register_post_process('slidecontroller_update_slide_limits')
> + settings.setValue('search as type', self.search_as_you_type)
"self.is_search_as_you_type_enabled"
> settings.endGroup()
>
> + def on_search_as_type_check_box_changed(self, check_state):
> + self.search_as_you_type = (check_state == QtCore.Qt.Checked)
"self.is_search_as_you_type_enabled"
> + self.settings_form.register_post_process('songs_config_updated')
> + self.settings_form.register_post_process('custom_config_updated')
> +
> def cancel(self):
> """
> Dialogue was cancelled, remove any pending data path change.
>
> === modified file 'openlp/core/ui/plugindialog.py'
> --- openlp/core/ui/plugindialog.py 2015-01-18 13:39:21 +0000
> +++ openlp/core/ui/plugindialog.py 2015-10-28 21:25:33 +0000
> @@ -78,7 +78,7 @@
> """
> Translate the UI on the fly
> """
> - pluginViewDialog.setWindowTitle(translate('OpenLP.PluginForm', 'Plugin List'))
> + pluginViewDialog.setWindowTitle(translate('OpenLP.PluginForm', 'Manage Plugins'))
pluginViewDialog? Old name, needs to be refactored.
> self.plugin_info_group_box.setTitle(translate('OpenLP.PluginForm', 'Plugin Details'))
> self.version_label.setText('%s:' % UiStrings().Version)
> self.about_label.setText('%s:' % UiStrings().About)
>
> === modified file 'openlp/plugins/custom/lib/mediaitem.py'
> --- openlp/plugins/custom/lib/mediaitem.py 2015-04-02 20:49:19 +0000
> +++ openlp/plugins/custom/lib/mediaitem.py 2015-10-28 21:25:33 +0000
> @@ -85,6 +85,7 @@
> """
> log.debug('Config loaded')
> self.add_custom_from_service = Settings().value(self.settings_section + '/add custom from service')
> + self.search_as_you_type = Settings().value('advanced/search as type')
Rather name boolean variables as a question its contents will answer. For example, this could be, "self.is_search_as_you_type_enabled"
>
> def retranslateUi(self):
> """
> @@ -269,11 +270,12 @@
>
> :param text: The search text
> """
> - search_length = 2
> - if len(text) > search_length:
> - self.on_search_text_button_clicked()
> - elif not text:
> - self.on_clear_text_button_click()
> + if self.search_as_you_type:
"self.is_search_as_you_type_enabled"
> + search_length = 2
> + if len(text) > search_length:
> + self.on_search_text_button_clicked()
> + elif not text:
> + self.on_clear_text_button_click()
>
> def service_load(self, item):
> """
--
https://code.launchpad.net/~trb143/openlp/bugs-2_4b/+merge/276057
Your team OpenLP Core is subscribed to branch lp:openlp.
References