[gedit/wip/file-saver] GeditFileSaver class
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/file-saver] GeditFileSaver class
- Date: Sun, 14 Jun 2015 15:40:35 +0000 (UTC)
commit a6588525ac5b1502a67b0b100b76ce3b451f469c
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Jun 14 17:36:23 2015 +0200
GeditFileSaver class
Subclass of GtkSourceFileSaver. To delegate some tasks of GeditTab.
gedit/Makefile.am | 2 +
gedit/gedit-file-saver.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++
gedit/gedit-file-saver.h | 35 +++++++++++++++++++++++++++
3 files changed, 95 insertions(+), 0 deletions(-)
---
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index 15adf68..72a4b76 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -108,6 +108,7 @@ gedit_NOINST_H_FILES = \
gedit/gedit-encodings-dialog.h \
gedit/gedit-file-chooser-dialog-gtk.h \
gedit/gedit-file-chooser-dialog.h \
+ gedit/gedit-file-saver.h \
gedit/gedit-highlight-mode-dialog.h \
gedit/gedit-highlight-mode-selector.h \
gedit/gedit-history-entry.h \
@@ -178,6 +179,7 @@ gedit_libgedit_c_files = \
gedit/gedit-encodings-dialog.c \
gedit/gedit-file-chooser-dialog.c \
gedit/gedit-file-chooser-dialog-gtk.c \
+ gedit/gedit-file-saver.c \
gedit/gedit-highlight-mode-dialog.c \
gedit/gedit-highlight-mode-selector.c \
gedit/gedit-history-entry.c \
diff --git a/gedit/gedit-file-saver.c b/gedit/gedit-file-saver.c
new file mode 100644
index 0000000..3501efd
--- /dev/null
+++ b/gedit/gedit-file-saver.c
@@ -0,0 +1,58 @@
+/*
+ * gedit-file-saver.c
+ * This file is part of gedit
+ *
+ * Copyright (C) 2015 - 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-saver.h"
+
+struct _GeditFileSaver
+{
+ GObject parent;
+};
+
+G_DEFINE_TYPE (GeditFileSaver, _gedit_file_saver, GTK_SOURCE_TYPE_FILE_SAVER)
+
+static void
+_gedit_file_saver_dispose (GObject *object)
+{
+
+ G_OBJECT_CLASS (_gedit_file_saver_parent_class)->dispose (object);
+}
+
+static void
+_gedit_file_saver_finalize (GObject *object)
+{
+
+ G_OBJECT_CLASS (_gedit_file_saver_parent_class)->finalize (object);
+}
+
+static void
+_gedit_file_saver_class_init (GeditFileSaverClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->dispose = _gedit_file_saver_dispose;
+ object_class->finalize = _gedit_file_saver_finalize;
+}
+
+static void
+_gedit_file_saver_init (GeditFileSaver *saver)
+{
+}
+
+/* ex:set ts=8 noet: */
diff --git a/gedit/gedit-file-saver.h b/gedit/gedit-file-saver.h
new file mode 100644
index 0000000..5980065
--- /dev/null
+++ b/gedit/gedit-file-saver.h
@@ -0,0 +1,35 @@
+/*
+ * gedit-file-saver.h
+ * This file is part of gedit
+ *
+ * Copyright (C) 2015 - 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_SAVER_H__
+#define __GEDIT_FILE_SAVER_H__
+
+#include <gtksourceview/gtksource.h>
+
+G_BEGIN_DECLS
+
+#define GEDIT_TYPE_FILE_SAVER _gedit_file_saver_get_type ()
+G_DECLARE_FINAL_TYPE (GeditFileSaver, _gedit_file_saver, GEDIT, FILE_SAVER, GtkSourceFileSaver)
+
+G_END_DECLS
+
+#endif /* __GEDIT_FILE_SAVER_H__ */
+
+/* ex:set ts=8 noet: */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]