[gnome-flashback] refactor code
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] refactor code
- Date: Sun, 24 Aug 2014 00:22:33 +0000 (UTC)
commit cb17f83d5169ff4e2fca06df2eb5f7408078b72a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Aug 24 01:00:25 2014 +0300
refactor code
data/org.gnome.gnome-flashback.gschema.xml.in.in | 9 +-
gnome-flashback/Makefile.am | 46 +++--
gnome-flashback/flashback-application.c | 178 +++-------------
gnome-flashback/flashback-end-session-dialog.c | 235 ++++++++++++++++++++++
gnome-flashback/flashback-end-session-dialog.h | 46 +++++
gnome-flashback/flashback-gsettings.h | 5 +-
6 files changed, 349 insertions(+), 170 deletions(-)
---
diff --git a/data/org.gnome.gnome-flashback.gschema.xml.in.in
b/data/org.gnome.gnome-flashback.gschema.xml.in.in
index 99aab19..d08d340 100644
--- a/data/org.gnome.gnome-flashback.gschema.xml.in.in
+++ b/data/org.gnome.gnome-flashback.gschema.xml.in.in
@@ -1,10 +1,15 @@
<schemalist gettext-domain="@GETTEXT_PACKAGE@">
<schema id="org.gnome.gnome-flashback" path="/org/gnome/gnome-flashback/">
- <key name="draw-background" type="b">
+ <key name="desktop-background" type="b">
<default>true</default>
- <_summary>Draw desktop background</_summary>
+ <_summary>Desktop background</_summary>
<_description>If set to true, then GNOME Flashback application will be used to draw
desktop background.</_description>
</key>
+ <key name="end-session-dialog" type="b">
+ <default>true</default>
+ <_summary>End session dialog</_summary>
+ <_description>If set to true, then GNOME Flashback application will be used to show
end session dialog.</_description>
+ </key>
<!--
<child name="background" schema="org.gnome.gnome-flashback.background"/>
diff --git a/gnome-flashback/Makefile.am b/gnome-flashback/Makefile.am
index 2536770..d271d7f 100644
--- a/gnome-flashback/Makefile.am
+++ b/gnome-flashback/Makefile.am
@@ -8,12 +8,14 @@ AM_CPPFLAGS = \
-DGNOME_DESKTOP_USE_UNSTABLE_API
gnome_flashback_SOURCES = \
+ dbus-display-config.c \
+ dbus-display-config.h \
+ dbus-end-session-dialog.c \
+ dbus-end-session-dialog.h \
+ dbus-idle-monitor.c \
+ dbus-idle-monitor.h \
flashback-application.c \
flashback-application.h \
- flashback-dbus-display-config.c \
- flashback-dbus-display-config.h \
- flashback-dbus-idle-monitor.c \
- flashback-dbus-idle-monitor.h \
flashback-desktop-background.c \
flashback-desktop-background.h \
flashback-end-session-dialog.c \
@@ -34,28 +36,28 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d
-u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
-flashback-end-session-dialog.h:
-flashback-end-session-dialog.c: org.gnome.SessionManager.EndSessionDialog.xml Makefile.am
+dbus-end-session-dialog.h:
+dbus-end-session-dialog.c: org.gnome.SessionManager.EndSessionDialog.xml Makefile.am
$(AM_V_GEN) gdbus-codegen \
--interface-prefix=org.gnome.SessionManager \
- --generate-c-code flashback-end-session-dialog \
- --c-namespace Flashback \
+ --generate-c-code dbus-end-session-dialog \
+ --c-namespace DBus \
org.gnome.SessionManager.EndSessionDialog.xml
-flashback-dbus-display-config.h:
-flashback-dbus-display-config.c: org.gnome.Mutter.DisplayConfig.xml
+dbus-display-config.h:
+dbus-display-config.c: org.gnome.Mutter.DisplayConfig.xml
$(AM_V_GEN) gdbus-codegen \
--interface-prefix org.gnome.Mutter \
- --c-namespace Flashback \
- --generate-c-code flashback-dbus-display-config \
+ --c-namespace DBus \
+ --generate-c-code dbus-display-config \
$(srcdir)/org.gnome.Mutter.DisplayConfig.xml
-flashback-dbus-idle-monitor.h:
-flashback-dbus-idle-monitor.c: org.gnome.Mutter.IdleMonitor.xml
+dbus-idle-monitor.h:
+dbus-idle-monitor.c: org.gnome.Mutter.IdleMonitor.xml
$(AM_V_GEN) gdbus-codegen \
--interface-prefix org.gnome.Mutter \
- --c-namespace Flashback \
- --generate-c-code flashback-dbus-idle-monitor \
+ --c-namespace DBus \
+ --generate-c-code dbus-idle-monitor \
--c-generate-object-manager \
$(srcdir)/org.gnome.Mutter.IdleMonitor.xml
@@ -65,12 +67,12 @@ flashback-resources.h: flashback.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES)
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name flashback
$<
BUILT_SOURCES = \
- flashback-end-session-dialog.h \
- flashback-end-session-dialog.c \
- flashback-dbus-display-config.h \
- flashback-dbus-display-config.c \
- flashback-dbus-idle-monitor.h \
- flashback-dbus-idle-monitor.c \
+ dbus-end-session-dialog.h \
+ dbus-end-session-dialog.c \
+ dbus-display-config.h \
+ dbus-display-config.c \
+ dbus-idle-monitor.h \
+ dbus-idle-monitor.c \
flashback-resources.c \
flashback-resources.h
diff --git a/gnome-flashback/flashback-application.c b/gnome-flashback/flashback-application.c
index 35f0338..a1b66fc 100644
--- a/gnome-flashback/flashback-application.c
+++ b/gnome-flashback/flashback-application.c
@@ -21,151 +21,47 @@
#include "flashback-application.h"
#include "flashback-desktop-background.h"
#include "flashback-end-session-dialog.h"
-#include "flashback-inhibit-dialog.h"
#include "flashback-gsettings.h"
struct _FlashbackApplicationPrivate {
- GSettings *settings;
+ GSettings *settings;
- /* Desktop background */
FlashbackDesktopBackground *background;
-
- /* End session dialog */
- gint bus_name;
- GtkWidget *dialog;
+ FlashbackEndSessionDialog *dialog;
};
G_DEFINE_TYPE (FlashbackApplication, flashback_application, GTK_TYPE_APPLICATION);
static void
-inhibit_dialog_response (FlashbackInhibitDialog *dialog,
- guint response_id,
- FlashbackEndSessionDialog *object)
-{
- int action;
-
- g_object_get (dialog, "action", &action, NULL);
- flashback_inhibit_dialog_close (dialog);
-
- switch (response_id) {
- case FLASHBACK_RESPONSE_CANCEL:
- flashback_end_session_dialog_emit_canceled (object);
- flashback_end_session_dialog_emit_closed (object);
- break;
- case FLASHBACK_RESPONSE_ACCEPT:
- if (action == FLASHBACK_LOGOUT_ACTION_LOGOUT) {
- flashback_end_session_dialog_emit_confirmed_logout (object);
- } else if (action == FLASHBACK_LOGOUT_ACTION_SHUTDOWN) {
- flashback_end_session_dialog_emit_confirmed_shutdown (object);
- } else if (action == FLASHBACK_LOGOUT_ACTION_REBOOT) {
- flashback_end_session_dialog_emit_confirmed_reboot (object);
- } else {
- g_assert_not_reached ();
- }
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-}
-
-static void
-inhibit_dialog_close (FlashbackInhibitDialog *dialog,
- FlashbackEndSessionDialog *object)
-{
- flashback_end_session_dialog_emit_canceled (object);
- flashback_end_session_dialog_emit_closed (object);
-}
-
-static void
-closed (FlashbackEndSessionDialog *object,
- FlashbackApplication *app)
-{
- app->priv->dialog = NULL;
-}
-
-static gboolean
-handle_open (FlashbackEndSessionDialog *object,
- GDBusMethodInvocation *invocation,
- guint arg_type,
- guint arg_timestamp,
- guint arg_seconds_to_stay_open,
- const gchar *const *arg_inhibitor_object_paths,
- gpointer user_data)
-{
- FlashbackApplication *app = user_data;
-
- if (app->priv->dialog != NULL) {
- g_object_set (app->priv->dialog, "inhibitor-paths", arg_inhibitor_object_paths, NULL);
-
- if (arg_timestamp != 0) {
- gtk_window_present_with_time (GTK_WINDOW (app->priv->dialog), arg_timestamp);
- } else {
- gtk_window_present (GTK_WINDOW (app->priv->dialog));
- }
-
- flashback_end_session_dialog_complete_open (object, invocation);
- return TRUE;
- }
-
- app->priv->dialog = flashback_inhibit_dialog_new (arg_type,
- arg_seconds_to_stay_open,
- arg_inhibitor_object_paths);
-
- g_signal_connect (app->priv->dialog, "response", G_CALLBACK (inhibit_dialog_response), object);
- g_signal_connect (app->priv->dialog, "destroy", G_CALLBACK (inhibit_dialog_close), object);
- g_signal_connect (app->priv->dialog, "close", G_CALLBACK (inhibit_dialog_close), object);
- g_signal_connect (object, "closed", G_CALLBACK (closed), app);
-
- if (arg_timestamp != 0) {
- gtk_window_present_with_time (GTK_WINDOW (app->priv->dialog), arg_timestamp);
- } else {
- gtk_window_present (GTK_WINDOW (app->priv->dialog));
- }
-
- flashback_end_session_dialog_complete_open (object, invocation);
- return TRUE;
-}
-
-static void
-on_bus_acquired (GDBusConnection *connection,
- const gchar *name,
- gpointer user_data)
-{
- FlashbackApplication *app;
- GDBusInterfaceSkeleton *iface;
- GError *error = NULL;
-
- app = FLASHBACK_APPLICATION (user_data);
- iface = G_DBUS_INTERFACE_SKELETON (flashback_end_session_dialog_skeleton_new ());
- g_signal_connect (iface, "handle-open", G_CALLBACK (handle_open), app);
-
- if (!g_dbus_interface_skeleton_export (iface,
- connection,
- "/org/gnome/SessionManager/EndSessionDialog",
- &error)) {
- g_warning ("Failed to export interface: %s", error->message);
- g_error_free (error);
- return;
- }
-}
-
-static void
flashback_application_settings_changed (GSettings *settings,
const gchar *key,
gpointer user_data)
{
FlashbackApplication *app = FLASHBACK_APPLICATION (user_data);
- gboolean draw_background = g_settings_get_boolean (settings, key);
- if (draw_background) {
- if (app->priv->background == NULL) {
- app->priv->background = flashback_desktop_background_new ();
+ if (key == NULL || g_strcmp0 (key, KEY_DESKTOP_BACKGROUND) == 0) {
+ if (g_settings_get_boolean (settings, KEY_DESKTOP_BACKGROUND)) {
+ if (app->priv->background == NULL) {
+ app->priv->background = flashback_desktop_background_new ();
+ }
+ } else {
+ if (app->priv->background) {
+ g_object_unref (app->priv->background);
+ app->priv->background = NULL;
+ }
}
- } else {
- if (app->priv->background) {
- g_object_unref (app->priv->background);
- app->priv->background = NULL;
+ }
+
+ if (key == NULL || g_strcmp0 (key, KEY_END_SESSION_DIALOG) == 0) {
+ if (g_settings_get_boolean (settings, KEY_END_SESSION_DIALOG)) {
+ if (app->priv->dialog == NULL) {
+ app->priv->dialog = flashback_end_session_dialog_new ();
+ }
+ } else {
+ if (app->priv->dialog) {
+ g_object_unref (app->priv->dialog);
+ app->priv->dialog = NULL;
+ }
}
}
}
@@ -188,20 +84,9 @@ flashback_application_startup (GApplication *application)
app->priv->settings = g_settings_new (FLASHBACK_SCHEMA);
- g_signal_connect (app->priv->settings, "changed::" KEY_DRAW_BACKGROUND,
+ g_signal_connect (app->priv->settings, "changed",
G_CALLBACK (flashback_application_settings_changed), app);
- flashback_application_settings_changed (app->priv->settings, KEY_DRAW_BACKGROUND, app);
-
- app->priv->dialog = NULL;
- app->priv->bus_name = g_bus_own_name (G_BUS_TYPE_SESSION,
- "org.gnome.Shell",
- G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT |
- G_BUS_NAME_OWNER_FLAGS_REPLACE,
- on_bus_acquired,
- NULL,
- NULL,
- app,
- NULL);
+ flashback_application_settings_changed (app->priv->settings, NULL, app);
g_application_hold (application);
}
@@ -216,20 +101,25 @@ flashback_application_shutdown (GApplication *application)
app->priv->background = NULL;
}
+ if (app->priv->dialog) {
+ g_object_unref (app->priv->dialog);
+ app->priv->dialog = NULL;
+ }
+
if (app->priv->settings) {
g_object_unref (app->priv->settings);
app->priv->settings = NULL;
}
- g_bus_unown_name (app->priv->bus_name);
-
G_APPLICATION_CLASS (flashback_application_parent_class)->shutdown (application);
}
static void
flashback_application_init (FlashbackApplication *application)
{
- application->priv = G_TYPE_INSTANCE_GET_PRIVATE (application, FLASHBACK_TYPE_APPLICATION,
FlashbackApplicationPrivate);
+ application->priv = G_TYPE_INSTANCE_GET_PRIVATE (application,
+ FLASHBACK_TYPE_APPLICATION,
+ FlashbackApplicationPrivate);
}
static void
diff --git a/gnome-flashback/flashback-end-session-dialog.c b/gnome-flashback/flashback-end-session-dialog.c
new file mode 100644
index 0000000..7673a2c
--- /dev/null
+++ b/gnome-flashback/flashback-end-session-dialog.c
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2014 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/>.
+ */
+
+/*
+ * Copyright (C) 2014 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 <gtk/gtk.h>
+#include "config.h"
+#include "dbus-end-session-dialog.h"
+#include "flashback-end-session-dialog.h"
+#include "flashback-inhibit-dialog.h"
+
+struct _FlashbackEndSessionDialogPrivate {
+ gint bus_name;
+ GDBusInterfaceSkeleton *iface;
+ GtkWidget *dialog;
+};
+
+G_DEFINE_TYPE (FlashbackEndSessionDialog, flashback_end_session_dialog, G_TYPE_OBJECT);
+
+static void
+inhibit_dialog_response (FlashbackInhibitDialog *dialog,
+ guint response_id,
+ DBusEndSessionDialog *object)
+{
+ int action;
+
+ g_object_get (dialog, "action", &action, NULL);
+ flashback_inhibit_dialog_close (dialog);
+
+ switch (response_id) {
+ case FLASHBACK_RESPONSE_CANCEL:
+ dbus_end_session_dialog_emit_canceled (object);
+ dbus_end_session_dialog_emit_closed (object);
+ break;
+ case FLASHBACK_RESPONSE_ACCEPT:
+ if (action == FLASHBACK_LOGOUT_ACTION_LOGOUT) {
+ dbus_end_session_dialog_emit_confirmed_logout (object);
+ } else if (action == FLASHBACK_LOGOUT_ACTION_SHUTDOWN) {
+ dbus_end_session_dialog_emit_confirmed_shutdown (object);
+ } else if (action == FLASHBACK_LOGOUT_ACTION_REBOOT) {
+ dbus_end_session_dialog_emit_confirmed_reboot (object);
+ } else {
+ g_assert_not_reached ();
+ }
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+}
+
+static void
+inhibit_dialog_close (FlashbackInhibitDialog *dialog,
+ DBusEndSessionDialog *object)
+{
+ dbus_end_session_dialog_emit_canceled (object);
+ dbus_end_session_dialog_emit_closed (object);
+}
+
+static void
+closed (DBusEndSessionDialog *object,
+ FlashbackEndSessionDialog *dialog)
+{
+ dialog->priv->dialog = NULL;
+}
+
+static gboolean
+handle_open (DBusEndSessionDialog *object,
+ GDBusMethodInvocation *invocation,
+ guint arg_type,
+ guint arg_timestamp,
+ guint arg_seconds_to_stay_open,
+ const gchar *const *arg_inhibitor_object_paths,
+ gpointer user_data)
+{
+ FlashbackEndSessionDialog *dialog = user_data;
+
+ if (dialog->priv->dialog != NULL) {
+ g_object_set (dialog->priv->dialog, "inhibitor-paths", arg_inhibitor_object_paths, NULL);
+
+ if (arg_timestamp != 0) {
+ gtk_window_present_with_time (GTK_WINDOW (dialog->priv->dialog), arg_timestamp);
+ } else {
+ gtk_window_present (GTK_WINDOW (dialog->priv->dialog));
+ }
+
+ dbus_end_session_dialog_complete_open (object, invocation);
+ return TRUE;
+ }
+
+ dialog->priv->dialog = flashback_inhibit_dialog_new (arg_type,
+ arg_seconds_to_stay_open,
+ arg_inhibitor_object_paths);
+
+ g_signal_connect (dialog->priv->dialog, "response", G_CALLBACK (inhibit_dialog_response), object);
+ g_signal_connect (dialog->priv->dialog, "destroy", G_CALLBACK (inhibit_dialog_close), object);
+ g_signal_connect (dialog->priv->dialog, "close", G_CALLBACK (inhibit_dialog_close), object);
+ g_signal_connect (object, "closed", G_CALLBACK (closed), dialog);
+
+ if (arg_timestamp != 0) {
+ gtk_window_present_with_time (GTK_WINDOW (dialog->priv->dialog), arg_timestamp);
+ } else {
+ gtk_window_present (GTK_WINDOW (dialog->priv->dialog));
+ }
+
+ dbus_end_session_dialog_complete_open (object, invocation);
+ return TRUE;
+}
+
+static void
+on_bus_acquired (GDBusConnection *connection,
+ const gchar *name,
+ gpointer user_data)
+{
+ FlashbackEndSessionDialog *dialog;
+ GError *error = NULL;
+
+ dialog = FLASHBACK_END_SESSION_DIALOG (user_data);
+ dialog->priv->iface = G_DBUS_INTERFACE_SKELETON (dbus_end_session_dialog_skeleton_new ());
+ g_signal_connect (dialog->priv->iface, "handle-open", G_CALLBACK (handle_open), dialog);
+
+ if (!g_dbus_interface_skeleton_export (dialog->priv->iface,
+ connection,
+ "/org/gnome/SessionManager/EndSessionDialog",
+ &error)) {
+ g_warning ("Failed to export interface: %s", error->message);
+ g_error_free (error);
+ return;
+ }
+}
+
+static void
+on_name_acquired (GDBusConnection *connection,
+ const char *name,
+ gpointer user_data)
+{
+}
+
+static void
+on_name_lost (GDBusConnection *connection,
+ const char *name,
+ gpointer user_data)
+{
+}
+
+static void
+flashback_end_session_dialog_finalize (GObject *object)
+{
+ FlashbackEndSessionDialog *dialog = FLASHBACK_END_SESSION_DIALOG (object);
+
+ if (dialog->priv->dialog) {
+ gtk_widget_destroy (dialog->priv->dialog);
+ dialog->priv->dialog = NULL;
+ }
+
+ if (dialog->priv->iface) {
+ g_dbus_interface_skeleton_unexport (dialog->priv->iface);
+
+ g_object_unref (dialog->priv->iface);
+ dialog->priv->iface = NULL;
+ }
+
+ if (dialog->priv->bus_name) {
+ g_bus_unown_name (dialog->priv->bus_name);
+ dialog->priv->bus_name = 0;
+ }
+
+ G_OBJECT_CLASS (flashback_end_session_dialog_parent_class)->finalize (object);
+}
+
+static void
+flashback_end_session_dialog_init (FlashbackEndSessionDialog *dialog)
+{
+ dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE (dialog,
+ FLASHBACK_TYPE_END_SESSION_DIALOG,
+ FlashbackEndSessionDialogPrivate);
+
+ dialog->priv->dialog = NULL;
+ dialog->priv->iface = NULL;
+ dialog->priv->bus_name = g_bus_own_name (G_BUS_TYPE_SESSION,
+ "org.gnome.Shell",
+ G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT |
+ G_BUS_NAME_OWNER_FLAGS_REPLACE,
+ on_bus_acquired,
+ on_name_acquired,
+ on_name_lost,
+ dialog,
+ NULL);
+}
+
+static void
+flashback_end_session_dialog_class_init (FlashbackEndSessionDialogClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ object_class->finalize = flashback_end_session_dialog_finalize;
+
+ g_type_class_add_private (class, sizeof (FlashbackEndSessionDialogPrivate));
+}
+
+FlashbackEndSessionDialog *
+flashback_end_session_dialog_new (void)
+{
+ return g_object_new (FLASHBACK_TYPE_END_SESSION_DIALOG,
+ NULL);
+}
diff --git a/gnome-flashback/flashback-end-session-dialog.h b/gnome-flashback/flashback-end-session-dialog.h
new file mode 100644
index 0000000..4317448
--- /dev/null
+++ b/gnome-flashback/flashback-end-session-dialog.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2014 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 FLASHBACK_END_SESSION_DIALOG_H
+#define FLASHBACK_END_SESSION_DIALOG_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define FLASHBACK_TYPE_END_SESSION_DIALOG (flashback_end_session_dialog_get_type ())
+#define FLASHBACK_END_SESSION_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o),
FLASHBACK_TYPE_END_SESSION_DIALOG, FlashbackEndSessionDialog))
+
+typedef struct _FlashbackEndSessionDialog FlashbackEndSessionDialog;
+typedef struct _FlashbackEndSessionDialogClass FlashbackEndSessionDialogClass;
+typedef struct _FlashbackEndSessionDialogPrivate FlashbackEndSessionDialogPrivate;
+
+struct _FlashbackEndSessionDialog {
+ GObject parent;
+ FlashbackEndSessionDialogPrivate *priv;
+};
+
+struct _FlashbackEndSessionDialogClass {
+ GObjectClass parent_class;
+};
+
+GType flashback_end_session_dialog_get_type (void);
+FlashbackEndSessionDialog *flashback_end_session_dialog_new (void);
+
+G_END_DECLS
+
+#endif
diff --git a/gnome-flashback/flashback-gsettings.h b/gnome-flashback/flashback-gsettings.h
index 6bc073b..73e53fb 100644
--- a/gnome-flashback/flashback-gsettings.h
+++ b/gnome-flashback/flashback-gsettings.h
@@ -18,8 +18,9 @@
#ifndef FLASHBACK_GSETTINGS_H
#define FLASHBACK_GSETTINGS_H
-#define FLASHBACK_SCHEMA "org.gnome.gnome-flashback"
-#define KEY_DRAW_BACKGROUND "draw-background"
+#define FLASHBACK_SCHEMA "org.gnome.gnome-flashback"
+#define KEY_DESKTOP_BACKGROUND "desktop-background"
+#define KEY_END_SESSION_DIALOG "end-session-dialog"
/*#define FLASHBACK_BACKGROUND_SCHEMA "org.gnome.gnome-flashback.background"
#define KEY_FADE "fade"*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]