[polari] entryArea: Use more generic names in paste UI
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] entryArea: Use more generic names in paste UI
- Date: Fri, 12 Feb 2016 21:18:47 +0000 (UTC)
commit 54d948a464af46541a9c79d1cfd56a194f57dec9
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Feb 11 22:31:23 2016 +0100
entryArea: Use more generic names in paste UI
"multiline" became a bit of a misnomer when support for pasting
images we added.
data/resources/entry-area.ui | 6 +++---
src/entryArea.js | 14 +++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/data/resources/entry-area.ui b/data/resources/entry-area.ui
index f7beca8..26b6b28 100644
--- a/data/resources/entry-area.ui
+++ b/data/resources/entry-area.ui
@@ -96,13 +96,13 @@
<class name="polari-paste-confirmation"/>
</style>
<child>
- <object class="GtkBox" id="multiLineBox">
+ <object class="GtkBox" id="pasteBox">
<property name="visible">True</property>
<property name="spacing">6</property>
<property name="margin">6</property>
<property name="margin-end">14</property>
<child>
- <object class="GtkLabel" id="multiLineLabel">
+ <object class="GtkLabel" id="confirmLabel">
<property name="visible">True</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
@@ -134,7 +134,7 @@
</child>
</object>
<packing>
- <property name="name">multiline</property>
+ <property name="name">paste-confirmation</property>
</packing>
</child>
</template>
diff --git a/src/entryArea.js b/src/entryArea.js
index 320750f..2da7d26 100644
--- a/src/entryArea.js
+++ b/src/entryArea.js
@@ -72,8 +72,8 @@ const EntryArea = new Lang.Class({
'nickPopover',
'nickEntry',
'changeButton',
- 'multiLineBox',
- 'multiLineLabel',
+ 'pasteBox',
+ 'confirmLabel',
'cancelButton',
'pasteButton'],
Properties: {
@@ -130,7 +130,7 @@ const EntryArea = new Lang.Class({
this._cancelButton.connect('clicked', Lang.bind(this, this._onButtonClicked));
this._pasteButton.connect('clicked', Lang.bind(this, this._onButtonClicked));
- this._multiLineBox.connect_after('key-press-event', Lang.bind(this,
+ this._pasteBox.connect_after('key-press-event', Lang.bind(this,
function(w, event) {
let [, keyval] = event.get_keyval();
let [, mods] = event.get_state();
@@ -216,24 +216,24 @@ const EntryArea = new Lang.Class({
},
_onTextPasted: function(entry, text, nLines) {
- this._multiLineLabel.label =
+ this._confirmLabel.label =
ngettext("Paste %s line of text to public paste service?",
"Paste %s lines of text to public paste service?",
nLines).format(nLines);
this._pasteButton.action_target = new GLib.Variant('(ayi)', [text, PasteManager.DndTargetType.TEXT]);
- this.visible_child_name = 'multiline';
+ this.visible_child_name = 'paste-confirmation';
this._pasteButton.grab_focus();
},
_onImagePasted: function(entry, data) {
- this._multiLineLabel.label = _("Upload image to public paste service?");
+ this._confirmLabel.label = _("Upload image to public paste service?");
let [success, buffer] = data.save_to_bufferv('png',[],[]);
if (!success)
return;
this._pasteButton.action_target = new GLib.Variant('(ayi)', [buffer,
PasteManager.DndTargetType.IMAGE]);
- this.visible_child_name = 'multiline';
+ this.visible_child_name = 'paste-confirmation';
this._pasteButton.grab_focus();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]