From 2b60b14889a47417a4b8f4c7d7e3f24c26b60bf5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 26 2018 15:01:00 +0000 Subject: import control-center-3.26.2-9.el7_5 --- diff --git a/SOURCES/wacom-pro-pen-3d.patch b/SOURCES/wacom-pro-pen-3d.patch new file mode 100644 index 0000000..608ab42 --- /dev/null +++ b/SOURCES/wacom-pro-pen-3d.patch @@ -0,0 +1,677 @@ +From e71872002edec18a28ff4f2d7e197cf2d2533eeb Mon Sep 17 00:00:00 2001 +From: Jason Gerecke +Date: Tue, 10 Oct 2017 07:57:29 -0700 +Subject: [PATCH 1/4] wacom: Set combo-topbutton to current value for styli + with > 2 buttons + +Although the Wacom panel doesn't have explicit support for styli with more +than two buttons, it tries to at least allow configuration of the upper and +lower buttons. This commit fixes an incorrect conditional which prevents +the panel from setting the combo box for the upper switch to the current +setting. + +https://bugzilla.gnome.org/show_bug.cgi?id=790028 +--- + panels/wacom/cc-wacom-stylus-page.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/panels/wacom/cc-wacom-stylus-page.c b/panels/wacom/cc-wacom-stylus-page.c +index c3829454e..ff1ea5d13 100644 +--- a/panels/wacom/cc-wacom-stylus-page.c ++++ b/panels/wacom/cc-wacom-stylus-page.c +@@ -450,7 +450,7 @@ cc_wacom_stylus_page_new (CcWacomTool *stylus) + + update_stylus_ui (page, layout); + +- if (num_buttons == 2) ++ if (num_buttons >= 2) + set_button_mapping_from_gsettings (GTK_COMBO_BOX (WID ("combo-topbutton")), + priv->stylus_settings, "secondary-button-action"); + if (num_buttons >= 1) +-- +2.17.0 + + +From 60202dcbc4feae2543e0970f53b5cd4936abf140 Mon Sep 17 00:00:00 2001 +From: Jason Gerecke +Date: Tue, 10 Oct 2017 07:44:02 -0700 +Subject: [PATCH 2/4] wacom: Make remove_buttons dynamic + +Both 'remove_buttons' and 'remove_button' perform the same general task and +can be unified into a single function. This makes supporting an arbitrary +number of stylus buttons more straightforward. + +https://bugzilla.gnome.org/show_bug.cgi?id=790028 +--- + panels/wacom/cc-wacom-stylus-page.c | 35 +++++++++++++---------------- + 1 file changed, 15 insertions(+), 20 deletions(-) + +diff --git a/panels/wacom/cc-wacom-stylus-page.c b/panels/wacom/cc-wacom-stylus-page.c +index ff1ea5d13..644d5b22a 100644 +--- a/panels/wacom/cc-wacom-stylus-page.c ++++ b/panels/wacom/cc-wacom-stylus-page.c +@@ -331,20 +331,17 @@ enum { + }; + + static void +-remove_buttons (CcWacomStylusPagePrivate *priv) ++remove_buttons (CcWacomStylusPagePrivate *priv, int n) + { +- gtk_widget_destroy (WID ("combo-topbutton")); +- gtk_widget_destroy (WID ("combo-bottombutton")); +- gtk_widget_destroy (WID ("label-top-button")); +- gtk_widget_destroy (WID ("label-lower-button")); +-} +- +-static void +-remove_button (CcWacomStylusPagePrivate *priv) +-{ +- gtk_widget_destroy (WID ("combo-topbutton")); +- gtk_widget_destroy (WID ("label-top-button")); +- gtk_label_set_text (GTK_LABEL (WID ("label-lower-button")), _("Button")); ++ if (n < 2) { ++ gtk_widget_destroy (WID ("combo-topbutton")); ++ gtk_widget_destroy (WID ("label-top-button")); ++ gtk_label_set_text (GTK_LABEL (WID ("label-lower-button")), _("Button")); ++ } ++ if (n < 1) { ++ gtk_widget_destroy (WID ("combo-bottombutton")); ++ gtk_widget_destroy (WID ("label-lower-button")); ++ } + } + + static void +@@ -362,10 +359,10 @@ update_stylus_ui (CcWacomStylusPage *page, + + switch (layout) { + case LAYOUT_NORMAL: +- /* easy! */ ++ remove_buttons (page->priv, 2); + break; + case LAYOUT_INKING: +- remove_buttons (page->priv); ++ remove_buttons (page->priv, 0); + remove_eraser (page->priv); + gtk_container_child_set (CWID ("stylus-controls-grid"), + WID ("label-tip-feel"), +@@ -375,7 +372,7 @@ update_stylus_ui (CcWacomStylusPage *page, + "top_attach", 0, NULL); + break; + case LAYOUT_AIRBRUSH: +- remove_button (page->priv); ++ remove_buttons (page->priv, 1); + gtk_container_child_set (CWID ("stylus-controls-grid"), + WID ("label-lower-button"), + "top_attach", 1, NULL); +@@ -390,6 +387,7 @@ update_stylus_ui (CcWacomStylusPage *page, + "top_attach", 2, NULL); + break; + case LAYOUT_GENERIC_2_BUTTONS_NO_ERASER: ++ remove_buttons (page->priv, 2); + remove_eraser (page->priv); + break; + case LAYOUT_OTHER: +@@ -435,10 +433,7 @@ cc_wacom_stylus_page_new (CcWacomTool *stylus) + layout = LAYOUT_GENERIC_2_BUTTONS_NO_ERASER; + else { + layout = LAYOUT_OTHER; +- if (num_buttons == 0) +- remove_buttons (priv); +- else if (num_buttons == 1) +- remove_button (priv); ++ remove_buttons (priv, num_buttons); + + /* Gray out eraser if not available */ + gtk_widget_set_sensitive (WID ("eraser-box"), has_eraser); +-- +2.17.0 + + +From 6a39001ebcc36fd91d2afc345fa9f6f3b5a7d25b Mon Sep 17 00:00:00 2001 +From: Jason Gerecke +Date: Tue, 10 Oct 2017 07:57:49 -0700 +Subject: [PATCH 3/4] wacom: Add support for three-button styli + +Wacom has introduced its new "Pro Pen 3D" stylus which includes a third +button. This commit adds support for arbitrary three-button styli. + +https://bugzilla.gnome.org/show_bug.cgi?id=790028 +--- + panels/wacom/cc-wacom-stylus-page.c | 27 +++- + panels/wacom/cc-wacom-tool.c | 15 +- + panels/wacom/wacom-stylus-3btn-no-eraser.svg | 132 ++++++++++++++++++ + panels/wacom/wacom-stylus-3btn.svg | 138 +++++++++++++++++++ + panels/wacom/wacom-stylus-page.ui | 33 ++++- + panels/wacom/wacom.gresource.xml | 2 + + 6 files changed, 341 insertions(+), 6 deletions(-) + create mode 100644 panels/wacom/wacom-stylus-3btn-no-eraser.svg + create mode 100644 panels/wacom/wacom-stylus-3btn.svg + +diff --git a/panels/wacom/cc-wacom-stylus-page.c b/panels/wacom/cc-wacom-stylus-page.c +index 644d5b22a..8adc7bca7 100644 +--- a/panels/wacom/cc-wacom-stylus-page.c ++++ b/panels/wacom/cc-wacom-stylus-page.c +@@ -160,7 +160,8 @@ button_changed_cb (GtkComboBox *combo, gpointer user_data) + GtkTreeIter iter; + GtkListStore *liststore; + gint mapping_b2, +- mapping_b3; ++ mapping_b3, ++ mapping_b4; + + if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (WID ("combo-bottombutton")), &iter)) + return; +@@ -181,8 +182,20 @@ button_changed_cb (GtkComboBox *combo, gpointer user_data) + mapping_b3 = 0; + } + ++ if (cc_wacom_tool_get_num_buttons (priv->stylus) > 2) { ++ if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (WID ("combo-thirdbutton")), &iter)) ++ return; ++ ++ gtk_tree_model_get (GTK_TREE_MODEL (liststore), &iter, ++ BUTTONNUMBER_COLUMN, &mapping_b4, ++ -1); ++ } else { ++ mapping_b4 = 0; ++ } ++ + g_settings_set_enum (priv->stylus_settings, "button-action", mapping_b2); + g_settings_set_enum (priv->stylus_settings, "secondary-button-action", mapping_b3); ++ g_settings_set_enum (priv->stylus_settings, "tertiary-button-action", mapping_b4); + } + + static void +@@ -299,6 +312,11 @@ cc_wacom_stylus_page_init (CcWacomStylusPage *self) + g_signal_connect (G_OBJECT (combo), "changed", + G_CALLBACK (button_changed_cb), self); + ++ combo = GTK_COMBO_BOX (WID ("combo-thirdbutton")); ++ combobox_text_cellrenderer (combo, BUTTONNAME_COLUMN); ++ g_signal_connect (G_OBJECT (combo), "changed", ++ G_CALLBACK (button_changed_cb), self); ++ + priv->nav = cc_wacom_nav_button_new (); + gtk_widget_set_halign (priv->nav, GTK_ALIGN_END); + gtk_widget_set_margin_start (priv->nav, 10); +@@ -333,6 +351,10 @@ enum { + static void + remove_buttons (CcWacomStylusPagePrivate *priv, int n) + { ++ if (n < 3) { ++ gtk_widget_destroy (WID ("combo-thirdbutton")); ++ gtk_widget_destroy (WID ("label-third-button")); ++ } + if (n < 2) { + gtk_widget_destroy (WID ("combo-topbutton")); + gtk_widget_destroy (WID ("label-top-button")); +@@ -445,6 +467,9 @@ cc_wacom_stylus_page_new (CcWacomTool *stylus) + + update_stylus_ui (page, layout); + ++ if (num_buttons >= 3) ++ set_button_mapping_from_gsettings (GTK_COMBO_BOX (WID ("combo-thirdbutton")), ++ priv->stylus_settings, "tertiary-button-action"); + if (num_buttons >= 2) + set_button_mapping_from_gsettings (GTK_COMBO_BOX (WID ("combo-topbutton")), + priv->stylus_settings, "secondary-button-action"); +diff --git a/panels/wacom/cc-wacom-tool.c b/panels/wacom/cc-wacom-tool.c +index 21050875d..7c74e93e5 100644 +--- a/panels/wacom/cc-wacom-tool.c ++++ b/panels/wacom/cc-wacom-tool.c +@@ -253,9 +253,18 @@ get_icon_name_from_type (const WacomStylus *wstylus) + case WSTYLUS_CLASSIC: + return "wacom-stylus-classic"; + default: +- if (!libwacom_stylus_has_eraser (wstylus)) +- return "wacom-stylus-no-eraser"; +- return "wacom-stylus"; ++ if (!libwacom_stylus_has_eraser (wstylus)) { ++ if (libwacom_stylus_get_num_buttons (wstylus) >= 3) ++ return "wacom-stylus-3btn-no-eraser"; ++ else ++ return "wacom-stylus-no-eraser"; ++ } ++ else { ++ if (libwacom_stylus_get_num_buttons (wstylus) >= 3) ++ return "wacom-stylus-3btn"; ++ else ++ return "wacom-stylus"; ++ } + } + } + +diff --git a/panels/wacom/wacom-stylus-3btn-no-eraser.svg b/panels/wacom/wacom-stylus-3btn-no-eraser.svg +new file mode 100644 +index 000000000..60642d7bb +--- /dev/null ++++ b/panels/wacom/wacom-stylus-3btn-no-eraser.svg +@@ -0,0 +1,132 @@ ++ ++ ++ ++ ++ ++ ++ ++ image/svg+xml ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/panels/wacom/wacom-stylus-3btn.svg b/panels/wacom/wacom-stylus-3btn.svg +new file mode 100644 +index 000000000..2f3db9aa4 +--- /dev/null ++++ b/panels/wacom/wacom-stylus-3btn.svg +@@ -0,0 +1,138 @@ ++ ++ ++ ++ ++ ++ ++ ++ image/svg+xml ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/panels/wacom/wacom-stylus-page.ui b/panels/wacom/wacom-stylus-page.ui +index 6e3cbfb02..b6f152d7f 100644 +--- a/panels/wacom/wacom-stylus-page.ui ++++ b/panels/wacom/wacom-stylus-page.ui +@@ -290,6 +290,35 @@ + 2 + + ++ ++ ++ True ++ False ++ end ++ center ++ Lowest Button ++ right ++ ++ ++ ++ 0 ++ 3 ++ ++ ++ ++ ++ True ++ False ++ center ++ liststore-buttons ++ ++ ++ 1 ++ 3 ++ ++ + + + True +@@ -304,7 +333,7 @@ + + + 0 +- 3 ++ 4 + + + +@@ -360,7 +389,7 @@ + + + 1 +- 3 ++ 4 + + + +diff --git a/panels/wacom/wacom.gresource.xml b/panels/wacom/wacom.gresource.xml +index 7683b4d38..a18ffb1ed 100644 +--- a/panels/wacom/wacom.gresource.xml ++++ b/panels/wacom/wacom.gresource.xml +@@ -6,6 +6,8 @@ + button-mapping.ui + wacom-tablet.svg + wacom-stylus.svg ++ wacom-stylus-3btn-no-eraser.svg ++ wacom-stylus-3btn.svg + wacom-stylus-no-eraser.svg + wacom-stylus-airbrush.svg + wacom-stylus-inking.svg +-- +2.17.0 + + +From c65f5feb695e7c6737aa60c6e96086e58aa43244 Mon Sep 17 00:00:00 2001 +From: Jason Gerecke +Date: Tue, 10 Oct 2017 07:56:17 -0700 +Subject: [PATCH 4/4] wacom: Support the WSTYLUS_3D stylus type + +Wacom's new "Pro Pen 3D" stylus is declared as a new stylus type within +libwacom: WSTYLUS_3D. Now that the Wacom panel supports arbitrary three- +button styli, we can add specific support for this new stylus type to +suppress the warning message that is generated. + +https://bugzilla.gnome.org/show_bug.cgi?id=790028 +--- + panels/wacom/cc-wacom-stylus-page.c | 7 +++++++ + panels/wacom/cc-wacom-tool.c | 6 ++++++ + 2 files changed, 13 insertions(+) + +diff --git a/panels/wacom/cc-wacom-stylus-page.c b/panels/wacom/cc-wacom-stylus-page.c +index 8adc7bca7..56aeeef3a 100644 +--- a/panels/wacom/cc-wacom-stylus-page.c ++++ b/panels/wacom/cc-wacom-stylus-page.c +@@ -345,6 +345,7 @@ enum { + LAYOUT_INKING, /* tip */ + LAYOUT_AIRBRUSH, /* eraser, 1 button, tip */ + LAYOUT_GENERIC_2_BUTTONS_NO_ERASER, /* 2 buttons, tip, no eraser */ ++ LAYOUT_3DPEN, /* 3 buttons, tip, no eraser */ + LAYOUT_OTHER + }; + +@@ -412,6 +413,10 @@ update_stylus_ui (CcWacomStylusPage *page, + remove_buttons (page->priv, 2); + remove_eraser (page->priv); + break; ++ case LAYOUT_3DPEN: ++ remove_buttons (page->priv, 3); ++ remove_eraser (page->priv); ++ break; + case LAYOUT_OTHER: + /* We already warn about it in cc_wacom_stylus_page_new () */ + break; +@@ -453,6 +458,8 @@ cc_wacom_stylus_page_new (CcWacomTool *stylus) + layout = LAYOUT_AIRBRUSH; + else if (num_buttons == 2 && !has_eraser) + layout = LAYOUT_GENERIC_2_BUTTONS_NO_ERASER; ++ else if (num_buttons == 3 && !has_eraser) ++ layout = LAYOUT_3DPEN; + else { + layout = LAYOUT_OTHER; + remove_buttons (priv, num_buttons); +diff --git a/panels/wacom/cc-wacom-tool.c b/panels/wacom/cc-wacom-tool.c +index 7c74e93e5..1330c8dc8 100644 +--- a/panels/wacom/cc-wacom-tool.c ++++ b/panels/wacom/cc-wacom-tool.c +@@ -18,8 +18,12 @@ + * + */ + ++#include "config.h" ++ + #include "cc-wacom-tool.h" + ++#define WSTYLUS_3D 8 ++ + enum { + PROP_0, + PROP_SERIAL, +@@ -252,6 +256,8 @@ get_icon_name_from_type (const WacomStylus *wstylus) + return "wacom-stylus-art-pen"; + case WSTYLUS_CLASSIC: + return "wacom-stylus-classic"; ++ case WSTYLUS_3D: ++ return "wacom-stylus-3btn-no-eraser"; + default: + if (!libwacom_stylus_has_eraser (wstylus)) { + if (libwacom_stylus_get_num_buttons (wstylus) >= 3) +-- +2.17.0 + diff --git a/SPECS/control-center.spec b/SPECS/control-center.spec index 7fca979..c2e10b5 100644 --- a/SPECS/control-center.spec +++ b/SPECS/control-center.spec @@ -11,7 +11,7 @@ Name: control-center Epoch: 1 Version: 3.26.2 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Utilities to configure the GNOME desktop License: GPLv2+ and GFDL @@ -40,6 +40,8 @@ Patch23: 0001-network-Consider-empty-IPv6-gateway-to-be-valid.patch Patch24: 0001-network-Request-periodic-Wi-Fi-scans.patch Patch25: 0002-wifi-Show-the-Wi-Fi-disabled-page-if-it-is-disabled.patch +Patch26: wacom-pro-pen-3d.patch + BuildRequires: autoconf automake libtool intltool gnome-common BuildRequires: gnome-settings-daemon-devel @@ -176,6 +178,7 @@ utilities. %patch24 -p1 %patch25 -p1 +%patch26 -p1 autoreconf -f -i @@ -263,6 +266,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Apr 17 2018 Carlos Garnacho - 3.26.2-9 +- Add support for Wacom Pro Pen 3D styli + Resolves: #1568701 + * Tue Feb 20 2018 Bastien Nocera - 3.26.2-8 + control-center-3.26.2-8 - Fix Wi-Fi networks not getting updated