View Single Post
Old 10-26-2023, 05:35 PM   #2768
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,110
Karma: 77213681
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question: I am trying to edit this so that 'comments' type columns are also a valid choice for the reading position column. (Just as a matter of preference; I find that title-type longtext columns more suitable for things like this.

In dialogs.py, lines 925-927:

Code:
    def get_text_type_custom_columns(self):
        column_types = ['text']
        return self.get_custom_columns(column_types)

config.py, lines 357-364:

Code:
CUSTOM_COLUMN_DEFAULTS = {
                CUSTOM_COLUMN_DEFAULT_LOOKUP_READING_LOCATION : {
                    'column_heading': _("Kobo Reading Location"),
                    'datatype' : 'text',
                    'description' : _("Kobo Reading location from the device."),
                    'columns_list' : 'avail_text_columns',
                    'config_label' : _('Current Reading Location Column:'),
                    'config_tool_tip' : _("Select a custom column to store the current reading location. The column type must be 'text'.  Leave this blank if you do not want to store or restore the current reading location."),
866-868:

Code:
    def get_text_custom_columns(self):
        column_types = ['text']
        return self.get_custom_columns(column_types)
The GetFileName plugin uses ['text','enumeration','custom','comments'] so thought that'd work. But changing the instances of 'text' to 'text,comments' just results in an empty column selection dialog in the configuration. It also happens with just 'comments'

Click image for larger version

Name:	2023-10-26 18_32_32-Customize Kobo Utilities.png
Views:	1070
Size:	22.7 KB
ID:	204435

What did I do wrong?

Last edited by ownedbycats; 10-26-2023 at 05:37 PM.
ownedbycats is offline