[gnome-flashback] rename FlashbackApplication to GfApplication



commit ecd82a7127f33c81377029a08e83bbdf450a6009
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Sep 14 20:05:12 2015 +0300

    rename FlashbackApplication to GfApplication

 gnome-flashback/gf-application.c |   84 +++++++++++++++++++------------------
 gnome-flashback/gf-application.h |   14 +++---
 gnome-flashback/gf-main.c        |    4 +-
 3 files changed, 52 insertions(+), 50 deletions(-)
---
diff --git a/gnome-flashback/gf-application.c b/gnome-flashback/gf-application.c
index 2d1d1bb..2a4b6e3 100644
--- a/gnome-flashback/gf-application.c
+++ b/gnome-flashback/gf-application.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Alberts Muktupāvels
+ * Copyright (C) 2014 - 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
@@ -35,36 +35,36 @@
 #include "libsound-applet/gf-sound-applet.h"
 #include "libworkarounds/gf-workarounds.h"
 
-struct _FlashbackApplication
+struct _GfApplication
 {
-  GObject                    parent;
-
-  gint                       bus_name;
-
-  GSettings                 *settings;
-
-  GtkCssProvider            *provider;
-
-  GsdAutomountManager       *automount;
-  FlashbackDisplayConfig    *config;
-  FlashbackIdleMonitor      *idle_monitor;
-  FlashbackPolkit           *polkit;
-  FlashbackScreencast       *screencast;
-  FlashbackShell            *shell;
-  GfBluetoothApplet         *bluetooth;
-  GfDesktopBackground       *background;
-  GfEndSessionDialog        *dialog;
-  GfPowerApplet             *power;
-  GfScreenshot              *screenshot;
-  GfSoundApplet             *sound;
-  GfWorkarounds             *workarounds;
+  GObject                 parent;
+
+  gint                    bus_name;
+
+  GSettings              *settings;
+
+  GtkCssProvider         *provider;
+
+  GsdAutomountManager    *automount;
+  FlashbackDisplayConfig *config;
+  FlashbackIdleMonitor   *idle_monitor;
+  FlashbackPolkit        *polkit;
+  FlashbackScreencast    *screencast;
+  FlashbackShell         *shell;
+  GfBluetoothApplet      *bluetooth;
+  GfDesktopBackground    *background;
+  GfEndSessionDialog     *dialog;
+  GfPowerApplet          *power;
+  GfScreenshot           *screenshot;
+  GfSoundApplet          *sound;
+  GfWorkarounds          *workarounds;
 };
 
-G_DEFINE_TYPE (FlashbackApplication, flashback_application, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GfApplication, gf_application, G_TYPE_OBJECT)
 
 static void
-remove_style_provider (FlashbackApplication *application,
-                       GdkScreen            *screen)
+remove_style_provider (GfApplication *application,
+                       GdkScreen     *screen)
 {
   GtkStyleProvider *provider;
 
@@ -81,11 +81,11 @@ theme_changed (GtkSettings *settings,
                GParamSpec  *pspec,
                gpointer     user_data)
 {
-  FlashbackApplication *application;
+  GfApplication *application;
   GdkScreen *screen;
   gchar *theme;
 
-  application = FLASHBACK_APPLICATION (user_data);
+  application = GF_APPLICATION (user_data);
   screen = gdk_screen_get_default ();
 
   g_object_get (settings, "gtk-theme-name", &theme, NULL);
@@ -118,9 +118,9 @@ settings_changed (GSettings   *settings,
                   const gchar *key,
                   gpointer     user_data)
 {
-  FlashbackApplication *application;
+  GfApplication *application;
 
-  application = FLASHBACK_APPLICATION (user_data);
+  application = GF_APPLICATION (user_data);
 
 #define SETTING_CHANGED(variable_name, setting_name, function_name) \
   if (key == NULL || g_strcmp0 (key, setting_name) == 0)            \
@@ -157,11 +157,13 @@ settings_changed (GSettings   *settings,
 }
 
 static void
-flashback_application_finalize (GObject *object)
+gf_application_dispose (GObject *object)
 {
-  FlashbackApplication *application;
+  GfApplication *application;
+  GdkScreen *screen;
 
-  application = FLASHBACK_APPLICATION (object);
+  application = GF_APPLICATION (object);
+  screen = gdk_screen_get_default ();
 
   if (application->bus_name)
     {
@@ -171,7 +173,7 @@ flashback_application_finalize (GObject *object)
 
   g_clear_object (&application->settings);
 
-  remove_style_provider (application, gdk_screen_get_default ());
+  remove_style_provider (application, screen);
 
   g_clear_object (&application->automount);
   g_clear_object (&application->config);
@@ -187,11 +189,11 @@ flashback_application_finalize (GObject *object)
   g_clear_object (&application->sound);
   g_clear_object (&application->workarounds);
 
-  G_OBJECT_CLASS (flashback_application_parent_class)->finalize (object);
+  G_OBJECT_CLASS (gf_application_parent_class)->dispose (object);
 }
 
 static void
-flashback_application_init (FlashbackApplication *application)
+gf_application_init (GfApplication *application)
 {
   GtkSettings *settings;
 
@@ -214,17 +216,17 @@ flashback_application_init (FlashbackApplication *application)
 }
 
 static void
-flashback_application_class_init (FlashbackApplicationClass *application_class)
+gf_application_class_init (GfApplicationClass *application_class)
 {
   GObjectClass *object_class;
 
   object_class = G_OBJECT_CLASS (application_class);
 
-  object_class->finalize = flashback_application_finalize;
+  object_class->dispose = gf_application_dispose;
 }
 
-FlashbackApplication *
-flashback_application_new (void)
+GfApplication *
+gf_application_new (void)
 {
-  return g_object_new (FLASHBACK_TYPE_APPLICATION, NULL);
+  return g_object_new (GF_TYPE_APPLICATION, NULL);
 }
diff --git a/gnome-flashback/gf-application.h b/gnome-flashback/gf-application.h
index e44db00..c5a95aa 100644
--- a/gnome-flashback/gf-application.h
+++ b/gnome-flashback/gf-application.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Alberts Muktupāvels
+ * Copyright (C) 2014 - 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
@@ -15,18 +15,18 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef FLASHBACK_APPLICATION_H
-#define FLASHBACK_APPLICATION_H
+#ifndef GF_APPLICATION_H
+#define GF_APPLICATION_H
 
 #include <glib-object.h>
 
 G_BEGIN_DECLS
 
-#define FLASHBACK_TYPE_APPLICATION flashback_application_get_type ()
-G_DECLARE_FINAL_TYPE (FlashbackApplication, flashback_application,
-                      FLASHBACK, APPLICATION, GObject)
+#define GF_TYPE_APPLICATION gf_application_get_type ()
+G_DECLARE_FINAL_TYPE (GfApplication, gf_application,
+                      GF, APPLICATION, GObject)
 
-FlashbackApplication *flashback_application_new (void);
+GfApplication *gf_application_new (void);
 
 G_END_DECLS
 
diff --git a/gnome-flashback/gf-main.c b/gnome-flashback/gf-main.c
index 968d2fb..ddf25ba 100644
--- a/gnome-flashback/gf-main.c
+++ b/gnome-flashback/gf-main.c
@@ -26,7 +26,7 @@
 #include "gf-session.h"
 
 static GMainLoop *loop = NULL;
-static FlashbackApplication *application = NULL;
+static GfApplication *application = NULL;
 
 static gboolean debug = FALSE;
 static gboolean initialize = FALSE;
@@ -127,7 +127,7 @@ session_ready_cb (GfSession *session,
     }
   else
     {
-      application = flashback_application_new ();
+      application = gf_application_new ();
       gf_session_register (session);
     }
 }


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