[gnome-shell] networkAgent: Port to ClutterTableLayout
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] networkAgent: Port to ClutterTableLayout
- Date: Thu, 19 Sep 2013 05:54:43 +0000 (UTC)
commit be1a7bac7c8f28678cb5f8609cc370046794f330
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jul 9 03:08:47 2013 +0200
networkAgent: Port to ClutterTableLayout
We don't make use of any functionality StTable provides over
ClutterTableLayout, so port all users to the Clutter layout
in order to remove our own copy of the code.
https://bugzilla.gnome.org/show_bug.cgi?id=703833
js/ui/components/networkAgent.js | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js
index 189dc94..63c8bb7 100644
--- a/js/ui/components/networkAgent.js
+++ b/js/ui/components/networkAgent.js
@@ -72,7 +72,11 @@ const NetworkSecretDialog = new Lang.Class({
expand: true });
}
- let secretTable = new St.Table({ style_class: 'network-dialog-secret-table' });
+ let layout = new Clutter.TableLayout();
+ let secretTable = new St.Widget({ style_class: 'network-dialog-secret-table',
+ layout_manager: layout });
+ layout.hookup_style(secretTable);
+
let initialFocusSet = false;
let pos = 0;
for (let i = 0; i < this._content.secrets.length; i++) {
@@ -111,11 +115,10 @@ const NetworkSecretDialog = new Lang.Class({
} else
secret.valid = true;
- secretTable.add(label, { row: pos, col: 0,
- x_expand: false, x_fill: true,
- x_align: St.Align.START,
- y_fill: false, y_align: St.Align.MIDDLE });
- secretTable.add(secret.entry, { row: pos, col: 1, x_expand: true, x_fill: true, y_align:
St.Align.END });
+ layout.pack(label, 0, pos);
+ layout.child_set(label, { x_expand: false, y_fill: false,
+ x_align: Clutter.TableAlignment.START });
+ layout.pack(secret.entry, 1, pos);
pos++;
if (secret.password)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]