[tepl] WindowActionsEdit: skeleton



commit 33df5dc7f734c992b0ea9bc9b40323879af09a17
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon May 4 00:37:27 2020 +0200

    WindowActionsEdit: skeleton

 po/POTFILES.in                  |  1 +
 tepl/meson.build                |  2 ++
 tepl/tepl-window-actions-edit.c | 25 +++++++++++++++++++++++++
 tepl/tepl-window-actions-edit.h | 17 +++++++++++++++++
 4 files changed, 45 insertions(+)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 77aac64..7d96df6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -33,4 +33,5 @@ tepl/tepl-tab-label.c
 tepl/tepl-tab-saving.c
 tepl/tepl-utils.c
 tepl/tepl-view.c
+tepl/tepl-window-actions-edit.c
 tepl/tepl-window-actions-file.c
diff --git a/tepl/meson.build b/tepl/meson.build
index 16dc4b2..fe257c0 100644
--- a/tepl/meson.build
+++ b/tepl/meson.build
@@ -73,6 +73,7 @@ TEPL_PRIVATE_HEADERS = [
   'tepl-progress-info-bar.h',
   'tepl-signal-group.h',
   'tepl-tab-saving.h',
+  'tepl-window-actions-edit.h',
   'tepl-window-actions-file.h'
 ]
 
@@ -88,6 +89,7 @@ tepl_private_c_files = [
   'tepl-progress-info-bar.c',
   'tepl-signal-group.c',
   'tepl-tab-saving.c',
+  'tepl-window-actions-edit.c',
   'tepl-window-actions-file.c'
 ]
 
diff --git a/tepl/tepl-window-actions-edit.c b/tepl/tepl-window-actions-edit.c
new file mode 100644
index 0000000..ecc69ed
--- /dev/null
+++ b/tepl/tepl-window-actions-edit.c
@@ -0,0 +1,25 @@
+/* SPDX-FileCopyrightText: 2020 - Sébastien Wilmet <swilmet gnome org>
+ * SPDX-License-Identifier: LGPL-3.0-or-later
+ */
+
+#include "tepl-window-actions-edit.h"
+#include <amtk/amtk.h>
+
+/* TeplApplicationWindow GActions for the Edit menu. */
+
+void
+_tepl_window_actions_edit_add_actions (TeplApplicationWindow *tepl_window)
+{
+       GtkApplicationWindow *gtk_window;
+
+       const GActionEntry entries[] = {
+       };
+
+       g_return_if_fail (TEPL_IS_APPLICATION_WINDOW (tepl_window));
+
+       gtk_window = tepl_application_window_get_application_window (tepl_window);
+       amtk_action_map_add_action_entries_check_dups (G_ACTION_MAP (gtk_window),
+                                                      entries,
+                                                      G_N_ELEMENTS (entries),
+                                                      tepl_window);
+}
diff --git a/tepl/tepl-window-actions-edit.h b/tepl/tepl-window-actions-edit.h
new file mode 100644
index 0000000..fb3ec6a
--- /dev/null
+++ b/tepl/tepl-window-actions-edit.h
@@ -0,0 +1,17 @@
+/* SPDX-FileCopyrightText: 2020 - Sébastien Wilmet <swilmet gnome org>
+ * SPDX-License-Identifier: LGPL-3.0-or-later
+ */
+
+#ifndef TEPL_WINDOW_ACTIONS_EDIT_H
+#define TEPL_WINDOW_ACTIONS_EDIT_H
+
+#include "tepl-application-window.h"
+
+G_BEGIN_DECLS
+
+G_GNUC_INTERNAL
+void   _tepl_window_actions_edit_add_actions   (TeplApplicationWindow *tepl_window);
+
+G_END_DECLS
+
+#endif /* TEPL_WINDOW_ACTIONS_EDIT_H */


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