Commit graph

519 commits

Author SHA1 Message Date
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
Georges Basile Stavracas Neto
5c4f2ff8a6 shell: Hardcode panel list order
Per the latest mockups [1], the panel list must be sorted
by the category, and then follow a manual predefined order.

This commit adds the hardcoded order to the the panel list.

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/shell/settings-organization.png
2017-08-12 11:03:17 -03:00
Georges Basile Stavracas Neto
d5c4436869 project: Switch to the new shell
This is the bomb dropping commit. It does so simply by
changing the compiled files, and adjusting the build
projects proper.
2017-08-09 19:31:41 +02:00
Rui Matos
ddd2d5ce8b shell: Add GtkListBox/Row derived types that do single row activations
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
2017-08-09 19:27:08 +02:00
Georges Basile Stavracas Neto
b4194048de panel-loader: Cosmetic changes
This commit only fixes some very minor cosmetic changes
like int → gint, simplifies the code by using g_autofoo,
et cetera.

https://bugzilla.gnome.org/show_bug.cgi?id=779216
2017-07-24 23:33:41 -03:00
Mohammed Sadiq
6cf52ada03 info: Add desktop files for the split panels
This commit shall show the panels separate.

Some panels are hidden in current design, while some other panels
are hidden in new shell design.

https://bugzilla.gnome.org/show_bug.cgi?id=779216
2017-07-24 22:55:27 -03:00
Mohammed Sadiq
1485b50a7a shell-model: Add hidden settings
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
2017-07-24 22:54:58 -03:00
Florian Müllner
8b09079f34 shell/alt: Always activate panel list after view change
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
2017-07-24 22:23:23 -03:00
Georges Basile Stavracas Neto
016efdfac8 wifi: Introduce Wi-Fi panel
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
2017-07-18 13:30:46 -03:00
Mohammed Sadiq
f8db8b67e3 shell/alt: Fix memory leak
'id' component was forgotten to be freed before the
struct itself is freed.

https://bugzilla.gnome.org/show_bug.cgi?id=782200
2017-05-27 12:03:58 -03:00