[polari] ui: Rename titlebar widget
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] ui: Rename titlebar widget
- Date: Thu, 8 Aug 2013 13:14:49 +0000 (UTC)
commit 418c862d88b6c2869c3767b5b60c904fa21189b0
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jul 31 11:05:31 2013 +0200
ui: Rename titlebar widget
We currently only need access to one of the headerbars in code, so
we don't care about the other's name; however this will change with
selection mode, so give either headerbar an appropriate name.
data/resources/main-window.ui | 10 +++++-----
src/mainWindow.js | 8 +++++---
2 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/data/resources/main-window.ui b/data/resources/main-window.ui
index 9fbbe33..309b11b 100644
--- a/data/resources/main-window.ui
+++ b/data/resources/main-window.ui
@@ -27,7 +27,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkHeaderBar" id="headerbar1">
+ <object class="GtkHeaderBar" id="titlebar_left">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">False</property>
@@ -101,13 +101,13 @@
</object>
</child>
<child>
- <object class="GtkHeaderBar" id="titlebar">
+ <object class="GtkHeaderBar" id="titlebar_right">
<property name="visible">True</property>
<property name="hexpand">True</property>
<!-- 6 should be the default value, but we set it explicitly
to make sure it matches the value used in the left group
- (where we move the padding to the first element instead
- to not confuse the size group, see comment for headerbar1 -->
+ (where we move the padding to the first element instead to
+ not confuse the size group, see comment for titlebar_left -->
<property name="hpadding">6</property>
<style>
<class name="polari-titlebar"/>
@@ -357,7 +357,7 @@
<object class="GtkSizeGroup" id="left_side_size_group">
<property name="mode">horizontal</property>
<widgets>
- <widget name="headerbar1"/>
+ <widget name="titlebar_left"/>
<widget name="frame1"/>
</widgets>
</object>
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 0f81e6e..34a1edb 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -56,7 +56,9 @@ const MainWindow = new Lang.Class({
this._topicChangedId = 0;
this._nicknameChangedId = 0;
- this._titlebar = builder.get_object('titlebar');
+ this._titlebarRight = builder.get_object('titlebar_right');
+ this._titlebarLeft = builder.get_object('titlebar_left');
+
this._revealer = builder.get_object('room_list_revealer');
this._chatStack = builder.get_object('chat_stack');
this._inputArea = builder.get_object('main_input_area');
@@ -227,8 +229,8 @@ const MainWindow = new Lang.Class({
},
_updateTitlebar: function() {
- this._titlebar.title = this._room ? this._room.display_name : null;
- this._titlebar.subtitle = this._room ? this._room.topic : null;
+ this._titlebarRight.title = this._room ? this._room.display_name : null;
+ this._titlebarRight.subtitle = this._room ? this._room.topic : null;
},
_updateNick: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]