[API] Add sidebar widget

Bug #810826 reported by Scott Ringwelski on 2011-07-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Granite
Fix Released
Wishlist
Victor Martinez

Bug Description

there's no sidebar widget... until now! :)

Related branches

Scott Ringwelski (sgringwe) wrote :

attached is beta sidebar widget with working example.

to test example, click remove and see root is invisible, click add and see it is visible again.

Scott Ringwelski (sgringwe) wrote :

this is my way of emailing you btw

xapantu (xapantu) wrote :

I don't think the custom cellrenderer is needed, a GtkTreeView has built in system to make item trees. These files are using tabs, but we would prefer spaces ;) See bug https://bugs.launchpad.net/granite/+bug/818244

Could you also add the good gtk css class for the theming? get_style_context().add_class("sidebar") should be sufficient :)

Oh, and (it is not really important, but...) maybe you could change the signal names? I think something like sidebar_selection_changed and sidebar_item_clicked would be more intuitive...

Otherwise, it looks fine, it is really needed to keep a consistent layout between apps :)

Scott Ringwelski (sgringwe) wrote :

1. the custom cellrenderer IS necessary in order to properly display the expander item
2. spaces... but why???
3. i was under the impression that "this.name = "SidebarContent";" is what added the styling. at least that's what i use in beatbox. or is this something new in gtk3?
4. as far as the signal names go, feel free to rename them whatever you want but do make sure you understand their context. item_clicked would not be appropiate imo. clickable_clicked happens when the clickable item on the treeiter (such as the eject button) is clicked. not when an item is clicked...

xapantu (xapantu) wrote :

1 Ah ok, I forgot that the expander had to be at right, sorry.
2 A council decision
3 Ah, maybe, currently, marlin sidebar, for instance, uses the sidebar class, so...
4 ok, it is not so important, we'll add good documentation, it should be sufficient for general understanding

xapantu (xapantu) wrote :

So, if someone wants to put that in a granite branch, make a sample in the demo apps and check the api is usable in most of our apps, it would be cool :)

Changed in granite:
status: New → Triaged
importance: Undecided → Low
Victor Martinez (victored) wrote :

It seems to me that BeatBox's sidebar is mature enough to be included in Granite. It would save hundreds of lines of code to new developers and is a good implementation. This would also improve consistency across applications.

Victor Martinez (victored) wrote :

Tom and I drafted a very complete sidebar API not so long ago, and it's been fully implemented. Please check out the linked branch :)

Changed in granite:
assignee: nobody → Victor Eduardo (victored)
milestone: none → 0.2
importance: Low → Medium
status: Triaged → In Progress
summary: - no sidebar widget
+ [API] Add sidebar widget
Changed in granite:
importance: Medium → Wishlist
Changed in granite:
status: In Progress → Fix Committed
Daniel Fore (danrabbit) on 2013-01-15
Changed in granite:
milestone: 0.2 → luna-beta2
Cody Garver (codygarver) on 2013-04-15
Changed in granite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers