Accepting request 231711 from GNOME:Factory

Push GNOME:Factory - GNOME 3.12.1

OBS-URL: https://build.opensuse.org/request/show/231711
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-control-center?expand=0&rev=114
This commit is contained in:
Stephan Kulow 2014-05-05 19:15:05 +00:00 committed by Git OBS Bridge
commit d7be15bbdb
10 changed files with 236 additions and 533 deletions

View File

@ -19,11 +19,11 @@ https://bugzilla.gnome.org/show_bug.cgi?id=646187
panels/network/network-dialogs.h | 6 ++++-- panels/network/network-dialogs.h | 6 ++++--
7 files changed, 94 insertions(+), 9 deletions(-) 7 files changed, 94 insertions(+), 9 deletions(-)
diff --git a/configure.ac b/configure.ac Index: gnome-control-center-3.11.1/configure.ac
index b0b492d..4453123 100644 ===================================================================
--- a/configure.ac --- gnome-control-center-3.11.1.orig/configure.ac
+++ b/configure.ac +++ gnome-control-center-3.11.1/configure.ac
@@ -134,7 +134,8 @@ PKG_CHECK_MODULES(KEYBOARD_PANEL, $COMMON_MODULES @@ -134,7 +134,8 @@ PKG_CHECK_MODULES(KEYBOARD_PANEL, $COMMO
PKG_CHECK_MODULES(MEDIA_PANEL, $COMMON_MODULES) PKG_CHECK_MODULES(MEDIA_PANEL, $COMMON_MODULES)
PKG_CHECK_MODULES(MOUSE_PANEL, $COMMON_MODULES xi >= 1.2 PKG_CHECK_MODULES(MOUSE_PANEL, $COMMON_MODULES xi >= 1.2
gnome-settings-daemon >= $GSD_REQUIRED_VERSION x11) gnome-settings-daemon >= $GSD_REQUIRED_VERSION x11)
@ -32,11 +32,11 @@ index b0b492d..4453123 100644
+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION) + polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
PKG_CHECK_MODULES(NOTIFICATIONS_PANEL, $COMMON_MODULES libgnome-menu-3.0) PKG_CHECK_MODULES(NOTIFICATIONS_PANEL, $COMMON_MODULES libgnome-menu-3.0)
PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION) PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION)
PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1 PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.99.0
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c Index: gnome-control-center-3.11.1/panels/network/cc-network-panel.c
index 4fa3706..7bae539 100644 ===================================================================
--- a/panels/network/cc-network-panel.c --- gnome-control-center-3.11.1.orig/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c +++ gnome-control-center-3.11.1/panels/network/cc-network-panel.c
@@ -24,6 +24,8 @@ @@ -24,6 +24,8 @@
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <stdlib.h> #include <stdlib.h>
@ -56,7 +56,7 @@ index 4fa3706..7bae539 100644
}; };
enum { enum {
@@ -574,13 +579,13 @@ handle_argv_for_device (CcNetworkPanel *panel, @@ -574,13 +579,13 @@ handle_argv_for_device (CcNetworkPanel *
return TRUE; return TRUE;
} else if (g_strcmp0 (nm_object_get_path (NM_OBJECT (device)), priv->arg_device) == 0) { } else if (g_strcmp0 (nm_object_get_path (NM_OBJECT (device)), priv->arg_device) == 0) {
if (priv->arg_operation == OPERATION_CONNECT_MOBILE) { if (priv->arg_operation == OPERATION_CONNECT_MOBILE) {
@ -72,7 +72,7 @@ index 4fa3706..7bae539 100644
reset_command_line_args (panel); /* done */ reset_command_line_args (panel); /* done */
select_tree_iter (panel, iter); select_tree_iter (panel, iter);
return TRUE; return TRUE;
@@ -1355,6 +1360,9 @@ cc_network_panel_init (CcNetworkPanel *panel) @@ -1355,6 +1360,9 @@ cc_network_panel_init (CcNetworkPanel *p
GtkWidget *widget; GtkWidget *widget;
GtkWidget *toplevel; GtkWidget *toplevel;
GDBusConnection *system_bus; GDBusConnection *system_bus;
@ -82,7 +82,7 @@ index 4fa3706..7bae539 100644
panel->priv = NETWORK_PANEL_PRIVATE (panel); panel->priv = NETWORK_PANEL_PRIVATE (panel);
g_resources_register (cc_network_get_resource ()); g_resources_register (cc_network_get_resource ());
@@ -1458,4 +1466,32 @@ cc_network_panel_init (CcNetworkPanel *panel) @@ -1458,4 +1466,32 @@ cc_network_panel_init (CcNetworkPanel *p
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
"vbox1")); "vbox1"));
gtk_container_add (GTK_CONTAINER (panel), widget); gtk_container_add (GTK_CONTAINER (panel), widget);
@ -115,11 +115,11 @@ index 4fa3706..7bae539 100644
+{ +{
+ return panel->priv->default_private; + return panel->priv->default_private;
} }
diff --git a/panels/network/cc-network-panel.h b/panels/network/cc-network-panel.h Index: gnome-control-center-3.11.1/panels/network/cc-network-panel.h
index f869c3f..d3773b2 100644 ===================================================================
--- a/panels/network/cc-network-panel.h --- gnome-control-center-3.11.1.orig/panels/network/cc-network-panel.h
+++ b/panels/network/cc-network-panel.h +++ gnome-control-center-3.11.1/panels/network/cc-network-panel.h
@@ -67,6 +67,8 @@ GType cc_network_panel_get_type (void) G_GNUC_CONST; @@ -67,6 +67,8 @@ GType cc_network_panel_get_type (void) G
GPtrArray *cc_network_panel_get_devices (CcNetworkPanel *panel); GPtrArray *cc_network_panel_get_devices (CcNetworkPanel *panel);
@ -128,11 +128,11 @@ index f869c3f..d3773b2 100644
G_END_DECLS G_END_DECLS
#endif /* _CC_NETWORK_PANEL_H */ #endif /* _CC_NETWORK_PANEL_H */
diff --git a/panels/network/net-device-mobile.c b/panels/network/net-device-mobile.c Index: gnome-control-center-3.11.1/panels/network/net-device-mobile.c
index dad3a4a..c671637 100644 ===================================================================
--- a/panels/network/net-device-mobile.c --- gnome-control-center-3.11.1.orig/panels/network/net-device-mobile.c
+++ b/panels/network/net-device-mobile.c +++ gnome-control-center-3.11.1/panels/network/net-device-mobile.c
@@ -141,12 +141,15 @@ mobile_connection_changed_cb (GtkComboBox *combo_box, NetDeviceMobile *device_mo @@ -141,12 +141,15 @@ mobile_connection_changed_cb (GtkComboBo
COLUMN_ID, &object_path, COLUMN_ID, &object_path,
-1); -1);
if (g_strcmp0 (object_path, NULL) == 0) { if (g_strcmp0 (object_path, NULL) == 0) {
@ -149,11 +149,11 @@ index dad3a4a..c671637 100644
goto out; goto out;
} }
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c Index: gnome-control-center-3.11.1/panels/network/net-device-wifi.c
index 49a79a8..da488c5 100644 ===================================================================
--- a/panels/network/net-device-wifi.c --- gnome-control-center-3.11.1.orig/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c +++ gnome-control-center-3.11.1/panels/network/net-device-wifi.c
@@ -696,6 +696,9 @@ wireless_try_to_connect (NetDeviceWifi *device_wifi, @@ -696,6 +696,9 @@ wireless_try_to_connect (NetDeviceWifi *
NMDevice *device; NMDevice *device;
NMSettingWireless *setting_wireless; NMSettingWireless *setting_wireless;
NMClient *client; NMClient *client;
@ -163,7 +163,7 @@ index 49a79a8..da488c5 100644
if (device_wifi->priv->updating_device) if (device_wifi->priv->updating_device)
goto out; goto out;
@@ -747,10 +750,21 @@ wireless_try_to_connect (NetDeviceWifi *device_wifi, @@ -747,10 +750,21 @@ wireless_try_to_connect (NetDeviceWifi *
/* create one, as it's missing */ /* create one, as it's missing */
g_debug ("no existing connection found for %s, creating", ssid_target); g_debug ("no existing connection found for %s, creating", ssid_target);
@ -186,7 +186,7 @@ index 49a79a8..da488c5 100644
device, ap_object_path, device, ap_object_path,
connection_add_activate_cb, device_wifi); connection_add_activate_cb, device_wifi);
} else { } else {
@@ -965,6 +979,7 @@ start_shared_connection (NetDeviceWifi *device_wifi) @@ -965,6 +979,7 @@ start_shared_connection (NetDeviceWifi *
GSList *l; GSList *l;
NMClient *client; NMClient *client;
const char *mode; const char *mode;
@ -194,7 +194,7 @@ index 49a79a8..da488c5 100644
device = net_device_get_nm_device (NET_DEVICE (device_wifi)); device = net_device_get_nm_device (NET_DEVICE (device_wifi));
g_assert (nm_device_get_device_type (device) == NM_DEVICE_TYPE_WIFI); g_assert (nm_device_get_device_type (device) == NM_DEVICE_TYPE_WIFI);
@@ -1001,6 +1016,14 @@ start_shared_connection (NetDeviceWifi *device_wifi) @@ -1001,6 +1016,14 @@ start_shared_connection (NetDeviceWifi *
"id", "Hotspot", "id", "Hotspot",
"autoconnect", FALSE, "autoconnect", FALSE,
NULL); NULL);
@ -209,10 +209,10 @@ index 49a79a8..da488c5 100644
nm_connection_add_setting (c, (NMSetting *)sc); nm_connection_add_setting (c, (NMSetting *)sc);
sw = (NMSettingWireless *)nm_setting_wireless_new (); sw = (NMSettingWireless *)nm_setting_wireless_new ();
diff --git a/panels/network/network-dialogs.c b/panels/network/network-dialogs.c Index: gnome-control-center-3.11.1/panels/network/network-dialogs.c
index b2f8376..24053cb 100644 ===================================================================
--- a/panels/network/network-dialogs.c --- gnome-control-center-3.11.1.orig/panels/network/network-dialogs.c
+++ b/panels/network/network-dialogs.c +++ gnome-control-center-3.11.1/panels/network/network-dialogs.c
@@ -41,6 +41,7 @@ typedef struct { @@ -41,6 +41,7 @@ typedef struct {
NMClient *client; NMClient *client;
NMRemoteSettings *settings; NMRemoteSettings *settings;
@ -221,7 +221,7 @@ index b2f8376..24053cb 100644
} MobileDialogClosure; } MobileDialogClosure;
static void static void
@@ -262,7 +263,8 @@ cc_network_panel_connect_to_8021x_network (GtkWidget *toplevel, @@ -262,7 +263,8 @@ cc_network_panel_connect_to_8021x_networ
NMClient *client, NMClient *client,
NMRemoteSettings *settings, NMRemoteSettings *settings,
NMDevice *device, NMDevice *device,
@ -231,7 +231,7 @@ index b2f8376..24053cb 100644
{ {
NMConnection *connection; NMConnection *connection;
NMSettingConnection *s_con; NMSettingConnection *s_con;
@@ -300,6 +302,8 @@ cc_network_panel_connect_to_8021x_network (GtkWidget *toplevel, @@ -300,6 +302,8 @@ cc_network_panel_connect_to_8021x_networ
uuid = nm_utils_uuid_generate (); uuid = nm_utils_uuid_generate ();
g_object_set (s_con, NM_SETTING_CONNECTION_UUID, uuid, NULL); g_object_set (s_con, NM_SETTING_CONNECTION_UUID, uuid, NULL);
g_free (uuid); g_free (uuid);
@ -240,7 +240,7 @@ index b2f8376..24053cb 100644
nm_connection_add_setting (connection, NM_SETTING (s_con)); nm_connection_add_setting (connection, NM_SETTING (s_con));
s_wifi = (NMSettingWireless *) nm_setting_wireless_new (); s_wifi = (NMSettingWireless *) nm_setting_wireless_new ();
@@ -357,6 +361,7 @@ cdma_mobile_wizard_done (NMAMobileWizard *wizard, @@ -357,6 +361,7 @@ cdma_mobile_wizard_done (NMAMobileWizard
if (!canceled && method) { if (!canceled && method) {
NMSetting *setting; NMSetting *setting;
char *uuid, *id; char *uuid, *id;
@ -248,7 +248,7 @@ index b2f8376..24053cb 100644
if (method->devtype != NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO) { if (method->devtype != NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO) {
g_warning ("Unexpected device type (not CDMA)."); g_warning ("Unexpected device type (not CDMA).");
@@ -400,6 +405,11 @@ cdma_mobile_wizard_done (NMAMobileWizard *wizard, @@ -400,6 +405,11 @@ cdma_mobile_wizard_done (NMAMobileWizard
NULL); NULL);
g_free (uuid); g_free (uuid);
g_free (id); g_free (id);
@ -260,7 +260,7 @@ index b2f8376..24053cb 100644
nm_connection_add_setting (connection, setting); nm_connection_add_setting (connection, setting);
} }
@@ -419,6 +429,7 @@ gsm_mobile_wizard_done (NMAMobileWizard *wizard, @@ -419,6 +429,7 @@ gsm_mobile_wizard_done (NMAMobileWizard
if (!canceled && method) { if (!canceled && method) {
NMSetting *setting; NMSetting *setting;
char *uuid, *id; char *uuid, *id;
@ -268,7 +268,7 @@ index b2f8376..24053cb 100644
if (method->devtype != NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) { if (method->devtype != NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) {
g_warning ("Unexpected device type (not GSM)."); g_warning ("Unexpected device type (not GSM).");
@@ -463,6 +474,11 @@ gsm_mobile_wizard_done (NMAMobileWizard *wizard, @@ -463,6 +474,11 @@ gsm_mobile_wizard_done (NMAMobileWizard
NULL); NULL);
g_free (uuid); g_free (uuid);
g_free (id); g_free (id);
@ -290,7 +290,7 @@ index b2f8376..24053cb 100644
{ {
MobileDialogClosure *closure; MobileDialogClosure *closure;
NMAMobileWizard *wizard; NMAMobileWizard *wizard;
@@ -512,6 +529,7 @@ cc_network_panel_connect_to_3g_network (GtkWidget *toplevel, @@ -512,6 +529,7 @@ cc_network_panel_connect_to_3g_network (
closure->client = g_object_ref (client); closure->client = g_object_ref (client);
closure->settings = g_object_ref (settings); closure->settings = g_object_ref (settings);
closure->device = g_object_ref (device); closure->device = g_object_ref (device);
@ -298,11 +298,11 @@ index b2f8376..24053cb 100644
caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device)); caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device));
if (caps & NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) { if (caps & NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) {
diff --git a/panels/network/network-dialogs.h b/panels/network/network-dialogs.h Index: gnome-control-center-3.11.1/panels/network/network-dialogs.h
index ddbf392..953fc2b 100644 ===================================================================
--- a/panels/network/network-dialogs.h --- gnome-control-center-3.11.1.orig/panels/network/network-dialogs.h
+++ b/panels/network/network-dialogs.h +++ gnome-control-center-3.11.1/panels/network/network-dialogs.h
@@ -38,11 +38,13 @@ void cc_network_panel_connect_to_8021x_network (GtkWidget *toplevel, @@ -38,11 +38,13 @@ void cc_network_panel_connect_to_8021x_n
NMClient *client, NMClient *client,
NMRemoteSettings *settings, NMRemoteSettings *settings,
NMDevice *device, NMDevice *device,
@ -318,6 +318,3 @@ index ddbf392..953fc2b 100644
+ gboolean default_private); + gboolean default_private);
#endif /* _NETWORK_DIALOGS_H */ #endif /* _NETWORK_DIALOGS_H */
--
1.8.1.4

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:059172d5e7f8b6c385bcc1b73f966375b92a8456dd5eba8d7f8b75907c3324a6
size 6821248

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5297d448eff0ec58f6c0ad9fbd1b94bed0a850496df0ee65571c0622b49c1582
size 6866544

View File

@ -1,186 +0,0 @@
From 6f78b2ab0f05cdf9d88ffb30abebc5d69cf121cf Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 17 Oct 2013 17:16:35 +0200
Subject: [PATCH] power: Fix run-time for DeviceChanged signal removal
The DeviceChanged signal was removed, instead, each interesting
device should be monitored individually. This means we need to keep
our own device list locally.
https://bugzilla.gnome.org/show_bug.cgi?id=710393
---
panels/power/cc-power-panel.c | 75 +++++++++++++++++++++++++++++++++++--------
1 file changed, 61 insertions(+), 14 deletions(-)
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index fccc994..75e8ce2 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -70,6 +70,7 @@ struct _CcPowerPanelPrivate
GtkBuilder *builder;
GtkWidget *automatic_suspend_dialog;
UpClient *up_client;
+ GPtrArray *devices;
GDBusProxy *screen_proxy;
GDBusProxy *kbd_proxy;
gboolean has_batteries;
@@ -142,6 +143,11 @@ cc_power_panel_dispose (GObject *object)
g_clear_object (&priv->builder);
g_clear_object (&priv->screen_proxy);
g_clear_object (&priv->kbd_proxy);
+ if (priv->devices)
+ {
+ g_ptr_array_foreach (priv->devices, (GFunc) g_object_unref, NULL);
+ g_clear_pointer (&priv->devices, g_ptr_array_unref);
+ }
g_clear_object (&priv->up_client);
#ifdef HAVE_BLUETOOTH
g_clear_object (&priv->bt_client);
@@ -624,7 +630,6 @@ up_client_changed (UpClient *client,
CcPowerPanel *self)
{
CcPowerPanelPrivate *priv = self->priv;
- GPtrArray *devices;
GList *children, *l;
gint i;
UpDeviceKind kind;
@@ -658,8 +663,6 @@ up_client_changed (UpClient *client,
g_list_free (children);
gtk_widget_hide (priv->device_section);
- devices = up_client_get_devices (client);
-
#ifdef TEST_FAKE_DEVICES
{
static gboolean fake_devices_added = FALSE;
@@ -675,7 +678,7 @@ up_client_changed (UpClient *client,
"state", UP_DEVICE_STATE_DISCHARGING,
"time-to-empty", 287,
NULL);
- g_ptr_array_add (devices, device);
+ g_ptr_array_add (priv->devices, device);
device = up_device_new ();
g_object_set (device,
"kind", UP_DEVICE_KIND_KEYBOARD,
@@ -683,7 +686,7 @@ up_client_changed (UpClient *client,
"state", UP_DEVICE_STATE_DISCHARGING,
"time-to-empty", 250,
NULL);
- g_ptr_array_add (devices, device);
+ g_ptr_array_add (priv->devices, device);
device = up_device_new ();
g_object_set (device,
"kind", UP_DEVICE_KIND_BATTERY,
@@ -694,7 +697,7 @@ up_client_changed (UpClient *client,
"energy-rate", 15.0,
"time-to-empty", 400,
NULL);
- g_ptr_array_add (devices, device);
+ g_ptr_array_add (priv->devices, device);
}
}
#endif
@@ -709,9 +712,9 @@ up_client_changed (UpClient *client,
"power-supply", TRUE,
"is-present", TRUE,
NULL);
- for (i = 0; devices != NULL && i < devices->len; i++)
+ for (i = 0; priv->devices != NULL && i < priv->devices->len; i++)
{
- UpDevice *device = (UpDevice*) g_ptr_array_index (devices, i);
+ UpDevice *device = (UpDevice*) g_ptr_array_index (priv->devices, i);
g_object_get (device,
"kind", &kind,
"state", &state,
@@ -776,9 +779,9 @@ up_client_changed (UpClient *client,
if (!on_ups && n_batteries > 1)
set_primary (self, composite);
- for (i = 0; devices != NULL && i < devices->len; i++)
+ for (i = 0; priv->devices != NULL && i < priv->devices->len; i++)
{
- UpDevice *device = (UpDevice*) g_ptr_array_index (devices, i);
+ UpDevice *device = (UpDevice*) g_ptr_array_index (priv->devices, i);
g_object_get (device, "kind", &kind, NULL);
if (kind == UP_DEVICE_KIND_LINE_POWER)
{
@@ -802,11 +805,48 @@ up_client_changed (UpClient *client,
}
}
- g_clear_pointer (&devices, g_ptr_array_unref);
g_object_unref (composite);
}
static void
+up_client_device_removed (UpClient *client,
+ const char *object_path,
+ CcPowerPanel *self)
+{
+ CcPowerPanelPrivate *priv = self->priv;
+ guint i;
+
+ if (priv->devices == NULL)
+ return;
+
+ for (i = 0; i < priv->devices->len; i++)
+ {
+ UpDevice *device = g_ptr_array_index (priv->devices, i);
+
+ if (g_strcmp0 (object_path, up_device_get_object_path (device)) == 0)
+ {
+ g_ptr_array_remove_index (priv->devices, i);
+ break;
+ }
+ }
+
+ up_client_changed (self->priv->up_client, NULL, self);
+}
+
+static void
+up_client_device_added (UpClient *client,
+ UpDevice *device,
+ CcPowerPanel *self)
+{
+ CcPowerPanelPrivate *priv = self->priv;
+
+ g_ptr_array_add (priv->devices, g_object_ref (device));
+ g_signal_connect (G_OBJECT (device), "notify",
+ G_CALLBACK (up_client_changed), self);
+ up_client_changed (priv->up_client, NULL, self);
+}
+
+static void
set_brightness_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
{
GError *error = NULL;
@@ -2163,6 +2203,7 @@ cc_power_panel_init (CcPowerPanel *self)
GError *error;
GtkWidget *widget;
GtkWidget *box;
+ guint i;
priv = self->priv = POWER_PANEL_PRIVATE (self);
g_resources_register (cc_power_get_resource ());
@@ -2226,9 +2267,15 @@ cc_power_panel_init (CcPowerPanel *self)
update_automatic_suspend_label (self);
/* populate batteries */
- g_signal_connect (priv->up_client, "device-added", G_CALLBACK (up_client_changed), self);
- g_signal_connect (priv->up_client, "device-changed", G_CALLBACK (up_client_changed), self);
- g_signal_connect (priv->up_client, "device-removed", G_CALLBACK (up_client_changed), self);
+ g_signal_connect (priv->up_client, "device-added", G_CALLBACK (up_client_device_added), self);
+ g_signal_connect (priv->up_client, "device-removed", G_CALLBACK (up_client_device_removed), self);
+
+ priv->devices = up_client_get_devices (priv->up_client);
+ for (i = 0; priv->devices != NULL && i < priv->devices->len; i++) {
+ UpDevice *device = g_ptr_array_index (priv->devices, i);
+ g_signal_connect (G_OBJECT (device), "notify",
+ G_CALLBACK (up_client_changed), self);
+ }
up_client_changed (priv->up_client, NULL, self);
widget = WID (priv->builder, "vbox_power");
--
1.8.4

View File

@ -1,37 +0,0 @@
From 8ba50267bed318cae35a40cd20f3067856e7c93b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Wed, 30 Oct 2013 12:03:33 +0100
Subject: [PATCH] display: Update for libupower-glib API changes
There's no "changed" signal anymore.
---
panels/display/cc-display-panel.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index f170d51..775b48d 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -2261,6 +2261,7 @@ mapped_cb (CcDisplayPanel *panel)
static void
cc_display_panel_up_client_changed (UpClient *client,
+ GParamSpec *pspec,
CcDisplayPanel *self)
{
CcDisplayPanelPrivate *priv = self->priv;
@@ -2352,9 +2353,9 @@ cc_display_panel_init (CcDisplayPanel *self)
* https://bugs.freedesktop.org/show_bug.cgi?id=43001
*/
- g_signal_connect (self->priv->up_client, "changed",
+ g_signal_connect (self->priv->up_client, "notify::lid-is-closed",
G_CALLBACK (cc_display_panel_up_client_changed), self);
- cc_display_panel_up_client_changed (self->priv->up_client, self);
+ cc_display_panel_up_client_changed (self->priv->up_client, NULL, self);
}
else
g_clear_object (&self->priv->up_client);
--
1.8.4

View File

@ -1,131 +0,0 @@
From 93997f5ee82107e710d1d22b55d6d1137ab97127 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Mon, 21 Oct 2013 22:53:43 +0200
Subject: [PATCH] power: Use the new display device
From UPower 0.99. Removes all the code creating the composite device.
https://bugzilla.gnome.org/show_bug.cgi?id=710393
---
panels/power/cc-power-panel.c | 86 +++++++------------------------------------
1 file changed, 13 insertions(+), 73 deletions(-)
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index 223fd86..8083888 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -633,22 +633,9 @@ up_client_changed (UpClient *client,
GList *children, *l;
gint i;
UpDeviceKind kind;
- UpDeviceState state;
guint n_batteries;
gboolean on_ups;
UpDevice *composite;
- gdouble percentage = 0.0;
- gdouble energy = 0.0;
- gdouble energy_full = 0.0;
- gdouble energy_rate = 0.0;
- gdouble energy_total = 0.0;
- gdouble energy_full_total = 0.0;
- gdouble energy_rate_total = 0.0;
- gint64 time_to_empty = 0;
- gint64 time_to_full = 0;
- gboolean is_charging = FALSE;
- gboolean is_discharging = FALSE;
- gboolean is_fully_charged = TRUE;
gchar *s;
children = gtk_container_get_children (GTK_CONTAINER (priv->battery_list));
@@ -713,38 +700,21 @@ up_client_changed (UpClient *client,
on_ups = FALSE;
n_batteries = 0;
- composite = up_device_new ();
- g_object_set (composite,
- "kind", UP_DEVICE_KIND_BATTERY,
- "is-rechargeable", TRUE,
- "native-path", "dummy:composite_battery",
- "power-supply", TRUE,
- "is-present", TRUE,
- NULL);
- for (i = 0; priv->devices != NULL && i < priv->devices->len; i++)
+ composite = up_client_get_display_device (priv->up_client);
+ g_object_get (composite, "kind", &kind, NULL);
+ if (kind == UP_DEVICE_KIND_UPS)
{
- UpDevice *device = (UpDevice*) g_ptr_array_index (priv->devices, i);
- g_object_get (device,
- "kind", &kind,
- "state", &state,
- "energy", &energy,
- "energy-full", &energy_full,
- "energy-rate", &energy_rate,
- NULL);
- if (kind == UP_DEVICE_KIND_UPS && state == UP_DEVICE_STATE_DISCHARGING)
- on_ups = TRUE;
- if (kind == UP_DEVICE_KIND_BATTERY)
+ on_ups = TRUE;
+ }
+ else
+ {
+ /* Count the batteries */
+ for (i = 0; priv->devices != NULL && i < priv->devices->len; i++)
{
- if (state == UP_DEVICE_STATE_CHARGING)
- is_charging = TRUE;
- if (state == UP_DEVICE_STATE_DISCHARGING)
- is_discharging = TRUE;
- if (state != UP_DEVICE_STATE_FULLY_CHARGED)
- is_fully_charged = FALSE;
- energy_total += energy;
- energy_full_total += energy_full;
- energy_rate_total += energy_rate;
- n_batteries++;
+ UpDevice *device = (UpDevice*) g_ptr_array_index (priv->devices, i);
+ g_object_get (device, "kind", &kind, NULL);
+ if (kind == UP_DEVICE_KIND_BATTERY)
+ n_batteries++;
}
}
@@ -755,36 +725,6 @@ up_client_changed (UpClient *client,
gtk_label_set_label (GTK_LABEL (priv->battery_heading), s);
g_free (s);
- if (energy_full_total > 0.0)
- percentage = 100.0 * energy_total / energy_full_total;
-
- if (is_charging)
- state = UP_DEVICE_STATE_CHARGING;
- else if (is_discharging)
- state = UP_DEVICE_STATE_DISCHARGING;
- else if (is_fully_charged)
- state = UP_DEVICE_STATE_FULLY_CHARGED;
- else
- state = UP_DEVICE_STATE_UNKNOWN;
-
- if (energy_rate_total > 0)
- {
- if (state == UP_DEVICE_STATE_DISCHARGING)
- time_to_empty = 3600 * (energy_total / energy_rate_total);
- else if (state == UP_DEVICE_STATE_CHARGING)
- time_to_full = 3600 * ((energy_full_total - energy_total) / energy_rate_total);
- }
-
- g_object_set (composite,
- "energy", energy_total,
- "energy-full", energy_full_total,
- "energy-rate", energy_rate_total,
- "time-to-empty", time_to_empty,
- "time-to-full", time_to_full,
- "percentage", percentage,
- "state", state,
- NULL);
-
if (!on_ups && n_batteries > 1)
set_primary (self, composite);
--
1.8.4

View File

@ -1,50 +0,0 @@
From ceafe6f4c51452b731c165808eebc8334bf58df9 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 17 Oct 2013 16:52:36 +0200
Subject: [PATCH] power: Fix build
up_client_enumerate_devices_sync() was removed.
https://bugzilla.gnome.org/show_bug.cgi?id=710393
---
panels/power/cc-power-panel.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index cab6b4a..fccc994 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -1095,22 +1095,11 @@ static void
set_ac_battery_ui_mode (CcPowerPanel *self)
{
gboolean has_batteries = FALSE;
- gboolean ret;
- GError *error = NULL;
GPtrArray *devices;
guint i;
UpDevice *device;
UpDeviceKind kind;
- /* this is sync, but it's cached in the daemon and so quick */
- ret = up_client_enumerate_devices_sync (self->priv->up_client, NULL, &error);
- if (!ret)
- {
- g_warning ("failed to get device list: %s", error->message);
- g_error_free (error);
- goto out;
- }
-
devices = up_client_get_devices (self->priv->up_client);
g_debug ("got %d devices from upower\n", devices->len);
@@ -1131,7 +1120,6 @@ set_ac_battery_ui_mode (CcPowerPanel *self)
has_batteries = FALSE;
#endif
-out:
self->priv->has_batteries = has_batteries;
gtk_widget_set_visible (self->priv->critical_battery_row, has_batteries);
--
1.8.4

View File

@ -1,54 +0,0 @@
From 63bf77196ec880ba7d013d8e5329656adc0b1c3e Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 17 Oct 2013 16:51:31 +0200
Subject: [PATCH] power: Use icons from UPower
https://bugzilla.gnome.org/show_bug.cgi?id=710393
---
panels/power/cc-power-panel.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index d9d09b3..cab6b4a 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -382,6 +382,7 @@ add_battery (CcPowerPanel *panel, UpDevice *device)
GtkWidget *widget;
gchar *s;
gchar *native_path;
+ gchar *icon_name;
const gchar *name;
g_object_get (device,
@@ -389,6 +390,7 @@ add_battery (CcPowerPanel *panel, UpDevice *device)
"state", &state,
"percentage", &percentage,
"native-path", &native_path,
+ "icon-name", &icon_name,
NULL);
if (native_path && strstr (native_path, "BAT0"))
@@ -412,10 +414,9 @@ add_battery (CcPowerPanel *panel, UpDevice *device)
gtk_box_pack_start (GTK_BOX (box), box2, FALSE, TRUE, 0);
#if 1
- if (state == UP_DEVICE_STATE_DISCHARGING ||
- state == UP_DEVICE_STATE_CHARGING)
+ if (icon_name != NULL && *icon_name != '\0')
{
- widget = gtk_image_new_from_icon_name ("battery-good-charging-symbolic", GTK_ICON_SIZE_BUTTON);
+ widget = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
gtk_style_context_add_class (gtk_widget_get_style_context (widget), GTK_STYLE_CLASS_DIM_LABEL);
gtk_widget_set_halign (widget, GTK_ALIGN_END);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
@@ -455,6 +456,7 @@ add_battery (CcPowerPanel *panel, UpDevice *device)
gtk_widget_show_all (row);
g_free (native_path);
+ g_free (icon_name);
gtk_widget_set_visible (priv->battery_section, TRUE);
}
--
1.8.4

View File

@ -1,3 +1,181 @@
-------------------------------------------------------------------
Wed Apr 16 14:44:25 UTC 2014 - zaitor@opensuse.org
- Update to version 3.12.1:
+ Background:
- Remove black from the preset colours.
- Make sure the whole dialog is visible on small screens.
+ Info:
- Fix incorrect virtualisation technology being displayed.
- Don't display "Check for updates" button when neither
gnome-software nor gpk-update-viewer are available.
+ Printers: Don't fail when adding Samba printers with spaces on
their name.
+ Users: Fix hang on password change.
+ Wacom: Unconditionally build the panel on supported platforms.
+ Updated translations.
-------------------------------------------------------------------
Mon Mar 24 15:03:46 UTC 2014 - dimstar@opensuse.org
- Update to version 3.12.0:
+ Updated translations.
-------------------------------------------------------------------
Tue Mar 18 16:05:46 UTC 2014 - dimstar@opensuse.org
- Update to version 3.11.92:
+ Date & Time: Fix the width of hour and minute spinbuttons.
+ Privacy: Disable the software usage reporting.
+ Updated translations.
-------------------------------------------------------------------
Tue Mar 4 19:46:43 UTC 2014 - dimstar@opensuse.org
- Update to version 3.11.91:
+ Color: Toolbar buttons are not refreshed when user changes
profile.
+ Online Accounts: Panel is too wide.
+ Printers:
- Fix build with CUPS <= 1.6.
- Improve description of discovered printers.
+ Shell: Improve hostname ASCIIfication.
-------------------------------------------------------------------
Mon Mar 3 20:00:00 UTC 2014 - zaitor@opensuse.org
- Update to version 3.11.90:
+ Background:
- Add Flickr support for backgrounds.
- Fix linking of test program.
- Guard against XDG_PICTURES_DIR not being defined.
+ Info: Show a static "Check for updates" button.
+ Mouse: Fix touch support for the testing widget.
+ Network:
- Fix build with NM 0.9.8.x.
- Don't warn for invalid settings.
- Allow an empty gateway address in the connection editor.
- Allow selecting a specific VPN or virtual interface.
- Handle argv after cold-plugging connections.
+ Keyboard: Whitelist a few more options for the 3rd level
chooser.
+ Printers:
- Vertically center text for no devices.
- Use "Default printer" instead of "Default".
- Don't wait for "Return" to start search.
- Don't show tooltip on clear icon when searching for printers.
- Don't react to icon-press when searching for new printers.
- Delay searching for remote printers.
+ Privacy: Add option to control GNOME Software usage stats.
+ Sharing: Address ambiguity in the screen sharing dialog.
+ Universal Access: Use '&' instead of 'and'.
+ User Accounts: Use POSIX for max login name length.
- Drop gcc-fix-build-with-old-NM.patch: fixed upstream.
-------------------------------------------------------------------
Mon Mar 3 19:11:06 UTC 2014 - zaitor@opensuse.org
- Add gcc-fix-build-with-old-NM.patch, fix build with
NetworkManager-0.9.8.x (bgo#723769).
-------------------------------------------------------------------
Mon Mar 3 19:11:05 UTC 2014 - dimstar@opensuse.org
- Update to version 3.11.5:
+ Background:
- The chooser should have exactly 3 columns.
- Add PNM and JPEG 2000 to the list of valid content types.
- Add a placeholder icon before creating thumbnails.
+ Date & Time: Set the filechooser clock format too.
+ Display:
- Hide Size label when empty.
- Only show rotation options if we support them.
+ Info: Fix possible crasher when exiting panel.
+ Network:
- Add a Team type to connection editor.
- Give an empty title to the hotspot dialog.
- Hide hotspot dialog on Escape.
+ Notifications: Fix invalid format string.
+ Online Accounts: Mention Pocket in the keywords.
+ Power: If battery is fully charged but 99%, just round it up.
+ Printers:
- Show correct time of print job.
- Plug a memory leak.
+ Privacy: Fix the alignment of the combobox in the Screen Lock
dialog.
+ Region: Do not show Login button if localed is not available.
+ Shell:
- Activate application when launching a panel.
- Disable type-ahead in search window.
- Fix headerbar item positions following gtk+ headerbar
changes.
+ Users: Improve logged-in check when deleting users to catch
console logins.
-------------------------------------------------------------------
Mon Mar 3 19:11:03 UTC 2014 - dimstar@opensuse.org
- Update to version 3.11.3:
+ Background: Fix small memory leak.
+ Bluetooth: New panel.
+ Color:
- Fix a crash if the user closes the window after calibrating.
- Actually show the whitepoint selector.
+ Display: Add an 'upside-down' button.
+ Network: Set mnemonic widget for labels and values in
connection details.
+ Sharing and Power: Use gnome-settings-daemon's rfkill Bluetooth
support.
+ Shell: Set iconview number of columns to 6.
+ Wacom:
- Hide tab borders by default.
- Clear background on "target" actor in calibration UI.
- Don't use monitor geometry X/Y when calculating calibration.
- Forgive inconspicuous double clicks when calibrating.
- Fix possible crashers when the calibration window goes away.
- Protect calibrator UI to spawn animations multiple times.
- Fix first animation of calibration UI.
-------------------------------------------------------------------
Mon Mar 3 19:11:02 UTC 2014 - dimstar@opensuse.org
- Update to version 3.11.2:
+ Background:
- Fix compilation with libsocialweb.
+ Everywhere:
- Improve rtl appearance by flipping margins.
+ Power:
- Fix automatic suspend popup sizing.
+ Sharing:
- Remove OBEX FTP support.
- Fix Bluetooth label always being off.
- Make it possible to add new folders.
- Fix a crash when turning off sharing.
-------------------------------------------------------------------
Mon Mar 3 19:00:00 UTC 2014 - dimstar@opensuse.org
- Update to version 3.11.1:
+ Details:
- Remove apparently duplicated autostart category.
- Use gnome-software for showing the list of updates if
installed.
+ Power, Display:
- Update for new UPower API
+ Region:
- Allow setting system-wide formats.
- Never show "None" for language and formats.
+ Universal Access:
- Split keywords with spaces.
- Rebase gcc-private-connection.patch.
- Drop gnome-control-center-linker.patch: fixed upstream.
- Drop UPower 1.0 related patches (fixed upstream):
+ gnome-control-center-upower-DeviceChanged-signal.patch.
+ gnome-control-center-upower-display.patch.
+ gnome-control-center-upower-fix-build.patch.
+ gnome-control-center-upower-icons.patch.
+ gnome-control-center-upower-changed-signal.patch.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 3 18:55:31 UTC 2014 - zaitor@opensuse.org Mon Mar 3 18:55:31 UTC 2014 - zaitor@opensuse.org

View File

@ -27,14 +27,14 @@
%endif %endif
Name: gnome-control-center Name: gnome-control-center
Version: 3.10.3 Version: 3.12.1
Release: 0 Release: 0
# FIXME: in 12.3 and later, check if we still need patch2 (gnome-control-center-hide-region-system-tab.patch) (see bnc#703833) # FIXME: in 12.3 and later, check if we still need patch2 (gnome-control-center-hide-region-system-tab.patch) (see bnc#703833)
Summary: The GNOME Control Center Summary: The GNOME Control Center
License: GPL-2.0+ License: GPL-2.0+
Group: System/GUI/GNOME Group: System/GUI/GNOME
Url: http://www.gnome.org Url: http://www.gnome.org
Source: http://download.gnome.org/sources/gnome-control-center/3.10/%{name}-%{version}.tar.xz Source: http://download.gnome.org/sources/gnome-control-center/3.12/%{name}-%{version}.tar.xz
# PATCH-FEATURE-OPENSUSE gnome-control-center-allow-yast-in-shell.patch vuntz@opensuse.org -- Allow the launch of the yast shell from the g-c-c shell; it's quite ugly, but on the other hand, we don't want to change the behavior of the shell except for yast... # PATCH-FEATURE-OPENSUSE gnome-control-center-allow-yast-in-shell.patch vuntz@opensuse.org -- Allow the launch of the yast shell from the g-c-c shell; it's quite ugly, but on the other hand, we don't want to change the behavior of the shell except for yast...
Patch0: gnome-control-center-allow-yast-in-shell.patch Patch0: gnome-control-center-allow-yast-in-shell.patch
# PATCH-NEEDS-REBASE gnome-control-center-system-proxy-configuration.patch -- this needs to be reimplemented to be more distro-generic before submitting upstream - docs at http://en.opensuse.org/GNOME/Proxy_configuration (was PATCH-FEATURE-OPENSUSE) # PATCH-NEEDS-REBASE gnome-control-center-system-proxy-configuration.patch -- this needs to be reimplemented to be more distro-generic before submitting upstream - docs at http://en.opensuse.org/GNOME/Proxy_configuration (was PATCH-FEATURE-OPENSUSE)
@ -43,16 +43,6 @@ Patch14: gnome-control-center-system-proxy-configuration.patch
Patch15: gcc-private-connection.patch Patch15: gcc-private-connection.patch
# PATCH-FIX-UPSTREAM gnome-control-center-probe-radius-server-cert.patch bnc#574266 glin@suse.com -- network: Probe the RADIUS server certificate # PATCH-FIX-UPSTREAM gnome-control-center-probe-radius-server-cert.patch bnc#574266 glin@suse.com -- network: Probe the RADIUS server certificate
Patch16: gnome-control-center-probe-radius-server-cert.patch Patch16: gnome-control-center-probe-radius-server-cert.patch
# PATCH-FEATURE-UPSTREAM gnome-control-center-upower-fix-build.patch mgorse@suse.com -- Build fix for UPower 0.99
Patch18: gnome-control-center-upower-fix-build.patch
# PATCH-FEATURE-UPSTREAM gnome-control-center-upower-DeviceChanged-signal.patch mgorse@suse.com -- DeviceChanged signal no longer exists in upower-glib 0.99
Patch19: gnome-control-center-upower-DeviceChanged-signal.patch
# PATCH-FEATURE-UPSTREAM gnome-control-center-upower-icons.patch mgorse@suse.com -- Use UPower icons
Patch20: gnome-control-center-upower-icons.patch
# PATCH-FEATURE-UPSTREAM gnome-control-center-upower-display.patch mgorse@suse.com -- Use new display device
Patch21: gnome-control-center-upower-display.patch
# PATCH-FEATURE-UPSTREAM gnome-control-center-upower-changed-signal.patch mgorse@suse.com -- Update for libupower-glib API changes
Patch22: gnome-control-center-upower-changed-signal.patch
BuildRequires: cups-devel BuildRequires: cups-devel
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: fdupes BuildRequires: fdupes
@ -72,17 +62,18 @@ BuildRequires: pkgconfig(gconf-2.0)
BuildRequires: pkgconfig(gdk-pixbuf-2.0) BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glib-2.0) >= 2.37.7 BuildRequires: pkgconfig(glib-2.0) >= 2.39.91
BuildRequires: pkgconfig(gmodule-2.0) BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gnome-bluetooth-1.0) >= 3.5.5 BuildRequires: pkgconfig(gnome-bluetooth-1.0) >= 3.11.1
BuildRequires: pkgconfig(gnome-desktop-3.0) >= 3.9.90 BuildRequires: pkgconfig(gnome-desktop-3.0) >= 3.11.3
BuildRequires: pkgconfig(gnome-settings-daemon) >= 3.7.3 BuildRequires: pkgconfig(gnome-settings-daemon) >= 3.7.3
BuildRequires: pkgconfig(goa-1.0) >= 3.9.90 BuildRequires: pkgconfig(goa-1.0) >= 3.9.90
BuildRequires: pkgconfig(goa-backend-1.0) BuildRequires: pkgconfig(goa-backend-1.0)
BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(grilo-0.2)
BuildRequires: pkgconfig(gsettings-desktop-schemas) >= 3.9.91 BuildRequires: pkgconfig(gsettings-desktop-schemas) >= 3.9.91
BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.9.12 BuildRequires: pkgconfig(gtk+-3.0) >= 3.11.1
%if %{with_ibus} %if %{with_ibus}
BuildRequires: pkgconfig(ibus-1.0) >= 1.5.2 BuildRequires: pkgconfig(ibus-1.0) >= 1.5.2
%endif %endif
@ -177,15 +168,10 @@ GNOME control center.
%lang_package %lang_package
%prep %prep
%setup -q %setup -q
translation-update-upstream #ranslation-update-upstream
%patch0 -p1 %patch0 -p1
%patch15 -p1 %patch15 -p1
%patch16 -p1 %patch16 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
#NEEDS-REBASE #NEEDS-REBASE
#patch14 -p1 #patch14 -p1