Instead of directly selecting the view that the panel
list will have, let it decide which is the previous
view instead.
This does not change anything functionality wise, but
in the future where we have sidebar widget (and thus
the main window does not control which view the sidebar
is display) this will be important.
This vfunc is the entry point for panels that have
a sidebar widget. It must never return NULL.
At this point, nothing uses it and this vfunc does
not impact execution of the program.
These overrides were added eight years ago, as a port from
GTK3's size_request() deprecation, in commit f5f5aac5c0.
These overrides are not necessary these days, since they
just reproduce the default behavior now.
Remove these overrides then.
It will be used by the next commits to look for the panel
name. That is because the panel name is what will be used
as the first headerbar title of panels with a sidebar widget.
The pending-charge state means AC power is on but the battery is not
being charged. This can happen because its charge is above a certain
threshold, to avoid short charging cycles and prolong the battery's
life, or because the PSU is not powerful enough to charge the batteries.
Instead of lying to the user about something being estimated, we should
simply tell the truth and set the label to "Not Charging".
Closes: #249.
The use of g_clear_pointer (&str, g_free) with str being a const gchar *
caused warning errors.
Instead of using str for both constant and allocated strings use separate
variables. Autofree the allocated strings.
This is solely used for filtering by unittest, however, if it is
missing, then unittest will fail. So generate a reasonable name (which
is unfortunately not identical to the real name of the attribute).
The purpose of this interactive test is to be able to
prototype new features for CcPanel without having to
adapt existing panels.
Three test panels were added as part of this initial
patch:
* Dynamic panels: panel exercising the ability to
show and hide itself at runtime.
* Header: panel that embeds a header widget.
* Static Initializer: panel that sets a static init
function to run at startup.
This commit does a few different bit interwined things to the
build steps:
* Make libtestshell and gnome-control-center share more of the
variables and resouces;
* Use 'dependencies' instead of 'link_with' for libshell;
* Add some visual marks as comments;