Application, Plugin: Make object conversion methods consistent.
Publicly, get objects for a variant rather than from it since we're not actually getting the objects from the variant, just looking them up using the variant as an id. Internally, use `to_` rather than `get_` when converting between plugin and engine objects, since its typically just a cast or a lookup to do so.
This commit is contained in:
parent
c252133222
commit
b8bbe53425
14 changed files with 74 additions and 49 deletions
|
|
@ -614,9 +614,9 @@ public class Application.Client : Gtk.Application {
|
|||
MainWindow main = yield this.present();
|
||||
if (id != null) {
|
||||
EmailStoreFactory email = this.controller.plugins.globals.email;
|
||||
AccountContext? context = email.get_account_from_variant(id);
|
||||
AccountContext? context = email.get_account_for_variant(id);
|
||||
Geary.EmailIdentifier? email_id =
|
||||
email.get_email_identifier_from_variant(id);
|
||||
email.get_email_identifier_for_variant(id);
|
||||
if (context != null && email_id != null) {
|
||||
// Determine what folders the email is in
|
||||
Gee.MultiMap<Geary.EmailIdentifier,Geary.FolderPath>? folders = null;
|
||||
|
|
@ -694,7 +694,7 @@ public class Application.Client : Gtk.Application {
|
|||
MainWindow main = yield this.present();
|
||||
if (id != null) {
|
||||
Geary.Folder? folder =
|
||||
this.controller.plugins.globals.folders.get_folder_from_variant(id);
|
||||
this.controller.plugins.globals.folders.get_folder_for_variant(id);
|
||||
if (folder != null) {
|
||||
yield main.select_folder(folder, true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue