[polari] join-dialog: Add back button manually
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] join-dialog: Add back button manually
- Date: Wed, 17 Sep 2014 02:49:55 +0000 (UTC)
commit 2d48e68cdecfb760b7a950568ac3a717bdc90b22
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Sep 17 01:23:33 2014 +0200
join-dialog: Add back button manually
Action widgets are automatically added to a size group, which is not
appropriate for the image-only back button. So don't make it an
action widget, but add it manually instead.
data/resources/join-room-dialog.ui | 18 ------------------
src/joinDialog.js | 5 ++++-
src/mainWindow.js | 5 ++---
3 files changed, 6 insertions(+), 22 deletions(-)
---
diff --git a/data/resources/join-room-dialog.ui b/data/resources/join-room-dialog.ui
index 5adb34d..8057d6d 100644
--- a/data/resources/join-room-dialog.ui
+++ b/data/resources/join-room-dialog.ui
@@ -21,23 +21,6 @@
<property name="default_width">500</property>
<property name="use_header_bar">1</property>
<child type="action">
- <object class="GtkButton" id="back_button">
- <property name="visible">False</property>
- <property name="can_focus">True</property>
- <property name="valign">center</property>
- <style>
- <class name="image-button"/>
- </style>
- <child>
- <object class="GtkImage" id="back_icon">
- <property name="visible">True</property>
- <property name="icon_name">go-previous-symbolic</property>
- <property name="icon_size">1</property>
- </object>
- </child>
- </object>
- </child>
- <child type="action">
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
@@ -247,7 +230,6 @@
<action-widgets>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="ok">confirm_button</action-widget>
- <action-widget response="help">back_button</action-widget>
</action-widgets>
</object>
</interface>
diff --git a/src/joinDialog.js b/src/joinDialog.js
index 3864425..7c21c1a 100644
--- a/src/joinDialog.js
+++ b/src/joinDialog.js
@@ -80,11 +80,14 @@ const JoinDialog = new Lang.Class({
function() {
this._setPage(DialogPage.CONNECTION);
}));
- this._backButton = builder.get_object('back_button');
+
+ let icon = new Gtk.Image({ icon_name: 'go-previous-symbolic' });
+ this._backButton = new Gtk.Button({ image: icon });
this._backButton.connect('clicked', Lang.bind(this,
function() {
this._setPage(DialogPage.MAIN);
}));
+ this.widget.get_header_bar().pack_start(this._backButton);
this._connectionCombo = builder.get_object('connection_combo');
this._connectionCombo.connect('changed',
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 37aef80..699ef8d 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -296,9 +296,8 @@ const MainWindow = new Lang.Class({
dialog.widget.transient_for = this.window;
dialog.widget.show();
dialog.widget.connect('response',
- function(widget, response) {
- if (response != Gtk.ResponseType.HELP)
- widget.destroy();
+ function(widget) {
+ widget.destroy();
});
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]