[gnome-control-center/wip/benzea/display-settings-widget: 8/14] display: Add helper that returns the monitor name as new string



commit 5473722ca9f82a6d40aad3eb3714a56f3ce7bd66
Author: Benjamin Berg <bberg redhat com>
Date:   Sat Jan 19 23:32:00 2019 +0100

    display: Add helper that returns the monitor name as new string

 panels/display/cc-display-config.c | 6 ++++++
 panels/display/cc-display-config.h | 1 +
 2 files changed, 7 insertions(+)
---
diff --git a/panels/display/cc-display-config.c b/panels/display/cc-display-config.c
index 346b93ebd..e92dc11ac 100644
--- a/panels/display/cc-display-config.c
+++ b/panels/display/cc-display-config.c
@@ -369,6 +369,12 @@ cc_display_monitor_get_ui_number_name (CcDisplayMonitor *self)
   return CC_DISPLAY_MONITOR_GET_PRIVATE (self)->ui_number_name;
 }
 
+char *
+cc_display_monitor_dup_ui_number_name (CcDisplayMonitor *self)
+{
+  return g_strdup (CC_DISPLAY_MONITOR_GET_PRIVATE (self)->ui_number_name);
+}
+
 static void
 cc_display_monitor_set_ui_info (CcDisplayMonitor *self, gint ui_number, gchar *ui_name)
 {
diff --git a/panels/display/cc-display-config.h b/panels/display/cc-display-config.h
index d4dcc5998..faeae8e34 100644
--- a/panels/display/cc-display-config.h
+++ b/panels/display/cc-display-config.h
@@ -224,6 +224,7 @@ void              cc_display_monitor_set_usable             (CcDisplayMonitor  *
 int               cc_display_monitor_get_ui_number          (CcDisplayMonitor  *monitor);
 const char*       cc_display_monitor_get_ui_name            (CcDisplayMonitor  *monitor);
 const char*       cc_display_monitor_get_ui_number_name     (CcDisplayMonitor  *monitor);
+char*             cc_display_monitor_dup_ui_number_name     (CcDisplayMonitor  *monitor);
 
 void              cc_display_mode_get_resolution            (CcDisplayMode     *mode,
                                                              int               *width,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]