Commit graph

628 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
083e7bdae6 object-storage: Introduce CcObjectStorage
CcObjectStorage is a cache for GObjects. It is meant to
store objects that are too expensive to be often created,
such as NMClient, GoaClient or D-Bus proxies.

CcObjectStorage has a very strict usage pattern. It is a
programming error to add an object that is already stored,
and so it is to retrieve an object that was not stored.
Stored objects are meant to be kept alive during the whole
lifetime of GNOME Settings, and CcObjectStorage takes a
reference on every stored object to achieve that.

If objects are destroyed while they are cached, it means
we have a reference mismanagement somewhere. In this sense,
CcObjectStorage will act Sam Sheepdog taking care of sneaky
wolves trying to steal their sheep-references.

Next patches will make various panels and objects around
GNOME Settings adopt this new API, and make sure they always
disconnect when destroyed.
2018-04-06 22:23:38 -03:00
Georges Basile Stavracas Neto
1367a8c083 window: Profile panel creation times 2018-04-06 22:23:38 -03:00
Jeremy Bicha
5ac87d3f18 appdata: Add UserDocs & HighContrast kudos
https://github.com/GNOME/gnome-software/blob/master/doc/kudos.md

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/14
2018-03-24 20:17:16 +00:00
Georges Basile Stavracas Neto
a1bace4683 build: Drop libgd
Settings does not use libgd.
2018-03-16 15:55:10 -03:00
Georges Basile Stavracas Neto
e59fdcdf1c window: Replace deprecated function
gdk_keymap_get_default() is deprecated in favor of
gdk_keymap_get_for_display(), so let's just use that.
2018-03-06 22:55:01 -03:00
Georges Basile Stavracas Neto
63ceb2305a fixup! application: Initialize action using a GActionEntry table 2018-03-06 22:48:06 -03:00
Georges Basile Stavracas Neto
c5f97d8a56 panel-loader: Update code style
Use g_auto and remove an unecessary line break.
2018-03-06 22:38:56 -03:00
Georges Basile Stavracas Neto
b5f7875be4 application: Initialize action using a GActionEntry table
Instead of manually instanciating each action.
2018-03-06 22:35:06 -03:00
Georges Basile Stavracas Neto
de5d1a2417 application: Use modern g_autoptr practices
This saves us some lines of code, and modernizes the
codebase a little bit.
2018-03-06 22:27:14 -03:00
Piotr Drąg
7265bd53a0 Add translator comments to .desktop files
Icons are confusing translators, and gettext
is unlikely to get fixed any time soon.
2018-02-23 18:49:35 +01:00
Piotr Drąg
65e5fa7eef shell: Add gettext-domain to the gschema 2018-02-06 16:56:28 +01:00
Bastien Nocera
10738d68c6 shell: Remember the last used panel
And restore it if the application is launched without any panels
requested.

https://bugzilla.gnome.org/show_bug.cgi?id=786607
2018-02-06 10:40:02 +01:00
Georges Basile Stavracas Neto
0a4ce2aa22 shell: Swap Display and Printers positions
So that whenever the user opens the "Devices" section,
the Display panel is the first panel to dislpay. This
is because the user most likely always have a display,
while they might not always have a printer available.

https://bugzilla.gnome.org/show_bug.cgi?id=786606
2018-01-30 11:12:41 -02:00
Iñigo Martínez
3afdaa3b2f build: Make network mandatory on every linux
In a recent commit[0], bluetooth, network and wacom panels were made
mandatory on every linux except on S390 systems. However, the
network panel should also be mandatory on S390 systems running
linux.

This changes the conditions to build bluetooh, network and wacom
panels.

https://bugzilla.gnome.org/show_bug.cgi?id=792641

[0] https://git.gnome.org/browse/gnome-control-center/commit/?id=a2b20a65c
2018-01-23 12:42:38 -02:00
Iñigo Martínez
0dd386f405 build: Migrate from Intltool to Gettext
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-23 10:49:31 +01:00
Iñigo Martínez
a2b20a65cb build: Make bluetooth, network and wacom mandatory on linux
The bluetooh, network and wacom panels should not be optional
on linux, except on s390 systems which lack USB support. It
should also not be built at all on other systems.

This patch makes these panels mandatory on linux.

https://bugzilla.gnome.org/show_bug.cgi?id=792641
2018-01-22 23:06:45 -02:00
Michael Biebl
385cd85708 completion: Drop shebang
No other bash completion file has a shebang (as said, those
are meant to be sourced) and Debian's automated test tool
lintian keeps flagging Control Center's completion, so it
seemed reasonable to fix that for good upstream.

Those completion files are meant to be sourced, not executed directly.

https://bugzilla.gnome.org/show_bug.cgi?id=756582
2018-01-21 11:35:49 -02:00
Georges Basile Stavracas Neto
2b89f90f73 project: Remove obsolete TODO 2018-01-21 10:50:48 -02:00
Georges Basile Stavracas Neto
efe3095eaf hostname-entry: Modernize code
Turn it into a final class, remove the private field and
update the code.
2018-01-21 10:48:56 -02:00
Georges Basile Stavracas Neto
4a34b693de main: Use g_autoptr to simplify code
With g_autoptr, we don't need to manually unref the
GtkApplication before returning its status. This
saves a few lines of code.
2018-01-21 10:37:29 -02:00
Georges Basile Stavracas Neto
eda492aab4 application: Remove empty override
The :dispose handler was just chaining up, so remove it.
2018-01-21 10:36:59 -02:00
Georges Basile Stavracas Neto
ed75703936 application: Modernize codebase
This commit ports CcApplication to use the modern
code practices and utilities, removing the boilerplate
macros. Namely, this commit introduces:

 * G_DECLARE_FINAL_TYPE
 * Remove unnecessary private field
 * Unifies parameter layout
2018-01-21 10:31:07 -02:00
Georges Basile Stavracas Neto
682bec8dd1 application: Use gtk_show_uri_on_window
Instead of the deprecated gtk_show_uri.
2018-01-21 10:24:53 -02:00
Georges Basile Stavracas Neto
3632bc7dad window: Remove unnecessary wrapper functions
These were only used by CcApplication, and at this level
of the program we don't need to use any wrapper functions,
since we're certain that the CcWindow is a GtkWindow subclass.
2018-01-21 10:24:53 -02:00
Georges Basile Stavracas Neto
4f40a2fa33 window: Move remaining UI declarations to GtkBuilder file
There were leftover UI declarations in the source code, breaking
the nice split that it having the UI declared in the GtkBuilder
file while the logic is programmed.

This commit moves the remaining widgets declared in the source
code, the connected signals using and the binded properties to
the GtkBuilder file. This led to a nice cleanup in the source
code.
2018-01-21 10:24:53 -02:00
Georges Basile Stavracas Neto
a5d3af3a25 window: Reorganize functions
In an attempt to make the CcWindow code more organized and
structured, this commit reorganizes the source code to match
a recent pattern:

 * Structure declarations, G_DEFINE_TYPE
 * Function prototypes
 * Auxiliary methods
 * Callbacks
 * Vfunc overrides
 * class_init() + init()
 * Public API
2018-01-21 09:46:12 -02:00
Georges Basile Stavracas Neto
8e76f88b7b trivial: Fix style issues
Fixes a few code style inconsistencies found.
2018-01-21 09:22:08 -02:00
Iñigo Martínez
dc0988d47c build: Remove autotools
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-18 12:20:08 +01:00
Jeremy Bicha
d4c4070ce2 shell: Disable emoji chooser in main search box
https://bugzilla.gnome.org/show_bug.cgi?id=789322
2018-01-17 23:44:51 -02:00
Georges Basile Stavracas Neto
693df19026 shell: Initialize variable
In practice, this is never uninitialized, but the
compiler is complaining anyway, so let's play the
conservative and make sure it's always initialized
to NULL.
2018-01-17 23:14:09 -02:00
Georges Basile Stavracas Neto
dc5e2fd555 application: Initialize clutter-gtk either with Cheese or Wacom
Both require clutter-gtk, but only Wacom was being checked. This would
make compiling with Cheese disabled fail.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:38 -02:00
Iñigo Martínez
32edd6789e build: Port to meson build system
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:35 -02:00
Iñigo Martínez
d7012d0337 build: Move libgd and gvc modules to subprojects
In order to share the libgd and gvc modules between autotools and
meson, this patch moves their directories to subprojects
directory and updates autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 19:02:57 -02:00
Georges Basile Stavracas Neto
c13de500b7 shell-model: Remove hidden category
No more panels are hidden now.

https://bugzilla.gnome.org/show_bug.cgi?id=790923
2017-11-28 17:03:51 -02:00
Georges Basile Stavracas Neto
6123d97e3f project: Remove CcInfoPanel
This panel was hidden in the new shell, and now that
we don't have the old one, can be safely dropped.

Minor adjustments were made to the other panels to
properly remove this panel.

https://bugzilla.gnome.org/show_bug.cgi?id=790923
2017-11-28 17:03:51 -02:00
Georges Basile Stavracas Neto
b23ef59926 shell-model: Remove old categories
Since we don't maintain two different shells anymore, there
is no need to maintain the two different sets of categories
in the desktop files.

This commit also drops the "#ifdef CC_ENABLE_ALT_CATEGORIES"
blocks, since the previous commit removed that define.

https://bugzilla.gnome.org/show_bug.cgi?id=790923
2017-11-28 17:03:51 -02:00
Georges Basile Stavracas Neto
34f1acd078 project: Drop the old shell
This is not used anymore, and is only consuming compile
time now.

https://bugzilla.gnome.org/show_bug.cgi?id=790923
2017-11-28 17:03:51 -02:00
Felipe Borges
aaabf05ae6 shell: Include panel "keywords" in the row data
This way GtkListBox filter functions can use the "keywords" in
order to provide accurate search results.

https://bugzilla.gnome.org/show_bug.cgi?id=790755
2017-11-28 11:04:38 +01:00
Jakub Steiner
5d32d8548c icons: ship app icon
- to move to the great new Flatpak future, Apps should rely on shiping
  their own app icons, their identity. For more context, see

  https://wiki.gnome.org/action/edit/Design/Whiteboards/CoreAppPresentation

https://bugzilla.gnome.org/show_bug.cgi?id=790070
2017-11-23 15:58:39 +01:00
Felipe Borges
09b6a532c0 window: Add accessible-name for the Search button
The search toggle button in the upper-left corner of the Window
lacks an accessible name. Thus when it gains focus, screen readers
cannot present what this widget does; only that it is a toggle button.

https://bugzilla.gnome.org/show_bug.cgi?id=790625
2017-11-21 16:25:08 +01:00
Didier Roche
3e04b1c53b Only load panel corresponding to OnlyShowIn/NotShowIn
Most panel desktop files have an OnlyShowIn entry to display them
in the previous iconish G-C-C UI. Some distributions (like ubuntu) prefers
adding new panel rather than patching the existing ones to ensure that
the upstream Control Center look it preserved under a vanilla GNOME session.
This patch fix thus the new layout setting to respect the OnlyShowIn property.

https://bugzilla.gnome.org/show_bug.cgi?id=787347
2017-09-12 15:31:22 +02:00
Felipe Borges
cfbe34f94c window: Disable the menubar
It looks better to present the fallback app menu in the headerbar
instead.

This change assumes that client side decorations will be available,
and therefore a GtkHeaderBar.

https://bugzilla.gnome.org/show_bug.cgi?id=786692
2017-09-12 11:10:33 +02:00
Felipe Borges
357e944336 window: Split the window decorations between the header bars
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
2017-09-12 11:10:33 +02:00
Jonathan Kang
82a7277499 shell: make Devices and Details rows selectable
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
2017-08-29 18:55:42 +02:00
Allan Day
baa69f3ab1 panel-list: use tailored icons for devices and details sections
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
2017-08-23 18:32:28 +02:00
Exalm
ded1b10eb1 panel-list: Further tweak sidebar classes
Removes sidebar-label class, adds sidebar-icon class to
Devices and Details arrows

https://bugzilla.gnome.org/show_bug.cgi?id=786612
2017-08-23 15:14:44 +02:00
Exalm
b8d1e8a814 panel-list: Update icon and label classes
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
2017-08-23 14:30:29 +02:00
Georges Basile Stavracas Neto
10c9722283 window: Synchronize sidebar and header with a size group
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.
2017-08-16 16:47:14 -03:00
Georges Basile Stavracas Neto
b8fbf5032e window: Don't accidentally destroy panels when showing overview
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
2017-08-16 16:35:07 -03:00
Allan Day
47a39f5c36 shell: increase initial window size
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
2017-08-16 15:38:35 -03:00