Sunflower icon indicating copy to clipboard operation
Sunflower copied to clipboard

Directory path doens't display in Fedora 24

Open Shihira opened this issue 6 years ago • 4 comments

This problem occurs in the latest commit of develop branch. Exceptions were being thrown all the time and error messages as follows piled up in the console:

Traceback (most recent call last):
  File "/home/shihira/Software/Sunflower/application/widgets/breadcrumbs.py", line 190, in __draw_event
    color = self._colors[0]
TypeError: 'NoneType' object has no attribute '__getitem__'

No path was displayed. It doesn't navigate when clicking on where there should have been path breadcrumbs as well.

What I Tried:

  • I added an if condition like if self._colors: which resulted in the path breadcrumbs being totally black.
  • I found _colors need to be set by apply_colors and I tried to searched for this word in other parts of the source tree. Grep gave me empty result.

Thank you for your great job! A really nice file manager. I was using Gtk 2 version for some years. Just wanted to try a newer version but found it to be a little buggy. Is it that I need to start out with a clear configuration environment?

Shihira avatar Aug 20 '17 10:08 Shihira

Thanks for trying development branch out. It's a transition to GTK3 which started back in the day when GObject Introspection documentation basically didn't exist so there are some quirks like these.

Issue here is that until version 0.4 we used to draw our own breadcrumbs and making our own widget. Hence that color applying and manipulation. Unfortunately I didn't remake this part of the code yet. Simple workaround is to change breadcrump type to none in settings and then everything will start working, although you do lose this functionality.

Am going to accept this issue as indeed it needs to be fixed. Rather, component needs to be replaced as GTK3 is simpler to achieve this in.

MeanEYE avatar Aug 20 '17 12:08 MeanEYE

Thank you for replying. I just made a mistake in thinking gtk2 version as 0.2 and gtk3 version as 0.3 :) A little bit embarrassing. So the development branch is halfway from 0.3 to 0.4, isn't it? I will be looking forward to a new release. This is a FM that I like and use everyday.

GTK3 is not currently integrated very well indeed. During usage I continued finding somewhere that need to be fixed.

Command menu is empty, I have a bunch of commands defined though.
New tab button does not work and throwing:

Traceback (most recent call last):
  File "/home/shihira/Software/Sunflower/application/gui/main_window.py", line 990, in _handle_new_tab_click
    plugin_class = widget.plugin_class
AttributeError: 'SimpleAction' object has no attribute 'plugin_class'

And when to copy something using Ctrl-C, I got:

Traceback (most recent call last):
  File "/home/shihira/Software/Sunflower/application/accelerator_group.py", line 93, in _handle_activate
    result = callback_method(widget, label)
  File "/home/shihira/Software/Sunflower/application/plugin_base/item_list.py", line 894, in _copy_files_to_clipboard
    self._parent.set_clipboard_item_list(operation, selected_items)
  File "/home/shihira/Software/Sunflower/application/gui/main_window.py", line 2767, in set_clipboard_item_list
    return self.clipboard.set_with_data(targets, get_func, clear_func)
AttributeError: 'Clipboard' object has no attribute 'set_with_data'
Traceback (most recent call last):
  File "/home/shihira/Software/Sunflower/application/plugin_base/item_list.py", line 621, in _handle_key_press
    self._parent.set_command_entry_text(unichr(key_value))
  File "/home/shihira/Software/Sunflower/application/gui/main_window.py", line 2724, in set_command_entry_text
    self.show_command_entry()
  File "/home/shihira/Software/Sunflower/application/gui/main_window.py", line 2364, in show_command_entry
    self.command_popover.popup()
AttributeError: 'Popover' object has no attribute 'popup'

Shihira avatar Aug 20 '17 14:08 Shihira

Yes, development version is semi-converted to GTK3 by a tool. I need to go through everything manually and iron out all the issues. That said 0.3-61 version is GTK2 and currently stable.

Issues you are quoting are a result of me relying too much on PyGTK module's ability to assign custom attributes to widget objects which GTK3 got rid of.

I also didn't finalize the UI part of the GTK3 version. New widgets offer some interesting opportunities for making cleaner interfaces and more intuitive experience.

MeanEYE avatar Aug 20 '17 15:08 MeanEYE

@MeanEYE , this issue can be closed, as latest develop version of Sunflower runs on Fedora 30 without problems.

joshas avatar Aug 02 '19 12:08 joshas