import gnome-control-center-3.28.2-4.el8

This commit is contained in:
CentOS Sources 2019-08-01 17:51:53 -04:00 committed by Stepan Oksanichenko
commit 5aac29f877
10 changed files with 7348 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/gnome-control-center-3.28.2.tar.xz

View File

@ -0,0 +1 @@
68f77d7fd2921025a65d0b0904e6db018ca7c1d0 SOURCES/gnome-control-center-3.28.2.tar.xz

View File

@ -0,0 +1,383 @@
From f135d985e80c85e1578cd60eeb79bd974788031f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Wed, 14 Feb 2018 20:52:37 +0800
Subject: [PATCH] sharing: Enable settings widget for gnome-remote-desktop
Enable support for manipulating GNOME Remote Desktop settings. Settings
are done via the org.gnome.desktop.remote-desktop.vnc schema.
Configuring the VNC password is done via libsecret, thus libsecret is
added as a dependency.
---
meson.build | 1 +
panels/sharing/cc-gnome-remote-desktop.c | 171 +++++++++++++++++++++++
panels/sharing/cc-gnome-remote-desktop.h | 49 +++++++
panels/sharing/cc-sharing-panel.c | 62 +++++++-
panels/sharing/meson.build | 3 +-
5 files changed, 282 insertions(+), 4 deletions(-)
create mode 100644 panels/sharing/cc-gnome-remote-desktop.c
create mode 100644 panels/sharing/cc-gnome-remote-desktop.h
diff --git a/meson.build b/meson.build
index 84e04334c..3017b180a 100644
--- a/meson.build
+++ b/meson.build
@@ -109,6 +109,7 @@ pulse_mainloop_dep = dependency('libpulse-mainloop-glib', version: pulse_req_ver
upower_glib_dep = dependency('upower-glib', version: '>= 0.99.6')
x11_dep = dependency('x11')
xi_dep = dependency('xi', version: '>= 1.2')
+libsecret_dep = dependency('libsecret-1')
m_dep = cc.find_library('m')
diff --git a/panels/sharing/cc-gnome-remote-desktop.c b/panels/sharing/cc-gnome-remote-desktop.c
new file mode 100644
index 000000000..8420fddca
--- /dev/null
+++ b/panels/sharing/cc-gnome-remote-desktop.c
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2018 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include "config.h"
+
+#include "cc-gnome-remote-desktop.h"
+
+const SecretSchema *
+cc_grd_vnc_password_get_schema (void)
+{
+ static const SecretSchema grd_vnc_password_schema = {
+ .name = "org.gnome.RemoteDesktop.VncPassword",
+ .flags = SECRET_SCHEMA_NONE,
+ .attributes = {
+ { "password", SECRET_SCHEMA_ATTRIBUTE_STRING },
+ { "NULL", 0 },
+ },
+ };
+
+ return &grd_vnc_password_schema;
+}
+
+gboolean
+cc_grd_get_is_auth_method_prompt (GValue *value,
+ GVariant *variant,
+ gpointer user_data)
+{
+ const char * auth_method;
+
+ auth_method = g_variant_get_string (variant, NULL);
+
+ if (g_strcmp0 (auth_method, "prompt") == 0)
+ {
+ g_value_set_boolean (value, TRUE);
+ }
+ else if (g_strcmp0 (auth_method, "password") == 0)
+ {
+ g_value_set_boolean (value, FALSE);
+ }
+ else
+ {
+ g_warning ("Unhandled VNC auth method %s", auth_method);
+ g_value_set_boolean (value, FALSE);
+ }
+
+ return TRUE;
+}
+
+GVariant *
+cc_grd_set_is_auth_method_prompt (const GValue *value,
+ const GVariantType *type,
+ gpointer user_data)
+{
+ char *auth_method;
+
+ if (g_value_get_boolean (value))
+ auth_method = "prompt";
+ else
+ auth_method = "password";
+
+ return g_variant_new_string (auth_method);
+}
+
+gboolean
+cc_grd_get_is_auth_method_password (GValue *value,
+ GVariant *variant,
+ gpointer user_data)
+{
+ const char *auth_method;
+
+ auth_method = g_variant_get_string (variant, NULL);
+
+ if (g_strcmp0 (auth_method, "prompt") == 0)
+ {
+ g_value_set_boolean (value, FALSE);
+ }
+ else if (g_strcmp0 (auth_method, "password") == 0)
+ {
+ g_value_set_boolean (value, TRUE);
+ }
+ else
+ {
+ g_warning ("Unhandled VNC auth method %s", auth_method);
+ g_value_set_boolean (value, FALSE);
+ }
+
+ return TRUE;
+}
+
+GVariant *
+cc_grd_set_is_auth_method_password (const GValue *value,
+ const GVariantType *type,
+ gpointer user_data)
+{
+ char *auth_method;
+
+ if (g_value_get_boolean (value))
+ auth_method = "password";
+ else
+ auth_method = "prompt";
+
+ return g_variant_new_string (auth_method);
+}
+
+static void
+on_password_stored (GObject *source,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ GtkEntry *entry = GTK_ENTRY (user_data);
+ GError *error = NULL;
+
+ if (!secret_password_store_finish (result, &error))
+ {
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ {
+ g_warning ("Failed to store VNC password: %s", error->message);
+ g_object_set_data (G_OBJECT (entry),
+ "vnc-password-cancellable", NULL);
+ }
+ g_error_free (error);
+ }
+ else
+ {
+ g_object_set_data (G_OBJECT (entry),
+ "vnc-password-cancellable", NULL);
+ }
+}
+
+void
+cc_grd_on_vnc_password_entry_notify_text (GtkEntry *entry,
+ GParamSpec *pspec,
+ gpointer user_data)
+{
+ GCancellable *cancellable;
+ const char *password;
+
+ cancellable = g_object_get_data (G_OBJECT (entry), "vnc-password-cancellable");
+ if (cancellable)
+ g_cancellable_cancel (cancellable);
+
+ cancellable = g_cancellable_new ();
+ g_object_set_data_full (G_OBJECT (entry),
+ "vnc-password-cancellable",
+ cancellable, g_object_unref);
+
+ password = gtk_entry_get_text (entry);
+
+ secret_password_store (CC_GRD_VNC_PASSWORD_SCHEMA,
+ SECRET_COLLECTION_DEFAULT,
+ "GNOME Remote Desktop VNC password",
+ password,
+ cancellable, on_password_stored, entry,
+ NULL);
+}
diff --git a/panels/sharing/cc-gnome-remote-desktop.h b/panels/sharing/cc-gnome-remote-desktop.h
new file mode 100644
index 000000000..2a4819986
--- /dev/null
+++ b/panels/sharing/cc-gnome-remote-desktop.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2018 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#ifndef CC_GNOME_REMOTE_DESKTOP_H
+#define CC_GNOME_REMOTE_DESKTOP_H
+
+#include <gtk/gtk.h>
+#include <libsecret/secret.h>
+
+const SecretSchema * cc_grd_vnc_password_get_schema (void);
+#define CC_GRD_VNC_PASSWORD_SCHEMA cc_grd_vnc_password_get_schema ()
+
+gboolean cc_grd_get_is_auth_method_prompt (GValue *value,
+ GVariant *variant,
+ gpointer user_data);
+
+GVariant * cc_grd_set_is_auth_method_prompt (const GValue *value,
+ const GVariantType *type,
+ gpointer user_data);
+
+gboolean cc_grd_get_is_auth_method_password (GValue *value,
+ GVariant *variant,
+ gpointer user_data);
+
+GVariant * cc_grd_set_is_auth_method_password (const GValue *value,
+ const GVariantType *type,
+ gpointer user_data);
+
+void cc_grd_on_vnc_password_entry_notify_text (GtkEntry *entry,
+ GParamSpec *pspec,
+ gpointer user_data);
+
+#endif /* CC_GNOME_REMOTE_DESKTOP_H */
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 8b35c9a31..adcbcdc86 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -30,6 +30,7 @@
#include "cc-media-sharing.h"
#include "cc-sharing-networks.h"
#include "cc-sharing-switch.h"
+#include "cc-gnome-remote-desktop.h"
#include "org.gnome.SettingsDaemon.Sharing.h"
#ifdef GDK_WINDOWING_WAYLAND
@@ -66,6 +67,13 @@ _gtk_builder_get_widget (GtkBuilder *builder,
#define VINO_SCHEMA_ID "org.gnome.Vino"
#define FILE_SHARING_SCHEMA_ID "org.gnome.desktop.file-sharing"
#define GNOME_REMOTE_DESKTOP_SCHEMA_ID "org.gnome.desktop.remote-desktop"
+#define GNOME_REMOTE_DESKTOP_VNC_SCHEMA_ID "org.gnome.desktop.remote-desktop.vnc"
+
+typedef enum
+{
+ GRD_VNC_AUTH_METHOD_PROMPT,
+ GRD_VNC_AUTH_METHOD_PASSWORD
+} GrdVncAuthMethod;
struct _CcSharingPanelPrivate
{
@@ -1077,11 +1085,56 @@ static void
cc_sharing_panel_setup_screen_sharing_dialog_gnome_remote_desktop (CcSharingPanel *self)
{
CcSharingPanelPrivate *priv = self->priv;
- GtkWidget *networks, *w;
+ GSettings *vnc_settings;
+ GtkWidget *networks, *box, *w;
+
+ cc_sharing_panel_bind_switch_to_widgets (WID ("require-password-radiobutton"),
+ WID ("password-grid"),
+ NULL);
+
+ cc_sharing_panel_setup_label_with_hostname (self,
+ WID ("screen-sharing-label"));
+
+ g_object_bind_property (WID ("show-password-checkbutton"), "active",
+ WID ("remote-control-password-entry"), "visibility",
+ G_BINDING_SYNC_CREATE);
+
+ /* make sure the password entry is hidden by default */
+ g_signal_connect (priv->screen_sharing_dialog, "show",
+ G_CALLBACK (screen_sharing_show_cb), self);
+
+ g_signal_connect (priv->screen_sharing_dialog, "hide",
+ G_CALLBACK (screen_sharing_hide_cb), self);
+
+ /* accept at most 8 bytes in password entry */
+ g_signal_connect (WID ("remote-control-password-entry"), "insert-text",
+ G_CALLBACK (screen_sharing_password_insert_text_cb), self);
+
+ /* Bind settings to widgets */
+ vnc_settings = g_settings_new (GNOME_REMOTE_DESKTOP_VNC_SCHEMA_ID);
+ g_settings_bind (vnc_settings, "view-only",
+ WID ("remote-control-checkbutton"), "active",
+ G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_INVERT_BOOLEAN);
+ g_settings_bind_with_mapping (vnc_settings, "auth-method",
+ WID ("approve-connections-radiobutton"), "active",
+ G_SETTINGS_BIND_DEFAULT,
+ cc_grd_get_is_auth_method_prompt,
+ cc_grd_set_is_auth_method_prompt,
+ NULL, NULL);
+ g_settings_bind_with_mapping (vnc_settings, "auth-method",
+ WID ("require-password-radiobutton"), "active",
+ G_SETTINGS_BIND_DEFAULT,
+ cc_grd_get_is_auth_method_password,
+ cc_grd_set_is_auth_method_password,
+ NULL, NULL);
+ g_signal_connect (WID ("remote-control-password-entry"),
+ "notify::text",
+ G_CALLBACK (cc_grd_on_vnc_password_entry_notify_text),
+ self);
networks = cc_sharing_networks_new (self->priv->sharing_proxy, "gnome-remote-desktop");
- gtk_widget_hide (WID ("remote-control-box"));
- gtk_grid_attach (GTK_GRID (WID ("grid3")), networks, 0, 1, 2, 1);
+ box = WID ("remote-control-box");
+ gtk_box_pack_end (GTK_BOX (box), networks, TRUE, TRUE, 0);
gtk_widget_show (networks);
w = cc_sharing_switch_new (networks);
@@ -1116,6 +1169,9 @@ check_remote_desktop_available (CcSharingPanel *self)
if (!cc_sharing_panel_check_schema_available (self, GNOME_REMOTE_DESKTOP_SCHEMA_ID))
return;
+ if (!cc_sharing_panel_check_schema_available (self, GNOME_REMOTE_DESKTOP_VNC_SCHEMA_ID))
+ return;
+
priv->remote_desktop_name_watch = g_bus_watch_name (G_BUS_TYPE_SESSION,
"org.gnome.Mutter.RemoteDesktop",
G_BUS_NAME_WATCHER_FLAGS_NONE,
diff --git a/panels/sharing/meson.build b/panels/sharing/meson.build
index 5caac36c0..1565a089a 100644
--- a/panels/sharing/meson.build
+++ b/panels/sharing/meson.build
@@ -43,6 +43,7 @@ sources = files(
'cc-remote-login.c',
'cc-sharing-networks.c',
'cc-sharing-switch.c',
+ 'cc-gnome-remote-desktop.c',
'file-share-properties.c',
'vino-preferences.c'
)
@@ -79,7 +80,7 @@ panels_libs += static_library(
cappletname,
sources: sources,
include_directories: top_inc,
- dependencies: common_deps,
+ dependencies: [common_deps, libsecret_dep],
c_args: cflags
)
--
2.17.1

View File

@ -0,0 +1,47 @@
From ec695fae92ef7470ef05211160e431f5c3486299 Mon Sep 17 00:00:00 2001
From: Christian Kellner <christian@kellner.me>
Date: Tue, 10 Apr 2018 09:43:22 +0200
Subject: [PATCH 1/4] 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.
---
shell/cc-window.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/shell/cc-window.c b/shell/cc-window.c
index 557819e0c76c..33f1ddcad511 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -118,7 +118,6 @@ activate_panel (CcWindow *self,
GIcon *gicon)
{
GtkWidget *box, *title_widget;
- const gchar *icon_name;
if (!id)
return FALSE;
@@ -144,12 +143,8 @@ activate_panel (CcWindow *self,
gtk_stack_set_visible_child_name (GTK_STACK (self->stack), id);
/* set the title of the window */
- icon_name = get_icon_name_from_g_icon (gicon);
-
gtk_window_set_role (GTK_WINDOW (self), id);
gtk_header_bar_set_title (GTK_HEADER_BAR (self->panel_headerbar), name);
- gtk_window_set_default_icon_name (icon_name);
- gtk_window_set_icon_name (GTK_WINDOW (self), icon_name);
title_widget = cc_panel_get_title_widget (CC_PANEL (self->current_panel));
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (self->panel_headerbar), title_widget);
@@ -778,4 +773,4 @@ cc_window_set_search_item (CcWindow *center,
gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (center->search_bar), TRUE);
gtk_entry_set_text (GTK_ENTRY (center->search_entry), search);
gtk_editable_set_position (GTK_EDITABLE (center->search_entry), -1);
-}
\ No newline at end of file
+}
--
2.17.0

View File

@ -0,0 +1,72 @@
From 7a4532ff72a74ce74dee4b96b993ecd11f557acc Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Mon, 11 Feb 2019 20:48:23 +0100
Subject: [PATCH] wacom: Update "Test your settings" button sensitivity on
device availability
The button/popover are meaningless if there's no device to test with. Set
it inactive (so the popover hides if visible) and set insensitive if no
devices are found.
https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/390
---
panels/wacom/cc-wacom-panel.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/panels/wacom/cc-wacom-panel.c b/panels/wacom/cc-wacom-panel.c
index 77a1e261f..e4f3ca7fc 100644
--- a/panels/wacom/cc-wacom-panel.c
+++ b/panels/wacom/cc-wacom-panel.c
@@ -53,6 +53,7 @@ struct _CcWacomPanelPrivate
GtkWidget *stylus_notebook;
GtkWidget *test_popover;
GtkWidget *test_draw_area;
+ GtkWidget *test_button;
GHashTable *devices; /* key=GsdDevice, value=CcWacomDevice */
GHashTable *pages; /* key=device name, value=GtkWidget */
GHashTable *stylus_pages; /* key=CcWacomTool, value=GtkWidget */
@@ -309,6 +310,22 @@ add_stylus (CcWacomPanel *self,
return TRUE;
}
+static void
+update_test_button (CcWacomPanel *self)
+{
+ CcWacomPanelPrivate *priv = self->priv;;
+
+ if (!priv->test_button)
+ return;
+
+ if (g_hash_table_size (priv->devices) == 0) {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->test_button), FALSE);
+ gtk_widget_set_sensitive (priv->test_button, FALSE);
+ } else {
+ gtk_widget_set_sensitive (priv->test_button, TRUE);
+ }
+}
+
static void
update_current_tool (CcWacomPanel *panel,
GdkDevice *device,
@@ -422,6 +439,9 @@ cc_wacom_panel_constructed (GObject *object)
g_signal_connect_object (shell, "event",
G_CALLBACK (on_shell_event_cb), self, 0);
+
+ priv->test_button = button;
+ update_test_button (self);
}
static const char *
@@ -561,6 +581,8 @@ update_current_page (CcWacomPanel *self,
if (num_pages > 1)
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->tablet_notebook), 1);
}
+
+ update_test_button (self);
}
static void
--
2.20.1

View File

@ -0,0 +1,78 @@
From b24a8e9aa82b64de970d8137181bf8a03b6f724a Mon Sep 17 00:00:00 2001
From: Christian Kellner <christian@kellner.me>
Date: Tue, 10 Apr 2018 09:47:48 +0200
Subject: [PATCH 2/4] 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).
---
shell/cc-window.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/shell/cc-window.c b/shell/cc-window.c
index 33f1ddcad511..3af9cf0bd9fc 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -88,8 +88,8 @@ enum
};
/* Auxiliary methods */
-static const gchar *
-get_icon_name_from_g_icon (GIcon *gicon)
+static gchar *
+get_symbolic_icon_name_from_g_icon (GIcon *gicon)
{
const gchar * const *names;
GtkIconTheme *icon_theme;
@@ -103,8 +103,11 @@ get_icon_name_from_g_icon (GIcon *gicon)
for (i = 0; names[i] != NULL; i++)
{
- if (gtk_icon_theme_has_icon (icon_theme, names[i]))
- return names[i];
+ g_autofree gchar *name = NULL;
+ name = g_strdup_printf ("%s-symbolic", names[i]);
+
+ if (gtk_icon_theme_has_icon (icon_theme, name))
+ return g_steal_pointer (&name);
}
return NULL;
@@ -248,9 +251,8 @@ setup_model (CcWindow *shell)
g_autofree gchar *name = NULL;
g_autofree gchar *description = NULL;
g_autofree gchar *id = NULL;
- g_autofree gchar *symbolic_icon = NULL;
+ g_autofree gchar *icon_name = NULL;
g_autofree GStrv keywords = NULL;
- const gchar *icon_name;
gtk_tree_model_get (model, &iter,
COL_CATEGORY, &category,
@@ -261,8 +263,7 @@ setup_model (CcWindow *shell)
COL_KEYWORDS, &keywords,
-1);
- icon_name = get_icon_name_from_g_icon (icon);
- symbolic_icon = g_strdup_printf ("%s-symbolic", icon_name);
+ icon_name = get_symbolic_icon_name_from_g_icon (icon);
cc_panel_list_add_panel (CC_PANEL_LIST (shell->panel_list),
category,
@@ -270,7 +271,7 @@ setup_model (CcWindow *shell)
name,
description,
keywords,
- symbolic_icon);
+ icon_name);
valid = gtk_tree_model_iter_next (model, &iter);
}
--
2.17.0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
From 2d1da22e17f703e27ff1b3177e35a54aa0c3aecc Mon Sep 17 00:00:00 2001
From: Christian Kellner <christian@kellner.me>
Date: Fri, 13 Apr 2018 16:03:21 +0200
Subject: [PATCH 4/4] 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).
---
panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in | 2 +-
shell/cc-panel-list.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in b/panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in
index db2477e45a74..abd317341bfd 100644
--- a/panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in
+++ b/panels/thunderbolt/gnome-thunderbolt-panel.desktop.in.in
@@ -7,7 +7,7 @@ Terminal=false
Type=Application
NoDisplay=true
StartupNotify=true
-Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;HardwareSettings;X-GNOME-DevicesSettings;X-GNOME-ConnectivitySettings;
+Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;HardwareSettings;X-GNOME-DevicesSettings;
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-control-center
diff --git a/shell/cc-panel-list.c b/shell/cc-panel-list.c
index 99d8a91144ad..f5b83509d646 100644
--- a/shell/cc-panel-list.c
+++ b/shell/cc-panel-list.c
@@ -276,7 +276,6 @@ static const gchar * const panel_order[] = {
"wifi",
"mobile-broadband",
"bluetooth",
- "thunderbolt",
"background",
"notifications",
"search",
@@ -295,6 +294,7 @@ static const gchar * const panel_order[] = {
"mouse",
"printers",
"removable-media",
+ "thunderbolt",
"wacom",
"color",
--
2.17.0

99
SOURCES/distro-logo.patch Normal file
View File

@ -0,0 +1,99 @@
From 73be5fcb0764cb8e7bdcbcf3ee06b833078d576a Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Sun, 31 Mar 2013 20:28:19 -0400
Subject: [PATCH] info: Switch around GNOME and distro information
This makes the distribution logo prominent, and puts GNOME version
information in the small print.
https://bugzilla.gnome.org/show_bug.cgi?id=695691
---
panels/info/cc-info-overview-panel.c | 7 ++-----
panels/info/info-overview.ui | 14 ++++++++------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c
index 7a5879c6b..ce15e92d0 100644
--- a/panels/info/cc-info-overview-panel.c
+++ b/panels/info/cc-info-overview-panel.c
@@ -446,7 +446,7 @@ static char *
get_os_name (void)
{
GHashTable *os_info;
- gchar *name, *version_id, *pretty_name, *build_id;
+ gchar *name, *version_id, *build_id;
gchar *result = NULL;
g_autofree gchar *name_version = NULL;
@@ -457,12 +457,9 @@ get_os_name (void)
name = g_hash_table_lookup (os_info, "NAME");
version_id = g_hash_table_lookup (os_info, "VERSION_ID");
- pretty_name = g_hash_table_lookup (os_info, "PRETTY_NAME");
build_id = g_hash_table_lookup (os_info, "BUILD_ID");
- if (pretty_name)
- name_version = g_strdup (pretty_name);
- else if (name && version_id)
+ if (name && version_id)
name_version = g_strdup_printf ("%s %s", name, version_id);
else
name_version = g_strdup (_("Unknown"));
diff --git a/panels/info/info-overview.ui b/panels/info/info-overview.ui
index 219a83c4c..aa87fbec2 100644
--- a/panels/info/info-overview.ui
+++ b/panels/info/info-overview.ui
@@ -12,13 +12,14 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">18</property>
+ <property name="spacing">6</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkImage" id="system_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="resource">/org/gnome/control-center/info/GnomeLogoVerticalMedium.svg</property>
+ <property name="pixel_size">128</property>
+ <property name="icon_name">fedora-logo-icon</property>
</object>
<packing>
<property name="expand">False</property>
@@ -27,11 +28,12 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="version_label">
+ <object class="GtkLabel" id="os_name_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">Version 3.0</property>
<property name="selectable">True</property>
+ <property name="margin-bottom">24</property>
<attributes>
<attribute name="scale" value="1.25"/>
</attributes>
@@ -118,8 +120,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
- <property name="label" translatable="yes" comments="To translators: this field contains the distro name and version">OS name</property>
- <property name="mnemonic_widget">os_name_label</property>
+ <property name="label">GNOME</property>
+ <property name="mnemonic_widget">version_label</property>
<style>
<class name="dim-label"/>
</style>
@@ -228,7 +230,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="os_name_label">
+ <object class="GtkLabel" id="version_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
--
2.13.0

View File

@ -0,0 +1,228 @@
%define gnome_online_accounts_version 3.25.3
%define glib2_version 2.53.0
%define gnome_desktop_version 3.27.90
%define gsd_version 3.25.90
%define gsettings_desktop_schemas_version 3.27.2
%define gtk3_version 3.22.20
%define upower_version 0.99.6
%define cheese_version 3.28.0
%define gnome_bluetooth_version 3.18.2
Name: gnome-control-center
Version: 3.28.2
Release: 4%{?dist}
Summary: Utilities to configure the GNOME desktop
License: GPLv2+ and CC-BY-SA
URL: http://www.gnome.org
Source0: https://download.gnome.org/sources/gnome-control-center/3.28/gnome-control-center-%{version}.tar.xz
# https://bugzilla.gnome.org/show_bug.cgi?id=695691
Patch0: distro-logo.patch
# thunderbolt panel backported to 3.28.x
# https://gitlab.gnome.org/gicmo/gnome-control-center/commits/thunderbolt_3_28_1
Patch1: 0001-shell-Don-t-set-per-panel-icon.patch
Patch2: 0002-shell-Icon-name-helper-returns-symbolic-name.patch
Patch3: 0003-thunderbolt-new-panel-for-device-management.patch
Patch4: 0004-thunderbolt-move-to-the-Devices-page.patch
# Backport of F29 screen sharing UI
Patch5: 0001-sharing-Enable-settings-widget-for-gnome-remote-desk.patch
Patch6: 0001-wacom-Update-Test-your-settings-button-sensitivity-o.patch
BuildRequires: chrpath
BuildRequires: cups-devel
BuildRequires: desktop-file-utils
BuildRequires: docbook-style-xsl libxslt
BuildRequires: gettext
BuildRequires: libXxf86misc-devel
BuildRequires: meson
BuildRequires: pkgconfig(accountsservice)
BuildRequires: pkgconfig(cheese) >= %{cheese_version}
BuildRequires: pkgconfig(cheese-gtk)
BuildRequires: pkgconfig(clutter-gtk-1.0)
BuildRequires: pkgconfig(colord)
BuildRequires: pkgconfig(colord-gtk)
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(gdk-wayland-3.0)
BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gnome-desktop-3.0) >= %{gnome_desktop_version}
BuildRequires: pkgconfig(gnome-settings-daemon) >= %{gsd_version}
BuildRequires: pkgconfig(goa-1.0) >= %{gnome_online_accounts_version}
BuildRequires: pkgconfig(goa-backend-1.0)
BuildRequires: pkgconfig(grilo-0.3)
BuildRequires: pkgconfig(gsettings-desktop-schemas) >= %{gsettings_desktop_schemas_version}
BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version}
BuildRequires: pkgconfig(gudev-1.0)
BuildRequires: pkgconfig(ibus-1.0)
BuildRequires: pkgconfig(libcanberra-gtk3)
BuildRequires: pkgconfig(libgtop-2.0)
BuildRequires: pkgconfig(libnm)
BuildRequires: pkgconfig(libnma)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libpulse-mainloop-glib)
BuildRequires: pkgconfig(libsecret-1)
BuildRequires: pkgconfig(libsoup-2.4)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(mm-glib)
BuildRequires: pkgconfig(polkit-gobject-1)
BuildRequires: pkgconfig(pwquality)
BuildRequires: pkgconfig(smbclient)
BuildRequires: pkgconfig(upower-glib) >= %{upower_version}
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xi)
%ifnarch s390 s390x
BuildRequires: pkgconfig(gnome-bluetooth-1.0) >= %{gnome_bluetooth_version}
BuildRequires: pkgconfig(libwacom)
%endif
# Versioned library deps
Requires: cheese-libs%{?_isa} >= %{cheese_version}
Requires: glib2%{?_isa} >= %{glib2_version}
Requires: gnome-desktop3%{?_isa} >= %{gnome_desktop_version}
Requires: gnome-online-accounts%{?_isa} >= %{gnome_online_accounts_version}
Requires: gnome-settings-daemon%{?_isa} >= %{gsd_version}
Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas_version}
Requires: gtk3%{?_isa} >= %{gtk3_version}
Requires: upower%{?_isa} >= %{upower_version}
%ifnarch s390 s390x
Requires: gnome-bluetooth%{?_isa} >= 1:%{gnome_bluetooth_version}
%endif
Requires: %{name}-filesystem = %{version}-%{release}
# For user accounts
Requires: accountsservice
Requires: alsa-lib
# For the thunderbolt panel
Requires: bolt
# For the color panel
Requires: colord
# For the printers panel
Requires: cups-pk-helper
Requires: dbus-x11
# For the info/details panel
Requires: glx-utils
# For the user languages
Requires: iso-codes
# For the network panel
Requires: nm-connection-editor
Recommends: NetworkManager-wifi
%if 0%{?fedora}
# For the sharing panel
Requires: rygel
%endif
# For the info/details panel
Requires: switcheroo-control
# For the keyboard panel
Requires: /usr/bin/gkbd-keyboard-display
Recommends: vino
Recommends: system-config-printer-libs
# Renamed in F28
Provides: control-center = 1:%{version}-%{release}
Provides: control-center%{?_isa} = 1:%{version}-%{release}
Obsoletes: control-center < 1:%{version}-%{release}
%description
This package contains configuration utilities for the GNOME desktop, which
allow to configure accessibility options, desktop fonts, keyboard and mouse
properties, sound setup, desktop theme and background, user interface
properties, screen resolution, and other settings.
%package filesystem
Summary: GNOME Control Center directories
# NOTE: this is an "inverse dep" subpackage. It gets pulled in
# NOTE: by the main package and MUST not depend on the main package
BuildArch: noarch
# Renamed in F28
Provides: control-center-filesystem = 1:%{version}-%{release}
Obsoletes: control-center-filesystem < 1:%{version}-%{release}
%description filesystem
The GNOME control-center provides a number of extension points
for applications. This package contains directories where applications
can install configuration files that are picked up by the control-center
utilities.
%prep
%autosetup -p1
%build
%meson -Ddocumentation=true
%meson_build
%install
%meson_install
# We do want this
mkdir -p $RPM_BUILD_ROOT%{_datadir}/gnome/wm-properties
# We don't want these
rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/autostart
rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/cursor-fonts
# Remove rpath
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center
%find_lang %{name} --all-name --with-gnome
%files -f %{name}.lang
%license COPYING
%doc AUTHORS NEWS README
%{_bindir}/gnome-control-center
%{_datadir}/applications/*.desktop
%{_datadir}/bash-completion/completions/gnome-control-center
%{_datadir}/dbus-1/services/org.gnome.ControlCenter.SearchProvider.service
%{_datadir}/dbus-1/services/org.gnome.ControlCenter.service
%{_datadir}/gettext/
%{_datadir}/glib-2.0/schemas/org.gnome.ControlCenter.gschema.xml
%{_datadir}/gnome-control-center/icons/
%{_datadir}/gnome-control-center/keybindings/*.xml
%{_datadir}/gnome-control-center/pixmaps
%{_datadir}/gnome-control-center/sounds/gnome-sounds-default.xml
%{_datadir}/gnome-shell/search-providers/gnome-control-center-search-provider.ini
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/man/man1/gnome-control-center.1*
%{_datadir}/metainfo/gnome-control-center.appdata.xml
%{_datadir}/pixmaps/faces
%{_datadir}/pkgconfig/gnome-keybindings.pc
%{_datadir}/polkit-1/actions/org.gnome.controlcenter.*.policy
%{_datadir}/polkit-1/rules.d/gnome-control-center.rules
%{_datadir}/sounds/gnome/default/*/*.ogg
%{_libexecdir}/cc-remote-login-helper
%{_libexecdir}/gnome-control-center-search-provider
%files filesystem
%dir %{_datadir}/gnome-control-center
%dir %{_datadir}/gnome-control-center/keybindings
%dir %{_datadir}/gnome-control-center/sounds
%dir %{_datadir}/gnome/wm-properties
%changelog
* Mon Feb 11 2019 Carlos Garnacho <cgarnach@redhat.com> - 3.28.2-4
- Update "Test your settings" wacom button sensitivity on device availability
- Resolves: #1656995
* Thu Dec 13 2018 Marek Kasik <mkasik@redhat.com> - 3.28.2-3
- Recommend system-config-printer-libs as a dependency
- Resolves: #1637370
* Tue Aug 14 2018 Jonas Ådahl <jadahl@redhat.com> - 3.28.2-1
- Backport screen sharing UI (rhbz#1615810)
* Tue May 29 2018 Kalev Lember <klember@redhat.com> - 3.28.2-1
- Update to 3.28.2
* Wed May 23 2018 Pete Walter <pwalter@fedoraproject.org> - 3.28.1-4
- Change NetworkManager-wifi requires to recommends (#1478661)
* Tue May 22 2018 Ray Strode <rstrode@redhat.com> - 3.28.1-3
- Change vino requires to a vino recommends
* Fri Apr 13 2018 Kalev Lember <klember@redhat.com> - 3.28.1-2
- Backport new thunderbolt panel
* Tue Apr 10 2018 Pete Walter <pwalter@fedoraproject.org> - 3.28.1-1
- Rename control-center to gnome-control-center