[gnome-flashback: 3/3] desktop: initial version



commit fcc38d1b67c2f3d0583abe62ac956fadf8c8afbe
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Oct 19 03:11:46 2019 +0300

    desktop: initial version

 configure.ac                                       |  6 ++++
 data/schemas/org.gnome.gnome-flashback.gschema.xml |  5 +++
 gnome-flashback/Makefile.am                        |  2 ++
 gnome-flashback/gf-application.c                   |  4 +++
 gnome-flashback/libdesktop/Makefile.am             | 31 ++++++++++++++++
 gnome-flashback/libdesktop/gf-desktop.c            | 42 ++++++++++++++++++++++
 gnome-flashback/libdesktop/gf-desktop.h            | 32 +++++++++++++++++
 7 files changed, 122 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index f2f5a11..2ec9853 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,6 +151,11 @@ PKG_CHECK_MODULES([COMMON], [
   x11
 ])
 
+PKG_CHECK_MODULES([DESKTOP], [
+  glib-2.0 >= $GLIB_REQUIRED
+  gtk+-3.0 >= $GTK_REQUIRED
+])
+
 PKG_CHECK_MODULES([DESKTOP_BACKGROUND], [
   gtk+-3.0 >= $GTK_REQUIRED
   gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED
@@ -321,6 +326,7 @@ AC_CONFIG_FILES([
   gnome-flashback/libbluetooth-applet/Makefile
   gnome-flashback/libcommon/Makefile
   gnome-flashback/libclipboard/Makefile
+  gnome-flashback/libdesktop/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 3ef926e..dad0001 100644
--- a/data/schemas/org.gnome.gnome-flashback.gschema.xml
+++ b/data/schemas/org.gnome.gnome-flashback.gschema.xml
@@ -28,6 +28,11 @@
       <summary>Clipboard</summary>
     </key>
 
+    <key name="desktop" type="b">
+      <default>true</default>
+      <summary>Desktop</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 e619c45..6e1ff49 100644
--- a/gnome-flashback/Makefile.am
+++ b/gnome-flashback/Makefile.am
@@ -7,6 +7,7 @@ SUBDIRS = \
        libbluetooth-applet \
        libcommon \
        libclipboard \
+       libdesktop \
        libdesktop-background \
        libend-session-dialog \
        libidle-monitor \
@@ -66,6 +67,7 @@ gnome_flashback_LDADD = \
        $(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/libdesktop.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 5db7bf6..6b98883 100644
--- a/gnome-flashback/gf-application.c
+++ b/gnome-flashback/gf-application.c
@@ -28,6 +28,7 @@
 #include "libautomount-manager/gsd-automount-manager.h"
 #include "libbluetooth-applet/gf-bluetooth-applet.h"
 #include "libclipboard/gf-clipboard.h"
+#include "libdesktop/gf-desktop.h"
 #include "libdesktop-background/gf-desktop-background.h"
 #include "libend-session-dialog/gf-end-session-dialog.h"
 #include "libidle-monitor/flashback-idle-monitor.h"
@@ -63,6 +64,7 @@ struct _GfApplication
   GfAudioDeviceSelection  *audio_device_selection;
   GfBluetoothApplet       *bluetooth;
   GfClipboard             *clipboard;
+  GfDesktop               *desktop;
   GfDesktopBackground     *background;
   GfEndSessionDialog      *dialog;
   GfInputSettings         *input_settings;
@@ -162,6 +164,7 @@ settings_changed (GSettings   *settings,
   SETTING_CHANGED (a11y_keyboard, "a11y-keyboard", gf_a11y_keyboard_new)
   SETTING_CHANGED (audio_device_selection, "audio-device-selection", gf_audio_device_selection_new)
   SETTING_CHANGED (bluetooth, "bluetooth-applet", gf_bluetooth_applet_new)
+  SETTING_CHANGED (desktop, "desktop", gf_desktop_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)
@@ -209,6 +212,7 @@ gf_application_dispose (GObject *object)
   g_clear_object (&application->a11y_keyboard);
   g_clear_object (&application->audio_device_selection);
   g_clear_object (&application->bluetooth);
+  g_clear_object (&application->desktop);
   g_clear_object (&application->background);
   g_clear_object (&application->clipboard);
   g_clear_object (&application->dialog);
diff --git a/gnome-flashback/libdesktop/Makefile.am b/gnome-flashback/libdesktop/Makefile.am
new file mode 100644
index 0000000..619ab94
--- /dev/null
+++ b/gnome-flashback/libdesktop/Makefile.am
@@ -0,0 +1,31 @@
+NULL =
+
+noinst_LTLIBRARIES = \
+       libdesktop.la \
+       $(NULL)
+
+libdesktop_la_CPPFLAGS = \
+       -I$(top_builddir)/gnome-flashback/libdesktop \
+       $(NULL)
+
+libdesktop_la_CFLAGS = \
+       $(DESKTOP_CFLAGS) \
+       $(WARN_CFLAGS) \
+       $(AM_CFLAGS) \
+       $(NULL)
+
+libdesktop_la_SOURCES = \
+       gf-desktop.c \
+       gf-desktop.h \
+       $(NULL)
+
+libdesktop_la_LDFLAGS = \
+       $(WARN_LDFLAGS) \
+       $(AM_LDFLAGS) \
+       $(NULL)
+
+libdesktop_la_LIBADD = \
+       $(DESKTOP_LIBS) \
+       $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/libdesktop/gf-desktop.c b/gnome-flashback/libdesktop/gf-desktop.c
new file mode 100644
index 0000000..b82bed7
--- /dev/null
+++ b/gnome-flashback/libdesktop/gf-desktop.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-desktop.h"
+
+struct _GfDesktop
+{
+  GObject parent;
+};
+
+G_DEFINE_TYPE (GfDesktop, gf_desktop, G_TYPE_OBJECT)
+
+static void
+gf_desktop_class_init (GfDesktopClass *self_class)
+{
+}
+
+static void
+gf_desktop_init (GfDesktop *self)
+{
+}
+
+GfDesktop *
+gf_desktop_new (void)
+{
+  return g_object_new (GF_TYPE_DESKTOP, NULL);
+}
diff --git a/gnome-flashback/libdesktop/gf-desktop.h b/gnome-flashback/libdesktop/gf-desktop.h
new file mode 100644
index 0000000..5f11e0b
--- /dev/null
+++ b/gnome-flashback/libdesktop/gf-desktop.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_DESKTOP_H
+#define GF_DESKTOP_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_DESKTOP (gf_desktop_get_type ())
+G_DECLARE_FINAL_TYPE (GfDesktop, gf_desktop, GF, DESKTOP, GObject)
+
+GfDesktop *gf_desktop_new (void);
+
+G_END_DECLS
+
+#endif


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