Remove ConversationEmail::load_error
The class can just handle submitting problem reports directly rather than handballing to MainWindow to do so.
This commit is contained in:
parent
01fc1abd55
commit
5312241d44
2 changed files with 9 additions and 14 deletions
|
|
@ -1397,8 +1397,6 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
|
|||
}
|
||||
|
||||
private void on_conversation_viewer_email_added(ConversationEmail view) {
|
||||
view.load_error.connect(on_email_load_error);
|
||||
|
||||
view.forward_message.connect(on_forward_message);
|
||||
view.reply_all_message.connect(on_reply_all_message);
|
||||
view.reply_to_message.connect(on_reply_to_message);
|
||||
|
|
@ -1797,13 +1795,6 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
|
|||
}
|
||||
}
|
||||
|
||||
private void on_email_load_error(ConversationEmail view, GLib.Error err) {
|
||||
handle_error(
|
||||
this.selected_account != null ? this.selected_account.information : null,
|
||||
err
|
||||
);
|
||||
}
|
||||
|
||||
private void on_reply_to_message(ConversationEmail target_view) {
|
||||
Geary.Account? account = this.selected_account;
|
||||
if (account != null) {
|
||||
|
|
|
|||
|
|
@ -248,9 +248,6 @@ public class ConversationEmail : Gtk.Box, Geary.BaseInterface {
|
|||
private bool shift_key_down;
|
||||
|
||||
|
||||
/** Fired when an error occurs loading the message body. */
|
||||
public signal void load_error(GLib.Error err);
|
||||
|
||||
/** Fired when the user clicks "reply" in the message menu. */
|
||||
public signal void reply_to_message();
|
||||
|
||||
|
|
@ -768,10 +765,17 @@ public class ConversationEmail : Gtk.Box, Geary.BaseInterface {
|
|||
}
|
||||
}
|
||||
|
||||
private void handle_load_failure(GLib.Error err) {
|
||||
load_error(err);
|
||||
private void handle_load_failure(GLib.Error error) {
|
||||
this.message_body_state = FAILED;
|
||||
this.primary_message.show_load_error_pane();
|
||||
|
||||
MainWindow? main = get_toplevel() as MainWindow;
|
||||
if (main != null) {
|
||||
Geary.AccountInformation account = this.email_store.account.information;
|
||||
main.application.controller.report_problem(
|
||||
new Geary.ServiceProblemReport(account, account.incoming, error)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private void handle_load_offline() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue