[gnome-control-center] display: Add a signal for scale changes
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] display: Add a signal for scale changes
- Date: Tue, 22 Aug 2017 17:27:17 +0000 (UTC)
commit e4dc2995a3efed97be220ab1f03a35fbb5884e2b
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Aug 21 15:24:11 2017 +0200
display: Add a signal for scale changes
This will allows other bits of the UI to monitor scale changes.
panels/display/cc-display-config-dbus.c | 2 ++
panels/display/cc-display-config.c | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/panels/display/cc-display-config-dbus.c b/panels/display/cc-display-config-dbus.c
index dbcc8e2..16c1927 100644
--- a/panels/display/cc-display-config-dbus.c
+++ b/panels/display/cc-display-config-dbus.c
@@ -716,6 +716,8 @@ cc_display_monitor_dbus_set_scale (CcDisplayMonitor *pself,
/* See comment in ensure_gapless() for why we disregard the
existing layout here. */
cc_display_config_dbus_make_linear (self->config);
+
+ g_signal_emit_by_name (self, "scale");
}
}
diff --git a/panels/display/cc-display-config.c b/panels/display/cc-display-config.c
index aee1efe..af1ff78 100644
--- a/panels/display/cc-display-config.c
+++ b/panels/display/cc-display-config.c
@@ -102,6 +102,11 @@ cc_display_monitor_class_init (CcDisplayMonitorClass *klass)
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
+ g_signal_new ("scale",
+ CC_TYPE_DISPLAY_MONITOR,
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 0);
}
const char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]