[console/zbrown/term-intent-2: 3/8] rebase fallout
- From: Zander Brown <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [console/zbrown/term-intent-2: 3/8] rebase fallout
- Date: Thu, 28 Jul 2022 01:11:23 +0000 (UTC)
commit 3ad451f62f5bf64b0aa03b91947592754b633770
Author: Zander Brown <zbrown gnome org>
Date: Thu Dec 9 11:45:33 2021 +0000
rebase fallout
src/kgx-session-manager.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++
src/kgx-session-manager.h | 31 +++++++++++++++++++
src/meson.build | 2 +-
3 files changed, 108 insertions(+), 1 deletion(-)
---
diff --git a/src/kgx-session-manager.c b/src/kgx-session-manager.c
new file mode 100644
index 0000000..af0c76c
--- /dev/null
+++ b/src/kgx-session-manager.c
@@ -0,0 +1,76 @@
+/* kgx-session-manager.c
+ *
+ * Copyright 2021 Zander Brown
+ *
+ * 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 3 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/>.
+ */
+
+/**
+ * SECTION:kgx-session-manager
+ * @short_description: An object with proxy details
+ * @title: KgxSessionManager
+ *
+ * #KgxSessionManager maps org.gnome.system.proxy to environmental variables
+ * when launching new sessions
+ *
+ * Note that whilst changes to system settings are tracked, they _cannot_ be
+ * applied existing terminals
+ *
+ * Only manual proxies are supported
+ */
+
+#include "kgx-config.h"
+
+#include <gio/gio.h>
+
+#include "kgx-session-manager.h"
+
+
+struct _KgxSessionManager {
+ GObject parent_instance;
+
+ GFile *cache_dir;
+};
+
+
+G_DEFINE_TYPE (KgxSessionManager, kgx_session_manager, G_TYPE_OBJECT)
+
+
+static void
+kgx_session_manager_dispose (GObject *object)
+{
+ KgxSessionManager *self = KGX_SESSION_MANAGER (object);
+
+ g_clear_object (&self->cache_dir);
+
+ G_OBJECT_CLASS (kgx_session_manager_parent_class)->dispose (object);
+}
+
+
+static void
+kgx_session_manager_class_init (KgxSessionManagerClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->dispose = kgx_session_manager_dispose;
+}
+
+
+static void
+kgx_session_manager_init (KgxSessionManager *self)
+{
+ self->cache_dir = g_file_new_build_filename (g_get_user_cache_dir (),
+ KGX_APPLICATION_ID,
+ TRUE);
+}
diff --git a/src/kgx-session-manager.h b/src/kgx-session-manager.h
new file mode 100644
index 0000000..c57228d
--- /dev/null
+++ b/src/kgx-session-manager.h
@@ -0,0 +1,31 @@
+/* kgx-session-manager.h
+ *
+ * Copyright 2021 Zander Brown
+ *
+ * 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 3 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/>.
+ */
+
+#pragma once
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define KGX_TYPE_SESSION_MANAGER kgx_session_manager_get_type ()
+
+G_DECLARE_FINAL_TYPE (KgxSessionManager, kgx_session_manager, KGX, SESSION_MANAGER, GObject)
+
+KgxSessionManager *kgx_session_manager_new (void);
+
+G_END_DECLS
diff --git a/src/meson.build b/src/meson.build
index a79b294..847e2cd 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -61,7 +61,7 @@ kgx_sources += gnome.gdbus_codegen('xdg-term1',
namespace: 'Xdg',
)
-kgx_sources += gnome.mkenums_simple('kgx-enums',
+kgx_enums = gnome.mkenums_simple('kgx-enums',
sources: [
'kgx-close-dialog.h',
'kgx-terminal.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]