[gedit] File choosers: add GeditFileChooserOpenNative class skeleton



commit af3f776647bef371fd5941d6cfa48b11a046b794
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Jun 11 20:14:06 2020 +0200

    File choosers: add GeditFileChooserOpenNative class skeleton

 gedit/gedit-file-chooser-open-native.c | 54 +++++++++++++++++++++++++++++++
 gedit/gedit-file-chooser-open-native.h | 58 ++++++++++++++++++++++++++++++++++
 gedit/meson.build                      |  2 ++
 po/POTFILES.in                         |  1 +
 4 files changed, 115 insertions(+)
---
diff --git a/gedit/gedit-file-chooser-open-native.c b/gedit/gedit-file-chooser-open-native.c
new file mode 100644
index 000000000..da2c3eb63
--- /dev/null
+++ b/gedit/gedit-file-chooser-open-native.c
@@ -0,0 +1,54 @@
+/*
+ * This file is part of gedit
+ *
+ * Copyright (C) 2020 Sébastien Wilmet <swilmet gnome org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "gedit-file-chooser-open-native.h"
+
+struct _GeditFileChooserOpenNativePrivate
+{
+       gint something;
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE (GeditFileChooserOpenNative, _gedit_file_chooser_open_native, 
GEDIT_TYPE_FILE_CHOOSER_OPEN)
+
+static void
+_gedit_file_chooser_open_native_dispose (GObject *object)
+{
+
+       G_OBJECT_CLASS (_gedit_file_chooser_open_native_parent_class)->dispose (object);
+}
+
+static void
+_gedit_file_chooser_open_native_class_init (GeditFileChooserOpenNativeClass *klass)
+{
+       GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+       object_class->dispose = _gedit_file_chooser_open_native_dispose;
+}
+
+static void
+_gedit_file_chooser_open_native_init (GeditFileChooserOpenNative *chooser)
+{
+       chooser->priv = _gedit_file_chooser_open_native_get_instance_private (chooser);
+}
+
+GeditFileChooserOpenNative *
+_gedit_file_chooser_open_native_new (void)
+{
+       return g_object_new (GEDIT_TYPE_FILE_CHOOSER_OPEN_NATIVE, NULL);
+}
diff --git a/gedit/gedit-file-chooser-open-native.h b/gedit/gedit-file-chooser-open-native.h
new file mode 100644
index 000000000..fbfeaeb56
--- /dev/null
+++ b/gedit/gedit-file-chooser-open-native.h
@@ -0,0 +1,58 @@
+/*
+ * This file is part of gedit
+ *
+ * Copyright (C) 2020 Sébastien Wilmet <swilmet gnome org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GEDIT_FILE_CHOOSER_OPEN_NATIVE_H
+#define GEDIT_FILE_CHOOSER_OPEN_NATIVE_H
+
+#include "gedit-file-chooser-open.h"
+
+G_BEGIN_DECLS
+
+#define GEDIT_TYPE_FILE_CHOOSER_OPEN_NATIVE             (_gedit_file_chooser_open_native_get_type ())
+#define GEDIT_FILE_CHOOSER_OPEN_NATIVE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GEDIT_TYPE_FILE_CHOOSER_OPEN_NATIVE, GeditFileChooserOpenNative))
+#define GEDIT_FILE_CHOOSER_OPEN_NATIVE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), 
GEDIT_TYPE_FILE_CHOOSER_OPEN_NATIVE, GeditFileChooserOpenNativeClass))
+#define GEDIT_IS_FILE_CHOOSER_OPEN_NATIVE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
GEDIT_TYPE_FILE_CHOOSER_OPEN_NATIVE))
+#define GEDIT_IS_FILE_CHOOSER_OPEN_NATIVE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), 
GEDIT_TYPE_FILE_CHOOSER_OPEN_NATIVE))
+#define GEDIT_FILE_CHOOSER_OPEN_NATIVE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), 
GEDIT_TYPE_FILE_CHOOSER_OPEN_NATIVE, GeditFileChooserOpenNativeClass))
+
+typedef struct _GeditFileChooserOpenNative         GeditFileChooserOpenNative;
+typedef struct _GeditFileChooserOpenNativeClass    GeditFileChooserOpenNativeClass;
+typedef struct _GeditFileChooserOpenNativePrivate  GeditFileChooserOpenNativePrivate;
+
+struct _GeditFileChooserOpenNative
+{
+       GeditFileChooserOpen parent;
+
+       GeditFileChooserOpenNativePrivate *priv;
+};
+
+struct _GeditFileChooserOpenNativeClass
+{
+       GeditFileChooserOpenClass parent_class;
+};
+
+G_GNUC_INTERNAL
+GType                          _gedit_file_chooser_open_native_get_type        (void);
+
+G_GNUC_INTERNAL
+GeditFileChooserOpenNative *   _gedit_file_chooser_open_native_new             (void);
+
+G_END_DECLS
+
+#endif /* GEDIT_FILE_CHOOSER_OPEN_NATIVE_H */
diff --git a/gedit/meson.build b/gedit/meson.build
index 416b34dee..9a46954e1 100644
--- a/gedit/meson.build
+++ b/gedit/meson.build
@@ -52,6 +52,7 @@ libgedit_private_headers = [
   'gedit-file-chooser-dialog.h',
   'gedit-file-chooser.h',
   'gedit-file-chooser-open.h',
+  'gedit-file-chooser-open-native.h',
   'gedit-highlight-mode-dialog.h',
   'gedit-highlight-mode-selector.h',
   'gedit-history-entry.h',
@@ -92,6 +93,7 @@ libgedit_private_sources = [
   'gedit-file-chooser-dialog.c',
   'gedit-file-chooser-dialog-gtk.c',
   'gedit-file-chooser-open.c',
+  'gedit-file-chooser-open-native.c',
   'gedit-highlight-mode-dialog.c',
   'gedit-highlight-mode-selector.c',
   'gedit-history-entry.c',
diff --git a/po/POTFILES.in b/po/POTFILES.in
index d806969db..16ad8dd1a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -20,6 +20,7 @@ gedit/gedit-factory.c
 gedit/gedit-file-chooser.c
 gedit/gedit-file-chooser-dialog-gtk.c
 gedit/gedit-file-chooser-open.c
+gedit/gedit-file-chooser-open-native.c
 gedit/gedit-highlight-mode-dialog.c
 gedit/gedit-highlight-mode-selector.c
 gedit/gedit-io-error-info-bar.c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]