Commit 3dfd5ded authored by William Jon McCann's avatar William Jon McCann

migrate gui to new config framework with a chainsaw

svn path=/branches/mccann-gobject/; revision=4947
parent e1a7b7ca
......@@ -79,10 +79,10 @@ get_value (const char *key,
G_TYPE_INVALID);
if (! res) {
if (error != NULL) {
g_warning ("Failed to get value for %s: %s", key, error->message);
g_debug ("Failed to get value for %s: %s", key, error->message);
g_error_free (error);
} else {
g_warning ("Failed to get value for %s", key);
g_debug ("Failed to get value for %s", key);
}
return FALSE;
......@@ -144,6 +144,76 @@ gdm_settings_client_get_string (const char *key,
return ret;
}
gboolean
gdm_settings_client_get_locale_string (const char *key,
const char *locale,
char **value)
{
char *candidate_key;
char *translated_value;
GError *error;
char **languages;
gboolean free_languages = FALSE;
int i;
gboolean ret;
g_return_val_if_fail (key != NULL, FALSE);
candidate_key = NULL;
translated_value = NULL;
error = NULL;
if (locale != NULL) {
languages = g_new (char *, 2);
languages[0] = (char *)locale;
languages[1] = NULL;
free_languages = TRUE;
} else {
languages = (char **) g_get_language_names ();
free_languages = FALSE;
}
for (i = 0; languages[i]; i++) {
gboolean res;
candidate_key = g_strdup_printf ("%s[%s]", key, languages[i]);
res = get_value (candidate_key, &translated_value);
g_free (candidate_key);
if (res) {
break;
}
g_free (translated_value);
translated_value = NULL;
}
/* Fallback to untranslated key
*/
if (translated_value == NULL) {
get_value (key, &translated_value);
}
if (free_languages) {
g_strfreev (languages);
}
if (translated_value != NULL) {
ret = TRUE;
if (value != NULL) {
*value = g_strdup (translated_value);
}
} else {
ret = FALSE;
}
g_free (translated_value);
return ret;
}
gboolean
gdm_settings_client_get_boolean (const char *key,
gboolean *value)
......
......@@ -36,6 +36,9 @@ gboolean gdm_settings_client_get_boolean (const char
gboolean *value);
gboolean gdm_settings_client_get_string (const char *key,
char **value);
gboolean gdm_settings_client_get_locale_string (const char *key,
const char *locale,
char **value);
gboolean gdm_settings_client_set_int (const char *key,
int value);
......
......@@ -78,10 +78,10 @@ get_value (const char *key,
res = gdm_settings_get_value (settings_object, key, &str, &error);
if (! res) {
if (error != NULL) {
g_warning ("Failed to get value for %s: %s", key, error->message);
g_debug ("Failed to get value for %s: %s", key, error->message);
g_error_free (error);
} else {
g_warning ("Failed to get value for %s", key);
g_debug ("Failed to get value for %s", key);
}
return FALSE;
......
......@@ -232,6 +232,8 @@ load_static_servers (GdmManager *manager)
void
gdm_manager_start (GdmManager *manager)
{
g_debug ("GDM starting to manage");
load_static_servers (manager);
/* Start static X servers */
......@@ -405,6 +407,27 @@ gdm_manager_get_property (GObject *object,
}
}
static GObject *
gdm_manager_constructor (GType type,
guint n_construct_properties,
GObjectConstructParam *construct_properties)
{
GdmManager *manager;
GdmManagerClass *klass;
klass = GDM_MANAGER_CLASS (g_type_class_peek (GDM_TYPE_MANAGER));
manager = GDM_MANAGER (G_OBJECT_CLASS (gdm_manager_parent_class)->constructor (type,
n_construct_properties,
construct_properties));
if (manager->priv->xdmcp_enabled) {
manager->priv->xdmcp_manager = gdm_xdmcp_manager_new (manager->priv->display_store);
}
return G_OBJECT (manager);
}
static void
gdm_manager_class_init (GdmManagerClass *klass)
{
......@@ -412,6 +435,7 @@ gdm_manager_class_init (GdmManagerClass *klass)
object_class->get_property = gdm_manager_get_property;
object_class->set_property = gdm_manager_set_property;
object_class->constructor = gdm_manager_constructor;
object_class->finalize = gdm_manager_finalize;
signals [DISPLAY_ADDED] =
......@@ -459,10 +483,6 @@ gdm_manager_init (GdmManager *manager)
make_global_cookie (manager);
manager->priv->display_store = gdm_display_store_new ();
if (manager->priv->xdmcp_enabled) {
manager->priv->xdmcp_manager = gdm_xdmcp_manager_new (manager->priv->display_store);
}
}
static void
......
......@@ -48,6 +48,7 @@
#include "gdm-settings.h"
#include "gdm-settings-direct.h"
#include "gdm-settings-keys.h"
#include "misc.h"
......@@ -397,10 +398,14 @@ gdm_daemon_change_user (uid_t *uidp,
uid = 0;
gid = 0;
#if 0
gdm_daemon_config_get_string_for_id (daemon_config, GDM_ID_USER, &username);
gdm_daemon_config_get_string_for_id (daemon_config, GDM_ID_GROUP, &groupname);
#endif
gdm_settings_direct_get_string (GDM_KEY_USER, &username);
gdm_settings_direct_get_string (GDM_KEY_GROUP, &groupname);
if (username == NULL || groupname == NULL) {
return;
}
g_debug ("Changing user:group to %s:%s", username, groupname);
/* Lookup user and groupid for the GDM user */
pwent = getpwnam (username);
......
......@@ -5035,6 +5035,27 @@ homogeneous="bool">
If no item node has "background" property set, then the
background is not modified when greeter exits.
</para>
<para>
To use a different background for login transition than the one
used for login, insert a "item" node with "background" property set to "true" to draw login transition background before "item&quote; node (without any "background" property) used for greeter background. For instance :
</para>
<screen>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE greeter SYSTEM "greeter.dtd"&gt;
&lt;greeter&gt;
&lt;item type="rect" background="true"&gt;
&lt;normal file="background_for_login.svg"/&gt;
&lt;pos x="0" y="0" width="100%" height="100%"/&gt;
&lt;/item&gt;
&lt;item type="rect"&gt;
&lt;normal file="background_for_greeter.svg"/&gt;
&lt;pos x="0" y="0" width="100%" height="100%"/&gt;
&lt;/item&gt;
[...]
&lt;/greeter&gt;
</screen>
</sect3>
<sect3 id="positionnodes">
......
......@@ -39,20 +39,14 @@ noinst_LIBRARIES = libgdmwm.a libgdmcommon.a
libexec_PROGRAMS = \
@GDMCHOOSER@ \
gdmlogin
sbin_PROGRAMS = \
gdmsetup
$(NULL)
bin_PROGRAMS = \
gdmphotosetup \
@GDMXNESTCHOOSER@ \
gdmflexiserver \
gdmdynamic
EXTRA_PROGRAMS = gdmchooser gdmXnestchooser
gdmflexiserver \
$(NULL)
gdmphotosetup_SOURCES = \
gdmphotosetup.c
EXTRA_PROGRAMS = gdmchooser gdmXnestchooser
gdmXnestchooser_SOURCES = \
gdmXnestchooser.c
......@@ -60,9 +54,6 @@ gdmXnestchooser_SOURCES = \
gdmflexiserver_SOURCES = \
gdmflexiserver.c
gdmdynamic_SOURCES = \
gdmdynamic.c
libgdmwm_a_SOURCES = \
gdmwm.c \
gdmwm.h
......@@ -76,10 +67,6 @@ libgdmcommon_a_SOURCES = \
gdmsession.h \
misc.c \
misc.h \
gdmcomm.c \
gdmcomm.h \
gdmconfig.c \
gdmconfig.h \
gdmcommon.c \
gdmcommon.h \
$(NULL)
......@@ -90,12 +77,6 @@ gdmchooser_SOURCES = \
misc.h \
$(NULL)
gdmlogin_SOURCES = \
gdmlogin.c
gdmsetup_SOURCES = \
gdmsetup.c
gdmchooser_LDFLAGS = -export-dynamic
gdmchooser_LDADD = \
$(EXTRA_CHOOSER_LIBS) \
......@@ -104,6 +85,7 @@ gdmchooser_LDADD = \
$(GUIGLADE_LIBS) \
$(INTLLIBS) \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(GOBJECT_LIBS) \
$(PANGO_LIBS) \
$(GDK_LIBS) \
......@@ -116,65 +98,12 @@ gdmchooser_LDADD = \
-lX11 \
$(NULL)
gdmlogin_LDADD = \
$(EXTRA_GREETER_LIBS) \
libgdmwm.a \
libgdmcommon.a \
$(GUING_LIBS) \
$(INTLLIBS) \
$(GLIB_LIBS) \
$(GOBJECT_LIBS) \
$(GDK_LIBS) \
$(PANGO_LIBS) \
$(GDKPIXBUF_LIBS) \
$(top_builddir)/common/libgdmcommon.a \
$(X_EXTRA_LIBS) \
$(XINERAMA_LIBS) \
$(X_LIBS) \
-lX11 \
$(NULL)
# LIBGNOMEUI should be removed from gdmsetup at some point.
# It is needed because it uses gnome_help_display_uri(), which
# should be replaced at some point.
#
gdmsetup_CFLAGS = $(LIBGNOMEUI_CFLAGS)
gdmsetup_LDFLAGS = -export-dynamic
gdmsetup_LDADD = \
libgdmcommon.a \
$(GUI_LIBS) \
$(INTLLIBS) \
$(GLIB_LIBS) \
$(GOBJECT_LIBS) \
$(PANGO_LIBS) \
$(GDK_LIBS) \
$(GDKPIXBUF_LIBS) \
$(EXTRA_SETUP_LIBS) \
$(LIBGNOMEUI_LIBS) \
$(top_builddir)/common/libgdmcommon.a \
$(X_LIBS) \
-lXau \
-lX11 \
$(NULL)
gdmphotosetup_LDADD = \
libgdmcommon.a \
$(GUI_LIBS) \
$(INTLLIBS) \
$(GLIB_LIBS) \
$(GOBJECT_LIBS) \
$(GDK_LIBS) \
$(GDKPIXBUF_LIBS) \
$(INTLLIBS) \
-lX11 \
$(top_builddir)/common/libgdmcommon.a \
$(NULL)
gdmXnestchooser_LDADD = \
libgdmcommon.a \
$(GUI_LIBS) \
$(INTLLIBS) \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(GOBJECT_LIBS) \
$(GDK_LIBS) \
$(top_builddir)/common/libgdmcommon.a \
......@@ -189,6 +118,7 @@ gdmflexiserver_LDADD = \
$(GUI_LIBS) \
$(INTLLIBS) \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(GOBJECT_LIBS) \
$(GDK_LIBS) \
$(top_builddir)/common/libgdmcommon.a \
......@@ -198,46 +128,27 @@ gdmflexiserver_LDADD = \
-lXau \
$(NULL)
gdmdynamic_LDADD = \
libgdmcommon.a \
$(GUI_LIBS) \
$(INTLLIBS) \
$(GLIB_LIBS) \
$(GOBJECT_LIBS) \
$(GDK_LIBS) \
$(top_builddir)/common/libgdmcommon.a \
$(EXTRA_DYNAMIC_LIBS) \
$(X_LIBS) \
-lX11 \
-lXau \
$(NULL)
Settingsdir = $(datadir)/applications
Settings_files = gdmphotosetup.desktop
Settings_in_files = gdmphotosetup.desktop.in
Settings_DATA = $(Settings_in_files:.desktop.in=.desktop)
Systemdir = $(datadir)/applications
System_files = \
gdmsetup.desktop \
gdmflexiserver.desktop \
gdmflexiserver-xnest.desktop
System_dist_files = \
gdmsetup.desktop.in.in \
gdmflexiserver.desktop.in \
gdmflexiserver-xnest.desktop.in.in
System_DATA = $(System_files)
CLEANFILES = gdmsetup.desktop gdmsetup.desktop.in gdmflexiserver.desktop gdmflexiserver-xnest.desktop gdmflexiserver-xnest.desktop.in gdmphotosetup.desktop
gdmsetup.desktop.in: $(srcdir)/gdmsetup.desktop.in.in
sed -e 's,[@]sbindir[@],$(sbindir),g' <$(srcdir)/gdmsetup.desktop.in.in \
>gdmsetup.desktop.in
CLEANFILES = \
gdmflexiserver.desktop \
gdmflexiserver-xnest.desktop \
gdmflexiserver-xnest.desktop.in \
$(NULL)
@INTLTOOL_DESKTOP_RULE@
Gladedir = $(datadir)/gdm
Glade_DATA = gdmsetup.glade gdmchooser.glade gdmphotosetup.glade
Glade_DATA = \
gdmchooser.glade \
$(NULL)
Iconsdir = $(datadir)/pixmaps
......
......@@ -2,27 +2,27 @@
*
* GDM - The GNOME Display Manager
* Copyright (c) 2001 Queen of England
*
*
* GDMXnestChooser - run X nest with a chooser using xdmcp
*
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
*/
#include "config.h"
#include <glib/gi18n.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
......@@ -39,13 +39,14 @@
#include <X11/Xlib.h>
#include <X11/Xauth.h>
#include <glib/gi18n.h>
#include "gdm.h"
#include "gdmcomm.h"
#include "gdmcommon.h"
#include "gdmconfig.h"
#include "gdm-common.h"
#include "gdm-daemon-config-keys.h"
#include "gdm-settings-client.h"
#include "gdm-settings-keys.h"
static gchar **args_remaining;
static pid_t xnest_pid = 0;
......@@ -399,13 +400,14 @@ setup_cookie (int disp)
FILE *af;
Xauth *xa;
const char *filename = XauFileName ();
if (filename == NULL)
return;
if (XauLockAuth (filename, 3, 3, 0) != LOCK_SUCCESS)
return;
cookie = gdmcomm_get_a_cookie (TRUE /* binary */);
cookie = gdm_common_get_a_cookie (TRUE /* binary */);
if (cookie == NULL) {
XauUnlockAuth (filename);
return;
......@@ -500,16 +502,16 @@ main (int argc, char *argv[])
host = args_remaining[0];
g_strfreev (args_remaining);
/* Read config data in bulk */
gdmcomm_comm_bulk_start ();
if (! gdm_settings_client_init (GDMCONFDIR "/gdm.schemas", "/")) {
exit (1);
}
xdmcp_enabled = gdm_config_get_bool (GDM_KEY_XDMCP);
honor_indirect = gdm_config_get_bool (GDM_KEY_INDIRECT);
pidfile = GDM_PID_FILE;
xnest = gdm_config_get_string (GDM_KEY_XNEST);
gdm_settings_client_get_boolean (GDM_KEY_XDMCP, &xdmcp_enabled);
gdm_settings_client_get_boolean (GDM_KEY_INDIRECT, &honor_indirect);
xnest = NULL;
gdm_settings_client_get_string (GDM_KEY_XNEST, &xnest);
/* At this point we are done using the socket, so close it */
gdmcomm_comm_bulk_stop ();
pidfile = GDM_PID_FILE;
/* complex and wonderous way to get the exec vector */
execvec = make_us_an_exec_vector (xnest);
......
......@@ -54,12 +54,11 @@
#include "gdm.h"
#include "misc.h"
#include "gdmwm.h"
#include "gdmcomm.h"
#include "gdmcommon.h"
#include "gdmconfig.h"
#include "gdm-common.h"
#include "gdm-daemon-config-keys.h"
#include "gdm-settings-client.h"
#include "gdm-settings-keys.h"
static gboolean RUNNING_UNDER_GDM = FALSE;
......@@ -229,8 +228,10 @@ gdm_chooser_host_alloc (const char *hostname,
if ( ! willing)
return host;
hostimgdir = gdm_config_get_string (GDM_KEY_HOST_IMAGE_DIR);
gdm_settings_client_get_string (GDM_KEY_HOST_IMAGE_DIR, &hostimgdir);
hostimg = g_strconcat (hostimgdir, "/", hostname, NULL);
g_free (hostimgdir);
if (g_access (hostimg, R_OK) != 0) {
g_free (hostimg);
hostimg = g_strconcat (hostimgdir, "/", hostname, ".png", NULL);
......@@ -243,9 +244,8 @@ gdm_chooser_host_alloc (const char *hostname,
w = gdk_pixbuf_get_width (img);
h = gdk_pixbuf_get_height (img);
maxw = gdm_config_get_int (GDM_KEY_MAX_ICON_WIDTH);
maxh = gdm_config_get_int (GDM_KEY_MAX_ICON_HEIGHT);
gdm_settings_client_get_int (GDM_KEY_MAX_ICON_WIDTH, &maxw);
gdm_settings_client_get_int (GDM_KEY_MAX_ICON_HEIGHT, &maxh);
if (w > h && w > maxw) {
h = h * ((gfloat) maxw / w);
w = maxw;
......@@ -261,7 +261,7 @@ gdm_chooser_host_alloc (const char *hostname,
GDK_INTERP_BILINEAR);
else
host->picture = g_object_ref (G_OBJECT (img));
g_object_unref (G_OBJECT (img));
} else if (defhostimg != NULL) {
host->picture = (GdkPixbuf *)g_object_ref (G_OBJECT (defhostimg));
......@@ -760,6 +760,7 @@ gdm_chooser_find_mcaddr (void)
/* For interfaces' list */
struct ifconf ifc;
struct ifreq *ifr = NULL;
char *multicast;
sock = socket (AF_INET, SOCK_DGRAM, 0);
#ifdef SIOCGIFNUM
......@@ -778,18 +779,21 @@ gdm_chooser_find_mcaddr (void)
if (ioctl (sock, SIOCGIFCONF, &ifc) >= 0)
ifr = ifc.ifc_req;
num = ifc.ifc_len / sizeof (struct ifreq); /* No of interfaces */
gdm_settings_client_get_string (GDM_KEY_MULTICAST_ADDR, &multicast);
for (i = 0 ; i < num ; i++) {
struct ifreq ifreq;
int ifindex;
memset (&ifreq, 0, sizeof (ifreq));
strncpy (ifreq.ifr_name, ifr[i].ifr_name, sizeof (ifreq.ifr_name));
ifreq.ifr_name[sizeof (ifreq.ifr_name) - 1] = '\0';
if (ioctl (sock, SIOCGIFFLAGS, &ifreq) < 0)
gdm_common_error ("Could not get interface flags for %s\n", ifr[i].ifr_name);
gdm_common_error ("Could not get interface flags for %s\n", ifr[i].ifr_name);
ifindex = if_nametoindex (ifr[i].ifr_name);
if ((!(ifreq.ifr_flags & IFF_UP) || (!(ifreq.ifr_flags & IFF_MULTICAST))) || (ifindex == 0 )) {
/* Not a valid interface or Not up */
continue;
......@@ -799,12 +803,17 @@ gdm_chooser_find_mcaddr (void)
sin6->sin6_family = AF_INET6;
sin6->sin6_port = htons (XDM_UDP_PORT);
sin6->sin6_scope_id = ifindex;
inet_pton (AF_INET6, gdm_config_get_string (GDM_KEY_MULTICAST_ADDR),
inet_pton (AF_INET6,
multicast,
&sin6->sin6_addr);
/* bcaddr is also serving for multicast address for IPv6 */
bcaddr = g_slist_append (bcaddr, sin6);
}
g_free (multicast);
}
#endif
......@@ -928,6 +937,7 @@ void
gdm_chooser_xdmcp_discover (void)
{
GList *hl = chooser_hosts;
int scan_time;
g_free (added_host);
added_host = NULL;
......@@ -958,7 +968,9 @@ gdm_chooser_xdmcp_discover (void)
if (scan_time_handler > 0)
g_source_remove (scan_time_handler);
scan_time_handler = g_timeout_add (gdm_config_get_int (GDM_KEY_SCAN_TIME) * 1000,
gdm_settings_client_get_int (GDM_KEY_SCAN_TIME, &scan_time);
scan_time_handler = g_timeout_add (scan_time * 1000,
chooser_scan_time_update, NULL);
/* Note we already used up one try */
......@@ -1651,24 +1663,34 @@ gdm_chooser_gui_init (void)
gchar *defaulthosticon;
int width;
int height;
gboolean allow_add;
/* Enable theme */
if (RUNNING_UNDER_GDM) {
const char *theme_name;
char *theme_name;
char *gtkrc;
gdm_settings_client_get_string (GDM_KEY_GTKRC, &gtkrc);
if ( ! ve_string_empty (gdm_config_get_string (GDM_KEY_GTKRC)))
gtk_rc_parse (gdm_config_get_string (GDM_KEY_GTKRC));
if ( ! ve_string_empty (gtkrc))
gtk_rc_parse (gtkrc);
g_free (gtkrc);
theme_name = g_getenv ("GDM_GTK_THEME");
if (ve_string_empty (theme_name))
theme_name = gdm_config_get_string (GDM_KEY_GTK_THEME);
theme_name = g_strdup (g_getenv ("GDM_GTK_THEME"));
if (ve_string_empty (theme_name)) {
gdm_settings_client_get_string (GDM_KEY_GTK_THEME, &theme_name);
}
if ( ! ve_string_empty (theme_name)) {
gdm_set_theme (theme_name);
}
g_free (theme_name);
}
defaulthosticon = gdm_config_get_string (GDM_KEY_DEFAULT_HOST_IMG);
defaulthosticon = NULL;
gdm_settings_client_get_string (GDM_KEY_DEFAULT_HOST_IMG, &defaulthosticon);
/* Load default host image */
if (g_access (defaulthosticon, R_OK) != 0) {
......@@ -1683,6 +1705,8 @@ gdm_chooser_gui_init (void)
defhostimg = gdk_pixbuf_new_from_file (defaulthosticon, NULL);
}
g_free (defaulthosticon);
/* Main window */
chooser_app = glade_xml_new (GDM_GLADE_DIR "/gdmchooser.glade",
"gdmchooser_main",
......@@ -1732,8 +1756,8 @@ gdm_chooser_gui_init (void)
CHOOSER_LIST_LABEL_COLUMN,
GTK_SORT_ASCENDING);
if ( ! gdm_config_get_bool (GDM_KEY_ALLOW_ADD)) {
gdm_settings_client_get_boolean (GDM_KEY_ALLOW_ADD, &allow_add);
if ( ! allow_add) {
GtkWidget *w = glade_xml_get_widget (chooser_app, "add_hbox");
gtk_widget_hide (w);
}
......@@ -1769,93 +1793,6 @@ gdm_chooser_gui_init (void)
}
}
/*
* If new configuration keys are added to this program, make sure to add the
* key to the gdm_read_config and gdm_reread_config functions.
*/
static gboolean
gdm_read_config (void)
{
/* Read config data in bulk */
gdmcomm_comm_bulk_start ();
/*
* Read all the keys at once and close sockets connection so we do
* not have to keep the socket open.
*/
gdm_config_get_string (GDM_KEY_HOSTS);
gdm_config_get_string (GDM_KEY_GTKRC);
gdm_config_get_string (GDM_KEY_GTK_THEME);
gdm_config_get_string (GDM_KEY_DEFAULT_HOST_IMG);
gdm_config_get_string (GDM_KEY_HOST_IMAGE_DIR);
gdm_config_get_string (GDM_KEY_MULTICAST_ADDR);
gdm_config_get_string (GDM_KEY_BACKGROUND_COLOR);
gdm_config_get_int (GDM_KEY_XINERAMA_SCREEN);
gdm_config_get_int (GDM_KEY_MAX_ICON_WIDTH);
gdm_config_get_int (GDM_KEY_MAX_ICON_HEIGHT);
gdm_config_get_int (GDM_KEY_SCAN_TIME);
gdm_config_get_int (GDM_KEY_BACKGROUND_TYPE);
gdm_config_get_bool (GDM_KEY_ALLOW_ADD);
gdm_config_get_bool (GDM_KEY_BROADCAST);
gdm_config_get_bool (GDM_KEY_MULTICAST);
gdmcomm_comm_bulk_stop ();
return FALSE;
}
static gboolean
gdm_reread_config (int sig, gpointer data)
{
/* reparse config stuff here. At least ones we care about */
/* Read config data in bulk */
gdmcomm_comm_bulk_start ();
/* FIXME: The following is evil, we should update on the fly rather
* then just restarting */
/* Also we may not need to check ALL those keys but just a few */
if (gdm_config_reload_string (GDM_KEY_HOSTS) ||
gdm_config_reload_string (GDM_KEY_GTKRC) ||
gdm_config_reload_string (GDM_KEY_GTK_THEME) ||
gdm_config_reload_string (GDM_KEY_DEFAULT_HOST_IMG) ||
gdm_config_reload_string (GDM_KEY_HOST_IMAGE_DIR) ||
gdm_config_reload_string (GDM_KEY_MULTICAST_ADDR) ||
gdm_config_reload_int (GDM_KEY_XINERAMA_SCREEN) ||
gdm_config_reload_int (GDM_KEY_MAX_ICON_WIDTH) ||
gdm_config_reload_int (GDM_KEY_MAX_ICON_HEIGHT) ||
gdm_config_reload_int (GDM_KEY_SCAN_TIME) ||
gdm_config_reload_bool (GDM_KEY_ALLOW_ADD) ||
gdm_config_reload_bool (GDM_KEY_BROADCAST) ||
gdm_config_reload_bool (GDM_KEY_MULTICAST)) {