[gnome-music: 5/5] window: rate-limit store_window_size_and_position
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music: 5/5] window: rate-limit store_window_size_and_position
- Date: Wed, 17 Jun 2015 10:44:09 +0000 (UTC)
commit 036adf540596f83acf22eb92e9da9fb603b9329b
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Wed Jun 17 11:41:00 2015 +0200
window: rate-limit store_window_size_and_position
gnomemusic/window.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index d4e3b6f..bfab1a6 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -42,7 +42,7 @@ import gnomemusic.view as Views
import gnomemusic.widgets as Widgets
from gnomemusic.playlists import Playlists
from gnomemusic.grilo import grilo
-from gnomemusic import log
+from gnomemusic import log, RateLimited
import logging
logger = logging.getLogger(__name__)
@@ -136,6 +136,7 @@ class Window(Gtk.ApplicationWindow):
GLib.idle_add(self.store_window_size_and_position, widget, priority=GLib.PRIORITY_LOW)
@log
+ @RateLimited(2)
def store_window_size_and_position(self, widget):
size = widget.get_size()
self.settings.set_value('window-size', GLib.Variant('ai', [size[0], size[1]]))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]