diff --git a/extension.js b/extension.js index 9a17261..c9da8f7 100644 --- a/extension.js +++ b/extension.js @@ -212,10 +212,31 @@ class Indicator extends PanelMenu.Button { this.setupTimeout ( ); } + createHeaderBin ( status, text, col ) { + let _widths = [ 300, 300, 200, 50, 600 ]; + let _bin = new St.Bin({ + style_class: 'monito-service-' + status, + width: _widths[col], + x_expand: ( col == 4 ? true : false ), + child: new St.Button ( { + x_align: Clutter.ActorAlign.FILL, + y_align: Clutter.ActorAlign.CENTER, + reactive: true, + can_focus: true, + track_hover: true, + accessible_name: text, + style_class: 'button', + label: 'Foo', + }) + }); + return _bin; + } + createBin ( status, text, col ) { let _widths = [ 300, 300, 200, 50, 600 ]; let _bin = new St.Bin({ style_class: 'monito-service-' + status, + track_hover: true, width: _widths[col], x_expand: ( col == 4 ? true : false ), child: new St.Label({ style_class: 'monito-label', text: text }) @@ -228,6 +249,19 @@ class Indicator extends PanelMenu.Button { this._box.remove_all_children(); + let headerBox = new St.BoxLayout({ + style_class: 'monito-service-line', + hover: true, + x_expand: true + }); + this._box.add_child(headerBox); + + headerBox.add_child ( this.createHeaderBin ( '', 'Foo', 0 ) ); + headerBox.add_child ( this.createHeaderBin ( '', 'Foo', 1 ) ); + headerBox.add_child ( this.createHeaderBin ( '', 'Foo', 2 ) ); + headerBox.add_child ( this.createHeaderBin ( '', 'Foo', 3 ) ); + headerBox.add_child ( this.createHeaderBin ( '', 'Foo', 4 ) ); + for ( let i = 0 ; i < serverLogic.status.service_status.length ; i ++ ) { _status [ serverLogic.status.service_status[i].status ] ++; @@ -285,7 +319,7 @@ class Indicator extends PanelMenu.Button { can_focus: true, track_hover: true, accessible_name: text, - style_class: 'button' + style_class: 'button', }); button.child = new St.Icon({ diff --git a/prefs.js b/prefs.js index 919966e..4c8fc44 100644 --- a/prefs.js +++ b/prefs.js @@ -189,6 +189,13 @@ function createAccountWidgets ( isActive ) this.prefWidgets = { }; + this._accountsWidget.attach ( new Gtk.Label({ + label: '' + _('Accounts settings') + '', + visible: true, + halign: Gtk.Align.START, + use_markup: true, + }), 0, 0, 2, 1 ); + let y = 1; for ( var prefEntry of prefs ) {