Closed GoogleCodeExporter closed 9 years ago
Shouldn't be too hard. Doubt I'll use blue color. Different color is prettier
but I doubt pango supports underlining with different color.
Thanks for posting this request!
Original comment by MeanEYE.rcf
on 26 Jul 2011 at 9:57
Thanks for quick reply and interest :)
I used classic blue only to be more obvious. I wouldn't use it for real
Original comment by klo...@gmail.com
on 26 Jul 2011 at 9:59
Well it's prettier to use a different color, preferably from theme. There are
some nice attempts at creating breadcrumb widget but none of them are for
python (not counting Ubuntu one). I'll probably end up writing my own widget if
I don't find an easy solution to this. :)
Original comment by MeanEYE.rcf
on 26 Jul 2011 at 10:06
Hi. I discovered you project today and I like it very much. Actually I have
such widget in Python and GTK. I developed it for some similar project. There
are bread-crumbs and button, wich allows you to type path with autocomplition.
So if you don't have such widget yet, I think I can to put it in Sunflower.
Original comment by sevka.fe...@gmail.com
on 3 Oct 2011 at 7:52
@4 Can you provide some screenshots or example code?
Original comment by MeanEYE.rcf
on 3 Oct 2011 at 7:55
Check out screenshot:
http://dl.dropbox.com/u/279140/screenshots/bread-crumbs-screenshot.png
I used a red color, but apparently it can be an underline or something like
that.
Original comment by sevka.fe...@gmail.com
on 4 Oct 2011 at 4:59
Ok, looks like something we could use. Can you tell me if it's compatible with
GTK3 or GObject Introspection? In which language code is written and under
which license. :)
Thanks.
Original comment by MeanEYE.rcf
on 4 Oct 2011 at 5:36
The code written on Python 2.6 under GPL. I'm not shure about GTK3 and GObject
Introspection at the moment. I used this manual:
http://developer.gnome.org/pygtk/stable/
I think it's GTK 2.x. Is it compatible with GTK3?
Original comment by sevka.fe...@gmail.com
on 4 Oct 2011 at 10:27
Library-wise, yes, GTK2 is compatible with GTK3. From Python's point of view
things are quite different. Following announcement on
http://article.gmane.org/gmane.comp.gnome.gtk%2B.python/15449 PyGTK is no
longer being actively developed and all users of this module are advised to
switch to GObject Introspection model.
We will be switching to GObject Introspection as GTK3 has a lot of new things
to offer and along the way our memory footprint will be reduced, number of bugs
fixed and start-up time will be significantly smaller.
Since you are programming under GPL, I would suggest the following. Take most
of your code, adapt it for best performance and seamlessly integrate it into
Sunflower. I'll, of course, give credit to you for original widget and if you
wish provide people with link to your site/code.
Generally I like what I saw from that screenshot but I need to make few things
a bit differently. Also, code needs to be adapted to our coding style since we
are going to bundle it with Sunflower.
Let me know if you like this idea. :)
Original comment by MeanEYE.rcf
on 4 Oct 2011 at 10:40
Ok, I like your idea. I going to clean and optimize my code and add more
comments.
When I'll do some commits in my branch of sunflower, I'll let you know.
Original comment by sevka.fe...@gmail.com
on 4 Oct 2011 at 11:14
Great. :)
You don't need to clean up your code if you don't wish to. If you are going to
clone Sunflower repository please put your widget in application/widgets
directory. :)
Original comment by MeanEYE.rcf
on 4 Oct 2011 at 11:58
Hi. I comitted my widget to my clone of sunflower:
http://code.google.com/r/sevkafedoroff-sunflower-fm/source/browse/application/wi
dgets/path_panel.py
Now I trying to integrate my widget to your widget title_bar.py. I need point
in your code where directory changed. I have to call refresh method here to
refresh my widget when directory changed outside my widget. And I need call
some your method to change directory when user chages directory inside my
widget. Can you help me?
Original comment by sevka.fe...@gmail.com
on 17 Oct 2011 at 10:31
Hey there. Since it's a separate widget you shouldn't really integrate it into
title bar, rather make a separate file in application/widgets. Then we'll
create it as a separate object in title bar __init__ method. Title bar has a
method called set_title which is used to set main part of the title, in case of
file list it's a path.
Bare in mind that other plugins will probably use title for something else so
we should take that into account. For example for terminal tab this title is
actually title set by the terminal application.
Original comment by MeanEYE.rcf
on 17 Oct 2011 at 11:06
Sorry I misread your post. Now we need to think of intelligent way to
differentiate title that contains path and title that has something else.
We could test if parent is descendant to ItemList class. If it is, it will
probably use title as path. But this is not 100% certain to work. I think
TitleBar should get additional parameter to __init__ called
title_is_path=False. This way we will ensure compliance with existing plugins
(if there are any)... and provide easy way to implement different widget.
This parameter should be stored locally (per object, not class) and use it in
set_title method to properly assign changed path.
Original comment by MeanEYE.rcf
on 17 Oct 2011 at 11:18
> I think TitleBar should get additional parameter to __init__ called
title_is_path=False. This way we will ensure compliance with existing plugins
(if there are any)... and provide easy way to implement different widget.
Ok, I can do it. And what method should I call when I change directory inside
my widget? I tried such code:
active_object = self._application.get_active_object()
if hasattr(active_object, 'change_path'):
active_object.change_path(new_path, new_path)
But it change path allways in active panel even if I click on inactive panel.
How can I reach not active but parent panel to my widget? Or should I have to
activate panel which I clicked first and then change path of active panel? What
do you think?
Original comment by sevka.fe...@gmail.com
on 18 Oct 2011 at 6:47
You are a widget, you don't change anything. Title bar has method named
set_title. Lists and other plugins call that method to set title for current
module. There you should listen for path.
Original comment by MeanEYE.rcf
on 18 Oct 2011 at 8:39
> You are a widget, you don't change anything.
No no, certainly I don't change anything inside my widget. It strictly low
coupled. I use callbacks.
In title_bar I create my widget:
self._path_panel = PathPanel(self._path_panel_clicked)
And when I click on bread crumbs, I call callback method of title_bar. Its
kinda observer/observable.
I already use set_title to refresh my widget when directory change in
sunflower. And
callback is needed to change directory in sunflower when I click on breadcrumbs.
Original comment by sevka.fe...@gmail.com
on 18 Oct 2011 at 8:54
Oh ok, sorry. Am having extremely bad day today. Don't use active object.
self._parent is plugin that has created title bar so you can use
self._parent.change_path.
You can add me on GTalk if you wish. My email is in about box.
Original comment by MeanEYE.rcf
on 18 Oct 2011 at 9:17
Hi! Any news about automatic path completion? Quick navigation to any path is
the most missing feature in my opinion.
It would be great to transform the left breadcrumb to path entry with Ctrl+L
and the right one with Ctrl+Shift+L instead of the path navigation dialog for
the active panel.
Free disk space percentage (free units / total units) like 10% free (11.8 GiB /
118.2 GiB) could be moved after "Size" in the panel status bars, enhanced with
progress bars to visualize the remaining free space.
Regards,
rid
Original comment by ridand...@gmail.com
on 20 Jan 2013 at 4:01
I didn't get the chance to work on that. But I didn't forget about it either.
Transforming path label to entry widget would increase title bar height and
cause some ugly UI issues. BCP is a must though.
Percentage is a good idea. I'll add that. I did also think about adding
progress bar, but some themes have them animated and I didn't find any option
to disable that animation. I didn't want to have a constant distraction on the
screen.
Original comment by MeanEYE.rcf
on 20 Jan 2013 at 4:06
I think I almost done with breadcrumbs, but can't figure out with colors of
text and background :(
You can look on it here: http://code.google.com/r/sevkafedoroff-sunflowerfm/
I also did auto completion in change directory dialog (using bash compgen at
the monent)
Original comment by sevka.fe...@gmail.com
on 16 Jul 2013 at 10:51
I can probably help with that. Can you be more specific what's the problem you
are having with colors?
Original comment by MeanEYE.rcf
on 18 Jul 2013 at 2:46
Take a look:
https://dl.dropboxusercontent.com/u/279140/screenshots/sunflower-breadcrumbs-col
or.png
I don't know how to set bg color of bread-crumbs on active panel.
There such hierarchy of objects: HBox->Hbox->(set of EventBox->Label). I tried
to set bg color of both HBoxes and Labels, but it doesn't work. Transparent
color would be usefull, but AFAIK GTK doesn't support it.
Original comment by sevka.fe...@gmail.com
on 19 Jul 2013 at 9:59
Original comment by sevka.fe...@gmail.com
on 19 Jul 2013 at 10:00
Attachments:
Ok, I got it. Only Eventbox have a bg color.
Original comment by sevka.fe...@gmail.com
on 31 Jul 2013 at 9:19
Okay, nice. Do you have an isolated patch just for this feature?
Original comment by MeanEYE.rcf
on 31 Jul 2013 at 9:20
Original comment by sevka.fe...@gmail.com
on 1 Aug 2013 at 7:50
Attachments:
I think I can make a patch
Original comment by sevka.fe...@gmail.com
on 1 Aug 2013 at 7:52
Ah, I see you have a clone. I can work with that. Is this a final version of
this addition? Or should I wait with merging and give you chance to fix things?
Original comment by MeanEYE.rcf
on 1 Aug 2013 at 7:57
Let's wait a little. But you can take a look of it now. Maybe you will have
some suggestions.
Original comment by sevka.fe...@gmail.com
on 1 Aug 2013 at 8:22
Okay, I'll wait. Am currently busy with work anyway, so it will probably be
later today. I'll let you know if any changes are required. Thanks!
Original comment by MeanEYE.rcf
on 1 Aug 2013 at 8:23
Should I make a checkboxes in settings page for breadcrumbs?
Something like this:
[x] Show breadcrumbs
[x] Smart breadcrumbs
Smart breadcumbs - this kind of breadcrumbs, when there are not only current
path shown, but also previous (it's hard to explain actually, but I saw this
feature in other managers, even in Nautilus)
Original comment by sevka.fe...@gmail.com
on 1 Aug 2013 at 3:52
Well, I would start simple, with no options and a good default behavior. It
also needs to be as easy on the CPU as possible.
So, we do some code checks, see if something can be made simpler, and then
merge it with main branch.
Original comment by MeanEYE.rcf
on 1 Aug 2013 at 4:47
Just took a look at your code and I really like the result and the way
everything behaves. We'll probably change some things to make everything a bit
more readable and to conform to coding style.
Original comment by MeanEYE.rcf
on 1 Aug 2013 at 10:32
Good work btw! :)
Original comment by MeanEYE.rcf
on 1 Aug 2013 at 10:32
Great!
Original comment by sevka.fe...@gmail.com
on 2 Aug 2013 at 8:03
Am starting to merge this feature. Can you tell me what does BreadCrumbsEvent
is used for?
Original comment by MeanEYE.rcf
on 7 Aug 2013 at 6:50
Actually this class is not nessesary. Because there are only one event in the
bread crumbs widget - change directory. I can change the code and remove it.
Original comment by sevka.fe...@gmail.com
on 12 Aug 2013 at 2:28
P.S. You can pull my branch. I removed BreadCrumbsEvent.
Original comment by sevka.fe...@gmail.com
on 12 Aug 2013 at 2:40
I am looking at _path_resized method in bread_crumbs.py and can't seem to
figure out what you are trying to do. Can you explain what this method is doing?
Thanks!
Original comment by MeanEYE.rcf
on 14 Sep 2013 at 11:42
This method shrink the path when there are not enough space to show full path.
Try to change directory to some long path, and then resize window. You'll see
how it works.
Original comment by sevka.fe...@gmail.com
on 15 Sep 2013 at 7:02
I guessed as much. Okay, thanks. :)
Original comment by MeanEYE.rcf
on 15 Sep 2013 at 7:20
Issue 332 has been merged into this issue.
Original comment by MeanEYE.rcf
on 1 Jan 2014 at 2:09
Merged changes from Sevka's repo and changed the widget a bit to be more
flexible. Sadly I had to remove some options but I will restore them back.
Original comment by MeanEYE.rcf
on 18 Jan 2014 at 11:53
Original issue reported on code.google.com by
klo...@gmail.com
on 26 Jul 2011 at 9:53Attachments: