Clean up the settings UI for preview delay.

Closes #26
This commit is contained in:
jderose9
2017-02-06 22:42:22 -05:00
parent ccee4464ec
commit f2e159dcf0
3 changed files with 12 additions and 6 deletions

View File

@@ -811,14 +811,17 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="margin_left">12</property>
<property name="margin_top">3</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="draw_indicator">True</property>
<child>
<object class="GtkLabel" id="label3">
<property name="name">4</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">4</property>
<property name="label" translatable="yes">Animate &lt;i&gt;Show Applications&lt;/i&gt;.</property>
<property name="use_markup">True</property>
</object>
@@ -980,8 +983,9 @@
<object class="GtkLabel" id="preview_timeout_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Time before showing (ms)</property>
<property name="label" translatable="yes">Time (ms) before showing (100 is default)</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>

View File

@@ -156,9 +156,13 @@ const Settings = new Lang.Class({
'active',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('show-window-previews',
this._builder.get_object('preview_timeout_spinbutton'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT);
this._builder.get_object('preview_timeout_spinbutton'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('show-window-previews',
this._builder.get_object('preview_timeout_label'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT);
this._builder.get_object('preview_timeout_spinbutton').set_value(this._settings.get_int('show-window-previews-timeout'));
this._builder.get_object('preview_timeout_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {

View File

@@ -141,7 +141,6 @@ const thumbnailPreviewMenu = new Lang.Class({
cancelOpen: function () {
if(this._hoverOpenTimeoutId) {
Mainloop.source_remove(this._hoverOpenTimeoutId);
log("cancelled open");
this._hoverOpenTimeoutId = null;
}
},
@@ -149,7 +148,6 @@ const thumbnailPreviewMenu = new Lang.Class({
cancelClose: function () {
if(this._hoverCloseTimeoutId) {
Mainloop.source_remove(this._hoverCloseTimeoutId);
log("cancelled close");
this._hoverCloseTimeoutId = null;
}
},