When application menus are not supported by the desktop environment
or are disabled, Gtk+ makes the menu available with a fallback. For
client-side decorations the fallback consists of adding a menu
button at the begining of the titlebar. Since g-c-c has a split
headerbar, we need to explicitly handle the decoration layout.
This commit forces the "menu" to belong to the left headerbar, and
leaves the other buttons to ble placed at the right headerbar.
The "show-close-button" property has to be set in order to present
any type of decoration buttons in the header bar.
https://bugzilla.gnome.org/show_bug.cgi?id=786692
Currently, while navigating using keyboard, the "Devices" and
"Details" rows of the GtkListBox in the sidebar don't seem to be
selected visually. Fix that by setting "selectable" property of those
two widgets as TRUE.
https://bugzilla.gnome.org/show_bug.cgi?id=786849
The devices and details rows should have distinct icons which
provide meaning. applications-system-symbolic is generic and
therefore unhelpful in both cases.
Instead use tailored icons from the icon theme, in order to
ensure that icon theme changes don't result in inappropriate
images being used.
https://bugzilla.gnome.org/show_bug.cgi?id=786605
Set icon class to sidebar-icon, and label class to
sidebar-label. This makes it more consistent with
places sidebar in Nautilus and GtkFileChooser.
https://bugzilla.gnome.org/show_bug.cgi?id=786612
Instead of using a callback on size-allocate, and setting
a custom size request. Using a sizegroup is much cleaner
and avoid some potential issues we could have in the future.
When passing --overview, Settings' new shell window accidentally
removes the newly selected panel.
We're considering the possibility of adding an overview page but,
since that won't happen for the next release, let's just make sure
something happens for now.
Fix that by simply changing the panel list view, which selects the
Wi-Fi panel if the user was in another view.
https://bugzilla.gnome.org/show_bug.cgi?id=786117
With the new settings shell, a larger window makes it easier to
navigate the different panels and shows more content from each
panel, reducing the need to scroll.
https://bugzilla.gnome.org/show_bug.cgi?id=786328
We often use rows representing different things in the same list
box. In these cases it's often desirable to have rows emitting their
own activation signals instead of having a single handler for the
whole list box that dispatches according to the activated row.
https://bugzilla.gnome.org/show_bug.cgi?id=785949
Some panels shall be shown only in current design, And some other panels
shall be shown only in new Shell design. So let's have a code that
would help us do that
https://bugzilla.gnome.org/show_bug.cgi?id=779216
The displayed panel should always match the selection in the panel
list. That implies that after swapping out the list (for instance
by browsing Devices or Details), we need to update the panel rather
than keeping the old one around until the user manually selects a
row. The easiest way to achieve that is to activate the panel list
after a view change when appropriate.
https://bugzilla.gnome.org/show_bug.cgi?id=783429
The glory moment has come. The new Wi-Fi panel is finally
introduced using a different code style from the rest of
the Network panel, since Control Center itself is written
using the GTK+ C code style.
The Wi-Fi panel uses modern GTK+ features like template
classes and new widgets. The files are stored together
with the Network panel so that we can reuse the abstraction
layer that the Network panel has to manage devices.
https://bugzilla.gnome.org/show_bug.cgi?id=784818
g_utf8_find_next_char() doesn't do checks whether the char
is '\0' or not. We have to take care of that ourself.
This commit fixes heap-buffer-overflow found by test-hostname
ERROR: AddressSanitizer: heap-buffer-overflow on address
READ of size 1 at 0x60200000cd76 thread T0
#0 0x7f8b26920d08 in g_utf8_find_next_char glib/glib/gutf8.c:179
#1 0x55c2b8eacaee in pretty_hostname_to_ssid gnome-control-center/shell/hostname-helper.c:199
https://bugzilla.gnome.org/show_bug.cgi?id=782216
The empty string is not too useful as an SSID, an attempt to create a
hotspot fails:
(gnome-control-center:19371): network-cc-panel-WARNING **:
Failed to add new connection: (2)
A 'wireless' setting with a valid SSID is required if no AP path was given.
So the panel implementations will be able to set a custom widget
in the shell headerbar. It defaults to NULL, so by default panels
set the plain label with the panel title.
CcPanel uses the old boilerplate code from GLib,
which does not set an autocleanup function.
The lack of a cleanup function implies that panels
cannot use G_DECLARE_{FINAL,DERIVABLE}_TYPE, making
the code stick to the old boilerplate.
This patch adds a cleanup function to CcPanel. It doesn't
move CcPanel to G_DECLARE_DERIVABLE_TYPE() because it'd
break the CcPanel's subclasses.
https://bugzilla.gnome.org/show_bug.cgi?id=769063
When the active panel is not changed through sidebar navigation,
e.g. by calling the Control Center through command line and asking
to open a specific panel, the panel is correctly opened but the
sidebar is not updated to reflect that.
Fix that by selecting the externally set panel row, and eventually
moving to the correct list.
https://bugzilla.gnome.org/show_bug.cgi?id=769063
After introducing the new sidelist class, the
next logical step is to make CcWindow use it.
This patch, then, adapts CcWindow to use CcPanelList
instead of a plain GtkListBox.
https://bugzilla.gnome.org/show_bug.cgi?id=767301
As the sidelist gets more complex, managing it in CcWindow
would make it very confusing.
This patch introduces the CcPanelList, a widget that manages
the sidelist.
https://bugzilla.gnome.org/show_bug.cgi?id=767301
Following the previous set of patches for implementing
the next generation Shell, a new set of categories must
be added.
These new categories will reflect on the ordering of the
panels and subpages in the sidelist.
This patch adds these new categories and conditionally
compiles them, to not break the current icon-based Shell.
https://bugzilla.gnome.org/show_bug.cgi?id=767301
We previously had a dedicate view for handling search,
based on model filtering and a custom panel to display
that differently.
After moving to GtkListBox, search can be trivially
done by using a filtering function, and widgets can
be fine-tuned to display extra information.
This patch, then, reimplements the search using a filtering
function over the panels' list.
https://bugzilla.gnome.org/show_bug.cgi?id=766922
The latest mockups use a list instead of icon grid. This
commit, after all the work porting the current UI to use
a side list, replacing the temporary icon grid.
https://bugzilla.gnome.org/show_bug.cgi?id=766922
Since the window can shrink down too much, it makes
sense for us to have a sane default width and height.
720x480 was chosen because that's the default resolution
for CRT TVs.
https://bugzilla.gnome.org/show_bug.cgi?id=766922
The first headerbar and the sidelist should stay synchronized,
and this commit does so by setting the width request of the
headerbar to the allocated width of the sidelist.
https://bugzilla.gnome.org/show_bug.cgi?id=766922
This commit introduces the second headerbar, where the
panel title and the panel widgets are displayed. It also
adapts the code to use the second headerbar when needed.
https://bugzilla.gnome.org/show_bug.cgi?id=766922
Since the search bar has been moved to above the sidelist, it
makes sense to have the search button on the start of the
headerbar, strengthening the relation between both widgets.
https://bugzilla.gnome.org/show_bug.cgi?id=766922
In order to prepare ourselves for the future changes,
having the window as a template class is hugely advantageous
for we'll be able to modify the interface much more
quickly and cleanly.
This commit makes the window a template class, and only
that. No behavioral changes, nor new features were
introduced here.
https://bugzilla.gnome.org/show_bug.cgi?id=766922
Because the old layout was never meant to scale well on low
resolution displays, we had to introduce code that adapts the
window to be usable on low res screens.
The problem with this code is that it still doesn't scale down
very well for really low resolution screens. Partially because
of the layout itself (which, again, was never meant to), partially
because the panels request a size bigger than e.g. 720x480. Now,
this is an important feature and we need to support that low
resolution by default.
To push this constraint forward, remove the code that managed a
custom mode for low resolution screens. From now on, the Control
Center shall be adapted to scale well on any screen sizes.
https://bugzilla.gnome.org/show_bug.cgi?id=766922
Having a fixed width is bad for various reasons. First, it's
harder to deal with low resolution screens, which was fixed
by adding an entire new mode just to deal with it. Second,
because it may not scale well for big resolutions.
Fix that by removing the code that handles the fixed width.
The next commit will completely remove the code that manages
small screens, in the hope that the new layout will handle
both cases well by design.
https://bugzilla.gnome.org/show_bug.cgi?id=766922
To progressively achieve the sidelist, let's start by moving
the current iconview selector to the side and then turning
it into a GtkListBox.
This commit, then, moves the iconviews' list to the start of
the horizontal box added in the previous commit.
https://bugzilla.gnome.org/show_bug.cgi?id=766922