Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added integration to Ubuntu AppIndicator #907

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ronymesquita
Copy link

The idea is to create a shortcut and integration with GNOME Shell and Ubuntu AppIndicator.
The image shows a screenshot on Ubuntu 20.04 with the code.
bleachbit-pull-request

Executing from terminal, the error below is show when clicked to open preferences dialog.
The clean operation not fail and this code can works when not called from terminal, but I doesn't have tested.

Traceback (most recent call last):
  File "/home/rony/git/bleachbit/bleachbit/GUI.py", line 271, in cb_preferences_dialog
    pref = self.get_preferences_dialog()
  File "/home/rony/git/bleachbit/bleachbit/GUI.py", line 267, in get_preferences_dialog
    return self._window.get_preferences_dialog()
AttributeError: 'NoneType' object has no attribute 'get_preferences_dialog'

@az0 az0 added this to the 4.2 milestone May 2, 2020
@az0 az0 modified the milestones: 4.2, 4.4 Aug 27, 2020
@az0 az0 added the enhancement label Nov 6, 2020
@az0 az0 modified the milestones: 4.4, 4.6 May 8, 2021
@az0
Copy link
Member

az0 commented Feb 4, 2023

@ronymesquita
Are you able to please fix the traceback and the merge conflict?

@az0 az0 modified the milestones: 5.0, 5.2 Feb 4, 2023
@ronymesquita
Copy link
Author

Hello @az0.
I fixed the traceback and merged the conflict.
Please, can you take a look?

@az0 az0 self-assigned this Feb 5, 2023
@az0
Copy link
Member

az0 commented Feb 5, 2023

@ronymesquita

Thank you for making that change quickly.

On my system, the application fails to start, so please allow graceful fallback.

$ python3 bleachbit.py 
Traceback (most recent call last):
  File "/bleachbit/bleachbit/GUI.py", line 48, in <module>
    from gi.repository import AyatanaAppIndicator3 as AppIndicator
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 136, in load_module
    raise ImportError('cannot import name %s, '
ImportError: cannot import name AyatanaAppIndicator3, introspection typelib not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bleachbit/bleachbit/GUI.py", line 51, in <module>
    from gi.repository import AppIndicator3 as AppIndicator
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 136, in load_module
    raise ImportError('cannot import name %s, '
ImportError: cannot import name AppIndicator3, introspection typelib not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bleachbit/bleachbit.py", line 55, in <module>
    import bleachbit.GUI
  File "/bleachbit/bleachbit/GUI.py", line 53, in <module>
    from gi.repository import AppIndicator
  File "/usr/lib/python3/dist-packages/gi/importer.py", line 136, in load_module
    raise ImportError('cannot import name %s, '
ImportError: cannot import name AppIndicator, introspection typelib not found

@ronymesquita
Copy link
Author

ronymesquita commented Feb 5, 2023

@az0

This time, the import has been changed to work when the appindicator is unavailable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants