[gnome-shell] dialog: Use object's set to assign properties



commit 2e5295b3a9dbcdbfd4a67f787b059c4e11ac9a1c
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date:   Fri May 3 15:30:42 2019 -0500

    dialog: Use object's set to assign properties
    
    We can just assign a properties object to a GObject using the set() method
    instead of using Object.assign.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/531

 js/ui/dialog.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/dialog.js b/js/ui/dialog.js
index 41a076353..553b81c78 100644
--- a/js/ui/dialog.js
+++ b/js/ui/dialog.js
@@ -177,8 +177,8 @@ var MessageDialogContent = GObject.registerClass({
 
         let textProps = { ellipsize: Pango.EllipsizeMode.NONE,
                           line_wrap: true };
-        Object.assign(this._subtitle.clutter_text, textProps);
-        Object.assign(this._body.clutter_text, textProps);
+        this._subtitle.clutter_text.set(textProps);
+        this._body.clutter_text.set(textProps);
 
         if (!params.hasOwnProperty('style_class'))
             params.style_class = 'message-dialog-main-layout';


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