Code convention style tweaks
This commit is contained in:
parent
dfc4c55a99
commit
29d947cd6d
1 changed files with 19 additions and 15 deletions
|
|
@ -1403,29 +1403,20 @@ internal class Application.Controller : Geary.BaseObject {
|
|||
}
|
||||
}
|
||||
|
||||
// Track a window receiving focus, for idle background work
|
||||
/**
|
||||
* Track a window receiving focus, for idle background work.
|
||||
*/
|
||||
public void window_focus_in() {
|
||||
this.all_windows_backgrounded_timeout.reset();
|
||||
}
|
||||
|
||||
// Track a window going unfocused, for idle background work
|
||||
/**
|
||||
* Track a window going unfocused, for idle background work.
|
||||
*/
|
||||
public void window_focus_out() {
|
||||
this.all_windows_backgrounded_timeout.start();
|
||||
}
|
||||
|
||||
private void on_unfocused_idle() {
|
||||
// Schedule later, catching cases where work should occur later while still in background
|
||||
this.all_windows_backgrounded_timeout.reset();
|
||||
this.all_windows_backgrounded = true;
|
||||
window_focus_out();
|
||||
|
||||
debug("Checking for backgrounded idle work");
|
||||
foreach (AccountContext context in this.accounts.values) {
|
||||
Geary.Account account = context.account;
|
||||
account.app_backgrounded_cleanup.begin(context.cancellable);
|
||||
}
|
||||
}
|
||||
|
||||
/** Displays a composer on the last active main window. */
|
||||
internal void show_composer(Composer.Widget composer,
|
||||
Gee.Collection<Geary.EmailIdentifier>? refers_to,
|
||||
|
|
@ -1792,6 +1783,19 @@ internal class Application.Controller : Geary.BaseObject {
|
|||
}
|
||||
}
|
||||
|
||||
private void on_unfocused_idle() {
|
||||
// Schedule later, catching cases where work should occur later while still in background
|
||||
this.all_windows_backgrounded_timeout.reset();
|
||||
this.all_windows_backgrounded = true;
|
||||
window_focus_out();
|
||||
|
||||
debug("Checking for backgrounded idle work");
|
||||
foreach (AccountContext context in this.accounts.values) {
|
||||
Geary.Account account = context.account;
|
||||
account.app_backgrounded_cleanup.begin(context.cancellable);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue