Skip to content

Commit

Permalink
prefs.js: Restyle insensitive messageTray option.
Browse files Browse the repository at this point in the history
  • Loading branch information
micheleg committed Jan 21, 2015
1 parent b4c64c9 commit 92ade48
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 92ade48

Please sign in to comment.