[gnome-builder] libide-code: port unsaved files to GTK 4
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide-code: port unsaved files to GTK 4
- Date: Tue, 12 Jul 2022 06:39:07 +0000 (UTC)
commit 095d355847f4773647eb0299924b69921382557f
Author: Christian Hergert <chergert redhat com>
Date: Mon Jul 11 16:26:24 2022 -0700
libide-code: port unsaved files to GTK 4
src/libide/code/ide-unsaved-file.c | 4 ----
src/libide/code/ide-unsaved-file.h | 16 ++++++++--------
src/libide/code/ide-unsaved-files.c | 21 +++++++--------------
src/libide/code/ide-unsaved-files.h | 30 +++++++++++++++---------------
4 files changed, 30 insertions(+), 41 deletions(-)
---
diff --git a/src/libide/code/ide-unsaved-file.c b/src/libide/code/ide-unsaved-file.c
index c371e51b3..c96260a64 100644
--- a/src/libide/code/ide-unsaved-file.c
+++ b/src/libide/code/ide-unsaved-file.c
@@ -147,8 +147,6 @@ ide_unsaved_file_unref (IdeUnsavedFile *self)
* Gets the contents of the unsaved file.
*
* Returns: (transfer none): a #GBytes containing the unsaved file content.
- *
- * Since: 3.32
*/
GBytes *
ide_unsaved_file_get_content (IdeUnsavedFile *self)
@@ -165,8 +163,6 @@ ide_unsaved_file_get_content (IdeUnsavedFile *self)
* Retrieves the underlying file represented by @self.
*
* Returns: (transfer none): a #GFile.
- *
- * Since: 3.32
*/
GFile *
ide_unsaved_file_get_file (IdeUnsavedFile *self)
diff --git a/src/libide/code/ide-unsaved-file.h b/src/libide/code/ide-unsaved-file.h
index 9e72bc65a..fd2d6a24a 100644
--- a/src/libide/code/ide-unsaved-file.h
+++ b/src/libide/code/ide-unsaved-file.h
@@ -30,21 +30,21 @@
G_BEGIN_DECLS
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
GType ide_unsaved_file_get_type (void);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
IdeUnsavedFile *ide_unsaved_file_ref (IdeUnsavedFile *self);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
void ide_unsaved_file_unref (IdeUnsavedFile *self);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
GBytes *ide_unsaved_file_get_content (IdeUnsavedFile *self);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
GFile *ide_unsaved_file_get_file (IdeUnsavedFile *self);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
gint64 ide_unsaved_file_get_sequence (IdeUnsavedFile *self);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
const gchar *ide_unsaved_file_get_temp_path (IdeUnsavedFile *self);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
gboolean ide_unsaved_file_persist (IdeUnsavedFile *self,
GCancellable *cancellable,
GError **error);
diff --git a/src/libide/code/ide-unsaved-files.c b/src/libide/code/ide-unsaved-files.c
index 27e669f47..3dff8a8fb 100644
--- a/src/libide/code/ide-unsaved-files.c
+++ b/src/libide/code/ide-unsaved-files.c
@@ -22,7 +22,6 @@
#include "config.h"
-#include <dazzle.h>
#include <glib/gi18n.h>
#include <errno.h>
#include <fcntl.h>
@@ -696,8 +695,6 @@ ide_unsaved_files_update (IdeUnsavedFiles *self,
*
* Returns: (transfer full) (element-type Ide.UnsavedFile): a #GPtrArray
* containing #IdeUnsavedFile elements.
- *
- * Since: 3.32
*/
GPtrArray *
ide_unsaved_files_to_array (IdeUnsavedFiles *self)
@@ -766,8 +763,6 @@ ide_unsaved_files_contains (IdeUnsavedFiles *self,
*
* Thread safety: you may call this from any thread, as long as you
* hold a reference to @self.
- *
- * Since: 3.32
*/
IdeUnsavedFile *
ide_unsaved_files_get_unsaved_file (IdeUnsavedFiles *self,
@@ -927,15 +922,15 @@ ide_unsaved_files_reap_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
- DzlDirectoryReaper *reaper = (DzlDirectoryReaper *)object;
+ IdeDirectoryReaper *reaper = (IdeDirectoryReaper *)object;
g_autoptr(IdeTask) task = user_data;
g_autoptr(GError) error = NULL;
- g_assert (DZL_IS_DIRECTORY_REAPER (reaper));
+ g_assert (IDE_IS_DIRECTORY_REAPER (reaper));
g_assert (G_IS_ASYNC_RESULT (result));
g_assert (IDE_IS_TASK (task));
- if (!dzl_directory_reaper_execute_finish (reaper, result, &error))
+ if (!ide_directory_reaper_execute_finish (reaper, result, &error))
ide_task_return_error (task, g_steal_pointer (&error));
else
ide_task_return_boolean (task, TRUE);
@@ -948,7 +943,7 @@ ide_unsaved_files_reap_async (IdeUnsavedFiles *self,
gpointer user_data)
{
g_autoptr(IdeTask) task = NULL;
- g_autoptr(DzlDirectoryReaper) reaper = NULL;
+ g_autoptr(IdeDirectoryReaper) reaper = NULL;
g_autoptr(GFile) buffersdir = NULL;
g_autofree gchar *path = NULL;
IdeContext *context;
@@ -963,14 +958,14 @@ ide_unsaved_files_reap_async (IdeUnsavedFiles *self,
context = ide_object_get_context (IDE_OBJECT (self));
g_return_if_fail (context != NULL);
- reaper = dzl_directory_reaper_new ();
+ reaper = ide_directory_reaper_new ();
path = get_buffers_dir (context);
buffersdir = g_file_new_for_path (path);
- dzl_directory_reaper_add_directory (reaper, buffersdir, G_TIME_SPAN_DAY);
+ ide_directory_reaper_add_directory (reaper, buffersdir, G_TIME_SPAN_DAY);
/* Now cleanup the old files */
- dzl_directory_reaper_execute_async (reaper,
+ ide_directory_reaper_execute_async (reaper,
cancellable,
ide_unsaved_files_reap_cb,
g_steal_pointer (&task));
@@ -994,8 +989,6 @@ ide_unsaved_files_reap_finish (IdeUnsavedFiles *self,
* Gets the unsaved files object for @context.
*
* Returns: (transfer none): an #IdeContext
- *
- * Since: 3.32
*/
IdeUnsavedFiles *
ide_unsaved_files_from_context (IdeContext *context)
diff --git a/src/libide/code/ide-unsaved-files.h b/src/libide/code/ide-unsaved-files.h
index 023616c32..8f6cd7df6 100644
--- a/src/libide/code/ide-unsaved-files.h
+++ b/src/libide/code/ide-unsaved-files.h
@@ -32,54 +32,54 @@ G_BEGIN_DECLS
#define IDE_TYPE_UNSAVED_FILES (ide_unsaved_files_get_type())
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (IdeUnsavedFiles, ide_unsaved_files, IDE, UNSAVED_FILES, IdeObject)
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
IdeUnsavedFiles *ide_unsaved_files_from_context (IdeContext *context);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
void ide_unsaved_files_update (IdeUnsavedFiles *self,
GFile *file,
GBytes *content);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
void ide_unsaved_files_remove (IdeUnsavedFiles *self,
GFile *file);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
void ide_unsaved_files_save_async (IdeUnsavedFiles *files,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
gboolean ide_unsaved_files_save_finish (IdeUnsavedFiles *files,
GAsyncResult *result,
GError **error);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
void ide_unsaved_files_restore_async (IdeUnsavedFiles *files,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
gboolean ide_unsaved_files_restore_finish (IdeUnsavedFiles *files,
GAsyncResult *result,
GError **error);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
GPtrArray *ide_unsaved_files_to_array (IdeUnsavedFiles *self);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
gint64 ide_unsaved_files_get_sequence (IdeUnsavedFiles *files);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
IdeUnsavedFile *ide_unsaved_files_get_unsaved_file (IdeUnsavedFiles *self,
GFile *file);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
void ide_unsaved_files_clear (IdeUnsavedFiles *self);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
gboolean ide_unsaved_files_contains (IdeUnsavedFiles *self,
GFile *file);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
void ide_unsaved_files_reap_async (IdeUnsavedFiles *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
-IDE_AVAILABLE_IN_3_32
+IDE_AVAILABLE_IN_ALL
gboolean ide_unsaved_files_reap_finish (IdeUnsavedFiles *self,
GAsyncResult *result,
GError **error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]