[gedit] File choosers: class skeleton of GeditFileChooserOpenDialog



commit e45cf9bac18ce1c5c612b82581d8291b514789c8
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jun 12 12:35:06 2020 +0200

    File choosers: class skeleton of GeditFileChooserOpenDialog

 gedit/gedit-file-chooser-open-dialog.c | 54 +++++++++++++++++++++++++++++++
 gedit/gedit-file-chooser-open-dialog.h | 58 ++++++++++++++++++++++++++++++++++
 gedit/meson.build                      |  2 ++
 po/POTFILES.in                         |  1 +
 4 files changed, 115 insertions(+)
---
diff --git a/gedit/gedit-file-chooser-open-dialog.c b/gedit/gedit-file-chooser-open-dialog.c
new file mode 100644
index 000000000..43f946150
--- /dev/null
+++ b/gedit/gedit-file-chooser-open-dialog.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-dialog.h"
+
+struct _GeditFileChooserOpenDialogPrivate
+{
+       gint something;
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE (GeditFileChooserOpenDialog, _gedit_file_chooser_open_dialog, 
GEDIT_TYPE_FILE_CHOOSER_OPEN)
+
+static void
+_gedit_file_chooser_open_dialog_dispose (GObject *object)
+{
+
+       G_OBJECT_CLASS (_gedit_file_chooser_open_dialog_parent_class)->dispose (object);
+}
+
+static void
+_gedit_file_chooser_open_dialog_class_init (GeditFileChooserOpenDialogClass *klass)
+{
+       GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+       object_class->dispose = _gedit_file_chooser_open_dialog_dispose;
+}
+
+static void
+_gedit_file_chooser_open_dialog_init (GeditFileChooserOpenDialog *chooser)
+{
+       chooser->priv = _gedit_file_chooser_open_dialog_get_instance_private (chooser);
+}
+
+GeditFileChooserOpen *
+_gedit_file_chooser_open_dialog_new (void)
+{
+       return g_object_new (GEDIT_TYPE_FILE_CHOOSER_OPEN_DIALOG, NULL);
+}
diff --git a/gedit/gedit-file-chooser-open-dialog.h b/gedit/gedit-file-chooser-open-dialog.h
new file mode 100644
index 000000000..d7f0d51c2
--- /dev/null
+++ b/gedit/gedit-file-chooser-open-dialog.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_DIALOG_H
+#define GEDIT_FILE_CHOOSER_OPEN_DIALOG_H
+
+#include "gedit-file-chooser-open.h"
+
+G_BEGIN_DECLS
+
+#define GEDIT_TYPE_FILE_CHOOSER_OPEN_DIALOG             (_gedit_file_chooser_open_dialog_get_type ())
+#define GEDIT_FILE_CHOOSER_OPEN_DIALOG(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GEDIT_TYPE_FILE_CHOOSER_OPEN_DIALOG, GeditFileChooserOpenDialog))
+#define GEDIT_FILE_CHOOSER_OPEN_DIALOG_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), 
GEDIT_TYPE_FILE_CHOOSER_OPEN_DIALOG, GeditFileChooserOpenDialogClass))
+#define GEDIT_IS_FILE_CHOOSER_OPEN_DIALOG(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
GEDIT_TYPE_FILE_CHOOSER_OPEN_DIALOG))
+#define GEDIT_IS_FILE_CHOOSER_OPEN_DIALOG_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), 
GEDIT_TYPE_FILE_CHOOSER_OPEN_DIALOG))
+#define GEDIT_FILE_CHOOSER_OPEN_DIALOG_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), 
GEDIT_TYPE_FILE_CHOOSER_OPEN_DIALOG, GeditFileChooserOpenDialogClass))
+
+typedef struct _GeditFileChooserOpenDialog         GeditFileChooserOpenDialog;
+typedef struct _GeditFileChooserOpenDialogClass    GeditFileChooserOpenDialogClass;
+typedef struct _GeditFileChooserOpenDialogPrivate  GeditFileChooserOpenDialogPrivate;
+
+struct _GeditFileChooserOpenDialog
+{
+       GeditFileChooserOpen parent;
+
+       GeditFileChooserOpenDialogPrivate *priv;
+};
+
+struct _GeditFileChooserOpenDialogClass
+{
+       GeditFileChooserOpenClass parent_class;
+};
+
+G_GNUC_INTERNAL
+GType                  _gedit_file_chooser_open_dialog_get_type        (void);
+
+G_GNUC_INTERNAL
+GeditFileChooserOpen * _gedit_file_chooser_open_dialog_new             (void);
+
+G_END_DECLS
+
+#endif /* GEDIT_FILE_CHOOSER_OPEN_DIALOG_H */
diff --git a/gedit/meson.build b/gedit/meson.build
index 9a46954e1..a960e6cee 100644
--- a/gedit/meson.build
+++ b/gedit/meson.build
@@ -51,6 +51,7 @@ libgedit_private_headers = [
   'gedit-file-chooser-dialog-gtk.h',
   'gedit-file-chooser-dialog.h',
   'gedit-file-chooser.h',
+  'gedit-file-chooser-open-dialog.h',
   'gedit-file-chooser-open.h',
   'gedit-file-chooser-open-native.h',
   'gedit-highlight-mode-dialog.h',
@@ -93,6 +94,7 @@ libgedit_private_sources = [
   'gedit-file-chooser-dialog.c',
   'gedit-file-chooser-dialog-gtk.c',
   'gedit-file-chooser-open.c',
+  'gedit-file-chooser-open-dialog.c',
   'gedit-file-chooser-open-native.c',
   'gedit-highlight-mode-dialog.c',
   'gedit-highlight-mode-selector.c',
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 16ad8dd1a..5969d09a9 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-dialog.c
 gedit/gedit-file-chooser-open-native.c
 gedit/gedit-highlight-mode-dialog.c
 gedit/gedit-highlight-mode-selector.c


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