[geary] Fix as many valac deprecation and valadoc unused warnings as poss.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Fix as many valac deprecation and valadoc unused warnings as poss.
- Date: Mon, 21 May 2018 13:11:23 +0000 (UTC)
commit 8d3b16ca68f84eaff7cfb1adeb0e84c78204b1a2
Author: Michael James Gratton <mike vee net>
Date: Mon May 21 11:21:21 2018 +1000
Fix as many valac deprecation and valadoc unused warnings as poss.
src/client/accounts/login-dialog.vala | 13 +++--
src/client/components/client-web-view.vala | 5 +-
src/client/components/icon-factory.vala | 10 ++--
src/client/components/main-window.vala | 57 ++++++++++++--------
src/client/composer/composer-widget.vala | 11 ++--
src/client/composer/composer-window.vala | 51 ++++++++++--------
.../conversation-list/conversation-list-view.vala | 4 +-
.../conversation-viewer/conversation-email.vala | 3 +-
.../conversation-viewer/conversation-message.vala | 3 +-
src/client/dialogs/password-dialog.vala | 3 +-
src/client/sidebar/sidebar-tree.vala | 10 ++--
.../conversation-monitor/app-conversation-set.vala | 12 ----
src/engine/db/db-transaction-async-job.vala | 6 +--
src/engine/imap-db/imap-db-account.vala | 54 +-----------------
src/engine/imap-db/imap-db-email-identifier.vala | 16 +-----
src/engine/imap-db/imap-db-folder.vala | 6 +--
src/engine/imap-db/outbox/smtp-outbox-folder.vala | 8 ---
.../imap-engine/imap-engine-generic-account.vala | 2 +-
.../imap-engine/imap-engine-minimal-folder.vala | 7 ---
src/engine/imap/api/imap-account-session.vala | 14 -----
src/engine/rfc822/rfc822-mailbox-addresses.vala | 4 +-
src/engine/rfc822/rfc822-part.vala | 4 +-
22 files changed, 107 insertions(+), 196 deletions(-)
---
diff --git a/src/client/accounts/login-dialog.vala b/src/client/accounts/login-dialog.vala
index fe0f3d2..470fdaa 100644
--- a/src/client/accounts/login-dialog.vala
+++ b/src/client/accounts/login-dialog.vala
@@ -23,15 +23,18 @@ public class LoginDialog : Gtk.Dialog {
spinner_page.visible = false;
page.size_changed.connect(() => { resize(1, 1); });
page.info_changed.connect(on_info_changed);
-
- cancel_button = new Gtk.Button.from_stock(Stock._CANCEL);
+
+ cancel_button = new Gtk.Button.with_label(Stock._CANCEL);
+ cancel_button.show();
add_action_widget(cancel_button, Gtk.ResponseType.CANCEL);
- ok_button = new Gtk.Button.from_stock(Stock._ADD);
+
+ ok_button = new Gtk.Button.with_label(Stock._ADD);
+ ok_button.show();
ok_button.can_default = true;
add_action_widget(ok_button, Gtk.ResponseType.OK);
+
set_default_response(Gtk.ResponseType.OK);
- get_action_area().show_all();
-
+
destroy.connect(() => {
debug("User closed login dialog, exiting...");
GearyApplication.instance.exit(1);
diff --git a/src/client/components/client-web-view.vala b/src/client/components/client-web-view.vala
index 5d38d4d..152a87b 100644
--- a/src/client/components/client-web-view.vala
+++ b/src/client/components/client-web-view.vala
@@ -294,9 +294,8 @@ public class ClientWebView : WebKit.WebView, Geary.BaseInterface {
// XXX get the allow prefix from the extension somehow
this.decide_policy.connect(on_decide_policy);
- this.web_process_crashed.connect(() => {
- warning("Web process crashed");
- return Gdk.EVENT_PROPAGATE;
+ this.web_process_terminated.connect((reason) => {
+ warning("Web process crashed: %s", reason.to_string());
});
register_message_handler(
diff --git a/src/client/components/icon-factory.vala b/src/client/components/icon-factory.vala
index ed860c8..3fd6eab 100644
--- a/src/client/components/icon-factory.vala
+++ b/src/client/components/icon-factory.vala
@@ -80,13 +80,15 @@ public class IconFactory {
// If that fails... well they're out of luck.
return null;
}
-
+
public Gtk.IconInfo? lookup_icon(string icon_name, int size, Gtk.IconLookupFlags flags = 0) {
Gtk.IconInfo? icon_info = icon_theme.lookup_icon(icon_name, size, flags);
- return icon_info != null ? icon_info.copy() :
- icon_theme.lookup_icon("text-x-generic-symbolic", size, flags);
+ if (icon_info == null) {
+ icon_info = icon_theme.lookup_icon("text-x-generic-symbolic", size, flags);
+ }
+ return icon_info;
}
-
+
// GTK+ 3.14 no longer scales icons via the IconInfo, so perform manually until we
// properly install the icons as per 3.14's expectations.
private Gdk.Pixbuf aspect_scale_down_pixbuf(Gdk.Pixbuf pixbuf, int size) {
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index add9721..d7fe781 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -108,16 +108,22 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
}
private void restore_saved_window_state() {
- Gdk.Screen? screen = get_screen();
- if (screen != null &&
- this.window_width <= screen.get_width() &&
- this.window_height <= screen.get_height()) {
- set_default_size(this.window_width, this.window_height);
+ Gdk.Display? display = Gdk.Display.get_default();
+ if (display != null) {
+ Gdk.Monitor? monitor = display.get_primary_monitor();
+ if (monitor == null) {
+ monitor = display.get_monitor_at_point(1, 1);
+ }
+ if (monitor != null &&
+ this.window_width <= monitor.geometry.width &&
+ this.window_height <= monitor.geometry.height) {
+ set_default_size(this.window_width, this.window_height);
+ }
}
+ this.window_position = Gtk.WindowPosition.CENTER;
if (this.window_maximized) {
maximize();
}
- this.window_position = Gtk.WindowPosition.CENTER;
}
// Called on [un]maximize and possibly others. Save maximized state
@@ -138,22 +144,29 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
public override void size_allocate(Gtk.Allocation allocation) {
base.size_allocate(allocation);
- Gdk.Screen? screen = get_screen();
- if (screen != null && !this.window_maximized) {
- // Get the size via ::get_size instead of the allocation
- // so that the window isn't ever-expanding.
- int width = 0;
- int height = 0;
- get_size(out width, out height);
-
- // Only store if the values have changed and are
- // reasonable-looking.
- if (this.window_width != width &&
- width > 0 && width <= screen.get_width())
- this.window_width = width;
- if (this.window_height != height &&
- height > 0 && height <= screen.get_height())
- this.window_height = height;
+ if (!this.window_maximized) {
+ Gdk.Display? display = get_display();
+ Gdk.Window? window = get_window();
+ if (display != null && window != null) {
+ Gdk.Monitor monitor = display.get_monitor_at_window(window);
+
+ // Get the size via ::get_size instead of the
+ // allocation so that the window isn't ever-expanding.
+ int width = 0;
+ int height = 0;
+ get_size(out width, out height);
+
+ // Only store if the values have changed and are
+ // reasonable-looking.
+ if (this.window_width != width &&
+ width > 0 && width <= monitor.geometry.width) {
+ this.window_width = width;
+ }
+ if (this.window_height != height &&
+ height > 0 && height <= monitor.geometry.height) {
+ this.window_height = height;
+ }
+ }
}
}
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index b66cc67..420cb9f 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -1933,12 +1933,11 @@ public class ComposerWidget : Gtk.EventBox {
if ("." in name)
name = name.split(".")[1];
- Gtk.Action action = new Gtk.Action(name, label, null, null);
- action.set_sensitive(get_action(name).enabled);
- action.activate.connect((action) => {
- this.actions.activate_action(name, target);
- });
- context_menu.append(new WebKit.ContextMenuItem(action));
+ GLib.SimpleAction action = new GLib.SimpleAction(name, null);
+ action.set_enabled(get_action(name).enabled);
+ context_menu.append(
+ new WebKit.ContextMenuItem.from_gaction(action, label, null)
+ );
});
}
diff --git a/src/client/composer/composer-window.vala b/src/client/composer/composer-window.vala
index 495a065..634ba09 100644
--- a/src/client/composer/composer-window.vala
+++ b/src/client/composer/composer-window.vala
@@ -55,38 +55,45 @@ public class ComposerWindow : Gtk.ApplicationWindow, ComposerContainer {
}
public override void show() {
- Gdk.Screen? screen = get_screen();
- if (screen != null) {
- int screen_width = screen.get_width();
- int screen_height = screen.get_height();
+ Gdk.Display? display = Gdk.Display.get_default();
+ if (display != null) {
+ Gdk.Monitor? monitor = display.get_primary_monitor();
+ if (monitor == null) {
+ monitor = display.get_monitor_at_point(1, 1);
+ }
int[] size = GearyApplication.instance.config.composer_window_size;
-
//check if stored values are reasonable
- if (size[0] >= 0 && size[0] <= screen_width &&
- size[1] >= 0 && size[1] <= screen_height)
+ if (monitor != null &&
+ size[0] >= 0 && size[0] <= monitor.geometry.width &&
+ size[1] >= 0 && size[1] <= monitor.geometry.height) {
set_default_size(size[0], size[1]);
- else
+ } else {
set_default_size(680, 600);
+ }
}
base.show();
}
private void save_window_geometry () {
- Gdk.Screen? screen = get_screen();
- if (screen != null && !this.is_maximized) {
- int screen_width = screen.get_width();
- int screen_height = screen.get_height();
-
- int width = 0;
- int height = 0;
-
- get_size(out width, out height);
-
- // Only store if the values are reasonable-looking.
- if (width > 0 && width <= screen_width &&
- height > 0 && height <= screen_height)
- GearyApplication.instance.config.composer_window_size = { width, height };
+ if (!this.is_maximized) {
+ Gdk.Display? display = get_display();
+ Gdk.Window? window = get_window();
+ if (display != null && window != null) {
+ Gdk.Monitor monitor = display.get_monitor_at_window(window);
+
+ int width = 0;
+ int height = 0;
+ get_size(out width, out height);
+
+ // Only store if the values are reasonable-looking.
+ if (width > 0 && width <= monitor.geometry.width &&
+ height > 0 && height <= monitor.geometry.height) {
+ GearyApplication.instance.config.composer_window_size = {
+ width, height
+ };
+ }
+ }
}
}
diff --git a/src/client/conversation-list/conversation-list-view.vala
b/src/client/conversation-list/conversation-list-view.vala
index 49af38b..06d83fd 100644
--- a/src/client/conversation-list/conversation-list-view.vala
+++ b/src/client/conversation-list/conversation-list-view.vala
@@ -50,7 +50,7 @@ public class ConversationListView : Gtk.TreeView, Geary.BaseInterface {
Gtk.TreeSelection selection = get_selection();
selection.set_mode(Gtk.SelectionMode.MULTIPLE);
- style_set.connect(on_style_changed);
+ style_updated.connect(on_style_changed);
show.connect(on_show);
row_activated.connect(on_row_activated);
@@ -475,7 +475,7 @@ public class ConversationListView : Gtk.TreeView, Geary.BaseInterface {
}
private void on_display_preview_changed() {
- style_set(null);
+ style_updated();
model.foreach(refresh_path);
schedule_visible_conversations_changed();
diff --git a/src/client/conversation-viewer/conversation-email.vala
b/src/client/conversation-viewer/conversation-email.vala
index 971c453..3bff500 100644
--- a/src/client/conversation-viewer/conversation-email.vala
+++ b/src/client/conversation-viewer/conversation-email.vala
@@ -612,7 +612,8 @@ public class ConversationEmail : Gtk.Box, Geary.BaseInterface {
}
private void set_action_enabled(string name, bool enabled) {
- SimpleAction? action = this.message_actions.lookup(name) as SimpleAction;
+ SimpleAction? action =
+ this.message_actions.lookup_action(name) as SimpleAction;
if (action != null) {
action.set_enabled(enabled);
}
diff --git a/src/client/conversation-viewer/conversation-message.vala
b/src/client/conversation-viewer/conversation-message.vala
index 877155c..dfbce2c 100644
--- a/src/client/conversation-viewer/conversation-message.vala
+++ b/src/client/conversation-viewer/conversation-message.vala
@@ -536,7 +536,8 @@ public class ConversationMessage : Gtk.Grid, Geary.BaseInterface {
}
private void set_action_enabled(string name, bool enabled) {
- SimpleAction? action = this.message_actions.lookup(name) as SimpleAction;
+ SimpleAction? action =
+ this.message_actions.lookup_action(name) as SimpleAction;
if (action != null) {
action.set_enabled(enabled);
}
diff --git a/src/client/dialogs/password-dialog.vala b/src/client/dialogs/password-dialog.vala
index bed58ce..fe09c31 100644
--- a/src/client/dialogs/password-dialog.vala
+++ b/src/client/dialogs/password-dialog.vala
@@ -66,8 +66,7 @@ public class PasswordDialog {
public bool run() {
dialog.show();
- dialog.get_action_area().show_all();
-
+
Gtk.ResponseType response = (Gtk.ResponseType) dialog.run();
if (response == Gtk.ResponseType.OK) {
password = entry_password.get_text();
diff --git a/src/client/sidebar/sidebar-tree.vala b/src/client/sidebar/sidebar-tree.vala
index e5c5ac7..a657fa3 100644
--- a/src/client/sidebar/sidebar-tree.vala
+++ b/src/client/sidebar/sidebar-tree.vala
@@ -97,7 +97,6 @@ public class Sidebar.Tree : Gtk.TreeView {
Gtk.TreeViewColumn text_column = new Gtk.TreeViewColumn();
text_column.set_expand(true);
Gtk.CellRendererPixbuf icon_renderer = new Gtk.CellRendererPixbuf();
- icon_renderer.follow_state = true;
text_column.pack_start(icon_renderer, false);
text_column.add_attribute(icon_renderer, "icon_name", Columns.ICON);
text_column.set_cell_data_func(icon_renderer, icon_renderer_function);
@@ -119,7 +118,6 @@ public class Sidebar.Tree : Gtk.TreeView {
set_headers_visible(false);
set_enable_search(false);
set_search_column(-1);
- set_rules_hint(false);
set_show_expanders(true);
set_reorderable(false);
set_enable_tree_lines(false);
@@ -790,9 +788,11 @@ public class Sidebar.Tree : Gtk.TreeView {
private Gtk.TreePath? get_path_from_event(Gdk.EventButton event) {
int x, y;
Gdk.ModifierType mask;
- event.window.get_device_position(Gdk.Display.get_default().get_device_manager()
- .get_client_pointer(), out x, out y, out mask);
-
+ event.window.get_device_position(
+ event.get_seat().get_pointer(),
+ out x, out y, out mask
+ );
+
int cell_x, cell_y;
Gtk.TreePath path;
return get_path_at_pos(x, y, out path, null, out cell_x, out cell_y) ? path : null;
diff --git a/src/engine/app/conversation-monitor/app-conversation-set.vala
b/src/engine/app/conversation-monitor/app-conversation-set.vala
index d23a8bd..91a557a 100644
--- a/src/engine/app/conversation-monitor/app-conversation-set.vala
+++ b/src/engine/app/conversation-monitor/app-conversation-set.vala
@@ -39,18 +39,6 @@ private class Geary.App.ConversationSet : BaseObject {
return email_id_map.size;
}
- public Gee.Collection<Geary.EmailIdentifier> get_email_identifiers() {
- return email_id_map.keys;
- }
-
- public bool contains(Conversation conversation) {
- return _conversations.contains(conversation);
- }
-
- public bool has_email_identifier(Geary.EmailIdentifier id) {
- return email_id_map.has_key(id);
- }
-
/**
* Return whether the set has the given Message ID. If logical_set,
* there's no requirement that any conversation actually contain a message
diff --git a/src/engine/db/db-transaction-async-job.vala b/src/engine/db/db-transaction-async-job.vala
index 9e41968..ff70de1 100644
--- a/src/engine/db/db-transaction-async-job.vala
+++ b/src/engine/db/db-transaction-async-job.vala
@@ -29,10 +29,6 @@ private class Geary.Db.TransactionAsyncJob : BaseObject {
this.completed = new Nonblocking.Event();
}
- public void cancel() {
- cancellable.cancel();
- }
-
public bool is_cancelled() {
return cancellable.is_cancelled();
}
@@ -94,7 +90,7 @@ private class Geary.Db.TransactionAsyncJob : BaseObject {
// No way to cancel this because the callback thread *must* finish before
// we move on here. Any I/O the thread is doing can still be cancelled
- // using our cancel() above.
+ // using the job's cancellable.
public async TransactionOutcome wait_for_completion_async()
throws Error {
yield this.completed.wait_async();
diff --git a/src/engine/imap-db/imap-db-account.vala b/src/engine/imap-db/imap-db-account.vala
index 41eac27..d0f6f27 100644
--- a/src/engine/imap-db/imap-db-account.vala
+++ b/src/engine/imap-db/imap-db-account.vala
@@ -578,30 +578,7 @@ private class Geary.ImapDB.Account : BaseObject {
return folders;
}
-
- public async bool folder_exists_async(Geary.FolderPath path, Cancellable? cancellable = null)
- throws Error {
- check_open();
-
- bool exists = false;
- yield db.exec_transaction_async(Db.TransactionType.RO, (cx) => {
- try {
- int64 folder_id;
- do_fetch_folder_id(cx, path, false, out folder_id, cancellable);
-
- exists = (folder_id != Db.INVALID_ROWID);
- } catch (EngineError err) {
- // treat NOT_FOUND as non-exceptional situation
- if (!(err is EngineError.NOT_FOUND))
- throw err;
- }
-
- return Db.TransactionOutcome.DONE;
- }, cancellable);
-
- return exists;
- }
-
+
public async Geary.ImapDB.Folder fetch_folder_async(Geary.FolderPath path, Cancellable? cancellable)
throws Error {
check_open();
@@ -1418,20 +1395,7 @@ private class Geary.ImapDB.Account : BaseObject {
return Db.TransactionOutcome.COMMIT;
}, cancellable);
}
-
- public async int get_email_count_async(Cancellable? cancellable) throws Error {
- check_open();
-
- int count = 0;
- yield db.exec_transaction_async(Db.TransactionType.RO, (cx) => {
- count = do_get_email_count(cx, cancellable);
-
- return Db.TransactionOutcome.SUCCESS;
- }, cancellable);
-
- return count;
- }
-
+
/**
* Return a map of each passed-in email identifier to the set of folders
* that contain it. If an email id doesn't appear in the resulting map,
@@ -1810,19 +1774,7 @@ private class Geary.ImapDB.Account : BaseObject {
Geary.FolderPath? parent_path = do_find_folder_path(cx, parent_id, cancellable);
return (parent_path == null ? null : parent_path.get_child(name));
}
-
- private int do_get_email_count(Db.Connection cx, Cancellable? cancellable)
- throws Error {
- Db.Statement stmt = cx.prepare(
- "SELECT COUNT(*) FROM MessageTable");
-
- Db.Result results = stmt.exec(cancellable);
- if (results.finished)
- return 0;
-
- return results.int_at(0);
- }
-
+
private void on_unread_updated(ImapDB.Folder source, Gee.Map<ImapDB.EmailIdentifier, bool>
unread_status) {
update_unread_async.begin(source, unread_status, null);
diff --git a/src/engine/imap-db/imap-db-email-identifier.vala
b/src/engine/imap-db/imap-db-email-identifier.vala
index 5f0fb0e..e5dda7e 100644
--- a/src/engine/imap-db/imap-db-email-identifier.vala
+++ b/src/engine/imap-db/imap-db-email-identifier.vala
@@ -58,21 +58,7 @@ private class Geary.ImapDB.EmailIdentifier : Geary.EmailIdentifier {
public override string to_string() {
return "[%s/%s]".printf(message_id.to_string(), (uid == null ? "null" : uid.to_string()));
}
-
- // Email's with no UID get sorted after emails with
- public static int compare_email_uid_ascending(Geary.Email a, Geary.Email b) {
- Imap.UID? auid = ((ImapDB.EmailIdentifier) a.id).uid;
- Imap.UID? buid = ((ImapDB.EmailIdentifier) b.id).uid;
-
- if (auid == null)
- return (buid != null) ? 1 : 0;
-
- if (buid == null)
- return -1;
-
- return auid.compare_to(buid);
- }
-
+
public static Gee.Set<Imap.UID> to_uids(Gee.Collection<ImapDB.EmailIdentifier> ids) {
Gee.HashSet<Imap.UID> uids = new Gee.HashSet<Imap.UID>();
foreach (ImapDB.EmailIdentifier id in ids) {
diff --git a/src/engine/imap-db/imap-db-folder.vala b/src/engine/imap-db/imap-db-folder.vala
index d155e4a..9daf538 100644
--- a/src/engine/imap-db/imap-db-folder.vala
+++ b/src/engine/imap-db/imap-db-folder.vala
@@ -45,11 +45,7 @@ private class Geary.ImapDB.Folder : BaseObject, Geary.ReferenceSemantics {
public bool is_all_set(ListFlags flags) {
return (this & flags) == flags;
}
-
- public bool is_any_set(ListFlags flags) {
- return (this & flags) != 0;
- }
-
+
public bool include_marked_for_remove() {
return is_all_set(INCLUDE_MARKED_FOR_REMOVE);
}
diff --git a/src/engine/imap-db/outbox/smtp-outbox-folder.vala
b/src/engine/imap-db/outbox/smtp-outbox-folder.vala
index 19ecdb0..f9a668c 100644
--- a/src/engine/imap-db/outbox/smtp-outbox-folder.vala
+++ b/src/engine/imap-db/outbox/smtp-outbox-folder.vala
@@ -274,14 +274,6 @@ private class Geary.SmtpOutboxFolder :
yield internal_remove_email_async(email_ids, cancellable);
}
- public virtual async void remove_single_email_async(Geary.EmailIdentifier id,
- Cancellable? cancellable = null) throws Error {
- Gee.List<Geary.EmailIdentifier> list = new Gee.ArrayList<Geary.EmailIdentifier>();
- list.add(id);
-
- yield remove_email_async(list, cancellable);
- }
-
public override Geary.Folder.OpenState get_open_state() {
return is_open() ? Geary.Folder.OpenState.LOCAL : Geary.Folder.OpenState.CLOSED;
}
diff --git a/src/engine/imap-engine/imap-engine-generic-account.vala
b/src/engine/imap-engine/imap-engine-generic-account.vala
index bee0e2b..0745936 100644
--- a/src/engine/imap-engine/imap-engine-generic-account.vala
+++ b/src/engine/imap-engine/imap-engine-generic-account.vala
@@ -787,7 +787,7 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account {
schedule_unseen_update(folder);
}
- /** Fires a {@link report_problem} signal for an IMAP service. */
+ /** Fires a {@link Account.report_problem} signal for an IMAP service. */
protected void notify_imap_problem(Geary.ProblemType type, Error? err) {
notify_service_problem(type, Service.IMAP, err);
}
diff --git a/src/engine/imap-engine/imap-engine-minimal-folder.vala
b/src/engine/imap-engine/imap-engine-minimal-folder.vala
index 40c99ae..63dccf7 100644
--- a/src/engine/imap-engine/imap-engine-minimal-folder.vala
+++ b/src/engine/imap-engine/imap-engine-minimal-folder.vala
@@ -1419,13 +1419,6 @@ private class Geary.ImapEngine.MinimalFolder : Geary.Folder, Geary.FolderSupport
return ret;
}
- /** Fires a {@link report_problem} signal for a service for this folder. */
- protected virtual void notify_service_problem(ProblemType type, Service service_type, Error? err) {
- report_problem(new ServiceProblemReport(
- type, this._account.information, service_type, err
- ));
- }
-
/** Fires a {@link marked_email_removed} signal for this folder. */
protected virtual void notify_marked_email_removed(Gee.Collection<Geary.EmailIdentifier> removed) {
marked_email_removed(removed);
diff --git a/src/engine/imap/api/imap-account-session.vala b/src/engine/imap/api/imap-account-session.vala
index e5e633c..99823f6 100644
--- a/src/engine/imap/api/imap-account-session.vala
+++ b/src/engine/imap/api/imap-account-session.vala
@@ -59,20 +59,6 @@ internal class Geary.Imap.AccountSession : Geary.Imap.SessionObject {
return new FolderRoot(prefix);
}
- public async bool folder_exists_async(FolderPath path, Cancellable? cancellable)
- throws Error {
- ClientSession session = claim_session();
- Gee.List<MailboxInformation> mailboxes = yield send_list_async(session, path, false, cancellable);
- bool exists = mailboxes.is_empty;
- if (!exists) {
- this.folders.unset(path);
- }
-
- // XXX fire some signal here
-
- return exists;
- }
-
/**
* Creates a new special folder on the remote server.
*
diff --git a/src/engine/rfc822/rfc822-mailbox-addresses.vala b/src/engine/rfc822/rfc822-mailbox-addresses.vala
index f94019b..f218944 100644
--- a/src/engine/rfc822/rfc822-mailbox-addresses.vala
+++ b/src/engine/rfc822/rfc822-mailbox-addresses.vala
@@ -151,8 +151,8 @@ public class Geary.RFC822.MailboxAddresses :
* Returns the addresses suitable for display to a human.
*
* @return a string containing each message in the list,
- * serialised by a call to {@link Message.to_full_display},
- * separated by commas.
+ * serialised by a call to {@link MailboxAddress.to_full_display}
+ * for each, separated by commas.
*/
public string to_full_display() {
return list_to_string(addrs, (a) => a.to_full_display());
diff --git a/src/engine/rfc822/rfc822-part.vala b/src/engine/rfc822/rfc822-part.vala
index 4a3f65f..82c2f6d 100644
--- a/src/engine/rfc822/rfc822-part.vala
+++ b/src/engine/rfc822/rfc822-part.vala
@@ -109,7 +109,7 @@ public class Geary.RFC822.Part : Object {
* This returns the entity's content type if set, else returns
* {@link Geary.Mime.ContentType.DISPLAY_DEFAULT} this is a
* displayable (i.e. non-attachment) entity, or {@link
- * Geary.Mime.ContentType.}
+ * Geary.Mime.ContentType.ATTACHMENT_DEFAULT} if not.
*/
public Mime.ContentType get_effective_content_type() {
Mime.ContentType? type = this.content_type;
@@ -181,8 +181,6 @@ public class Geary.RFC822.Part : Object {
// Remove the CR's in any CRLF sequence since they are
// effectively a wire encoding, unless the format requires
// them.
- GMime.ContentEncoding encoding =
- this.source_part.get_content_encoding();
if (!(content_type.media_subtype in CR_PRESERVING_TEXT_TYPES)) {
filter.add(new GMime.FilterCRLF(false, false));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]