forked from Mirrors/apostrophe
make headerbar autohidding toggeable
parent
d664308efd
commit
4bb6862f0e
|
@ -21,6 +21,13 @@
|
||||||
It can cause performance problems to some users
|
It can cause performance problems to some users
|
||||||
</description>
|
</description>
|
||||||
</key>
|
</key>
|
||||||
|
<key name='poll-motion' type='b'>
|
||||||
|
<default>true</default>
|
||||||
|
<summary>Allow Uberwriter to poll cursor motion</summary>
|
||||||
|
<description>
|
||||||
|
Used for hidding the headerbar after 3 seconds if the cursor is not moving.
|
||||||
|
</description>
|
||||||
|
</key>
|
||||||
<key name='open-file-path' type='s'>
|
<key name='open-file-path' type='s'>
|
||||||
<default>"/tmp"</default>
|
<default>"/tmp"</default>
|
||||||
<summary>Open file base path</summary>
|
<summary>Open file base path</summary>
|
||||||
|
|
|
@ -104,8 +104,10 @@ class UberwriterWindow(Gtk.ApplicationWindow):
|
||||||
self.status_bar_visible = True
|
self.status_bar_visible = True
|
||||||
self.was_motion = True
|
self.was_motion = True
|
||||||
self.buffer_modified_for_status_bar = False
|
self.buffer_modified_for_status_bar = False
|
||||||
self.connect("motion-notify-event", self.on_motion_notify)
|
|
||||||
GObject.timeout_add(3000, self.poll_for_motion)
|
if self.settings.get_value("poll-motion"):
|
||||||
|
self.connect("motion-notify-event", self.on_motion_notify)
|
||||||
|
GObject.timeout_add(3000, self.poll_for_motion)
|
||||||
|
|
||||||
self.accel_group = Gtk.AccelGroup()
|
self.accel_group = Gtk.AccelGroup()
|
||||||
self.add_accel_group(self.accel_group)
|
self.add_accel_group(self.accel_group)
|
||||||
|
|
Loading…
Reference in New Issue