Skip to content

Added a filter to the list of models#443

Open
temaps wants to merge 1 commit into
OpenPrinting:masterfrom
temaps:add-filter-to-models-list
Open

Added a filter to the list of models#443
temaps wants to merge 1 commit into
OpenPrinting:masterfrom
temaps:add-filter-to-models-list

Conversation

@temaps

@temaps temaps commented Jun 24, 2026

Copy link
Copy Markdown

The list of models is always very long and it is difficult to find the right one. Added a filter field that helps you select only the necessary models from the list.

@temaps

temaps commented Jun 24, 2026

Copy link
Copy Markdown
Author
20260624_221628

@mikhailnov

Copy link
Copy Markdown
Contributor

Looks much better than current filter, which you should know how to turn on and which finds from the beginning of the model only

@zdohnal zdohnal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general looks good, but I saw some issues:

  1. when running the program, I get 2 exceptions:
Traceback (most recent call last):
  File "/usr/local/share/system-config-printer/newprinter.py", line 3875, in on_tvNPMakes_cursor_changed
    self.fillModelList()
    ~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/share/system-config-printer/newprinter.py", line 3916, in fillModelList
    filter_path = self.models_filter.convert_child_iter_to_path(iter)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TreeModelFilter' object has no attribute 'convert_child_iter_to_path'. Did you mean: 'convert_child_iter_to_iter'?
Caught non-fatal exception.  Traceback:

The above happened when I opened the driver dialog during printer adding process.

File "/usr/local/share/system-config-printer/newprinter.py", line 1369, in _handlePrinterInstallationMode
    name = model.get(iter, 0)[0]
           ~~~~~~~~~^^^^^^^^^
File "/usr/lib64/python3.14/site-packages/gi/overrides/Gtk.py", line 1010, in get
    values.append(self.get_value(treeiter, col))
                  ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
TypeError: Argument 1 does not allow None as a value

This one I cannot reproduce, but it happened somewhere when I either went back to Manufacturers window, or when I was switching from Brother to HP.

Would you mind looking into them?

Thank you!

@temaps

temaps commented Jun 25, 2026

Copy link
Copy Markdown
Author
  1. when running the program, I get 2 exceptions:

Yes, I was wrong... In the final version, I did not replace the method, which I copied from my old project, where I defined this method... I will fix everything now and add a check.

The list of models is always very long and it is difficult to find
the right one. Added a filter field that helps you select only the
necessary models from the list.
@temaps temaps force-pushed the add-filter-to-models-list branch from 48a6af5 to 409a2ca Compare June 25, 2026 10:50
@temaps

temaps commented Jun 25, 2026

Copy link
Copy Markdown
Author

I fixed and did a force push.

@temaps temaps requested a review from zdohnal June 25, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants