[gnome-flashback] clipboard: initial version
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] clipboard: initial version
- Date: Thu, 10 Oct 2019 14:11:05 +0000 (UTC)
commit f70ce04f7294979cae47d45281d793fbff22c61b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Oct 10 15:54:38 2019 +0300
clipboard: initial version
https://gitlab.gnome.org/GNOME/gnome-flashback/issues/19
configure.ac | 5 +++
data/schemas/org.gnome.gnome-flashback.gschema.xml | 5 +++
gnome-flashback/Makefile.am | 2 ++
gnome-flashback/gf-application.c | 3 ++
gnome-flashback/libclipboard/Makefile.am | 32 +++++++++++++++++
gnome-flashback/libclipboard/gf-clipboard.c | 42 ++++++++++++++++++++++
gnome-flashback/libclipboard/gf-clipboard.h | 32 +++++++++++++++++
7 files changed, 121 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 5dbd86d..0291b47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,6 +140,10 @@ PKG_CHECK_MODULES([BLUETOOTH_APPLET], [
gnome-bluetooth-1.0
])
+PKG_CHECK_MODULES([CLIPBOARD], [
+ glib-2.0 >= $GLIB_REQUIRED
+])
+
PKG_CHECK_MODULES([COMMON], [
gtk+-3.0 >= $GTK_REQUIRED
x11
@@ -314,6 +318,7 @@ AC_CONFIG_FILES([
gnome-flashback/libautomount-manager/Makefile
gnome-flashback/libbluetooth-applet/Makefile
gnome-flashback/libcommon/Makefile
+ gnome-flashback/libclipboard/Makefile
gnome-flashback/libdesktop-background/Makefile
gnome-flashback/libend-session-dialog/Makefile
gnome-flashback/libidle-monitor/Makefile
diff --git a/data/schemas/org.gnome.gnome-flashback.gschema.xml
b/data/schemas/org.gnome.gnome-flashback.gschema.xml
index 9aeee18..3ef926e 100644
--- a/data/schemas/org.gnome.gnome-flashback.gschema.xml
+++ b/data/schemas/org.gnome.gnome-flashback.gschema.xml
@@ -23,6 +23,11 @@
<description>If set to true, then GNOME Flashback application will be used to show a Bluetooth
applet.</description>
</key>
+ <key name="clipboard" type="b">
+ <default>true</default>
+ <summary>Clipboard</summary>
+ </key>
+
<key name="desktop-background" type="b">
<default>true</default>
<summary>Desktop background</summary>
diff --git a/gnome-flashback/Makefile.am b/gnome-flashback/Makefile.am
index fc0e3ab..e619c45 100644
--- a/gnome-flashback/Makefile.am
+++ b/gnome-flashback/Makefile.am
@@ -6,6 +6,7 @@ SUBDIRS = \
libautomount-manager \
libbluetooth-applet \
libcommon \
+ libclipboard \
libdesktop-background \
libend-session-dialog \
libidle-monitor \
@@ -64,6 +65,7 @@ gnome_flashback_LDADD = \
$(top_builddir)/gnome-flashback/libaudio-device-selection/libaudio-device-selection.la \
$(top_builddir)/gnome-flashback/libautomount-manager/libautomount-manager.la \
$(top_builddir)/gnome-flashback/libbluetooth-applet/libbluetooth-applet.la \
+ $(top_builddir)/gnome-flashback/libclipboard/libclipboard.la \
$(top_builddir)/gnome-flashback/libdesktop-background/libdesktop-background.la \
$(top_builddir)/gnome-flashback/libend-session-dialog/libend-session-dialog.la \
$(top_builddir)/gnome-flashback/libidle-monitor/libidle-monitor.la \
diff --git a/gnome-flashback/gf-application.c b/gnome-flashback/gf-application.c
index 40567ae..22f66e0 100644
--- a/gnome-flashback/gf-application.c
+++ b/gnome-flashback/gf-application.c
@@ -27,6 +27,7 @@
#include "libaudio-device-selection/gf-audio-device-selection.h"
#include "libautomount-manager/gsd-automount-manager.h"
#include "libbluetooth-applet/gf-bluetooth-applet.h"
+#include "libclipboard/gf-clipboard.h"
#include "libdesktop-background/gf-desktop-background.h"
#include "libend-session-dialog/gf-end-session-dialog.h"
#include "libidle-monitor/flashback-idle-monitor.h"
@@ -61,6 +62,7 @@ struct _GfApplication
GfA11yKeyboard *a11y_keyboard;
GfAudioDeviceSelection *audio_device_selection;
GfBluetoothApplet *bluetooth;
+ GfClipboard *clipboard;
GfDesktopBackground *background;
GfEndSessionDialog *dialog;
GfInputSettings *input_settings;
@@ -161,6 +163,7 @@ settings_changed (GSettings *settings,
SETTING_CHANGED (audio_device_selection, "audio-device-selection", gf_audio_device_selection_new)
SETTING_CHANGED (bluetooth, "bluetooth-applet", gf_bluetooth_applet_new)
SETTING_CHANGED (background, "desktop-background", gf_desktop_background_new)
+ SETTING_CHANGED (clipboard, "clipboard", gf_clipboard_new)
SETTING_CHANGED (dialog, "end-session-dialog", gf_end_session_dialog_new)
SETTING_CHANGED (input_settings, "input-settings", gf_input_settings_new)
SETTING_CHANGED (input_sources, "input-sources", gf_input_sources_new)
diff --git a/gnome-flashback/libclipboard/Makefile.am b/gnome-flashback/libclipboard/Makefile.am
new file mode 100644
index 0000000..77855bc
--- /dev/null
+++ b/gnome-flashback/libclipboard/Makefile.am
@@ -0,0 +1,32 @@
+NULL =
+
+noinst_LTLIBRARIES = \
+ libclipboard.la \
+ $(NULL)
+
+libclipboard_la_CPPFLAGS = \
+ -I$(top_builddir)/gnome-flashback/libclipboard \
+ $(NULL)
+
+libclipboard_la_CFLAGS = \
+ $(CLIPBOARD_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(AM_CFLAGS) \
+ $(NULL)
+
+libclipboard_la_SOURCES = \
+ gf-clipboard.c \
+ gf-clipboard.h \
+ $(NULL)
+
+libclipboard_la_LDFLAGS = \
+ $(WARN_LDFLAGS) \
+ $(AM_LDFLAGS) \
+ $(NULL)
+
+libclipboard_la_LIBADD = \
+ $(CLIPBOARD_LIBS) \
+ $(LIBM) \
+ $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/libclipboard/gf-clipboard.c b/gnome-flashback/libclipboard/gf-clipboard.c
new file mode 100644
index 0000000..f2c9792
--- /dev/null
+++ b/gnome-flashback/libclipboard/gf-clipboard.c
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * 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/>.
+ */
+
+#include "config.h"
+#include "gf-clipboard.h"
+
+struct _GfClipboard
+{
+ GObject parent;
+};
+
+G_DEFINE_TYPE (GfClipboard, gf_clipboard, G_TYPE_OBJECT)
+
+static void
+gf_clipboard_class_init (GfClipboardClass *self_class)
+{
+}
+
+static void
+gf_clipboard_init (GfClipboard *self)
+{
+}
+
+GfClipboard *
+gf_clipboard_new (void)
+{
+ return g_object_new (GF_TYPE_CLIPBOARD, NULL);
+}
diff --git a/gnome-flashback/libclipboard/gf-clipboard.h b/gnome-flashback/libclipboard/gf-clipboard.h
new file mode 100644
index 0000000..89e5c6d
--- /dev/null
+++ b/gnome-flashback/libclipboard/gf-clipboard.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2019 Alberts Muktupāvels
+ *
+ * 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/>.
+ */
+
+#ifndef GF_CLIPBOARD_H
+#define GF_CLIPBOARD_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_CLIPBOARD (gf_clipboard_get_type ())
+G_DECLARE_FINAL_TYPE (GfClipboard, gf_clipboard, GF, CLIPBOARD, GObject)
+
+GfClipboard *gf_clipboard_new (void);
+
+G_END_DECLS
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]