qulogic/libgnt
Clone
Summary
Browse
Changes
Graph
Hide GntFile and its related API.
2019-05-14, Elliott Sales de Andrade
8278895039b8
Parents
4e6d829dcbc5
Children
648e28d1ad82
Hide GntFile and its related API.
2 files changed, 18 insertions(+), 113 deletions(-)
+18
-35
gntfilesel.c
+0
-78
gntfilesel.h
--- a/gntfilesel.c Tue May 21 01:20:54 2019 +0000
+++ b/gntfilesel.c Tue May 14 01:30:03 2019 -0400
@@ -40,6 +40,20 @@
#include <glib/gstdio.h>
+typedef enum
+{
+ GNT_FILE_REGULAR,
+ GNT_FILE_DIR
+} GntFileType;
+
+typedef struct
+{
+ char *fullpath;
+ char *basename;
+ GntFileType type;
+ unsigned long size;
+} GntFile;
+
typedef struct
{
GntWindow parent;
@@ -158,7 +172,8 @@
return find;
}
-GntFile* gnt_file_new_dir(const char *name)
+static GntFile *
+gnt_file_new_dir(const char *name)
{
GntFile *file = g_new0(GntFile, 1);
file->basename = g_strdup(name);
@@ -166,7 +181,8 @@
return file;
}
-GntFile* gnt_file_new(const char *name, unsigned long size)
+static GntFile *
+gnt_file_new(const char *name, unsigned long size)
{
GntFile *file = g_new0(GntFile, 1);
file->basename = g_strdup(name);
@@ -796,36 +812,3 @@
priv->read_fn = read_fn;
}
-
-/**************************************************************************
- * GntFile GBoxed API
- **************************************************************************/
-static GntFile *
-gnt_file_copy(GntFile *file)
-{
- GntFile *file_new;
-
- g_return_val_if_fail(file != NULL, NULL);
-
- file_new = g_new(GntFile, 1);
- *file_new = *file;
-
- file_new->fullpath = g_strdup(file->fullpath);
- file_new->basename = g_strdup(file->basename);
-
- return file_new;
-}
-
-GType
-gnt_file_get_type(void)
-{
- static GType type = 0;
-
- if (type == 0) {
- type = g_boxed_type_register_static("GntFile",
- (GBoxedCopyFunc)gnt_file_copy,
- (GBoxedFreeFunc)gnt_file_free);
- }
-
- return type;
-}
--- a/gntfilesel.h Tue May 21 01:20:54 2019 +0000
+++ b/gntfilesel.h Tue May 14 01:30:03 2019 -0400
@@ -35,35 +35,6 @@
#include "gntwindow.h"
#define GNT_TYPE_FILE_SEL gnt_file_sel_get_type()
-#define GNT_TYPE_FILE gnt_file_get_type()
-
-#ifndef GNT_DISABLE_DEPRECATED
-/**
- * GntFileType:
- *
- * Deprecated: 2.14.0: This is an internal implementation detail. Use #GFile
- * from GIO for a similar abstraction.
- */
-typedef enum
-{
- GNT_FILE_REGULAR,
- GNT_FILE_DIR
-} GntFileType;
-
-/**
- * GntFile:
- *
- * Deprecated: 2.14.0: This is an internal implementation detail. Use #GFile
- * from GIO for a similar abstraction.
- */
-typedef struct
-{
- char *fullpath;
- char *basename;
- GntFileType type;
- unsigned long size;
-} GntFile;
-#endif
G_BEGIN_DECLS
@@ -89,17 +60,6 @@
void (*gnt_reserved4)(void);
};
-#ifndef GNT_DISABLE_DEPRECATED
-/**
- * gnt_file_get_type:
- *
- * Returns: The #GType for the #GntFile boxed structure.
- *
- * Deprecated: 2.14.0: This is an internal implementation detail.
- */
-GType gnt_file_get_type(void);
-#endif
-
/**
* gnt_file_sel_new:
*
@@ -201,44 +161,6 @@
*/
void gnt_file_sel_set_suggested_filename(GntFileSel *sel, const char *suggest);
-#ifndef GNT_DISABLE_DEPRECATED
-/**
- * gnt_file_sel_set_read_fn:
- * @sel: The file selector.
- * @read_fn: The custom read function.
- *
- * Set custom functions to read the names of files.
- *
- * Deprecated: 2.14.0: This is an internal implementation detail.
- */
-void gnt_file_sel_set_read_fn(GntFileSel *sel, gboolean (*read_fn)(const char *path, GList **files, GError **error));
-
-/**
- * gnt_file_new:
- * @name: The name of the file.
- * @size: The size of the file.
- *
- * Create a new GntFile.
- *
- * Returns: The newly created GntFile.
- *
- * Deprecated: 2.14.0: This is an internal implementation detail.
- */
-GntFile* gnt_file_new(const char *name, unsigned long size);
-
-/**
- * gnt_file_new_dir:
- * @name: The name of the directory.
- *
- * Create a new GntFile for a directory.
- *
- * Returns: The newly created GntFile.
- *
- * Deprecated: 2.14.0: This is an internal implementation detail.
- */
-GntFile* gnt_file_new_dir(const char *name);
-#endif
-
G_END_DECLS
#endif /* GNT_FILE_SEL_H */