Merge lp://staging/~elementary-pantheon/switchboard/flowbox into lp://staging/~elementary-pantheon/switchboard/switchboard

Proposed by Danielle Foré
Status: Merged
Approved by: Danielle Foré
Approved revision: 656
Merged at revision: 644
Proposed branch: lp://staging/~elementary-pantheon/switchboard/flowbox
Merge into: lp://staging/~elementary-pantheon/switchboard/switchboard
Diff against target: 847 lines (+290/-398)
6 files modified
schemas/org.pantheon.switchboard.gschema.xml (+2/-2)
src/CMakeLists.txt (+2/-0)
src/CategoryView.vala (+86/-380)
src/Switchboard.vala (+10/-16)
src/Widgets/CategoryFlowBox.vala (+139/-0)
src/Widgets/CategoryIcon.vala (+51/-0)
To merge this branch: bzr merge lp://staging/~elementary-pantheon/switchboard/flowbox
Reviewer Review Type Date Requested Status
Adam Bieńkowski (community) testing Approve
Review via email: mp+294295@code.staging.launchpad.net

Commit message

CategoryView.vala:
* Rewrite the icon views as FlowBoxes
* Update copyright header

Switchboard.vala:
* Code Style
* Update calls to icon views to FlowBoxes

Schemas:
* Update default window size to fit default plug icons

Widgets:
* Add CategoryFlowBox and CategoryIcon widgets

Description of the change

I've been staring at this code long enough to probably not realize if I'm doing dumb things. I have noticed two regressions, but I'm not sure what's causing them:

* Pressing down from search entry skips personal category
* [GLib] g_sequence_get: assertion '!is_end (iter)' failed

To post a comment you must log in.
655. By Danielle Foré

update default size to fit default plugs

656. By Danielle Foré

fix copyright dates in new widgets

Revision history for this message
Adam Bieńkowski (donadigo) wrote :

It works & looks great for me, besides those issues that are pointed out in the description.

review: Approve (testing)
Revision history for this message
Zisu Andrei (matzipan) wrote :
Download full text (3.9 KiB)

I personally don't like how it splits the distance equally between icons, it leads to a huge gap between them. Furthermore, it seems that even if there is enough space, the Wacom tablet icon in the Hardware flexbox is still saying on a separate line.

It seems if you have two rows of icons in "Personal", it only skips the first row, so it goes to the first icon in the second row. Maybe there's some overlap?

Below is the log of a gdb session where you can see the stacktrace of where that g_sequence_get assert failure is happening:

(gdb) bt
#0 0x00007ffff60063c0 in g_sequence_get (iter=0xc0c4c0)
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gsequence.c:1186
#1 0x0000000000411e48 in switchboard_category_has_child ()
#2 0x000000000040edd4 in switchboard_category_view_filter_plugs ()
#3 0x000000000040e793 in switchboard_category_view_add_plug ()
#4 0x000000000040e10b in __lambda11_ ()
#5 0x000000000040e15c in ___lambda11__gsource_func ()
#6 0x00007ffff5febfda in g_main_context_dispatch (context=0x666cb0)
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3154
#7 0x00007ffff5febfda in g_main_context_dispatch (context=context@entry=0x666cb0)
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3769
#8 0x00007ffff5fec380 in g_main_context_iterate (context=0x666cb0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:3840
#9 0x00007ffff5fec6a2 in g_main_loop_run (loop=0xc96f40)
    at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./glib/gmain.c:4034
#10 0x00007ffff6a9f6f5 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#11 0x0000000000407640 in _switchboard_switchboard_app_command_line ()
#12 0x0000000000406a62 in switchboard_switchboard_app_real_command_line ()
#13 0x00007ffff1c42e40 in ffi_call_unix64 () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#14 0x00007ffff1c428ab in ffi_call () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#15 0x00007ffff62c3cf5 in g_cclosure_marshal_generic_va (closure=0x70b480, return_value=0x7fffffffd9d0, instance=0xa8e150, args_list=<optimized out>, marshal_data=0x4069e4 <switchboard_switchboard_app_real_command_line>, n_params=1, param_types=0x70b4f0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gclosure.c:1604
#16 0x00007ffff62c31d4 in _g_closure_invoke_va (closure=closure@entry=0x70b480, return_value=return_value@entry=0x7fffffffd9d0, instance=instance@entry=0xa8e150, args=args@entry=0x7fffffffdaa0, n_params=<optimized out>, param_types=0x70b4f0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gclosure.c:867
#17 0x00007ffff62dd4b8 in g_signal_emit_valist (instance=0xa8e150, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffdaa0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gsignal.c:3294
#18 0x00007ffff62de08f in g_signal_emit (instance=instance@entry=0xa8e150, signal_id=<optimized out>, detail=detail@entry=0) at /build/glib2.0-t9oPgV/glib2.0-2.48.0/./gobject/gsignal.c:3441
#19 0x00007ffff65b1a13 in g_application_call_command_line (application=0xa8e150 [SwitchboardSwitchboardApp], arguments=<optimized out>, options=<optimized out>, exit_status=0x7fffffffdcd4)
    at /build/glib2.0-t9oPgV/gl...

Read more...

Revision history for this message
Danielle Foré (danrabbit) wrote :

Hm so it looks like it's throwing a fit over this line:
"foreach (unowned Gtk.Widget child in flowbox.get_children ())"

Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

Can confirm that this solves the HiDPI icon issues. Glorious, crispy icons. Under fairly normal window sizes, it appears to be working as I'd expect.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches