|
@@ -170,28 +170,33 @@ on_standard_file_connected (GObject *object,
|
|
|
IridiumWindow *self;
|
|
IridiumWindow *self;
|
|
|
GList *notes;
|
|
GList *notes;
|
|
|
IridiumTag *tag_all;
|
|
IridiumTag *tag_all;
|
|
|
|
|
+ GError *error = NULL;
|
|
|
|
|
|
|
|
self = IRIDIUM_WINDOW (user_data);
|
|
self = IRIDIUM_WINDOW (user_data);
|
|
|
tag_all = iridium_tag_new ("All");
|
|
tag_all = iridium_tag_new ("All");
|
|
|
|
|
|
|
|
- /* TODO: implement iridium_standard_file_connect_finish */
|
|
|
|
|
- notes = iridium_standard_file_load (self->client, "sn.json");
|
|
|
|
|
|
|
+ if (iridium_standard_file_connect_finish (object, result, &error)) {
|
|
|
|
|
+ notes = iridium_standard_file_load (self->client, "sn.json");
|
|
|
|
|
|
|
|
- for (GList *it = g_list_first (notes); it != NULL; it = g_list_next (it)) {
|
|
|
|
|
- IridiumNote *note;
|
|
|
|
|
|
|
+ for (GList *it = g_list_first (notes); it != NULL; it = g_list_next (it)) {
|
|
|
|
|
+ IridiumNote *note;
|
|
|
|
|
|
|
|
- note = IRIDIUM_NOTE (it->data);
|
|
|
|
|
- iridium_note_add_tag (note, tag_all);
|
|
|
|
|
- gtk_list_box_insert (self->note_list, iridium_note_row_new (note), -1);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ note = IRIDIUM_NOTE (it->data);
|
|
|
|
|
+ iridium_note_add_tag (note, tag_all);
|
|
|
|
|
+ gtk_list_box_insert (self->note_list, iridium_note_row_new (note), -1);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- gtk_list_box_insert (self->tag_list, iridium_tag_row_new (tag_all), -1);
|
|
|
|
|
- g_list_free (notes);
|
|
|
|
|
|
|
+ gtk_list_box_insert (self->tag_list, iridium_tag_row_new (tag_all), -1);
|
|
|
|
|
+ g_list_free (notes);
|
|
|
|
|
|
|
|
- gtk_widget_show_all (GTK_WIDGET (self->note_list));
|
|
|
|
|
- gtk_widget_show_all (GTK_WIDGET (self->tag_list));
|
|
|
|
|
|
|
+ gtk_widget_show_all (GTK_WIDGET (self->note_list));
|
|
|
|
|
+ gtk_widget_show_all (GTK_WIDGET (self->tag_list));
|
|
|
|
|
|
|
|
- gtk_revealer_set_reveal_child (self->notification_revealer, FALSE);
|
|
|
|
|
|
|
+ gtk_revealer_set_reveal_child (self->notification_revealer, FALSE);
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ /* TODO: show message */
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
static void
|