[polari] connection: Rebrand connection details dialog as connection properties



commit 51e18e1051ea234a83492873d1dd2c366dc73e11
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Feb 3 20:04:43 2016 +0100

    connection: Rebrand connection details dialog as connection properties
    
    The dialog is now accessed through a "Properties" item in the room list's
    header popover, so it makes sense to adjust the title accordingly. Also
    bump up the default width a bit, as the new title contains the account
    name, which makes it likely longer than the old one.

 data/resources/connection-details.ui |    1 -
 src/application.js                   |    2 +-
 src/connections.js                   |   11 +++++++----
 3 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/data/resources/connection-details.ui b/data/resources/connection-details.ui
index 2f43c72..c1ac2ad 100644
--- a/data/resources/connection-details.ui
+++ b/data/resources/connection-details.ui
@@ -134,7 +134,6 @@
             <property name="xalign">0</property>
             <property name="wrap">true</property>
             <property name="vexpand">true</property>
-            <property name="max_width_chars">37</property>
             <property name="margin">12</property>
           </object>
         </child>
diff --git a/src/application.js b/src/application.js
index c2e476d..28cbaba 100644
--- a/src/application.js
+++ b/src/application.js
@@ -444,7 +444,7 @@ const Application = new Lang.Class({
         let accountPath = parameter.deep_unpack();
         let factory = Tp.AccountManager.dup().get_factory();
         let account = factory.ensure_account(accountPath, []);
-        let dialog = new Connections.ConnectionDetailsDialog(account);
+        let dialog = new Connections.ConnectionProperties(account);
         dialog.transient_for = this._window;
         dialog.connect('response', Lang.bind(this,
             function(w, response) {
diff --git a/src/connections.js b/src/connections.js
index 24bb212..d765846 100644
--- a/src/connections.js
+++ b/src/connections.js
@@ -205,15 +205,18 @@ const ConnectionDetails = new Lang.Class({
 });
 
 
-const ConnectionDetailsDialog = new Lang.Class({
-    Name: 'ConnectionDetailsDialog',
+const ConnectionProperties = new Lang.Class({
+    Name: 'ConnectionProperties',
     Extends: Gtk.Dialog,
 
     _init: function(account) {
-        this.parent({ title: _("Edit Connection"),
+        /* Translators: %s is a connection name */
+        let title = _("“%s” Properties").format(account.display_name);
+        this.parent({ title: title,
                       modal: true,
                       destroy_with_parent: true,
-                      use_header_bar: 1 });
+                      use_header_bar: 1,
+                      default_width: 450 });
 
         this.get_content_area().border_width = 0;
 


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