Browse Source

applet: avoid refreshing log list when non visible

Enrico Tassi 7 years ago
parent
commit
f849d4eebc
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      smd-applet.vala

+ 4
- 1
smd-applet.vala View File

@@ -308,7 +308,10 @@ class smdApplet : Gtk.Application {
308 308
 		notebook = builder.get_object("nMain") as Gtk.Notebook;
309 309
 		update_loglist();
310 310
 		GLib.Timeout.add(2000,(() => {
311
-			update_loglist(); update_logcontents(); return true; }));
311
+			if (win.visible) {
312
+				update_loglist(); update_logcontents();
313
+			}
314
+			return true; }));
312 315
 
313 316
 		// status icon
314 317
 		si = new Gtk.StatusIcon.from_icon_name("mail-send-receive");

Loading…
Cancel
Save