Progress Pathbar widget
So theses last few days i were playing with some gtk/cairo C code to make pathbars look like progressive a la ubuntu software center. In nautilus-elementary we use a pixmap hack where we map some pixmaps to the differents buttons of the breadcrumb it's a bit hackish but it work pretty well. But now some native pathbar are needed in nautilus-elementary, our next step would be to combine the paths with the search/edit entries like in Danrabbit mockups.
In my researches i found herzi code for a litlle path bar widget and i am playing with this code since a few days.
The hard part of the challenge is to match the gtk theme. I've experimented differents ways to achieve this goal:
- The first technique is to draw "manually" with cairo the pathbar drawing 3 lines of 1pixels, an outer border, a path and inner border line with a linear gradient fill. While it performs well on some themes, on some others the results are not so good. The solution would be to fix some drawing parameters and "cheat" a little depending on the used gtk theme. That's what the sofware center does. The counter part of this solution is every themes got the same shape whatever gtk engine it use. The nice part is you have a total control on the aspect of the pathbar. this screenshot don't really illustrate the gtk matching colors but rather focus on the drawing to get a good shape and giving the shape a nice relief. And i got some fun drawing the black carbon pathbar ;)
- The other solution and because i am really lazy ;) is to let gtk draw the button for you using gtk_paint_box function and draw & map the cairo arrows part on top of it. And i must say it works pretty well, the shape and colors of the theme are respected. I saw that gtk_paint_box functions will support cairo_t argument in gtk+3, it seems a good new as we could draw directly on a cr instead of the GdkWindow (at least that's how i understand it, i didn't tried it). It would be less "hackish" to use this technic. I resized the toolbar for 40px height to get a nice view of the outer borders of the pathbar (26px height). I added a standard toolbar button to check the style of the pathbar and check if the colors matche. The cairo part is really well mapped on the painted box and the pathbar can even extend or change size without a problem.
Still there's many thing to do to use this pathbar in the filemanager, manage the way the pathbar collapse when there's many directories to show and the width of the pathbar is not suffisant. Give the pathbar an entry to use in correlation with search or change path like in Dan's mockups. It's a first step and a nice one :)

