[gnome-builder/wip/libide] libide: use ide_buffer_manager_save_file_async()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: use ide_buffer_manager_save_file_async()
- Date: Tue, 24 Feb 2015 00:45:41 +0000 (UTC)
commit 8bfb60dc56ed9fe076e1c69fb476d4bb87aced3e
Author: Christian Hergert <christian hergert me>
Date: Mon Feb 23 16:45:06 2015 -0800
libide: use ide_buffer_manager_save_file_async()
We were using a dummy save function for auto save. This changes it to
use the proper save async function. However, we ignore the request
if there is no backing file.
libide/ide-buffer-manager.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/libide/ide-buffer-manager.c b/libide/ide-buffer-manager.c
index 711463b..d9ca1d7 100644
--- a/libide/ide-buffer-manager.c
+++ b/libide/ide-buffer-manager.c
@@ -266,26 +266,21 @@ ide_buffer_manager_set_focus_buffer (IdeBufferManager *self,
}
}
-static void
-ide_buffer_manager_save_async (IdeBufferManager *self,
- IdeBuffer *buffer,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
-}
-
static gboolean
ide_buffer_manager_auto_save_cb (gpointer data)
{
AutoSave *state = data;
+ IdeFile *file;
g_return_val_if_fail (state, G_SOURCE_REMOVE);
g_return_val_if_fail (IDE_IS_BUFFER_MANAGER (state->self), G_SOURCE_REMOVE);
g_return_val_if_fail (IDE_IS_BUFFER (state->buffer), G_SOURCE_REMOVE);
g_return_val_if_fail (state->source_id > 0, G_SOURCE_REMOVE);
- ide_buffer_manager_save_async (state->self, state->buffer, NULL, NULL, NULL);
+ file = ide_buffer_get_file (state->buffer);
+ if (file)
+ ide_buffer_manager_save_file_async (state->self, state->buffer, file, NULL, NULL, NULL, NULL);
+
unregister_auto_save (state->self, state->buffer);
return G_SOURCE_REMOVE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]