Commit graph

538 commits

Author SHA1 Message Date
Benjamin Berg
f547d9129d shell: Only try to select an existing panel on startup
When selecting the panel on startup based on the "last-panel" settings,
we need to make sure that the panel exists.

Note that this is a special case which does not use the internal
set_active_panel_from_id API. Using it is currently not possible because
the API does not report back the error and we would end up not selecting
any panel.
2018-04-30 14:02:25 +00:00
Benjamin Berg
c2f601a9d4 Move common panel code from shell/ to panel/common
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Benjamin Berg
e1593b3c02 shell: Remove CcEditableEntry, it is not used anywhere 2018-04-17 14:59:31 +02:00
Christian Kellner
25a302ae98 thunderbolt: move to the 'Devices' page
The 'Devices' page is a fitting place for the thunderbolt, being
an IO technology. It is expected that people that need to go to
that page will be sent there via a gnome-shell notification, so
there is no need for it to be on the main page.
Ok'ed by the design team (jimmac).
2018-04-13 16:03:21 +02:00
Christian Kellner
47f241b10c thunderbolt: new panel for device management
Thunderbolt devices need to be approved before they can be used.
This is done via the boltd system daemon and gnome-shell. The new
panel enables the user to manage thunderbolt devices, i.e.:

 - forget devices that have previously been authorized
 - authorize currently unauthorize devices

Additionally authorization of devices an be temporarily disabled
to ensure no evil device will gain access to the computers
resources.

File starting with "bolt-" are copied from bolt's source tree
and currently correspond to the bolt upstream commit with the id
f22b1cd6104bdc2b33a95d9896b50f29a141b8d8
They can be updated from bolt via the update-from-bolt.sh script.
2018-04-13 15:08:16 +02:00
Christian Kellner
2889ab03b2 shell: Icon name helper returns symbolic name
The helper function to get the icon name from a GIcon directly
returns the symbolic icon now. This makes it in turn possible
to also directly check if the theme has the icon with the symbolic
name instead of checking of for the full colored one and then
deriving the symbolic name from that. The latter (old) practice
will fail if there is a symbolic icon in the theme that has no
full color icon (like e.g. thunderbolt).
2018-04-10 09:47:48 +02:00
Christian Kellner
51a1229111 shell: Don't set per-panel icon
The control center app is considered one single application with
a single icon to represent it. Therefore get rid of per-panel
icons.
2018-04-10 09:43:22 +02:00
Georges Basile Stavracas Neto
02b0d5931c debug: Fix copy-pasta mistake
Now people now where did I copied it from!
2018-04-07 18:49:39 -03:00
Georges Basile Stavracas Neto
1187f147af log: Reimplement logging and debugging
This commit replaces the old rudimentary log handler
by a shinier version of it. It also introduces the
debugging macros that I usually add to the apps,
including the CC_TRACE_MSG() macro for tracing.
2018-04-06 23:18:26 -03:00
Georges Basile Stavracas Neto
85296f1eba trivial: Code style improvements 2018-04-06 22:23:39 -03:00
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