[gnome-flashback] bluetooth-applet: initial version



commit 4a63128eab3449bbf94e17bf9637b2594b44f047
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Sep 7 01:53:54 2015 +0300

    bluetooth-applet: initial version
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753424

 configure.ac                                       |    5 ++
 data/org.gnome.gnome-flashback.gschema.xml.in.in   |    5 ++
 gnome-flashback/Makefile.am                        |    2 +
 gnome-flashback/flashback-application.c            |    8 +++-
 gnome-flashback/libbluetooth-applet/Makefile.am    |   29 +++++++++++++
 .../libbluetooth-applet/gf-bluetooth-applet.c      |   43 ++++++++++++++++++++
 .../libbluetooth-applet/gf-bluetooth-applet.h      |   33 +++++++++++++++
 7 files changed, 124 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6e5fd25..6b1c6ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,10 @@ PKG_CHECK_MODULES(AUTOMOUNT_MANAGER, gtk+-3.0 >= $GTK_REQUIRED gsettings-desktop
 AC_SUBST(AUTOMOUNT_MANAGER_CFLAGS)
 AC_SUBST(AUTOMOUNT_MANAGER_LIBS)
 
+PKG_CHECK_MODULES(BLUETOOTH_APPLET, gtk+-3.0 >= $GTK_REQUIRED)
+AC_SUBST(BLUETOOTH_APPLET_CFLAGS)
+AC_SUBST(BLUETOOTH_APPLET_LIBS)
+
 PKG_CHECK_MODULES(DESKTOP_BACKGROUND, gtk+-3.0 >= $GTK_REQUIRED gnome-desktop-3.0 >= 
$LIBGNOME_DESKTOP_REQUIRED)
 AC_SUBST(DESKTOP_BACKGROUND_CFLAGS)
 AC_SUBST(DESKTOP_BACKGROUND_LIBS)
@@ -97,6 +101,7 @@ Makefile
 data/Makefile
 gnome-flashback/Makefile
 gnome-flashback/libautomount-manager/Makefile
+gnome-flashback/libbluetooth-applet/Makefile
 gnome-flashback/libdesktop-background/Makefile
 gnome-flashback/libdisplay-config/Makefile
 gnome-flashback/libend-session-dialog/Makefile
diff --git a/data/org.gnome.gnome-flashback.gschema.xml.in.in 
b/data/org.gnome.gnome-flashback.gschema.xml.in.in
index 11c6b9d..6261287 100644
--- a/data/org.gnome.gnome-flashback.gschema.xml.in.in
+++ b/data/org.gnome.gnome-flashback.gschema.xml.in.in
@@ -5,6 +5,11 @@
                        <_summary>Automount manager</_summary>
                        <_description>If set to true, then GNOME Flashback application will be used to 
automount removable media.</_description>
                </key>
+               <key name="bluetooth-applet" type="b">
+                       <default>true</default>
+                       <_summary>Bluetooth applet</_summary>
+                       <_description>If set to true, then GNOME Flashback application will be used to show a 
bluetooth applet.</_description>
+               </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 0976d62..bf18eec 100644
--- a/gnome-flashback/Makefile.am
+++ b/gnome-flashback/Makefile.am
@@ -2,6 +2,7 @@ NULL =
 
 SUBDIRS = \
        libautomount-manager \
+       libbluetooth-applet \
        libdesktop-background \
        libdisplay-config \
        libend-session-dialog \
@@ -43,6 +44,7 @@ gnome_flashback_LDFLAGS = \
 gnome_flashback_LDADD = \
        $(GNOME_FLASHBACK_LIBS) \
        $(top_builddir)/gnome-flashback/libautomount-manager/libautomount-manager.la \
+       $(top_builddir)/gnome-flashback/libbluetooth-applet/libbluetooth-applet.la \
        $(top_builddir)/gnome-flashback/libdesktop-background/libdesktop-background.la \
        $(top_builddir)/gnome-flashback/libdisplay-config/libdisplay-config.la \
        $(top_builddir)/gnome-flashback/libend-session-dialog/libend-session-dialog.la \
diff --git a/gnome-flashback/flashback-application.c b/gnome-flashback/flashback-application.c
index 4c87907..d298c7e 100644
--- a/gnome-flashback/flashback-application.c
+++ b/gnome-flashback/flashback-application.c
@@ -15,11 +15,14 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
+#include "config.h"
+
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+
 #include "flashback-application.h"
 #include "libautomount-manager/gsd-automount-manager.h"
+#include "libbluetooth-applet/gf-bluetooth-applet.h"
 #include "libdesktop-background/desktop-background.h"
 #include "libdisplay-config/flashback-display-config.h"
 #include "libend-session-dialog/flashback-end-session-dialog.h"
@@ -50,6 +53,7 @@ struct _FlashbackApplication
   FlashbackScreencast       *screencast;
   FlashbackScreenshot       *screenshot;
   FlashbackShell            *shell;
+  GfBluetoothApplet         *bluetooth;
   GvcApplet                 *applet;
   FlashbackWorkarounds      *workarounds;
 };
@@ -139,6 +143,7 @@ settings_changed (GSettings   *settings,
   SETTING_CHANGED (screencast, "screencast", flashback_screencast_new)
   SETTING_CHANGED (screenshot, "screenshot", flashback_screenshot_new)
   SETTING_CHANGED (shell, "shell", flashback_shell_new)
+  SETTING_CHANGED (bluetooth, "bluetooth-applet", gf_bluetooth_applet_new)
   SETTING_CHANGED (applet, "sound-applet", gvc_applet_new)
   SETTING_CHANGED (workarounds, "workarounds", flashback_workarounds_new)
 
@@ -174,6 +179,7 @@ flashback_application_finalize (GObject *object)
   g_clear_object (&application->screencast);
   g_clear_object (&application->screenshot);
   g_clear_object (&application->shell);
+  g_clear_object (&application->bluetooth);
   g_clear_object (&application->applet);
   g_clear_object (&application->workarounds);
 
diff --git a/gnome-flashback/libbluetooth-applet/Makefile.am b/gnome-flashback/libbluetooth-applet/Makefile.am
new file mode 100644
index 0000000..1cf652f
--- /dev/null
+++ b/gnome-flashback/libbluetooth-applet/Makefile.am
@@ -0,0 +1,29 @@
+NULL =
+
+noinst_LTLIBRARIES = \
+       libbluetooth-applet.la \
+       $(NULL)
+
+libbluetooth_applet_la_CFLAGS = \
+       $(BLUETOOTH_APPLET_CFLAGS) \
+       $(WARN_CFLAGS) \
+       $(AM_CFLAGS) \
+       -I$(top_builddir)/gnome-flashback/libbluetooth-applet \
+       -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+       $(NULL)
+
+libbluetooth_applet_la_SOURCES = \
+  gf-bluetooth-applet.c \
+       gf-bluetooth-applet.h \
+       $(NULL)
+
+libbluetooth_applet_la_LDFLAGS = \
+       $(WARN_LDFLAGS) \
+       $(AM_LDFLAGS) \
+       $(NULL)
+
+libbluetooth_applet_la_LIBADD = \
+       $(BLUETOOTH_APPLET_LIBS) \
+       $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.c 
b/gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.c
new file mode 100644
index 0000000..fe46eea
--- /dev/null
+++ b/gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2015 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-bluetooth-applet.h"
+
+struct _GfBluetoothApplet
+{
+  GObject parent;
+};
+
+G_DEFINE_TYPE (GfBluetoothApplet, gf_bluetooth_applet, G_TYPE_OBJECT)
+
+static void
+gf_bluetooth_applet_class_init (GfBluetoothAppletClass *applet_class)
+{
+}
+
+static void
+gf_bluetooth_applet_init (GfBluetoothApplet *applet)
+{
+}
+
+GfBluetoothApplet *
+gf_bluetooth_applet_new (void)
+{
+  return g_object_new (GF_TYPE_BLUETOOTH_APPLET, NULL);
+}
diff --git a/gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.h 
b/gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.h
new file mode 100644
index 0000000..3a08257
--- /dev/null
+++ b/gnome-flashback/libbluetooth-applet/gf-bluetooth-applet.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2015 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_BLUETOOTH_APPLET_H
+#define GF_BLUETOOTH_APPLET_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_BLUETOOTH_APPLET gf_bluetooth_applet_get_type ()
+G_DECLARE_FINAL_TYPE (GfBluetoothApplet, gf_bluetooth_applet,
+                      GF, BLUETOOTH_APPLET, GObject)
+
+GfBluetoothApplet *gf_bluetooth_applet_new (void);
+
+G_END_DECLS
+
+#endif


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