[geary/mjog/mutiple-main-windows: 2/14] Rename GearyApplication class and source to match code style
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/mutiple-main-windows: 2/14] Rename GearyApplication class and source to match code style
- Date: Mon, 18 Nov 2019 04:31:47 +0000 (UTC)
commit 56876365ba031b9bc013c3a36741128896bfd0ea
Author: Michael Gratton <mike vee net>
Date: Wed Nov 13 10:54:11 2019 +1100
Rename GearyApplication class and source to match code style
Rename `GearyApplication` => `Application.Client` and
`geary-application.vala to `application-client.vala`. Update call sites
and test cases.
po/POTFILES.in | 2 +-
src/client/accounts/accounts-editor-add-pane.vala | 5 ++---
src/client/accounts/accounts-editor-edit-pane.vala | 4 +---
src/client/accounts/accounts-editor-list-pane.vala | 2 +-
.../accounts/accounts-editor-servers-pane.vala | 2 +-
src/client/accounts/accounts-editor.vala | 10 +++++++--
...ry-application.vala => application-client.vala} | 26 +++++++++++-----------
src/client/application/application-controller.vala | 8 +++----
.../application/application-plugin-manager.vala | 4 ++--
src/client/application/main.vala | 2 +-
src/client/application/secret-mediator.vala | 2 +-
.../components/components-attachment-pane.vala | 2 +-
.../components-inspector-system-view.vala | 8 +++----
src/client/components/components-inspector.vala | 4 ++--
src/client/components/main-window.vala | 11 ++++-----
src/client/composer/composer-widget.vala | 12 +++++-----
src/client/composer/composer-window.vala | 6 ++---
.../dialogs/dialogs-problem-details-dialog.vala | 2 +-
src/client/dialogs/preferences-dialog.vala | 4 ++--
src/client/meson.build | 2 +-
.../desktop-notifications.vala | 4 ++--
.../plugin/messaging-menu/messaging-menu.vala | 4 ++--
.../notification-badge/notification-badge.vala | 4 ++--
src/client/plugin/plugin-notification.vala | 2 +-
src/client/util/util-migrate.vala | 4 ++--
...tion-test.vala => application-client-test.vala} | 10 ++++-----
.../application-configuration-test.vala | 2 +-
.../components/client-web-view-test-case.vala | 2 +-
test/client/components/client-web-view-test.vala | 2 +-
test/meson.build | 2 +-
test/test-client.vala | 2 +-
31 files changed, 80 insertions(+), 76 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 98c77885..b8a16b80 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -17,6 +17,7 @@ src/client/accounts/accounts-signature-web-view.vala
src/client/application/application-attachment-manager.vala
src/client/application/application-avatar-store.vala
src/client/application/application-certificate-manager.vala
+src/client/application/application-client.vala
src/client/application/application-command.vala
src/client/application/application-configuration.vala
src/client/application/application-contact-store.vala
@@ -25,7 +26,6 @@ src/client/application/application-controller.vala
src/client/application/application-notification-context.vala
src/client/application/application-plugin-manager.vala
src/client/application/application-startup-manager.vala
-src/client/application/geary-application.vala
src/client/application/goa-mediator.vala
src/client/application/main.vala
src/client/application/secret-mediator.vala
diff --git a/src/client/accounts/accounts-editor-add-pane.vala
b/src/client/accounts/accounts-editor-add-pane.vala
index cfbb3276..d565930d 100644
--- a/src/client/accounts/accounts-editor-add-pane.vala
+++ b/src/client/accounts/accounts-editor-add-pane.vala
@@ -90,9 +90,8 @@ internal class Accounts.EditorAddPane : Gtk.Grid, EditorPane {
this.editor = editor;
this.provider = provider;
- GearyApplication application = (GearyApplication) editor.application;
- this.accounts = application.controller.account_manager;
- this.engine = application.engine;
+ this.accounts = editor.application.controller.account_manager;
+ this.engine = editor.application.engine;
this.pane_content.set_focus_vadjustment(this.pane_adjustment);
diff --git a/src/client/accounts/accounts-editor-edit-pane.vala
b/src/client/accounts/accounts-editor-edit-pane.vala
index 0c052b44..c1df9a95 100644
--- a/src/client/accounts/accounts-editor-edit-pane.vala
+++ b/src/client/accounts/accounts-editor-edit-pane.vala
@@ -86,9 +86,7 @@ internal class Accounts.EditorEditPane :
}
this.senders_list.add(new AddMailboxRow());
- this.signature_preview = new SignatureWebView(
- ((GearyApplication) editor.application).config
- );
+ this.signature_preview = new SignatureWebView(editor.application.config);
this.signature_preview.events = (
this.signature_preview.events | Gdk.EventType.FOCUS_CHANGE
);
diff --git a/src/client/accounts/accounts-editor-list-pane.vala
b/src/client/accounts/accounts-editor-list-pane.vala
index 67b7c26b..9bb42c1a 100644
--- a/src/client/accounts/accounts-editor-list-pane.vala
+++ b/src/client/accounts/accounts-editor-list-pane.vala
@@ -92,7 +92,7 @@ internal class Accounts.EditorListPane : Gtk.Grid, EditorPane, CommandPane {
public EditorListPane(Editor editor) {
this.editor = editor;
- this.welcome_icon.icon_name = GearyApplication.APP_ID;
+ this.welcome_icon.icon_name = Application.Client.APP_ID;
// keep our own copy of this so we can disconnect from its signals
// without worrying about the editor's lifecycle
diff --git a/src/client/accounts/accounts-editor-servers-pane.vala
b/src/client/accounts/accounts-editor-servers-pane.vala
index 7bfa6f09..dcc83f18 100644
--- a/src/client/accounts/accounts-editor-servers-pane.vala
+++ b/src/client/accounts/accounts-editor-servers-pane.vala
@@ -90,7 +90,7 @@ internal class Accounts.EditorServersPane :
public EditorServersPane(Editor editor, Geary.AccountInformation account) {
this.editor = editor;
this.account = account;
- this.engine = ((GearyApplication) editor.application).engine;
+ this.engine = editor.application.engine;
this.incoming_mutable = new Geary.ServiceInformation.copy(account.incoming);
this.outgoing_mutable = new Geary.ServiceInformation.copy(account.outgoing);
diff --git a/src/client/accounts/accounts-editor.vala b/src/client/accounts/accounts-editor.vala
index 7f3252bb..4f14e88f 100644
--- a/src/client/accounts/accounts-editor.vala
+++ b/src/client/accounts/accounts-editor.vala
@@ -34,6 +34,12 @@ public class Accounts.Editor : Gtk.Dialog {
}
+ /** Returns the editor's associated client application instance. */
+ public new Application.Client application {
+ get { return (Application.Client) base.get_application(); }
+ set { base.set_application(value); }
+ }
+
internal Manager accounts { get; private set; }
internal Application.CertificateManager certificates {
@@ -54,10 +60,10 @@ public class Accounts.Editor : Gtk.Dialog {
new Gee.LinkedList<EditorPane>();
- public Editor(GearyApplication application, Gtk.Window parent) {
+ public Editor(Application.Client application, Gtk.Window parent) {
this.application = application;
this.transient_for = parent;
- this.icon_name = GearyApplication.APP_ID;
+ this.icon_name = Application.Client.APP_ID;
this.accounts = application.controller.account_manager;
this.certificates = application.controller.certificate_manager;
diff --git a/src/client/application/geary-application.vala b/src/client/application/application-client.vala
similarity index 97%
rename from src/client/application/geary-application.vala
rename to src/client/application/application-client.vala
index 4ede37e1..976c3098 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/application-client.vala
@@ -22,9 +22,9 @@ extern const string _REVNO;
/**
- * The interface between Geary and the desktop environment.
+ * The client application's main point of entry and desktop integration.
*/
-public class GearyApplication : Gtk.Application {
+public class Application.Client : Gtk.Application {
public const string NAME = "Geary" + _NAME_SUFFIX;
public const string APP_ID = _APP_ID;
@@ -163,7 +163,7 @@ public class GearyApplication : Gtk.Application {
* after initial activation, or after startup if {@link
* is_background_service} is true.
*/
- public Application.Controller? controller {
+ public Controller? controller {
get; private set; default = null;
}
@@ -185,7 +185,7 @@ public class GearyApplication : Gtk.Application {
* This will be null until {@link startup} has been called, and
* hence will only ever become non-null for the primary instance.
*/
- public Application.Configuration? config {
+ public Configuration? config {
get; private set; default = null;
}
@@ -195,7 +195,7 @@ public class GearyApplication : Gtk.Application {
* This will be null until {@link startup} has been called, and
* hence will only ever become non-null for the primary instance.
*/
- public Application.StartupManager? autostart {
+ public StartupManager? autostart {
get; private set; default = null;
}
@@ -326,7 +326,7 @@ public class GearyApplication : Gtk.Application {
}
- public GearyApplication() {
+ public Client() {
Object(
application_id: APP_ID,
flags: (
@@ -356,7 +356,7 @@ public class GearyApplication : Gtk.Application {
public override int handle_local_options(GLib.VariantDict options) {
if (options.contains(OPTION_VERSION)) {
GLib.stdout.printf(
- "%s: %s\n", this.binary, GearyApplication.VERSION
+ "%s: %s\n", this.binary, Client.VERSION
);
return 0;
}
@@ -367,7 +367,7 @@ public class GearyApplication : Gtk.Application {
Environment.set_application_name(NAME);
Util.International.init(GETTEXT_PACKAGE, this.binary);
- Application.Configuration.init(this.is_installed, GSETTINGS_DIR);
+ Configuration.init(this.is_installed, GSETTINGS_DIR);
Geary.Logging.init();
Geary.Logging.log_to(stderr);
GLib.Log.set_writer_func(Geary.Logging.default_log_writer);
@@ -382,8 +382,8 @@ public class GearyApplication : Gtk.Application {
// Calls Gtk.init(), amongst other things
base.startup();
- this.config = new Application.Configuration(SCHEMA_ID);
- this.autostart = new Application.StartupManager(
+ this.config = new Configuration(SCHEMA_ID);
+ this.autostart = new StartupManager(
this.config, this.get_desktop_directory()
);
@@ -688,7 +688,7 @@ public class GearyApplication : Gtk.Application {
GLib.Notification error = new GLib.Notification(summary);
error.set_body(body);
error.set_icon(
- new GLib.ThemedIcon("%s-symbolic".printf(GearyApplication.APP_ID))
+ new GLib.ThemedIcon("%s-symbolic".printf(Client.APP_ID))
);
send_notification(ERROR_NOTIFICATION_ID, error);
this.error_notification = error;
@@ -727,7 +727,7 @@ public class GearyApplication : Gtk.Application {
this.is_installed.to_string()
);
- this.controller = yield new Application.Controller(
+ this.controller = yield new Controller(
this, this.controller_cancellable
);
first_run = !this.engine.has_accounts;
@@ -963,7 +963,7 @@ public class GearyApplication : Gtk.Application {
File exec_dir = this.exec_dir;
string[] argv = new string[3];
argv[0] = "yelp";
- argv[1] = GearyApplication.SOURCE_ROOT_DIR + "/help/C/";
+ argv[1] = Client.SOURCE_ROOT_DIR + "/help/C/";
argv[2] = null;
if (!Process.spawn_async(
exec_dir.get_path(),
diff --git a/src/client/application/application-controller.vala
b/src/client/application/application-controller.vala
index 9b17ed00..b00a4875 100644
--- a/src/client/application/application-controller.vala
+++ b/src/client/application/application-controller.vala
@@ -132,7 +132,7 @@ public class Application.Controller : Geary.BaseObject {
}
/** The primary application instance that owns this controller. */
- public weak GearyApplication application { get; private set; } // circular ref
+ public weak Client application { get; private set; } // circular ref
/** Account management for the application. */
public Accounts.Manager account_manager { get; private set; }
@@ -175,7 +175,7 @@ public class Application.Controller : Geary.BaseObject {
/**
* Constructs a new instance of the controller.
*/
- public async Controller(GearyApplication application,
+ public async Controller(Client application,
GLib.Cancellable cancellable) {
this.application = application;
this.open_cancellable = cancellable;
@@ -2673,14 +2673,14 @@ private class Application.SendComposerCommand : ComposerCommand {
get { return this.application.config.undo_send_delay > 0; }
}
- private GearyApplication application;
+ private Client application;
private Controller.AccountContext context;
private Geary.Smtp.ClientService smtp;
private Geary.TimeoutManager commit_timer;
private Geary.EmailIdentifier? saved = null;
- public SendComposerCommand(GearyApplication application,
+ public SendComposerCommand(Client application,
Controller.AccountContext context,
Composer.Widget composer) {
base(composer);
diff --git a/src/client/application/application-plugin-manager.vala
b/src/client/application/application-plugin-manager.vala
index 5e0b07ba..746d0568 100644
--- a/src/client/application/application-plugin-manager.vala
+++ b/src/client/application/application-plugin-manager.vala
@@ -13,13 +13,13 @@ public class Application.PluginManager : GLib.Object {
public NotificationContext notifications { get; set; }
- private GearyApplication application;
+ private Client application;
private Peas.Engine engine;
private Peas.ExtensionSet? notification_extensions = null;
private bool is_shutdown = false;
- public PluginManager(GearyApplication application) {
+ public PluginManager(Client application) {
this.application = application;
this.engine = Peas.Engine.get_default();
this.engine.add_search_path(
diff --git a/src/client/application/main.vala b/src/client/application/main.vala
index d45bacf2..c95a3a4c 100644
--- a/src/client/application/main.vala
+++ b/src/client/application/main.vala
@@ -25,7 +25,7 @@ int main(string[] args) {
// proper fix lands. See GNOME/geary#558.
Environment.set_variable("WEBKIT_USE_SINGLE_WEB_PROCESS", "1", true);
- GearyApplication app = new GearyApplication();
+ Application.Client app = new Application.Client();
int ec = app.run(args);
diff --git a/src/client/application/secret-mediator.vala b/src/client/application/secret-mediator.vala
index 5d69b80e..199435e2 100644
--- a/src/client/application/secret-mediator.vala
+++ b/src/client/application/secret-mediator.vala
@@ -13,7 +13,7 @@ public class SecretMediator : Geary.CredentialsMediator, Object {
private const string ATTR_PROTO = "proto";
private static Secret.Schema schema = new Secret.Schema(
- GearyApplication.SCHEMA_ID,
+ Application.Client.SCHEMA_ID,
Secret.SchemaFlags.NONE,
ATTR_LOGIN, Secret.SchemaAttributeType.STRING,
ATTR_HOST, Secret.SchemaAttributeType.STRING,
diff --git a/src/client/components/components-attachment-pane.vala
b/src/client/components/components-attachment-pane.vala
index 3157114d..6ec58462 100644
--- a/src/client/components/components-attachment-pane.vala
+++ b/src/client/components/components-attachment-pane.vala
@@ -371,7 +371,7 @@ public class Components.AttachmentPane : Gtk.Grid {
private void open_attachments(Gee.Collection<Geary.Attachment> attachments) {
MainWindow? main = this.get_toplevel() as MainWindow;
if (main != null) {
- GearyApplication app = main.application;
+ Application.Client app = main.application;
bool confirmed = true;
if (app.config.ask_open_attachment) {
QuestionDialog ask_to_open = new QuestionDialog.with_checkbox(
diff --git a/src/client/components/components-inspector-system-view.vala
b/src/client/components/components-inspector-system-view.vala
index 8c9d82df..51249896 100644
--- a/src/client/components/components-inspector-system-view.vala
+++ b/src/client/components/components-inspector-system-view.vala
@@ -60,12 +60,12 @@ public class Components.InspectorSystemView : Gtk.Grid {
[GtkChild]
private Gtk.ListBox system_list;
- private Gee.Collection<GearyApplication.RuntimeDetail?> details;
+ private Gee.Collection<Application.Client.RuntimeDetail?> details;
- public InspectorSystemView(GearyApplication application) {
+ public InspectorSystemView(Application.Client application) {
this.details = application.get_runtime_information();
- foreach (GearyApplication.RuntimeDetail? detail in this.details) {
+ foreach (Application.Client.RuntimeDetail? detail in this.details) {
this.system_list.add(
new DetailRow("%s:".printf(detail.name), detail.value)
);
@@ -77,7 +77,7 @@ public class Components.InspectorSystemView : Gtk.Grid {
GLib.Cancellable? cancellable)
throws GLib.Error {
string line_sep = format.get_line_separator();
- foreach (GearyApplication.RuntimeDetail? detail in this.details) {
+ foreach (Application.Client.RuntimeDetail? detail in this.details) {
out.put_string(detail.name);
out.put_string(": ");
out.put_string(detail.value);
diff --git a/src/client/components/components-inspector.vala b/src/client/components/components-inspector.vala
index 5af29b41..0a803154 100644
--- a/src/client/components/components-inspector.vala
+++ b/src/client/components/components-inspector.vala
@@ -41,7 +41,7 @@ public class Components.Inspector : Gtk.ApplicationWindow {
};
- public static void add_accelerators(GearyApplication app) {
+ public static void add_accelerators(Application.Client app) {
app.add_window_accelerators(ACTION_CLOSE, { "Escape" } );
app.add_window_accelerators(ACTION_PLAY_TOGGLE, { "space" } );
app.add_window_accelerators(ACTION_SEARCH_ACTIVATE, { "<Ctrl>F" } );
@@ -67,7 +67,7 @@ public class Components.Inspector : Gtk.ApplicationWindow {
private InspectorSystemView system_pane;
- public Inspector(GearyApplication application) {
+ public Inspector(Application.Client application) {
Object(application: application);
this.title = this.header_bar.title = _("Inspector");
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index 216c2340..b77bbf3d 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -74,7 +74,7 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
private const int MIN_CONVERSATION_COUNT = 50;
- public static void add_accelerators(GearyApplication owner) {
+ public static void add_accelerators(Application.Client owner) {
// Marking actions
//
// Unread is the primary action, so it doesn't get the <Shift>
@@ -158,8 +158,9 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
private enum ConversationCount { NONE, SINGLE, MULTIPLE; }
- public new GearyApplication application {
- get { return (GearyApplication) base.get_application(); }
+ /** Returns the window's associated client application instance. */
+ public new Application.Client application {
+ get { return (Application.Client) base.get_application(); }
set { base.set_application(value); }
}
@@ -273,7 +274,7 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
public signal void retry_service_problem(Geary.ClientService.Status problem);
- public MainWindow(GearyApplication application) {
+ public MainWindow(Application.Client application) {
Object(
application: application,
show_menubar: false
@@ -873,7 +874,7 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
string folder = selected_folder != null ? selected_folder.get_display_name() + " " : "";
string account = main_toolbar.account != null ? "(%s)".printf(main_toolbar.account) : "";
- target = "%s%s - %s".printf(folder, account, GearyApplication.NAME);
+ target = "%s%s - %s".printf(folder, account, Application.Client.NAME);
return true;
};
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 56203c79..d1103b35 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -185,7 +185,7 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
{ ACTION_SHOW_EXTENDED_HEADERS, on_toggle_action, null, "false", on_show_extended_headers_toggled
},
};
- public static void add_accelerators(GearyApplication application) {
+ public static void add_accelerators(Application.Client application) {
application.add_window_accelerators(ACTION_DISCARD, { "Escape" } );
application.add_window_accelerators(ACTION_ADD_ATTACHMENT, { "<Ctrl>t" } );
application.add_window_accelerators(ACTION_DETACH, { "<Ctrl>d" } );
@@ -462,10 +462,10 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
get { return this.parent as Container; }
}
- private GearyApplication application;
+ private Application.Client application;
- public Widget(GearyApplication application,
+ public Widget(Application.Client application,
Geary.Account initial_account,
ComposeType compose_type) {
base_ref();
@@ -592,14 +592,14 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
load_entry_completions();
}
- public Widget.from_mailbox(GearyApplication application,
+ public Widget.from_mailbox(Application.Client application,
Geary.Account initial_account,
Geary.RFC822.MailboxAddress to) {
this(application, initial_account, ComposeType.NEW_MESSAGE);
this.to = to.to_full_display();
}
- public Widget.from_mailto(GearyApplication application,
+ public Widget.from_mailto(Application.Client application,
Geary.Account initial_account,
string mailto) {
this(application, initial_account, ComposeType.NEW_MESSAGE);
@@ -1292,7 +1292,7 @@ public class Composer.Widget : Gtk.EventBox, Geary.BaseInterface {
}
// User-Agent
- email.mailer = Environment.get_prgname() + "/" + GearyApplication.VERSION;
+ email.mailer = Environment.get_prgname() + "/" + Application.Client.VERSION;
return email;
}
diff --git a/src/client/composer/composer-window.vala b/src/client/composer/composer-window.vala
index 9ca8699b..91bfc08b 100644
--- a/src/client/composer/composer-window.vala
+++ b/src/client/composer/composer-window.vala
@@ -24,8 +24,8 @@ public class Composer.Window : Gtk.ApplicationWindow, Container {
}
/** {@inheritDoc} */
- public new GearyApplication? application {
- get { return base.get_application() as GearyApplication; }
+ public new Application.Client application {
+ get { return (Application.Client) base.get_application(); }
set { base.set_application(value); }
}
@@ -33,7 +33,7 @@ public class Composer.Window : Gtk.ApplicationWindow, Container {
internal Widget composer { get; set; }
- public Window(Widget composer, GearyApplication application) {
+ public Window(Widget composer, Application.Client application) {
Object(application: application, type: Gtk.WindowType.TOPLEVEL);
this.composer = composer;
this.composer.set_mode(DETACHED);
diff --git a/src/client/dialogs/dialogs-problem-details-dialog.vala
b/src/client/dialogs/dialogs-problem-details-dialog.vala
index 59e4c97f..ab0c7f6a 100644
--- a/src/client/dialogs/dialogs-problem-details-dialog.vala
+++ b/src/client/dialogs/dialogs-problem-details-dialog.vala
@@ -27,7 +27,7 @@ public class Dialogs.ProblemDetailsDialog : Hdy.Dialog {
{ ACTION_SEARCH_ACTIVATE, on_logs_search_activated },
};
- public static void add_accelerators(GearyApplication app) {
+ public static void add_accelerators(Application.Client app) {
app.add_window_accelerators(ACTION_CLOSE, { "Escape" } );
app.add_window_accelerators(ACTION_SEARCH_ACTIVATE, { "<Ctrl>F" } );
}
diff --git a/src/client/dialogs/preferences-dialog.vala b/src/client/dialogs/preferences-dialog.vala
index 5d77c685..5a0ce3db 100644
--- a/src/client/dialogs/preferences-dialog.vala
+++ b/src/client/dialogs/preferences-dialog.vala
@@ -22,9 +22,9 @@ public class PreferencesDialog : Gtk.Dialog {
[GtkChild]
private Gtk.HeaderBar header;
- private GearyApplication app;
+ private Application.Client app;
- public PreferencesDialog(Gtk.Window parent, GearyApplication app) {
+ public PreferencesDialog(Gtk.Window parent, Application.Client app) {
set_transient_for(parent);
set_titlebar(this.header);
this.app = app;
diff --git a/src/client/meson.build b/src/client/meson.build
index 09b5c685..49097e56 100644
--- a/src/client/meson.build
+++ b/src/client/meson.build
@@ -3,6 +3,7 @@ geary_client_vala_sources = files(
'application/application-attachment-manager.vala',
'application/application-avatar-store.vala',
'application/application-certificate-manager.vala',
+ 'application/application-client.vala',
'application/application-command.vala',
'application/application-configuration.vala',
'application/application-contact-store.vala',
@@ -11,7 +12,6 @@ geary_client_vala_sources = files(
'application/application-notification-context.vala',
'application/application-plugin-manager.vala',
'application/application-startup-manager.vala',
- 'application/geary-application.vala',
'application/goa-mediator.vala',
'application/secret-mediator.vala',
diff --git a/src/client/plugin/desktop-notifications/desktop-notifications.vala
b/src/client/plugin/desktop-notifications/desktop-notifications.vala
index 021a25a9..8c57a16e 100644
--- a/src/client/plugin/desktop-notifications/desktop-notifications.vala
+++ b/src/client/plugin/desktop-notifications/desktop-notifications.vala
@@ -24,7 +24,7 @@ public class Plugin.DesktopNotifications : Notification {
public const Geary.Email.Field REQUIRED_FIELDS =
Geary.Email.Field.ORIGINATORS | Geary.Email.Field.SUBJECT;
- public override GearyApplication application {
+ public override Application.Client application {
get; construct set;
}
@@ -172,7 +172,7 @@ public class Plugin.DesktopNotifications : Notification {
GLib.Notification notification = new GLib.Notification(summary);
notification.set_body(body);
notification.set_icon(
- new GLib.ThemedIcon("%s-symbolic".printf(GearyApplication.APP_ID))
+ new GLib.ThemedIcon("%s-symbolic".printf(Application.Client.APP_ID))
);
/* We do not show notification action under Unity */
diff --git a/src/client/plugin/messaging-menu/messaging-menu.vala
b/src/client/plugin/messaging-menu/messaging-menu.vala
index c1d8883e..4506b1c7 100644
--- a/src/client/plugin/messaging-menu/messaging-menu.vala
+++ b/src/client/plugin/messaging-menu/messaging-menu.vala
@@ -19,7 +19,7 @@ public void peas_register_types(TypeModule module) {
public class Plugin.MessagingMenu : Notification {
- public override GearyApplication application {
+ public override Application.Client application {
get; construct set;
}
@@ -32,7 +32,7 @@ public class Plugin.MessagingMenu : Notification {
public override void activate() {
this.app = new global::MessagingMenu.App(
- "%s.desktop".printf(GearyApplication.APP_ID)
+ "%s.desktop".printf(Application.Client.APP_ID)
);
this.app.register();
this.app.activate_source.connect(on_activate_source);
diff --git a/src/client/plugin/notification-badge/notification-badge.vala
b/src/client/plugin/notification-badge/notification-badge.vala
index 26c043a8..8285ec58 100644
--- a/src/client/plugin/notification-badge/notification-badge.vala
+++ b/src/client/plugin/notification-badge/notification-badge.vala
@@ -19,7 +19,7 @@ public void peas_register_types(TypeModule module) {
public class Plugin.NotificationBadge : Notification {
- public override GearyApplication application {
+ public override Application.Client application {
get; construct set;
}
@@ -31,7 +31,7 @@ public class Plugin.NotificationBadge : Notification {
public override void activate() {
this.entry = Unity.LauncherEntry.get_for_desktop_id(
- GearyApplication.APP_ID + ".desktop"
+ Application.Client.APP_ID + ".desktop"
);
this.context.notify["total-new-messages"].connect(on_total_changed);
update_count();
diff --git a/src/client/plugin/plugin-notification.vala b/src/client/plugin/plugin-notification.vala
index e0a0e110..90513c6e 100644
--- a/src/client/plugin/plugin-notification.vala
+++ b/src/client/plugin/plugin-notification.vala
@@ -11,7 +11,7 @@
public abstract class Plugin.Notification : GLib.Object {
/** The application instance containing the plugin. */
- public abstract GearyApplication application {
+ public abstract Application.Client application {
get; construct set;
}
diff --git a/src/client/util/util-migrate.vala b/src/client/util/util-migrate.vala
index 42033f03..f4a905ed 100644
--- a/src/client/util/util-migrate.vala
+++ b/src/client/util/util-migrate.vala
@@ -114,9 +114,9 @@ namespace Migrate {
public static void old_app_config(Settings newSettings, string old_app_id = OLD_APP_ID) {
SettingsSchemaSource schemaSource = SettingsSchemaSource.get_default();
- if (GearyApplication.GSETTINGS_DIR != null) {
+ if (Application.Client.GSETTINGS_DIR != null) {
try {
- schemaSource = new SettingsSchemaSource.from_directory(GearyApplication.GSETTINGS_DIR, null,
false);
+ schemaSource = new SettingsSchemaSource.from_directory(Application.Client.GSETTINGS_DIR,
null, false);
} catch (Error e) {
// If it didn't work, do nothing (i.e. use the default GSettings dir)
}
diff --git a/test/client/application/geary-application-test.vala
b/test/client/application/application-client-test.vala
similarity index 83%
rename from test/client/application/geary-application-test.vala
rename to test/client/application/application-client-test.vala
index 505c2351..2981b5c6 100644
--- a/test/client/application/geary-application-test.vala
+++ b/test/client/application/application-client-test.vala
@@ -6,19 +6,19 @@
*/
-class GearyApplicationTest : TestCase {
+class Application.ClientTest : TestCase {
- private GearyApplication? test_article = null;
+ private Client? test_article = null;
- public GearyApplicationTest() {
- base("GearyApplicationTest");
+ public ClientTest() {
+ base("Application.ClientTest");
add_test("paths_when_installed", paths_when_installed);
}
public override void set_up() {
- this.test_article = new GearyApplication();
+ this.test_article = new Client();
}
public override void tear_down() {
diff --git a/test/client/application/application-configuration-test.vala
b/test/client/application/application-configuration-test.vala
index d31d6749..35e8f029 100644
--- a/test/client/application/application-configuration-test.vala
+++ b/test/client/application/application-configuration-test.vala
@@ -16,7 +16,7 @@ public class Application.ConfigurationTest : TestCase {
public override void set_up() {
Environment.unset_variable("XDG_CURRENT_DESKTOP");
- this.test_config = new Configuration(GearyApplication.SCHEMA_ID);
+ this.test_config = new Configuration(Client.SCHEMA_ID);
}
public void desktop_environment() throws Error {
diff --git a/test/client/components/client-web-view-test-case.vala
b/test/client/components/client-web-view-test-case.vala
index 10f9846b..d1212afb 100644
--- a/test/client/components/client-web-view-test-case.vala
+++ b/test/client/components/client-web-view-test-case.vala
@@ -13,7 +13,7 @@ public abstract class ClientWebViewTestCase<V> : TestCase {
protected ClientWebViewTestCase(string name) {
base(name);
- this.config = new Application.Configuration(GearyApplication.SCHEMA_ID);
+ this.config = new Application.Configuration(Application.Client.SCHEMA_ID);
this.config.enable_debug = true;
ClientWebView.init_web_context(
this.config,
diff --git a/test/client/components/client-web-view-test.vala
b/test/client/components/client-web-view-test.vala
index 8ff91f90..d08e5192 100644
--- a/test/client/components/client-web-view-test.vala
+++ b/test/client/components/client-web-view-test.vala
@@ -15,7 +15,7 @@ public class ClientWebViewTest : TestCase {
public void init_web_context() throws Error {
Application.Configuration config = new Application.Configuration(
- GearyApplication.SCHEMA_ID
+ Application.Client.SCHEMA_ID
);
config.enable_debug = true;
ClientWebView.init_web_context(
diff --git a/test/meson.build b/test/meson.build
index 073da675..1cced2f7 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -80,8 +80,8 @@ geary_test_client_sources = [
'engine/api/geary-credentials-mediator-mock.vala',
'client/accounts/accounts-manager-test.vala',
+ 'client/application/application-client-test.vala',
'client/application/application-configuration-test.vala',
- 'client/application/geary-application-test.vala',
'client/components/client-web-view-test.vala',
'client/components/client-web-view-test-case.vala',
'client/composer/composer-web-view-test.vala',
diff --git a/test/test-client.vala b/test/test-client.vala
index 2b9be70b..6b828b0c 100644
--- a/test/test-client.vala
+++ b/test/test-client.vala
@@ -49,10 +49,10 @@ int main(string[] args) {
// Keep this before other ClientWebView based tests since it tests
// WebContext init
client.add_suite(new Accounts.ManagerTest().get_suite());
+ client.add_suite(new Application.ClientTest().get_suite());
client.add_suite(new Application.ConfigurationTest().get_suite());
client.add_suite(new ClientWebViewTest().get_suite());
client.add_suite(new Composer.WebViewTest().get_suite());
- client.add_suite(new GearyApplicationTest().get_suite());
client.add_suite(new Util.Avatar.Test().get_suite());
client.add_suite(new Util.Cache.Test().get_suite());
client.add_suite(new Util.Email.Test().get_suite());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]