Backport new thunderbolt panel
This commit is contained in:
parent
d7fa705c99
commit
914091ac01
47
0001-shell-Don-t-set-per-panel-icon.patch
Normal file
47
0001-shell-Don-t-set-per-panel-icon.patch
Normal 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
|
||||
|
78
0002-shell-Icon-name-helper-returns-symbolic-name.patch
Normal file
78
0002-shell-Icon-name-helper-returns-symbolic-name.patch
Normal 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
|
||||
|
6388
0003-thunderbolt-new-panel-for-device-management.patch
Normal file
6388
0003-thunderbolt-new-panel-for-device-management.patch
Normal file
File diff suppressed because it is too large
Load Diff
51
0004-thunderbolt-move-to-the-Devices-page.patch
Normal file
51
0004-thunderbolt-move-to-the-Devices-page.patch
Normal 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
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
Name: gnome-control-center
|
||||
Version: 3.28.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Utilities to configure the GNOME desktop
|
||||
|
||||
License: GPLv2+ and CC-BY-SA
|
||||
@ -17,6 +17,12 @@ Source0: https://download.gnome.org/sources/gnome-control-center/3.28/gno
|
||||
|
||||
# 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
|
||||
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: cups-devel
|
||||
@ -77,6 +83,8 @@ 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
|
||||
@ -180,5 +188,8 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center
|
||||
%dir %{_datadir}/gnome/wm-properties
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user