2001-12-09 18:50:32 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2001 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
* documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
* the above copyright notice appear in all copies and that both that
|
|
|
|
* copyright notice and this permission notice appear in supporting
|
|
|
|
* documentation, and that the name of Red Hat not be used in advertising or
|
|
|
|
* publicity pertaining to distribution of the software without specific,
|
|
|
|
* written prior permission. Red Hat makes no representations about the
|
|
|
|
* suitability of this software for any purpose. It is provided "as is"
|
|
|
|
* without express or implied warranty.
|
|
|
|
*
|
|
|
|
* RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT
|
|
|
|
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
|
|
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*
|
|
|
|
* Authors: Owen Taylor, Havoc Pennington
|
|
|
|
*/
|
2005-05-22 15:46:45 +00:00
|
|
|
#include <config.h>
|
2001-12-09 18:50:32 +00:00
|
|
|
|
|
|
|
#include <gdk/gdkx.h>
|
2005-05-22 15:46:45 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2001-12-09 18:50:32 +00:00
|
|
|
|
|
|
|
#include <gconf/gconf.h>
|
2002-01-08 14:54:35 +00:00
|
|
|
#include <libgnome/gnome-init.h>
|
|
|
|
#include <libgnomeui/gnome-ui-init.h>
|
2003-02-06 21:47:00 +00:00
|
|
|
|
2001-12-09 18:50:32 +00:00
|
|
|
#include "xsettings-manager.h"
|
|
|
|
#include "gnome-settings-daemon.h"
|
2005-01-31 15:31:44 +00:00
|
|
|
#include "gnome-settings-xmodmap.h"
|
2001-12-09 18:50:32 +00:00
|
|
|
|
2002-04-10 06:08:08 +00:00
|
|
|
/*#include "gnome-settings-disk.h"*/
|
2002-03-28 14:27:13 +00:00
|
|
|
#include "gnome-settings-font.h"
|
2001-12-20 20:20:03 +00:00
|
|
|
#include "gnome-settings-xsettings.h"
|
|
|
|
#include "gnome-settings-mouse.h"
|
2003-11-12 21:58:51 +00:00
|
|
|
#include "gnome-settings-keyboard-xkb.h"
|
2001-12-20 20:20:03 +00:00
|
|
|
#include "gnome-settings-keyboard.h"
|
|
|
|
#include "gnome-settings-background.h"
|
2002-01-04 17:50:44 +00:00
|
|
|
#include "gnome-settings-sound.h"
|
2002-03-23 04:39:24 +00:00
|
|
|
#include "gnome-settings-accessibility-keyboard.h"
|
2002-03-26 17:22:02 +00:00
|
|
|
#include "gnome-settings-screensaver.h"
|
2002-05-16 23:09:02 +00:00
|
|
|
#include "gnome-settings-default-editor.h"
|
2002-05-30 00:25:29 +00:00
|
|
|
#include "gnome-settings-keybindings.h"
|
2004-01-13 15:59:09 +00:00
|
|
|
#include "gnome-settings-multimedia-keys.h"
|
2002-08-19 19:14:21 +00:00
|
|
|
#include "gnome-settings-gtk1theme.h"
|
2003-05-01 16:08:26 +00:00
|
|
|
#include "gnome-settings-xrdb.h"
|
2003-06-26 11:40:10 +00:00
|
|
|
#include "gnome-settings-typing-break.h"
|
2001-12-20 20:20:03 +00:00
|
|
|
|
2005-06-03 08:29:45 +00:00
|
|
|
#include "clipboard-manager.h"
|
|
|
|
|
2002-03-11 01:44:03 +00:00
|
|
|
static GObjectClass *parent_class = NULL;
|
|
|
|
|
|
|
|
struct _GnomeSettingsDaemonPrivate {
|
2002-03-13 17:31:20 +00:00
|
|
|
int dummy;
|
2002-03-11 01:44:03 +00:00
|
|
|
};
|
|
|
|
|
2002-11-08 03:26:33 +00:00
|
|
|
XSettingsManager **managers = NULL;
|
2005-06-03 08:29:45 +00:00
|
|
|
static ClipboardManager *clipboard_manager;
|
2001-12-09 18:50:32 +00:00
|
|
|
|
2005-06-03 08:29:45 +00:00
|
|
|
static void
|
|
|
|
clipboard_manager_terminate_cb (void *data)
|
|
|
|
{
|
|
|
|
/* Do nothing */
|
|
|
|
}
|
|
|
|
|
|
|
|
static GdkFilterReturn
|
|
|
|
clipboard_manager_event_filter (GdkXEvent *xevent,
|
|
|
|
GdkEvent *event,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
if (clipboard_manager_process_event (clipboard_manager,
|
|
|
|
(XEvent *)xevent))
|
|
|
|
return GDK_FILTER_REMOVE;
|
|
|
|
else
|
|
|
|
return GDK_FILTER_CONTINUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
clipboard_manager_watch_cb (Window window,
|
|
|
|
Bool is_start,
|
|
|
|
long mask,
|
|
|
|
void *cb_data)
|
|
|
|
{
|
|
|
|
GdkWindow *gdkwin;
|
|
|
|
GdkDisplay *display;
|
|
|
|
|
|
|
|
display = gdk_display_get_default ();
|
|
|
|
gdkwin = gdk_window_lookup_for_display (display, window);
|
|
|
|
|
|
|
|
if (is_start)
|
|
|
|
{
|
|
|
|
if (!gdkwin)
|
|
|
|
gdkwin = gdk_window_foreign_new_for_display (display, window);
|
|
|
|
else
|
|
|
|
g_object_ref (gdkwin);
|
|
|
|
|
|
|
|
gdk_window_add_filter (gdkwin, clipboard_manager_event_filter, NULL);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-06-12 13:09:44 +00:00
|
|
|
if (!gdkwin)
|
|
|
|
return;
|
2005-06-03 08:29:45 +00:00
|
|
|
gdk_window_remove_filter (gdkwin, clipboard_manager_event_filter, NULL);
|
|
|
|
g_object_unref (gdkwin);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-12-09 18:50:32 +00:00
|
|
|
static void
|
|
|
|
terminate_cb (void *data)
|
|
|
|
{
|
|
|
|
gboolean *terminated = data;
|
2002-11-08 03:26:33 +00:00
|
|
|
|
|
|
|
if (*terminated)
|
|
|
|
return;
|
2001-12-09 18:50:32 +00:00
|
|
|
|
|
|
|
*terminated = TRUE;
|
|
|
|
gtk_main_quit ();
|
|
|
|
}
|
|
|
|
|
|
|
|
static GdkFilterReturn
|
|
|
|
manager_event_filter (GdkXEvent *xevent,
|
|
|
|
GdkEvent *event,
|
|
|
|
gpointer data)
|
|
|
|
{
|
2002-11-08 03:26:33 +00:00
|
|
|
int screen_num = GPOINTER_TO_INT (data);
|
|
|
|
|
|
|
|
g_return_val_if_fail (managers != NULL, GDK_FILTER_CONTINUE);
|
|
|
|
|
|
|
|
if (xsettings_manager_process_event (managers [screen_num], (XEvent *)xevent))
|
2001-12-09 18:50:32 +00:00
|
|
|
return GDK_FILTER_REMOVE;
|
|
|
|
else
|
|
|
|
return GDK_FILTER_CONTINUE;
|
|
|
|
}
|
|
|
|
|
2002-03-11 01:44:03 +00:00
|
|
|
static void
|
|
|
|
finalize (GObject *object)
|
|
|
|
{
|
|
|
|
GnomeSettingsDaemon *daemon;
|
2002-11-08 03:26:33 +00:00
|
|
|
int i;
|
2002-03-11 01:44:03 +00:00
|
|
|
|
|
|
|
daemon = GNOME_SETTINGS_DAEMON (object);
|
|
|
|
if (daemon->private == NULL) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-11-08 03:26:33 +00:00
|
|
|
for (i = 0; managers && managers [i]; i++)
|
|
|
|
xsettings_manager_destroy (managers [i]);
|
2002-03-11 01:44:03 +00:00
|
|
|
|
2005-06-03 08:29:45 +00:00
|
|
|
clipboard_manager_destroy (clipboard_manager);
|
|
|
|
|
2002-03-11 01:44:03 +00:00
|
|
|
g_free (daemon->private);
|
|
|
|
daemon->private = NULL;
|
|
|
|
|
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gnome_settings_daemon_class_init (GnomeSettingsDaemonClass *klass)
|
|
|
|
{
|
|
|
|
GObjectClass *object_class;
|
|
|
|
|
|
|
|
object_class = G_OBJECT_CLASS (klass);
|
|
|
|
|
|
|
|
object_class->finalize = finalize;
|
|
|
|
|
|
|
|
parent_class = g_type_class_peek_parent (klass);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
gnome_settings_daemon_init (GnomeSettingsDaemon *settings)
|
|
|
|
{
|
|
|
|
settings->private = g_new (GnomeSettingsDaemonPrivate, 1);
|
|
|
|
}
|
|
|
|
|
2006-06-25 02:16:06 +00:00
|
|
|
G_DEFINE_TYPE (GnomeSettingsDaemon, gnome_settings_daemon,
|
|
|
|
G_TYPE_OBJECT)
|
2002-03-11 01:44:03 +00:00
|
|
|
|
|
|
|
GObject *
|
|
|
|
gnome_settings_daemon_new (void)
|
2001-12-09 18:50:32 +00:00
|
|
|
{
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
gboolean terminated = FALSE;
|
|
|
|
GConfClient *client;
|
|
|
|
GSList *list;
|
|
|
|
GnomeSettingsDaemon *daemon;
|
|
|
|
GdkDisplay *display;
|
|
|
|
GObject *dbusServer;
|
|
|
|
int i;
|
|
|
|
int n_screens;
|
2002-11-08 03:26:33 +00:00
|
|
|
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
display = gdk_display_get_default ();
|
|
|
|
n_screens = gdk_display_get_n_screens (display);
|
2002-03-06 18:17:33 +00:00
|
|
|
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
daemon = g_object_new (gnome_settings_daemon_get_type (), NULL);
|
2002-01-08 14:54:35 +00:00
|
|
|
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
if (xsettings_manager_check_running (
|
|
|
|
gdk_x11_display_get_xdisplay (display),
|
|
|
|
gdk_screen_get_number (gdk_screen_get_default ()))) {
|
|
|
|
fprintf (stderr, "You can only run one xsettings manager at a time; exiting\n");
|
|
|
|
return NULL;
|
|
|
|
}
|
2005-06-03 08:29:45 +00:00
|
|
|
|
|
|
|
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
if (!terminated) {
|
|
|
|
managers = g_new (XSettingsManager *, n_screens + 1);
|
2002-11-08 03:26:33 +00:00
|
|
|
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
for (i = 0; i < n_screens; i++) {
|
|
|
|
GdkScreen *screen;
|
2002-11-08 03:26:33 +00:00
|
|
|
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
screen = gdk_display_get_screen (display, i);
|
2002-11-08 03:26:33 +00:00
|
|
|
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
managers [i] = xsettings_manager_new (
|
2002-11-08 03:26:33 +00:00
|
|
|
gdk_x11_display_get_xdisplay (display),
|
|
|
|
gdk_screen_get_number (screen),
|
|
|
|
terminate_cb, &terminated);
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
if (!managers [i]) {
|
|
|
|
fprintf (stderr, "Could not create xsettings manager for screen %d!\n", i);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
g_assert (i == n_screens);
|
|
|
|
managers [i] = NULL;
|
2003-02-06 21:47:00 +00:00
|
|
|
}
|
|
|
|
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
if (!clipboard_manager_check_running (GDK_DISPLAY_XDISPLAY (display))) {
|
|
|
|
clipboard_manager = clipboard_manager_new (GDK_DISPLAY_XDISPLAY (display),
|
|
|
|
gdk_error_trap_push,
|
|
|
|
gdk_error_trap_pop,
|
|
|
|
clipboard_manager_terminate_cb,
|
|
|
|
clipboard_manager_watch_cb,
|
|
|
|
NULL);
|
2003-02-06 21:47:00 +00:00
|
|
|
}
|
|
|
|
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
client = gnome_settings_get_config_client ();
|
|
|
|
|
|
|
|
/* gnome_settings_disk_init (client);*/
|
|
|
|
gnome_settings_font_init (client);
|
|
|
|
gnome_settings_xsettings_init (client);
|
|
|
|
gnome_settings_mouse_init (client);
|
|
|
|
/* Essential - xkb initialization should happen before */
|
|
|
|
gnome_settings_keyboard_xkb_set_post_activation_callback ((PostActivationCallback)gnome_settings_load_modmap_files, NULL);
|
|
|
|
gnome_settings_keyboard_xkb_init (client);
|
|
|
|
gnome_settings_keyboard_init (client);
|
|
|
|
gnome_settings_multimedia_keys_init (client);
|
|
|
|
/* */
|
|
|
|
gnome_settings_sound_init (client);
|
|
|
|
gnome_settings_accessibility_keyboard_init (client);
|
|
|
|
gnome_settings_screensaver_init (client);
|
|
|
|
gnome_settings_default_editor_init (client);
|
|
|
|
gnome_settings_background_init (client);
|
|
|
|
gnome_settings_keybindings_init (client);
|
|
|
|
gnome_settings_gtk1_theme_init (client);
|
|
|
|
gnome_settings_xrdb_init (client);
|
|
|
|
gnome_settings_typing_break_init (client);
|
|
|
|
|
|
|
|
for (i = 0; i < n_screens; i++) {
|
|
|
|
GdkScreen *screen;
|
|
|
|
|
|
|
|
screen = gdk_display_get_screen (display, i);
|
|
|
|
gdk_window_add_filter (
|
|
|
|
gdk_screen_get_root_window (screen),
|
|
|
|
manager_event_filter, GINT_TO_POINTER (i));
|
|
|
|
}
|
declare a global GConfClient. (main): unref the global GConfClient.
2005-10-16 Rodrigo Moya <rodrigo@novell.com>
* factory.c: declare a global GConfClient.
(main): unref the global GConfClient.
* gnome-settings-daemon.[ch] (gnome_settings_daemon_get_conf_client):
new function to use the same GConfClient everywhere.
(gnome_settings_daemon_new): use the global GConfClient.
* gnome-settings-accessibility-keyboard.c (set_server_from_gconf,
ax_response_callback, set_gconf_from_server):
* gnome-settings-gtk1theme.c (apply_settings):
* gnome-settings-keybindings.c (bindings_get_entry):
* gnome-settings-keyboard.c (numlock_get_gconf_state,
numlock_set_gconf_state, apply_settings):
* gnome-settings-keyboard-xkb.c (apply_xkb_settings,
gnome_settings_keyboard_xkb_sysconfig_changed_response,
gnome_settings_keyboard_xkb_analyze_sysconfig,
gnome_settings_chk_file_list):
* gnome-settings-screensaver.c (key_toggled_cb,
really_start_screensaver):
* gnome-settings-sound.c (apply_settings):
* gnome-settings-xmodmap.c (check_button_callback,
gnome_settings_load_modmap_files, remove_button_clicked_callback,
load_button_clicked_callback, gnome_settings_modmap_dialog_call):
* gnome-settings-xsettings.c (xft_callback):
use the global GConfClient.
* gnome-settings-keyboard-xkb.c (gnome_settings_keyboard_xkb_load):
don't get another GConfClient when we're getting one passed!
2005-10-17 14:53:19 +00:00
|
|
|
|
return NULL when there is an error, not exit(), so that we do proper
2007-04-02 Rodrigo Moya <rodrigo@gnome-db.org>
* gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL
when there is an error, not exit(), so that we do proper cleanup.
Remove code to register GConf callbacks, that is done in utils.c.
(gnome_settings_daemon_get_conf_client,
gnome_settings_daemon_register_callback,
gnome_settings_daemon_spawn_with_input,
gnome_settings_daemon_get_invisible,
gnome_settings_daemon_delayed_show_dialog): removed from the
GnomeSettingsDaemon interface.
* utils.c (gnome_settings_get_config_client,
gnome_settings_get_invisible,
gnome_settings_register_config_callback,
gnome_settings_spawn_with_input,
gnome_settings_delayed_show_dialog): moved from GnomeSettingsDaemon
interface.
* factory.c (main): check return value from gnome_settings_daemon().
* *.c: adapted to changes in function names.
* Makefile.am: put source files in alphabetical order.
svn path=/trunk/; revision=7434
2007-04-02 15:27:35 +00:00
|
|
|
/* gnome_settings_disk_load (client);*/
|
|
|
|
gnome_settings_font_load (client);
|
|
|
|
gnome_settings_xsettings_load (client);
|
|
|
|
gnome_settings_mouse_load (client);
|
|
|
|
/* Essential - xkb initialization should happen before */
|
|
|
|
gnome_settings_keyboard_xkb_load (client);
|
|
|
|
gnome_settings_keyboard_load (client);
|
|
|
|
gnome_settings_multimedia_keys_load (client);
|
|
|
|
/* */
|
|
|
|
gnome_settings_sound_load (client);
|
|
|
|
gnome_settings_accessibility_keyboard_load (client);
|
|
|
|
gnome_settings_screensaver_load (client);
|
|
|
|
gnome_settings_default_editor_load (client);
|
|
|
|
gnome_settings_background_load (client);
|
|
|
|
gnome_settings_keybindings_load (client);
|
|
|
|
gnome_settings_gtk1_theme_load (client);
|
|
|
|
gnome_settings_xrdb_load (client);
|
|
|
|
gnome_settings_typing_break_load (client);
|
|
|
|
|
|
|
|
dbusServer = g_object_new (gnome_settings_server_get_type (), NULL);
|
|
|
|
|
|
|
|
return G_OBJECT (daemon);
|
declare a global GConfClient. (main): unref the global GConfClient.
2005-10-16 Rodrigo Moya <rodrigo@novell.com>
* factory.c: declare a global GConfClient.
(main): unref the global GConfClient.
* gnome-settings-daemon.[ch] (gnome_settings_daemon_get_conf_client):
new function to use the same GConfClient everywhere.
(gnome_settings_daemon_new): use the global GConfClient.
* gnome-settings-accessibility-keyboard.c (set_server_from_gconf,
ax_response_callback, set_gconf_from_server):
* gnome-settings-gtk1theme.c (apply_settings):
* gnome-settings-keybindings.c (bindings_get_entry):
* gnome-settings-keyboard.c (numlock_get_gconf_state,
numlock_set_gconf_state, apply_settings):
* gnome-settings-keyboard-xkb.c (apply_xkb_settings,
gnome_settings_keyboard_xkb_sysconfig_changed_response,
gnome_settings_keyboard_xkb_analyze_sysconfig,
gnome_settings_chk_file_list):
* gnome-settings-screensaver.c (key_toggled_cb,
really_start_screensaver):
* gnome-settings-sound.c (apply_settings):
* gnome-settings-xmodmap.c (check_button_callback,
gnome_settings_load_modmap_files, remove_button_clicked_callback,
load_button_clicked_callback, gnome_settings_modmap_dialog_call):
* gnome-settings-xsettings.c (xft_callback):
use the global GConfClient.
* gnome-settings-keyboard-xkb.c (gnome_settings_keyboard_xkb_load):
don't get another GConfClient when we're getting one passed!
2005-10-17 14:53:19 +00:00
|
|
|
}
|