diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-12-17 05:52:57 +0000 |
---|---|---|
committer | William Jon McCann <mccann@src.gnome.org> | 2007-12-17 05:52:57 +0000 |
commit | abd0258716109610791b106ec3015ef37db7ffc0 (patch) | |
tree | 201966bf741b5703e2e769496e68a5a69f5ec950 /plugins | |
parent | 33ee9c347a8cae40074666b6386874f80e5fdc97 (diff) | |
download | gnome-settings-daemon-abd0258716109610791b106ec3015ef37db7ffc0.tar.gz |
Add screensaver plugin.
2007-12-17 William Jon McCann <mccann@jhu.edu>
* configure.ac:
* data/gnome-settings-daemon.schemas.in:
* plugins/Makefile.am:
* plugins/screensaver/Makefile.am:
* plugins/screensaver/gsd-screensaver-manager.c: (key_toggled_cb),
(gsd_screensaver_manager_start), (gsd_screensaver_manager_stop),
(gsd_screensaver_manager_set_property),
(gsd_screensaver_manager_get_property),
(gsd_screensaver_manager_constructor),
(gsd_screensaver_manager_dispose),
(gsd_screensaver_manager_class_init),
(gsd_screensaver_manager_init), (gsd_screensaver_manager_finalize),
(gsd_screensaver_manager_new):
* plugins/screensaver/gsd-screensaver-manager.h:
* plugins/screensaver/gsd-screensaver-plugin.c:
(gsd_screensaver_plugin_init), (gsd_screensaver_plugin_finalize),
(impl_activate), (impl_deactivate),
(gsd_screensaver_plugin_class_init):
* plugins/screensaver/gsd-screensaver-plugin.h:
* plugins/screensaver/screensaver.gnome-settings-plugin.desktop.in:
Add screensaver plugin.
svn path=/trunk/; revision=20
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Makefile.am | 1 | ||||
-rw-r--r-- | plugins/screensaver/Makefile.am | 55 | ||||
-rw-r--r-- | plugins/screensaver/gsd-screensaver-manager.c | 309 | ||||
-rw-r--r-- | plugins/screensaver/gsd-screensaver-manager.h | 57 | ||||
-rw-r--r-- | plugins/screensaver/gsd-screensaver-plugin.c | 103 | ||||
-rw-r--r-- | plugins/screensaver/gsd-screensaver-plugin.h | 59 | ||||
-rw-r--r-- | plugins/screensaver/screensaver.gnome-settings-plugin.desktop.in | 8 |
7 files changed, 592 insertions, 0 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 0771ab50..bce70ddc 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -9,6 +9,7 @@ SUBDIRS = \ keybindings \ keyboard \ mouse \ + screensaver \ xrandr \ xrdb \ xsettings \ diff --git a/plugins/screensaver/Makefile.am b/plugins/screensaver/Makefile.am new file mode 100644 index 00000000..1436356f --- /dev/null +++ b/plugins/screensaver/Makefile.am @@ -0,0 +1,55 @@ +NULL = + +modules_flags = -export_dynamic -avoid-version -module -no-undefined + +plugindir = $(libdir)/gnome-settings-daemon/plugins/screensaver + +INCLUDES = \ + -I$(top_srcdir)/src \ + -DGNOME_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\"\ + $(SETTINGS_PLUGIN_CFLAGS) \ + $(NULL) + +plugin_LTLIBRARIES = \ + libscreensaver.la \ + $(NULL) + +libscreensaver_la_SOURCES = \ + gsd-screensaver-plugin.h \ + gsd-screensaver-plugin.c \ + gsd-screensaver-manager.h \ + gsd-screensaver-manager.c \ + $(NULL) + +libscreensaver_la_LDFLAGS = \ + $(PLUGIN_LIBTOOL_FLAGS) \ + $(modules_flags) \ + $(NULL) + +libscreensaver_la_LIBADD = \ + $(SETTINGS_PLUGIN_LIBS) \ + $(NULL) + +libscreensaver_la_CFLAGS = \ + $(NULL) + +plugin_in_files = \ + screensaver.gnome-settings-plugin.desktop.in \ + $(NULL) + +%.gnome-settings-plugin: %.gnome-settings-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache + +plugin_DATA = $(plugin_in_files:.gnome-settings-plugin.desktop.in=.gnome-settings-plugin) + +EXTRA_DIST = \ + $(plugin_in_files) \ + $(NULL) + +CLEANFILES = \ + $(plugin_DATA) \ + $(NULL) + +DISTCLEANFILES = \ + $(plugin_DATA) \ + $(NULL) + diff --git a/plugins/screensaver/gsd-screensaver-manager.c b/plugins/screensaver/gsd-screensaver-manager.c new file mode 100644 index 00000000..6e13730e --- /dev/null +++ b/plugins/screensaver/gsd-screensaver-manager.c @@ -0,0 +1,309 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu> + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +#include "config.h" + +#include <sys/types.h> +#include <sys/wait.h> +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> +#include <string.h> +#include <errno.h> + +#include <locale.h> + +#include <glib.h> +#include <glib/gi18n.h> +#include <gdk/gdk.h> +#include <gdk/gdkx.h> +#include <gtk/gtk.h> +#include <gconf/gconf-client.h> + +#include "gsd-screensaver-manager.h" + +#define START_SCREENSAVER_KEY "/apps/gnome-settings-daemon/plugins/screensaver/start_screensaver" +#define SHOW_STARTUP_ERRORS_KEY "/apps/gnome-settings-daemon/plugins/screensaver/show_startup_errors" + +#define GSD_SCREENSAVER_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_SCREENSAVER_MANAGER, GsdScreensaverManagerPrivate)) + +struct GsdScreensaverManagerPrivate +{ + GPid screensaver_pid; + gboolean start_screensaver; + gboolean have_gscreensaver; + gboolean have_xscreensaver; +}; + +enum { + PROP_0, +}; + +static void gsd_screensaver_manager_class_init (GsdScreensaverManagerClass *klass); +static void gsd_screensaver_manager_init (GsdScreensaverManager *screensaver_manager); +static void gsd_screensaver_manager_finalize (GObject *object); + +G_DEFINE_TYPE (GsdScreensaverManager, gsd_screensaver_manager, G_TYPE_OBJECT) + +static gpointer manager_object = NULL; + +static void +key_toggled_cb (GtkWidget *toggle, + GsdScreensaverManager *manager) +{ + GConfClient *client; + + client = gconf_client_get_default (); + gconf_client_set_bool (client, + SHOW_STARTUP_ERRORS_KEY, + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)) + ? 0 : 1, + NULL); + g_object_unref (client); +} + +gboolean +gsd_screensaver_manager_start (GsdScreensaverManager *manager, + GError **error) +{ + char *ss_cmd; + GError *gerr = NULL; + gboolean show_error; + GtkWidget *dialog; + GtkWidget *toggle; + char *args[3]; + GConfClient *client; + + g_debug ("Starting screensaver manager"); + + /* + * with gnome-screensaver, all settings are loaded internally + * from gconf at startup + * + * with xscreensaver, our settings only apply to startup, and + * the screensaver settings are all in xscreensaver and not + * gconf. + * + * we could have xscreensaver-demo run gconftool-2 directly, + * and start / stop xscreensaver here + * + */ + + client = gconf_client_get_default (); + + manager->priv->start_screensaver = gconf_client_get_bool (client, START_SCREENSAVER_KEY, NULL); + + if ((ss_cmd = g_find_program_in_path ("gnome-screensaver"))) { + manager->priv->have_gscreensaver = TRUE; + g_free (ss_cmd); + } else { + manager->priv->have_gscreensaver = FALSE; + } + + if ((ss_cmd = g_find_program_in_path ("xscreensaver"))) { + manager->priv->have_xscreensaver = TRUE; + g_free (ss_cmd); + } else { + manager->priv->have_xscreensaver = FALSE; + } + + + if (!manager->priv->start_screensaver) { + return TRUE; + } + + if (manager->priv->have_gscreensaver) { + args[0] = "gnome-screensaver"; + args[1] = NULL; + } else if (manager->priv->have_xscreensaver) { + args[0] = "xscreensaver"; + args[1] = "-nosplash"; + } else + return FALSE; + args[2] = NULL; + + if (g_spawn_async (g_get_home_dir (), args, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &manager->priv->screensaver_pid, &gerr)) { + g_object_unref (client); + return TRUE; + } + + show_error = gconf_client_get_bool (client, SHOW_STARTUP_ERRORS_KEY, NULL); + if (!show_error) { + g_error_free (gerr); + g_object_unref (client); + return FALSE; + } + + dialog = gtk_message_dialog_new (NULL, + 0, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("There was an error starting up the screensaver:\n\n" + "%s\n\n" + "Screensaver functionality will not work in this session."), + gerr->message); + g_error_free (gerr); + + g_signal_connect (dialog, "response", + G_CALLBACK (gtk_widget_destroy), + NULL); + + toggle = gtk_check_button_new_with_mnemonic (_("_Do not show this message again")); + gtk_widget_show (toggle); + + if (gconf_client_key_is_writable (client, SHOW_STARTUP_ERRORS_KEY, NULL)) { + g_signal_connect (toggle, + "toggled", + G_CALLBACK (key_toggled_cb), + manager); + } else { + gtk_widget_set_sensitive (toggle, FALSE); + } + g_object_unref (client); + + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + toggle, + FALSE, FALSE, 0); + + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); + + gtk_widget_show (dialog); + + return TRUE; +} + +void +gsd_screensaver_manager_stop (GsdScreensaverManager *manager) +{ + g_debug ("Stopping screensaver manager"); + + g_spawn_close_pid (manager->priv->screensaver_pid); +} + +static void +gsd_screensaver_manager_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + GsdScreensaverManager *self; + + self = GSD_SCREENSAVER_MANAGER (object); + + switch (prop_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gsd_screensaver_manager_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + GsdScreensaverManager *self; + + self = GSD_SCREENSAVER_MANAGER (object); + + switch (prop_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static GObject * +gsd_screensaver_manager_constructor (GType type, + guint n_construct_properties, + GObjectConstructParam *construct_properties) +{ + GsdScreensaverManager *screensaver_manager; + GsdScreensaverManagerClass *klass; + + klass = GSD_SCREENSAVER_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_SCREENSAVER_MANAGER)); + + screensaver_manager = GSD_SCREENSAVER_MANAGER (G_OBJECT_CLASS (gsd_screensaver_manager_parent_class)->constructor (type, + n_construct_properties, + construct_properties)); + + return G_OBJECT (screensaver_manager); +} + +static void +gsd_screensaver_manager_dispose (GObject *object) +{ + GsdScreensaverManager *screensaver_manager; + + screensaver_manager = GSD_SCREENSAVER_MANAGER (object); + + G_OBJECT_CLASS (gsd_screensaver_manager_parent_class)->dispose (object); +} + +static void +gsd_screensaver_manager_class_init (GsdScreensaverManagerClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->get_property = gsd_screensaver_manager_get_property; + object_class->set_property = gsd_screensaver_manager_set_property; + object_class->constructor = gsd_screensaver_manager_constructor; + object_class->dispose = gsd_screensaver_manager_dispose; + object_class->finalize = gsd_screensaver_manager_finalize; + + g_type_class_add_private (klass, sizeof (GsdScreensaverManagerPrivate)); +} + +static void +gsd_screensaver_manager_init (GsdScreensaverManager *manager) +{ + manager->priv = GSD_SCREENSAVER_MANAGER_GET_PRIVATE (manager); + +} + +static void +gsd_screensaver_manager_finalize (GObject *object) +{ + GsdScreensaverManager *screensaver_manager; + + g_return_if_fail (object != NULL); + g_return_if_fail (GSD_IS_SCREENSAVER_MANAGER (object)); + + screensaver_manager = GSD_SCREENSAVER_MANAGER (object); + + g_return_if_fail (screensaver_manager->priv != NULL); + + G_OBJECT_CLASS (gsd_screensaver_manager_parent_class)->finalize (object); +} + +GsdScreensaverManager * +gsd_screensaver_manager_new (void) +{ + if (manager_object != NULL) { + g_object_ref (manager_object); + } else { + manager_object = g_object_new (GSD_TYPE_SCREENSAVER_MANAGER, NULL); + g_object_add_weak_pointer (manager_object, + (gpointer *) &manager_object); + } + + return GSD_SCREENSAVER_MANAGER (manager_object); +} diff --git a/plugins/screensaver/gsd-screensaver-manager.h b/plugins/screensaver/gsd-screensaver-manager.h new file mode 100644 index 00000000..79886437 --- /dev/null +++ b/plugins/screensaver/gsd-screensaver-manager.h @@ -0,0 +1,57 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu> + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +#ifndef __GSD_SCREENSAVER_MANAGER_H +#define __GSD_SCREENSAVER_MANAGER_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define GSD_TYPE_SCREENSAVER_MANAGER (gsd_screensaver_manager_get_type ()) +#define GSD_SCREENSAVER_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_SCREENSAVER_MANAGER, GsdScreensaverManager)) +#define GSD_SCREENSAVER_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_SCREENSAVER_MANAGER, GsdScreensaverManagerClass)) +#define GSD_IS_SCREENSAVER_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_SCREENSAVER_MANAGER)) +#define GSD_IS_SCREENSAVER_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_SCREENSAVER_MANAGER)) +#define GSD_SCREENSAVER_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_SCREENSAVER_MANAGER, GsdScreensaverManagerClass)) + +typedef struct GsdScreensaverManagerPrivate GsdScreensaverManagerPrivate; + +typedef struct +{ + GObject parent; + GsdScreensaverManagerPrivate *priv; +} GsdScreensaverManager; + +typedef struct +{ + GObjectClass parent_class; +} GsdScreensaverManagerClass; + +GType gsd_screensaver_manager_get_type (void); + +GsdScreensaverManager * gsd_screensaver_manager_new (void); +gboolean gsd_screensaver_manager_start (GsdScreensaverManager *manager, + GError **error); +void gsd_screensaver_manager_stop (GsdScreensaverManager *manager); + +G_END_DECLS + +#endif /* __GSD_SCREENSAVER_MANAGER_H */ diff --git a/plugins/screensaver/gsd-screensaver-plugin.c b/plugins/screensaver/gsd-screensaver-plugin.c new file mode 100644 index 00000000..4d33384d --- /dev/null +++ b/plugins/screensaver/gsd-screensaver-plugin.c @@ -0,0 +1,103 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu> + * + * 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 2, 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +#include "config.h" + +#include <glib/gi18n-lib.h> +#include <gmodule.h> + +#include "gnome-settings-plugin.h" +#include "gsd-screensaver-plugin.h" +#include "gsd-screensaver-manager.h" + +struct GsdScreensaverPluginPrivate { + GsdScreensaverManager *manager; +}; + +#define GSD_SCREENSAVER_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_SCREENSAVER_PLUGIN, GsdScreensaverPluginPrivate)) + +GNOME_SETTINGS_PLUGIN_REGISTER (GsdScreensaverPlugin, gsd_screensaver_plugin) + +static void +gsd_screensaver_plugin_init (GsdScreensaverPlugin *plugin) +{ + plugin->priv = GSD_SCREENSAVER_PLUGIN_GET_PRIVATE (plugin); + + g_debug ("GsdScreensaverPlugin initializing"); + + plugin->priv->manager = gsd_screensaver_manager_new (); +} + +static void +gsd_screensaver_plugin_finalize (GObject *object) +{ + GsdScreensaverPlugin *plugin; + + g_return_if_fail (object != NULL); + g_return_if_fail (GSD_IS_SCREENSAVER_PLUGIN (object)); + + g_debug ("GsdScreensaverPlugin finalizing"); + + plugin = GSD_SCREENSAVER_PLUGIN (object); + + g_return_if_fail (plugin->priv != NULL); + + if (plugin->priv->manager != NULL) { + g_object_unref (plugin->priv->manager); + } + + G_OBJECT_CLASS (gsd_screensaver_plugin_parent_class)->finalize (object); +} + +static void +impl_activate (GnomeSettingsPlugin *plugin) +{ + gboolean res; + GError *error; + + g_debug ("Activating screensaver plugin"); + + error = NULL; + res = gsd_screensaver_manager_start (GSD_SCREENSAVER_PLUGIN (plugin)->priv->manager, &error); + if (! res) { + g_warning ("Unable to start screensaver manager: %s", error->message); + g_error_free (error); + } +} + +static void +impl_deactivate (GnomeSettingsPlugin *plugin) +{ + g_debug ("Deactivating screensaver plugin"); +} + +static void +gsd_screensaver_plugin_class_init (GsdScreensaverPluginClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + GnomeSettingsPluginClass *plugin_class = GNOME_SETTINGS_PLUGIN_CLASS (klass); + + object_class->finalize = gsd_screensaver_plugin_finalize; + + plugin_class->activate = impl_activate; + plugin_class->deactivate = impl_deactivate; + + g_type_class_add_private (klass, sizeof (GsdScreensaverPluginPrivate)); +} diff --git a/plugins/screensaver/gsd-screensaver-plugin.h b/plugins/screensaver/gsd-screensaver-plugin.h new file mode 100644 index 00000000..fb1f98a1 --- /dev/null +++ b/plugins/screensaver/gsd-screensaver-plugin.h @@ -0,0 +1,59 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu> + * + * 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 2, 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +#ifndef __GSD_SCREENSAVER_PLUGIN_H__ +#define __GSD_SCREENSAVER_PLUGIN_H__ + +#include <glib.h> +#include <glib-object.h> +#include <gmodule.h> + +#include "gnome-settings-plugin.h" + +G_BEGIN_DECLS + +#define GSD_TYPE_SCREENSAVER_PLUGIN (gsd_screensaver_plugin_get_type ()) +#define GSD_SCREENSAVER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_SCREENSAVER_PLUGIN, GsdScreensaverPlugin)) +#define GSD_SCREENSAVER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_SCREENSAVER_PLUGIN, GsdScreensaverPluginClass)) +#define GSD_IS_SCREENSAVER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_SCREENSAVER_PLUGIN)) +#define GSD_IS_SCREENSAVER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_SCREENSAVER_PLUGIN)) +#define GSD_SCREENSAVER_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_SCREENSAVER_PLUGIN, GsdScreensaverPluginClass)) + +typedef struct GsdScreensaverPluginPrivate GsdScreensaverPluginPrivate; + +typedef struct +{ + GnomeSettingsPlugin parent; + GsdScreensaverPluginPrivate *priv; +} GsdScreensaverPlugin; + +typedef struct +{ + GnomeSettingsPluginClass parent_class; +} GsdScreensaverPluginClass; + +GType gsd_screensaver_plugin_get_type (void) G_GNUC_CONST; + +/* All the plugins must implement this function */ +G_MODULE_EXPORT GType register_gnome_settings_plugin (GTypeModule *module); + +G_END_DECLS + +#endif /* __GSD_SCREENSAVER_PLUGIN_H__ */ diff --git a/plugins/screensaver/screensaver.gnome-settings-plugin.desktop.in b/plugins/screensaver/screensaver.gnome-settings-plugin.desktop.in new file mode 100644 index 00000000..aba7ab53 --- /dev/null +++ b/plugins/screensaver/screensaver.gnome-settings-plugin.desktop.in @@ -0,0 +1,8 @@ +[GNOME Settings Plugin] +Module=screensaver +IAge=0 +_Name=Screensaver +_Description=Screensaver plugin +Authors=Jacob Berkman <jacob@ximian.com> +Copyright=Copyright © 2002 Sun Microsystems, Inc. +Website= |