[polari] ui: Use a regular button for join



commit 9e48218423700fb4f5b71bacd8e65e2001c07fe4
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Jan 30 01:50:33 2016 +0100

    ui: Use a regular button for join
    
    After the message-user dialog was removed, we now have a menu with
    a single item, which is quite silly. Just skipping the menu and
    opening the join dialog directly will also fix the slight oddity
    of hiding account creation behind an action labeled "Join a room".

 data/resources/main-window.ui |   15 +++------------
 src/application.js            |    3 ---
 src/mainWindow.js             |    4 ++--
 3 files changed, 5 insertions(+), 17 deletions(-)
---
diff --git a/data/resources/main-window.ui b/data/resources/main-window.ui
index c7a18f2..01dcccd 100644
--- a/data/resources/main-window.ui
+++ b/data/resources/main-window.ui
@@ -1,13 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <menu id="join_menu">
-    <section>
-      <item>
-        <attribute name="label" translatable="yes">Join a Room</attribute>
-        <attribute name="action">app.show-join-dialog</attribute>
-      </item>
-    </section>
-  </menu>
   <object class="Gjs_UserListPopover" id="userListPopover">
     <property name="position">bottom</property>
     <property name="border-width">6</property>
@@ -33,14 +25,13 @@
               <class name="polari-titlebar-left"/>
             </style>
             <child>
-              <object class="GtkMenuButton" id="joinMenuButton">
+              <object class="GtkButton" id="joinButton">
                 <property name="visible">True</property>
                 <property name="halign">end</property>
                 <property name="valign">center</property>
                 <property name="margin-start">5</property>
                 <property name="margin-end">5</property>
-                <property name="menu-model">join_menu</property>
-                <property name="action-name">app.room-menu</property>
+                <property name="action_name">app.show-join-dialog</property>
                 <style>
                   <class name="image-button"/>
                 </style>
@@ -54,7 +45,7 @@
                 <child internal-child="accessible">
                   <object class="AtkObject">
                     <property name="AtkObject::accessible-name"
-                              translatable="yes">Join room</property>
+                              translatable="yes">Add rooms and networks</property>
                   </object>
                 </child>
               </object>
diff --git a/src/application.js b/src/application.js
index 72b6102..13fa603 100644
--- a/src/application.js
+++ b/src/application.js
@@ -52,9 +52,6 @@ const Application = new Lang.Class({
         this.commandOutputQueue = new AppNotifications.CommandOutputQueue();
 
         let actionEntries = [
-          { name: 'room-menu',
-            activate: Lang.bind(this, this._onToggleAction),
-            state: GLib.Variant.new('b', false) },
           { name: 'show-join-dialog',
             activate: Lang.bind(this, this._onShowJoinDialog),
             accels: ['<Primary>n'] },
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 7700786..5e1b557 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -95,7 +95,7 @@ const MainWindow = new Lang.Class({
     Template: 'resource:///org/gnome/Polari/ui/main-window.ui',
     InternalChildren: ['titlebarRight',
                        'titlebarLeft',
-                       'joinMenuButton',
+                       'joinButton',
                        'showUserListButton',
                        'userListPopover',
                        'roomListRevealer',
@@ -148,7 +148,7 @@ const MainWindow = new Lang.Class({
                                       GObject.BindingFlags.SYNC_CREATE);
 
         // Make sure user-list button is at least as wide as icon buttons
-        this._joinMenuButton.connect('size-allocate', Lang.bind(this,
+        this._joinButton.connect('size-allocate', Lang.bind(this,
             function(w, rect) {
                 let width = rect.width;
                 Mainloop.idle_add(Lang.bind(this, function() {


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