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.
This commit is contained in:
parent
419bc6d051
commit
56876365ba
31 changed files with 80 additions and 76 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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" } );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue