|
|
@@ -216,6 +216,20 @@ note_date_cmp (IridiumNoteRow *row1,
|
|
|
return g_date_time_compare (dt2, dt1);
|
|
|
}
|
|
|
|
|
|
+static void
|
|
|
+show_error_dialog (IridiumWindow *window,
|
|
|
+ GError *error)
|
|
|
+{
|
|
|
+ GtkWidget *dialog;
|
|
|
+
|
|
|
+ dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
|
|
+ GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
|
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
|
|
|
+ "%s.", error->message);
|
|
|
+ gtk_dialog_run (GTK_DIALOG (dialog));
|
|
|
+ gtk_widget_destroy (dialog);
|
|
|
+}
|
|
|
+
|
|
|
static void
|
|
|
on_load_finished (GObject *object,
|
|
|
GAsyncResult *result,
|
|
|
@@ -250,8 +264,7 @@ on_load_finished (GObject *object,
|
|
|
gtk_widget_show_all (GTK_WIDGET (self->tag_list));
|
|
|
}
|
|
|
else if (error != NULL) {
|
|
|
- /* TODO: show message */
|
|
|
- g_printerr ("Error: %s\n", error->message);
|
|
|
+ show_error_dialog (self, error);
|
|
|
g_error_free (error);
|
|
|
}
|
|
|
}
|
|
|
@@ -273,8 +286,7 @@ on_standard_file_connected (GObject *object,
|
|
|
gtk_revealer_set_reveal_child (self->notification_revealer, FALSE);
|
|
|
}
|
|
|
else {
|
|
|
- /* TODO: show message */
|
|
|
- g_printerr ("Error: %s\n", error->message);
|
|
|
+ show_error_dialog (self, error);
|
|
|
g_error_free (error);
|
|
|
}
|
|
|
}
|