From 63462e49de759a23676a30ad740d2d37b6f8fdac Mon Sep 17 00:00:00 2001 From: Michele Date: Tue, 20 Jan 2015 01:44:38 +0000 Subject: [PATCH] prefs.js: Restyle insensitive messageTray option. --- prefs.js | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/prefs.js b/prefs.js index 22ad412ab..39b446fa8 100644 --- a/prefs.js +++ b/prefs.js @@ -490,26 +490,22 @@ const WorkspaceSettingsWidget = new GObject.Class({ /* INSENSITIVE MESSAGE TRAY */ - let insensitiveMessageTray = new Gtk.Box({orientation:Gtk.Orientation.VERTICAL, homogeneous:false, - margin_top:10, margin_right:10, margin_bottom:0, margin_left:10}); - - let insensitiveMessageTrayLabel = new Gtk.Label({label: _("Make message tray not be shown on mouse-over. Used in bottom dock placement."), - hexpand: true, halign: Gtk.Align.START}); - - insensitiveMessageTray.add(insensitiveMessageTrayLabel); - - let insensitiveTick = new Gtk.CheckButton({ label: _("Insensitive On"), hexpand:true }); - insensitiveTick.set_active(this.settings.get_boolean('insensitive-message-tray')); - insensitiveTick.connect('toggled', Lang.bind(this, function(check){ - this.settings.set_boolean('insensitive-message-tray', check.get_active()); - })); - indentWidget(insensitiveTick); - - insensitiveMessageTray.add(insensitiveTick); + let insensitiveMessageTrayControl = new Gtk.Box({margin_left:10, margin_top:10, margin_bottom:5, margin_right:10}); - this.settings.bind('customize-click', clickMain, 'sensitive', Gio.SettingsBindFlags.DEFAULT); + let insensitiveMessageTrayLabel = new Gtk.Label({label: _("Make message tray insensitive to mouse events"), + xalign: 0, hexpand:true}); + let insensitiveMessageTray = new Gtk.Switch({halign:Gtk.Align.END}); + insensitiveMessageTray.set_active(this.settings.get_boolean('insensitive-message-tray')); + insensitiveMessageTray.connect('notify::active', Lang.bind(this, function(check){ + this.settings.set_boolean('insensitive-message-tray', check.get_active()); + })); + + indentWidget(insensitiveMessageTray); + + insensitiveMessageTrayControl.add(insensitiveMessageTrayLabel); + insensitiveMessageTrayControl.add(insensitiveMessageTray); - customization.add(insensitiveMessageTray); + customization.add(insensitiveMessageTrayControl); notebook.append_page(customization, customizationTitle);